@soma-vertical-web/multi-lib 1.0.7 → 1.0.9
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/cms/Sections/ProductCarousel/Composite/CommonShelf.d.ts +1 -1
- package/cms/Sections/ProductCarousel/ProductCarousel.d.ts +1 -1
- package/cms/index.d.ts +1 -1
- package/index-CKV97AXT.js +4 -0
- package/index-DwDBLrtu.mjs +1822 -0
- package/index.js +4 -4
- package/index.mjs +78 -62
- package/index2.js +1 -1
- package/index2.mjs +1 -1
- package/layout/template/SearchModal/Composite/Recommendations.d.ts +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/cms/Sections/ProductCarousel/index.d.ts +2 -0
- package/types/cms/Sections/SectionZone/index.d.ts +1 -0
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var em=Object.defineProperty;var tm=(e,t,n)=>t in e?em(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tn=(e,t,n)=>tm(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),T=require("./index-DvhdPe3b.js"),Ze=require("idb-keyval"),xt=require("zustand"),Ur=require("js-cookie"),d=require("@soma-vertical-web/core-components"),ht=require("axios"),Hr=require("@date-fns/tz"),nm=require("jose"),wt=require("@soma-vertical-web/foundations"),ls=require("react-dom"),Ye=require("draft-js"),_a=require("react-intersection-observer"),us=g.createContext({}),rm=({data:e,children:t})=>r.jsx(us.Provider,{value:{tags:e==null?void 0:e.config},children:t}),mt=()=>{const{tags:e}=g.useContext(us),t=g.useCallback(n=>{var c,l,u,m;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(h=>{var p;return(p=n??[])==null?void 0:p.find(f=>f.id===h.key)}),o=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(h=>{var p;return(p=n??[])==null?void 0:p.find(f=>f.id===h.key)}),a=e==null?void 0:e.flagPdp,i=(n==null?void 0:n.find(h=>{var p;return h.id===((p=e==null?void 0:e.flagGoldenPdp)==null?void 0:p.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},ga=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},ya=g.createContext({}),sm=({children:e,gridScrollBack:t})=>{const n=g.useRef(null);return ga({gridScrollBack:t}),r.jsx(ya.Provider,{value:{sizesContainerRef:n},children:e})},va=()=>{const e=g.useContext(ya);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},it=({event:e,data:t})=>{const n=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&n.push({ecommerce:null}),n.push({...e&&{event:`custom_${e}`},...t})},Ce={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:n,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,h={...n==="view_item"?{currency:Ce.configs.currency,value:m,grade_disponivel:l??(u?xa(u):"")}:{},...n==="add_to_wishlist"||n==="remove_from_wishlist"?{value:m,currency:Ce.configs.currency}:{}},p=nn({data:s,customData:{...o,...i,...a},configs:Ce.configs});it({event:n,data:{...c,ecommerce:{...i,...h,items:[p]}}}),typeof t=="function"&&t(p,h)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:n,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>nn({data:{...c},customData:{...n,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Ce.configs}));it({event:"view_item_list",data:{...o,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:n},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=n.map(h=>{var y,v,b,C,j,x,P,S,E;const p=o==null?void 0:o.find(I=>(h.productId??h.id)===I.productId);let f={...i,...c};if(p){const I=ja(),A=Ca(I,p);A&&(f={...f,...A}),t==="add_to_cart"&&(i||c)&&qr({persistedData:I,type:"add",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&qr({persistedData:I,type:"remove",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)})}u+=h.price??((b=(v=(y=p==null?void 0:p.offers)==null?void 0:y.offers)==null?void 0:v[0])==null?void 0:b.price)??0;const _=(p==null?void 0:p.size)??T.getColorAndSizeFromSkuName((p==null?void 0:p.skuName)??(p==null?void 0:p.name)??((C=h.itemOffered)==null?void 0:C.skuName),Ce.configs.NAME_SPLIT_SYMBOL).size;return nn({data:h,customData:{...s,...f??{...i,...c},item_sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)??((j=h.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??h.quantity??1,item_variant2:_,seller_id:(p==null?void 0:p.sellerId)??(p==null?void 0:p.seller)??((E=(S=(P=(x=p==null?void 0:p.offers)==null?void 0:x.offers)==null?void 0:P[0])==null?void 0:S.seller)==null?void 0:E.identifier)??h.seller},configs:Ce.configs})});it({event:t,data:{...l,ecommerce:{value:a??u,currency:Ce.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:n,outsideEcommerceData:s}=e,o={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var h;const u=((h=Ce.configs.PLP_FILTERS.find(p=>p.key===c))==null?void 0:h.eventLabel)??c,m=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...m,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),it({event:"filter",data:{...s,...a,...n}})},viewCartEvent:e=>{var m,h,p,f,_,y,v,b,C,j;const{commonData:t,outsideEcommerceData:n}=e,{cartStore:s}=t;if(!s)return;const o=window.localStorage.getItem("persistedCartEventsData"),a=o?JSON.parse(o):{},i=s.items.map(x=>{const{promotionInfo:P,itemList:S}=a[x.id]??{};return nn({data:{...x,price:x.price/100,listPrice:x.listPrice/100},customData:{...P,...S,item_sku:x.id??x.itemOffered.sku,quantity:x.quantity??1},configs:Ce.configs})}),c=(((m=s.totalizers.find(x=>x.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((h=s.totalizers.find(x=>x.name==="Total dos Descontos"))==null?void 0:h.value)??0)/100,u=((p=s.marketingData)==null?void 0:p.utmiCampaign)===Ce.configs.VENDOR_CODE?(f=s.marketingData)==null?void 0:f.utmCampaign:(y=String((_=s.openTextField)==null?void 0:_.value))==null?void 0:y.split(" - ")[0];it({event:"view_cart",data:{...n,ecommerce:{currency:Ce.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((b=(v=s.shippingData)==null?void 0:v.address)!=null&&b.postalCode),...u?{seller_coupon_name:u}:{},...((C=s.marketingData)==null?void 0:C.coupon)&&{sale_coupon_name:(j=s.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:n}=e;it({event:t,data:{...n}})}},xa=e=>e.reduce((t,n)=>(n.available&&t.push(n.value),t),[]).toString(),om=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Ce.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},nn=({data:e,customData:t,configs:n})=>({...am(e,n==null?void 0:n.MAIN_IMAGE),...im(e),...cm(e),...lm(e),...t}),ba=()=>{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("_"))??[]:[]},ja=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Ca=(e,t)=>e==null?void 0:e[t],qr=({persistedData:e,type:t,sku:n,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[n]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[n]:s}));return}e&&t==="remove"&&(delete e[n],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},am=(e,t="1")=>{var a,i,c,l,u,m,h,p,f,_,y;const n=e.productReference??e.gtin??e.productRefId,s=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),o=s==null?void 0:s.find(v=>v.alternateName===t||v.imageLabel===t||v.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((h=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:h.productGroupID),item_ref:/_\d$/.test(n)?n.slice(0,-2):n,item_name:e.productTitle??e.productName??e.name??T.splitNameAndSizeFromFullName((p=e.itemOffered)==null?void 0:p.name,Ce.configs.NAME_SPLIT_SYMBOL).name,item_brand:((f=e.brand)==null?void 0:f.brandName)??((_=e.brand)==null?void 0:_.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${Ce.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},Xs=e=>Array.isArray(e)?e.reduce((t,n)=>(n.length>t.length&&(t=n),t),""):e,im=e=>{var u,m;const{categories:t,categoriesIds:n}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=n??((m=e.itemOffered)==null?void 0:m.categoriesIds),a=Xs(s),i=Xs(o),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Ce.configs.categoryOff)?"Bazar":"Coleção",...c[1]&&{item_category2:c[1]},...c.length>2&&{item_category3:c[c.length-1]},item_category_id:l[l.length-1],...l.length>1&&{item_parent_category_id:l[l.length-2]}}},cm=e=>{var o,a,i,c,l,u;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:n,size:s}=T.getColorAndSizeFromSkuName(t,Ce.configs.NAME_SPLIT_SYMBOL);return{item_variant:n,...e.itemOffered&&{item_variant2:s}}},lm=e=>{var l,u;const{price:t,listPrice:n,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=n??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-o:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:o??a},...a&&{list_price:a,discount:c},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Ce.configs.currency}},Sa=()=>{const[e,t]=ba(),[n,s]=e.split("-"),o=n.includes("shop")||n.includes("sale")?n:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},um=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Ce,findDataInPersistedData:Ca,getAvailablesSizes:xa,getCategories:om,getPageCategoryAndDepartmentFromSlug:Sa,getPersistedData:ja,getProductListInfoFromHead:ba,pushDatalayer:it,updatePersistedData:qr},Symbol.toStringTag,{value:"Module"})),Ea=g.createContext({}),dm=({children:e,evtFunctionsConfigs:t})=>{const n=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:m,data:h,callBack:p,timeout:f=100})=>{window.dataLayer||(window.dataLayer=[]),Ce.configs=t;try{typeof Ce[m]=="function"&&setTimeout(()=>{var _;h.promotionInfo=n.current,(_=o.current)!=null&&_.item_list_name&&(h.itemList=o.current),Ce[m](h,p)},f)}catch(_){it({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:m})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:m.replace("::",":")}}})},u=({updatePromotionRef:m,promotion:h,index:p})=>{m&&(n.current={...h}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...h,...p!==void 0&&{index:p}}}}})};return r.jsx(Ea.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:n,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},oe=()=>g.useContext(Ea),Pa=g.createContext({}),mm=({children:e,productData:t,isKit:n,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var D,U;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=oe(),{productId:l,productName:u,items:m,items:[{images:h,Videos:p}],description:f,["Composição"]:_="",productReference:y,categories:[v]}=t,{getAvailableProductTag:b}=mt(),C=b(Object.entries(t.clusterHighlights).map(F=>({id:F[0],name:F[1]}))),j=v.slice(1,-1).split("/"),{installments:x,price:P,listPrice:S,sizes:E,allSizesAvailable:I}=T.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:o}),A=T.getThumbImage({images:h,TEXTURE_IMAGE:a}),O=[{label:`${s.product.description}`,value:"description",content:f},{label:`${s.product.materiais}`,value:"composition",content:_}],L=((U=T.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,o))==null?void 0:U.color)??t["Cores Filtráveis"][0]??"",M=()=>({commonData:{...t,sizes:E,price:P,listPrice:S,installments:x},customData:{installments:x==null?void 0:x.count,installment_value:Number(x==null?void 0:x.value).toFixed(2)}}),Q=({sku:F,size:Y})=>{const{commonData:G,customData:H}=M();i({functionKey:"productEvents",data:{event:"view_item",commonData:G,customData:{...H,...F&&{item_sku:F},...Y&&{item_variant2:Y}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:F,customData:Y}=M();i({functionKey:"productEvents",data:{event:"select_item",commonData:F,customData:{...Y,index:c.current.index}}}),c.current.trigger=!1}Q({})},[]),r.jsx(Pa.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:m,sizes:E,allSizesAvailable:I,installments:x,price:P,listPrice:S,thumbImage:A,images:h,video:p[0],descriptionContent:O,breadcrumbList:j,isKit:n,colorName:L,handleViewItemEvent:Q},children:e})},Le=()=>{const e=g.useContext(Pa);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},pm=()=>{const[e,t]=g.useState(null);return[e,async s=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(s),t(s),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},Na=()=>{g.useEffect(()=>{const e=t=>{t.preventDefault()};return document.addEventListener("gesturestart",e),document.addEventListener("gesturechange",e),document.addEventListener("dblclick",e),document.addEventListener("wheel",t=>{t.ctrlKey&&e(t)}),()=>{document.removeEventListener("gesturestart",e),document.removeEventListener("gesturechange",e),document.removeEventListener("dblclick",e),document.removeEventListener("wheel",e)}},[])},fm=typeof window>"u",hm=(e,t)=>{const[n,s]=g.useState(()=>{if(fm)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return g.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&s(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[n,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function ds(e,t,n){const[s,o]=g.useState(!1),{threshold:a}=n||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(n!=null&&n.delay){i&&clearTimeout(i),i=setTimeout(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},n.delay);return}o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),s}const An=({callback:e,onEnterViewportOnce:t,options:n})=>{const s=g.useRef(null);return g.useEffect(()=>{const o=s.current;if(!o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(o),a.disconnect()))},n);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,n]),{element:s}},Ia=({defaultScale:e=1,maxScale:t=3})=>{const n=g.useRef(null),s=g.useRef(null),[o,a]=g.useState(e),i=g.useRef(0),c=g.useRef({x:0,y:0}),l=g.useRef({x:0,y:0}),u=()=>{if(!s.current||!n.current)return{minX:0,maxX:0,minY:0,maxY:0};const f=n.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,v=_.height,b=Math.min(0,(f.width-y)/2),C=Math.max(0,(y-f.width)/2),j=Math.min(0,(f.height-v)/2),x=Math.max(0,(v-f.height)/2);return{minX:b,maxX:C,minY:j,maxY:x}},m=(f,_,y)=>{if(s.current){const v=s.current.children[0];v&&requestAnimationFrame(()=>{v.style.transform=`translate(calc(-50% + ${f}px), calc(-50% + ${_}px)) scale(${y})`})}},h=g.useCallback(f=>{const{minX:_,maxX:y,minY:v,maxY:b}=u(),{x:C,y:j}=l.current,x=Math.max(_,Math.min(y,C)),P=Math.max(v,Math.min(b,j));if(f.touches.length>1){const S=f.touches[0],E=f.touches[1],I=S.pageX-E.pageX,A=S.pageY-E.pageY;i.current=Math.sqrt(I*I+A*A),c.current={x:(S.pageX+E.pageX)/2,y:(S.pageY+E.pageY)/2}}else f.touches.length===1&&(c.current={x:f.touches[0].pageX-x,y:f.touches[0].pageY-P})},[o,l]),p=g.useCallback(f=>{if(!s.current||!n.current)return;const{minX:_,maxX:y,minY:v,maxY:b}=u();if(f.touches.length>1){f.preventDefault();const C=f.touches[0],j=f.touches[1],x=C.pageX-j.pageX,P=C.pageY-j.pageY,S=Math.sqrt(x*x+P*P);if(!i.current){i.current=S;return}const E=S/i.current,I=Math.max(1,Math.min(t,o*E));if(o===I)return;a(I);const A=(C.pageX+j.pageX)/2,O=(C.pageY+j.pageY)/2;let L=A-c.current.x,M=O-c.current.y;L=Math.max(_,Math.min(y,L)),M=Math.max(v,Math.min(b,M)),l.current={x:L,y:M},i.current=S,m(L,M,I)}else if(f.touches.length===1){const C=f.touches[0].pageX,j=f.touches[0].pageY;let x=C-c.current.x,P=j-c.current.y;x=Math.max(_,Math.min(y,x)),P=Math.max(v,Math.min(b,P)),l.current={x,y:P},m(x,P,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",h),document.addEventListener("touchmove",p,{passive:!1}),()=>{document.removeEventListener("touchstart",h),document.removeEventListener("touchmove",p)}),[p,h]),{containerRef:n,imgRef:s,scale:o}},_m={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},qe=Promise.resolve(!1),Vr={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>qe,addItem:()=>qe,addSellerCode:()=>qe,addMarketingData:()=>qe,emptyCart:()=>({}),removeItem:()=>qe,setIsOpen:()=>({}),shipping:()=>qe,shippingUpdate:()=>qe,toggleServiceToProduct:()=>qe,updateItemQuantity:()=>qe,insertProfileEmail:()=>qe,setRecentlyAddedProducts:()=>({})},ms=e=>e===0,wa=(e,t)=>{if(!e||e.length===0)return[];let n="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(n+=(n?"/":"")+i,s.push(n))}return s},Ra=(e,t)=>{const{availability:n,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:m,listPrice:h,quantity:p,price:f,priceDefinition:_,productCategories:y,productCategoryIds:v,productId:b,refId:C,seller:j,referenceId:x,offerings:P,productRefId:S,skuName:E,sellingPrice:I}=e;return{availability:n,bundleItems:o,referenceId:x,productRefId:S,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:wa(v,y),categoriesIds:v,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:m,isVariationOf:{name:m,productGroupID:b},sku:a,slug:c,skuName:E},listPrice:h,quantity:p,offerings:P,price:f,priceDefinition:_,sellingPrice:I,seller:j}},Aa=(e,t)=>{const n=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...n,...t]:[...n,t]},Ta=(e,t)=>{const n=e.find(s=>s.id===t);if(n){const s=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(n==null?void 0:n.id)===((c=o.itemOffered)==null?void 0:c.sku)?0:o.quantity,seller:o.seller??""}});return{updateItems:s,filterItems:s.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},Oa=(e,t,n)=>e.filter(s=>s.availability!=="withoutStock"&&s.availability!=="https://schema.org/OutOfStock").map((s,o)=>{var a,i;return s.id===t?{id:s.id,index:o,quantity:n,seller:s.seller,sku:((a=s.itemOffered)==null?void 0:a.sku)??""}:{id:s.id,index:o,quantity:s.quantity,seller:s.seller,sku:((i=s.itemOffered)==null?void 0:i.sku)??""}}),Wr=(e,t)=>e.filter(n=>n.availability!=="withoutStock").findIndex(({id:n})=>n===t),gm=(e,t)=>{var n;return Array.isArray(e)?(((n=e==null?void 0:e.find(s=>{var o;return((o=s==null?void 0:s.id)==null?void 0:o.toLowerCase())===t}))==null?void 0:n.value)??0)/100:0},ym=e=>{const t=e.reduce((o,a)=>{const i=ms(a.price)?0:a.quantity;return o+i},0),n=e.reduce((o,a)=>o+a.price*a.quantity,0),s=e.reduce((o,a)=>o+a.listPrice*a.quantity,0);return{totalItems:t,total:n,subTotal:s}},vm=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,n)=>t+(ms(n==null?void 0:n.price)?0:n.quantity),0):0,La=(e,t)=>{const{items:n,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(n)?n.map(a=>Ra(a,t)):[]}},ka=(e,t)=>{const n=e.find(s=>s.id===t);return n?n.availability==="unavailableItemFulfillment":!1},xm=(e,t)=>{const n=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===n);return s?s.name.split(t)[1]:"--"},Pt=(e,t,n=!1)=>!e&&t!==""?{code:300,value:t,statusOk:n}:e===t?{code:200,value:t,statusOk:n}:{code:400,value:t,statusOk:n},bm=(e,t)=>{const n=new Set;return[e,...t].filter(s=>!n.has(s)&&n.add(s),n)},Ma=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),Da=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),$a=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},za=(e,t)=>{if(t!==-1){const n=Number(e);return n?n+1:1}return e??1},Fa=(e,t)=>Array.isArray(e)?e.filter(n=>t==null?void 0:t.some(s=>s.id===n.id)):[],Ba=async(e,t)=>e.then(n=>[...n??[],...t??[]]),Te=async(e,t,n,s)=>{const{priority:o="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:o,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return n?c:La(c,s)})},Ua=(e,t,n)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:n}]}),Ha=e=>[...Array.isArray(e)?e:[e],"faststore"],qa=e=>{const t=e.get("utm_source")||ft("utm_source"),n=e.get("utm_campaign")||ft("utm_campaign"),s=e.get("utm_medium")||ft("utm_medium"),o=e.get("utmi_cp")||ft("utmi_cp"),a=e.get("utmi_pc")||ft("utmi_pc"),i=e.get("utmi_p")||ft("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...n&&{utmCampaign:n},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},ft=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=n.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},Va=(e,t,n="BR")=>{const s=t,o={country:n,addressType:"",postalCode:e||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(s){const a=typeof s=="object"&&"latitude"in s?s.latitude:null,i=typeof s=="object"&&"longitude"in s?s.longitude:null;o.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[o]},jm=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:_m,addItemOrder:Aa,addNotification:Ua,createItemOrder:Ra,createNewAddress:Va,fetchCartAPI:Te,findItemIndex:Wr,findOptions:Fa,findTotalizerValue:gm,getCategories:wa,getCode:Pt,getQuantity:za,getRemoveId:Ma,getSize:xm,getTotalItems:vm,getTotalizer:ym,getUrlParameter:ft,getValue:Da,initialState:Vr,isGift:ms,marketingTagsBuilder:Ha,mergeOptionsPromise:Ba,mountMarketingData:qa,orderFormValues:La,promiseDefault:qe,removeQuantity:Ta,updateItemSellerExternal:ka,updateOrderFormPromise:$a,updateQuantity:Oa,wishlistArray:bm},Symbol.toStringTag,{value:"Module"})),Cm=()=>{const e=async(f,_)=>Te("/api/checkout/order-form/coupon",{body:{orderFormId:f,coupon:_}}),t=async(f,_,y={},v)=>{if(v)if(_){const b=_.includes(" - ")?_.split(" - ")[0]:_,C=await Te("/api/checkout/order-form/seller-code",{body:{orderFormId:f,sellerCode:b}},!0);return C instanceof Object&&y.name in C&&C[y.status]===!0?Te("/api/checkout/order-form/attachments",{body:{orderFormId:f,sellerCode:b,sellerName:C[y.name]}}).then(x=>({...x,openTextField:{...(x==null?void 0:x.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:b}})}else return Te("/api/checkout/order-form/attachments",{body:{orderFormId:f,sellerCode:"",sellerName:""}})},n=async(f,_)=>Te("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:f,marketingData:_}}),s=async(f,_,y)=>Te("/api/checkout/order-form/items",{body:{orderFormId:f,orderItems:Aa(_,y)}}),o=async(f,_,y,v=!1)=>Te("/api/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:f,remove:v}}),a=async f=>Te("/api/checkout/order-form/items/remove-all",{body:{orderFormId:f}}),i=async(f,_="low")=>Te("/api/checkout/order-form",{priority:_,body:{orderFormId:f??""}}),c=async(f,_)=>Te("/api/checkout/order-form/profile",{body:{orderFormId:f,email:_}}),l=async(f,_,y)=>{const v=Ta(_,y);return Te("/api/checkout/order-form/items/update",{body:{orderItems:v.updateItems,orderFormId:f}})},u=async(f,_,y,v,b,C,j)=>{var S,E;const x=j?{startDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.startDate,endDateUtc:(E=C==null?void 0:C.deliveryWindow)==null?void 0:E.endDate}:null,P={logisticsInfo:Array.from({length:v},(I,A)=>({itemIndex:A,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:x})),selectedAddresses:b,clearAddressIfPostalCodeNotFound:!0};return Te("/api/checkout/order-form/shipping",{body:{...P,orderFormId:f,country:y,postalCode:_}})},m=async(f,_,y)=>Te("/api/checkout/order-form/shipping/update",{body:{orderFormId:f,options:_,selectedAddresses:y}}),h=async(f,_,y,v)=>{const b=Oa(_,y,v);return Te("/api/checkout/order-form/items/update",{body:{orderFormId:f,orderItems:b}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:n,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(f,_,y,v,b)=>h(f,_,y,v).then(C=>C&&Array.isArray(C.items)?ka(C.items,y)?h(f,_,y,b):C:!1)}},Gr="soma::cart",$t="soma::options",gt=xt.create((e,t)=>{const n=Cm(),s=async(o,a,i)=>{e({loading:!0});const c=await $a(o);if(typeof c!="boolean"){e({...c});const l=await Ba(Ze.get($t),i);return Ze.set($t,l),Da(c,a).finally(()=>e({loading:!1,options:l}))}return qe};if(typeof window<"u"){const o=async a=>{if(a){const i=await Ze.get($t).then(u=>Fa(u,a.items));Ze.set(Gr,a),Ze.set($t,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>n.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Ze.get(Gr).then(a=>n.getOrderForm(a?a.id:"").then(o)),{...Vr,addCoupon:async a=>s(()=>n.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>n.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>n.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>n.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>n.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>n.removeItem(t().id,t().items,a),"items");return Ma(a,i)},shipping:async(a,i="BR")=>s(()=>n.shipping(t().id,a??"",i,t().items.length,Va(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return n.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>n.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return n.updateItemQuantity(l,u,a,i,((m=u.find(h=>h.id===a))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>n.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return Vr}),Sm=()=>gt(e=>e),Wa=xt.create(e=>({notifications:[],actions:{addNotification:(t,n)=>e(s=>Ua(s,t,n)),removeNotification:t=>e(n=>({notifications:n.notifications.filter(s=>s.id!==t)}))}})),ps=()=>Wa(e=>e.notifications),fs=()=>Wa(e=>e.actions),Em=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:$t,KEY_INDEXED_STORE:Gr,useCartStore:gt,useGetCartStoreState:Sm,useGetNotificationActions:fs,useGetNotificationsStore:ps},Symbol.toStringTag,{value:"Module"})),Pm=6e3,Ga=g.createContext({}),Ka=({children:e,...t})=>{const{items:n}=gt(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>n.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[n,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},Pm))},[s]),r.jsx(Ga.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},Vt=()=>{const e=g.useContext(Ga);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Xa{constructor(){tn(this,"events",{});tn(this,"prevData",{})}subscribe(t,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n),()=>{this.events[t]=this.events[t].filter(s=>s!==n)}}publish(t,n){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=n,s(n)})}}const Ya=g.createContext({}),Nm=({children:e,headerConfigs:t,pathname:n,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=n==="/",u=g.useRef(new Xa),m=f=>f?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},h=m(l),p=g.useRef(h);return g.useEffect(()=>{var y;const f=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(f.includes("utm_")||f.includes("gclid"))&&(Ur.get("lastMedias")||Ur.set("lastMedias",`${f}`,{expires:1/24}));const _=()=>{const v=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,b=window.innerWidth<1024||!!v.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),o!==b&&(a(b),c(!0))};return i||_(),window.addEventListener("resize",_,{passive:!0}),()=>window.removeEventListener("resize",_)},[o,i]),g.useEffect(()=>{const f=m(l);u.current.publish("header:change_variant",f.headerVariant),u.current.publish("header:change_position",f.position),p.current=f},[l]),r.jsx(Ya.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:p,deviceValidated:i,...s},children:r.jsx(Ka,{children:e})})},ne=()=>g.useContext(Ya),Qa=g.createContext({}),Im=({children:e,...t})=>r.jsx(Qa.Provider,{value:{...t},children:e}),ce=()=>g.useContext(Qa),bt=(e,t)=>xt.create(n=>{const s=()=>n({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>n({value:o}),reset:s}}}),Ht={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Wt=new Set,wm=()=>{Wt.forEach(e=>{e()})},Za=xt.create((e,t)=>{const n=()=>e({value:Ht.category});return Wt.add(n),{value:Ht.category,actions:{reset:n,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),Ja=()=>Za(e=>e.value),Gt=()=>Za(e=>e.actions),ei=bt(Ht.menuMobileIsOpen,Wt),ti=()=>ei(e=>e.value),ni=()=>ei(e=>e.actions),ri=bt(Ht.searchModalIsOpen,Wt),si=()=>ri(e=>e.value),Tn=()=>ri(e=>e.actions),oi=bt(Ht.userMenuIsOpen,Wt),hs=()=>oi(e=>e.value),_s=()=>oi(e=>e.actions),Rm=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:wm,useActionsHeaderCategory:Gt,useActionsMenuMobileIsOpen:ni,useActionsSearchModalIsOpen:Tn,useActionsUserMenuIsOpen:_s,useGetHeaderCategoryStore:Ja,useGetMenuMobileIsOpen:ti,useGetSearchModalIsOpen:si,useGetUserMenuIsOpen:hs},Symbol.toStringTag,{value:"Module"})),Tt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Ot=new Set,Am=()=>{Ot.forEach(e=>{e()})},ai=xt.create(e=>{const t=()=>e({value:Tt.selectedSkuInfo});return Ot.add(t),{value:Tt.selectedSkuInfo,actions:{setValue:n=>e(s=>({value:{...s,...n}})),reset:t}}}),Kt=()=>ai(e=>e.value),ii=()=>ai(e=>e.actions),ci=bt(Tt.openLetMeKnow,Ot),Tm=()=>ci(e=>e.value),Om=()=>ci(e=>e.actions),li=bt(Tt.showNotify,Ot),ui=()=>li(e=>e.value),gs=()=>li(e=>e.actions),di=bt(Tt.showBottomNavigation,Ot),Lm=()=>di(e=>e.value),km=()=>di(e=>e.actions),mi=bt(Tt.openMeasurements,Ot),pi=()=>mi(e=>e.value),fi=()=>mi(e=>e.actions),Mm=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Am,useActionsPDPOpenLetMeKnow:Om,useActionsPDPOpenMeasurements:fi,useActionsPDPSelectedSkuInfo:ii,useActionsPDPShowBottomNavigation:km,useActionsPDPShowNotify:gs,useGetPDPOpenLetMeKnow:Tm,useGetPDPOpenMeasurements:pi,useGetPDPSelectedSkuInfo:Kt,useGetPDPShowBottomNavigation:Lm,useGetPDPShowNotify:ui},Symbol.toStringTag,{value:"Module"})),Ys={feedback:{active:!1,action:"add"},list:[]},ys=xt.create((e,t)=>({value:Ys,actions:{reset:()=>e({value:Ys}),setValue:s=>e(()=>({value:s})),toggleProduct:s=>e(o=>o.value.list.includes(s)?{value:{feedback:{active:!0,action:"remove"},list:o.value.list.filter(a=>a!==s)}}:{value:{feedback:{active:!0,action:"add"},list:[...o.value.list,s]}}),updateList:s=>e(o=>({value:{...o.value,list:s}})),resetFeedback:()=>e(s=>({value:{...s.value,feedback:{active:!1,action:""}}}))}})),Lt=()=>ys(e=>e.value.list),vs=()=>ys(e=>e.value.feedback),jt=()=>ys(e=>e.actions),Dm=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:jt,useGetWishlistFeedbackStore:vs,useGetWishlistStore:Lt},Symbol.toStringTag,{value:"Module"})),hi=g.createContext({}),$m=({children:e,headerData:t,...n})=>{var m,h;const s=g.useRef(null),o=g.useRef(null),a=g.useRef(null),i=g.useRef(null),c=g.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=ne();return(m=l.current)==null||m.subscribe("header:change_variant",p=>{var b,C,j;if(p&&u.current&&(u.current.bannerVariant=p),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),v=_?y:p??((b=u.current)==null?void 0:b.bannerVariant)??"default";v!==((C=u.current)==null?void 0:C.headerVariant)&&(s.current.setAttribute("data-bottomdivider",String(_)),s.current.setAttribute("data-variant",String(v)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",v),u.current&&(u.current.headerVariant=v))}),(h=l.current)==null||h.subscribe("header:change_position",p=>{s.current&&(s.current.style.position=p)}),g.useEffect(()=>{const p=new AbortController,f=d.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:p.signal});const _=y=>{var b;(b=y.target.closest("a"))==null||b.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:p.signal}),s.current.addEventListener("touchend",_,{signal:p.signal})),()=>{p.abort()}},[]),r.jsx(hi.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...n},children:e})},Ee=()=>g.useContext(hi),_i=g.createContext({}),gi=({children:e,...t})=>r.jsx(_i.Provider,{value:g.useMemo(()=>t,[t]),children:e}),xs=()=>{const e=g.useContext(_i);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},zm=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Fm=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?zm(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+n}},yi=g.createContext({}),vi=({children:e,delay:t=600,gap:n=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,m]=g.useState({left:0,top:0}),h=g.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return g.useEffect(()=>{if(typeof window>"u")return;const p=window.document.querySelector("#cart-button"),f=window.document.querySelector("#add-to-cart--tooltip");if(p&&f){const{left:_,top:y}=Fm(f,p,n??0);m({left:_,top:y}),l(!1)}},[n,o]),r.jsx(yi.Provider,{value:g.useMemo(()=>({...s,...u,handleClose:h,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[s,u,h,c,o,a,l]),children:e})},Ct=()=>{const e=g.useContext(yi);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},xi=g.createContext({}),Bm=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:n,data:s,...o})=>{var re,le,se,ie;const a=gt(),{setRecentlyAdded:i}=Vt(),c=g.useRef(""),l=ps(),{addNotification:u,removeNotification:m}=fs(),[h,p]=g.useState(null),{addCoupon:f,addItem:_,addSellerCode:y,addMarketingData:v,emptyCart:b,isOpen:C,removeItem:j,shipping:x,shippingUpdate:P,toggleServiceToProduct:S,updateItemQuantity:E}=a;g.useEffect(()=>{(async()=>{var w,W;if(!a.id||!((W=(w=s==null?void 0:s.promotion)==null?void 0:w.promotionCart)!=null&&W.idPromotion))return;const J=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:a.id,promotionId:s.promotion.promotionCart.idPromotion,web:(s==null?void 0:s.promotion.promotionCart.versionAPI)==="Original"})}).then(ae=>ae.json());p(J)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(le=(re=s==null?void 0:s.promotion)==null?void 0:re.promotionCart)==null?void 0:le.idPromotion,(ie=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:ie.versionAPI]),g.useEffect(()=>{const $=Ur.get("lastMedias");if(a.id&&$&&c.current!==$){c.current=$;const J=new URLSearchParams($),w=qa(J);v(w)}},[a,v]);const I=g.useCallback(async($,J)=>(J==="coupon"?f($):y($,t??{})).then(W=>{if(typeof W!="boolean"&&W instanceof Object){if(J==="seller"&&"value"in W){const{statusOk:ae,value:he}=W,N=String(he??"").split(" - ");return Pt((N==null?void 0:N[0])??"",$,!!ae)}return Pt(String(W.coupon),$,!0)}return Pt("","")}).catch(()=>Promise.resolve({code:400})),[f,y]),A=g.useCallback(($,J,w)=>{const{id:W}=$;E(W,J,w)},[E]),O=g.useCallback(($,J,w=!1)=>{if(!$)return;const{id:W}=$,ae=Wr(a.items,W);if(ae!==-1&&!w){const he=Number(a.items[ae].quantity),N=a.items[ae]?he+1:1;A($,N,J)}else _({id:W,quantity:($==null?void 0:$.quantity)??1,seller:$.seller});C||i(he=>[...he,$])},[_,A,a.items,C,i]),L=g.useCallback(($,J)=>{if(!$||!Array.isArray($))return;i(W=>[...W,...$]);const w=$.map(W=>{const{id:ae,quantity:he,seller:N}=W,R=Wr(a.items,ae),Ne=za(he??1,R);return{id:ae,quantity:Ne,seller:N}});_(w,J)},[_,a.items,i]),M=g.useCallback(async($,J,w)=>$?j($).then(()=>(u(J??`${n}`,w),Pt($,$))):Promise.resolve(Pt("","Product id required")),[u,j]),Q=g.useCallback(()=>{a.items.length>0&&b()},[b,a.items]),D=g.useCallback(($,J="BRA")=>x($,J),[x]),U=g.useCallback($=>{$&&P($)},[P]),F=g.useCallback(async($,J,w=!1)=>{const W=a.items.findIndex(he=>he.uniqueId===$);return a.items[W]&&W>=0?S(J,W,w):!1},[a.items,S]),Y=g.useCallback(async($,J)=>E($,J).then(w=>{if(Array.isArray(w)){const W=w.find(ae=>ae.id===$);if(W&&(W==null?void 0:W.quantity)<J)return String(W.quantity)}return!1}),[E]),G=g.useCallback(async()=>{await v({...a.marketingData,coupon:""})},[v,a.marketingData]),H=g.useCallback(async()=>{await v({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[v,a.marketingData]),Z=g.useCallback(async()=>{await x("","BRA")},[x]);return r.jsx(xi.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:I,addToCart:O,addItemsToCart:L,cartStore:a,notifications:l,clearCart:Q,addNotification:u,isOpen:a.isOpen,removeNotification:m,removeToCart:M,setIsOpen:a.setIsOpen,shipping:D,shippingUpdateOption:U,toggleGiftItemCart:F,updateItemQuantity:Y,removeCoupon:G,removeSellerCode:H,removeCEP:Z,promotionRules:h,setPromotionRules:p}),[o,s,I,O,L,l,Q,u,a,m,M,D,U,F,Y,G,H,Z,h,p]),children:e})},xe=()=>{const e=g.useContext(xi);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},bi=g.createContext({}),bs=({children:e,fetch:t})=>{const n=g.useRef(!0),[s,o]=g.useState(null),[a,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{n.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();o(u.data),n.current=!1}catch{n.current=!0,i(!0)}})()},[t]),r.jsx(bi.Provider,{value:g.useMemo(()=>({data:s,isLoading:n.current??!1,isError:a}),[s,a,n]),children:e})},js=()=>{const e=g.useContext(bi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},ji=g.createContext({}),Cs=({children:e,sort:t,state:n,count:s,collectionId:o,brand:a,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=g.useMemo(()=>{var u;return o?[{key:"productclusterids",value:o.toString()}]:a?[{key:"brand",value:a}]:(u=n.base)!=null&&u.length?n.base.slice(1).split("/").map((m,h)=>({key:`category-${h+1}`,value:m})):[]},[n.base,o]);return r.jsx(ji.Provider,{value:g.useMemo(()=>({state:{...n,facets:[...l,...n.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,n,i]),children:e})},ze=()=>{const e=g.useContext(ji);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Ci=g.createContext({}),Um=({children:e,...t})=>r.jsx(Ci.Provider,{value:t,children:e}),Me=()=>{const e=g.useContext(Ci);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Si=g.createContext({}),Hm=({children:e,selectedFacets:t})=>{const{data:n,...s}=js(),{router:o}=ce(),{searchParams:a,PLP_SORT_DEFAULT:i}=Me(),c=g.useCallback((p,f)=>{if(f){if(p.key.toLocaleLowerCase()==="price"){const _=f.getAll("facets");f.delete("facets"),_.forEach(y=>{const[v]=y.split("/");v!==p.key&&f.append("facets",y)})}f.set("page","1"),f.append("facets",`${p.key}/${p.value}`),o.push(`?${f.toString()}`)}},[o]),l=g.useCallback(()=>{const p=new URLSearchParams;p.set("sort",i),p.set("page","1"),o.push(`?${p.toString()}`)},[o]),u=g.useCallback((p,f)=>{if(!f||!f.has&&!f.has("facets"))return;const _=f.getAll("facets");f.delete("facets"),f.set("page","1"),_.forEach(y=>{const[v,b]=y.split("/");(v!==p.key||b!==p.value)&&f.append("facets",y)}),o.push(`?${f.toString()}`)},[o]),m=g.useCallback(p=>{const f=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of f.entries()){const[y,v]=_.split("/");if(y===p.key&&v===p.value)return u(p,f)}return c(p,f)},[c,u,a]),h=g.useCallback(p=>{const f=a?new URLSearchParams(a):new URLSearchParams;f.set("sort",p.replace("_",":")),o.push(`?${f.toString()}`)},[o,a]);return r.jsx(Si.Provider,{value:g.useMemo(()=>({...s,breadcrumb:n&&"breadcrumb"in n?n==null?void 0:n.breadcrumb:[],deleteAllFacets:l,facets:n&&"facets"in n?n==null?void 0:n.facets:[],selectedFacets:t,onToggleFacet:m,onSort:h,searchParams:a}),[n,l,h,m,s,t,a]),children:e})},Ei=({children:e,forceUpdate:t})=>{const{state:n}=ze();return r.jsx(bs,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...n,forceUpdate:t}),priority:"low"}),children:r.jsx(Hm,{selectedFacets:(n==null?void 0:n.facets)??[],children:e})})},Pi=()=>{const e=g.useContext(Si);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Dt={placeholder:"Ordernar por",options:{score_desc:"Mais Relevantes",orders_desc:"Mais Vendidos",price_desc:"Maior Preço",price_asc:"Menor Preço",release_desc:"Novidades",discount_desc:"Maior Desconto",name_asc:"De A a Z"}},qm={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Vm="Imagem do produto",Qs=1,Wm="Sair",Gm=e=>e.exit,Zs=({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"}],Km=(e,t)=>{const n=(t??"").split("@")[0];return e?`Olá${n.length?", ":" "}${n}!`:"Olá!"},Xm=e=>"Seja bem vindo!",Ym="Marque a caixa para aceitar os termos de política de privacidade.",Qm="Algumas informações estão incorretas ou não foram preenchidas",Zm="Enviar",Ni=g.createContext({}),Jm=({children:e})=>{const{data:t,...n}=js(),[s,o]=g.useState(0),{sendDataLayerEvent:a}=oe();return g.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&o(i)}},[t,a,o]),r.jsx(Ni.Provider,{value:g.useMemo(()=>({...n,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:qm,total:s}),[t,n,s]),children:e})},Ss=({children:e,query:t,forceUpdate:n})=>{const{count:s,state:o}=ze(),a={...o,count:s};return r.jsx(bs,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:n,facets:o.facets??[]})}),children:r.jsx(Jm,{children:e})})},Xt=()=>{const e=g.useContext(Ni);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},Ii=g.createContext({}),ep=({children:e,slug:t,searchParams:n,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ce(),l=g.useRef(""),[u,m]=g.useState(!1),h=g.useMemo(()=>{const f=new URL(c,"http://localhost"),_=(n==null?void 0:n.getAll("facets"))??[],y=(n==null?void 0:n.get("page"))??"1",v=(n==null?void 0:n.get("sort"))??(s?"":i);return f.searchParams.set("page",String(y)),f.searchParams.set("sort",String(v)),n!=null&&n.get("query")?(f.searchParams.set("query",n.get("query")),f):(f.searchParams.set("base",Array.isArray(t)?t.join("/"):t),f.searchParams.set("facets",_.join(",")),f)},[s,c,n,t]),p=g.useMemo(()=>{if(Array.isArray(n==null?void 0:n.getAll("facets")))return T.parseSearchState(h,n.getAll("facets")??[""]);const f=(n==null?void 0:n.getAll("facets"))??[];return T.parseSearchState(h,f)},[h,n]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),r.jsx(Ii.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:m}),[u,m]),children:r.jsx(Cs,{ITEMS_PER_PAGE:a,searchParams:n??new URLSearchParams,state:g.useMemo(()=>({...p}),[p]),collectionId:s,brand:o,children:e})})},Es=()=>{const e=g.useContext(Ii);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Sn=(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((o,a)=>Sn(o,t[a]));if(Array.isArray(t))return!1;const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&Sn(e[o],t[o]))},wi=(e,t,n="page")=>Object.keys(t).some(s=>s===n?!1:!Sn(t[s],e[s])),Kr=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const n=await t.json();return n==null?void 0:n.data},Ri=()=>({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}}}),Ai=(e,t,n,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*n;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%n;if(m+c.columns>n){l+=n-m;continue}if(!Array.from({length:c.columns}).some((f,_)=>o.has(l+_))){for(let f=0;f<c.columns;f++)o.add(l+f);a.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:o,placedBanners:a}},Xr=(e,t,n,s=24)=>{const{placedBanners:o,taken:a}=Ai(e??[],t,n),i=[];let c=0;try{for(;i.length<t*s;)a.has(c)||i.push(c),c++;return{banners:o,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},bn=(e,t,n=24)=>Array.from({length:e},(s,o)=>{const a=o+1;return{loading:e===a,page:a,pagination:t!=null&&t.products.length&&e===a?t==null?void 0:t.pagination:Ps(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:n},()=>Ri())}}),Ti=(e,t)=>[...e,{loading:!1,page:t,pagination:Ps(),products:[]}],Ps=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),tp=(e,t,n,s,o)=>{const a=e[e.length-1],i=(a==null?void 0:a.products.length)??o,c=(e.length-1)*o+i-1,l=n[c];return t.filter((u,m)=>{const h=s[m];return h<=l||o>i&&h>l})},Oi=(e,t)=>{const n=new Map;for(const o of e){const a=Math.floor(o/t);n.has(a)||n.set(a,[]),n.get(a).push(o)}const s=[];for(const[,o]of n){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},Li=(e,t)=>{if(!e)return[];const n=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return Oi(n,t)},ki=e=>Array.isArray(e)?e.map((t,n)=>({href:`/${e.slice(0,n+1).join("/")}`,name:t})):[],np=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:ki,createPage:Ti,createPages:bn,createPagination:Ps,createProduct:Ri,deepEqual:Sn,fetchPage:Kr,getBanners:Ai,getPositions:Xr,getProductsWithVideo:Li,getRandomVideoPerRow:Oi,getVisibleBanners:tp,hasStateChangedExceptPage:wi},Symbol.toStringTag,{value:"Module"})),rp=50,sp=xt.create((e,t)=>{const n=i=>Math.min(i,rp),s=async(i,c)=>{const l=n(i.page);try{const u=await Kr({...i,page:l});o(l,m=>c?c(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,m=>({...m,loading:!1}))}},o=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},a=async(i,c)=>{await s(i,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u)=>{var h,p,f;const m=n(Number(i==null?void 0:i.page));e({...c,pages:bn(m,void 0,u)});try{const _=await Kr({...i,page:m});if(_){if(!_.products.length&&((h=_==null?void 0:_.pagination)==null?void 0:h.total)<m){a({...i,page:(p=_==null?void 0:_.pagination)==null?void 0:p.total},l),e({pages:bn((f=_==null?void 0:_.pagination)==null?void 0:f.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:bn(m,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),m=n(i==null?void 0:i.page);u.some(h=>h.page===m)||(e({...c,pages:Ti(u,m)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===n(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),op=(e,t,n,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=n){const c=e.slice(i,i+n),l=c.findIndex(u=>{var m;return(m=u.node)==null?void 0:m.video});for(let u=0;u<c.length;u++){const m=i+u,h=s+m,p=t.find(_=>_.position_grid===h+1),f=h+o+1;p&&(o+=p.columns),a.push({position:f,canPlayVideo:u===l})}}return a},Mi=(e,t,n)=>{const s=(t-1)*n,o=t*n;return e>=s&&e<=o},On=e=>{var t;return(t=e==null?void 0:e.map(n=>({disable:T.disableSKU(n),size:T.getSKUName(n),skuID:"sku"in n&&n.sku})))==null?void 0:t.filter(n=>n.disable)},ap=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:op,getSkusNotify:On,isPositionInCurrentPage:Mi},Symbol.toStringTag,{value:"Module"})),Di=({isMobile:e,ICONS:t,NOTIFY_INFO:n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),r.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:n.title})]});Di.displayName="Notify.Controls";const Xe={"notify--header-modifier":"_notify--header-modifier_xlomp_1","notify--container":"_notify--container_xlomp_4","notify--form":"_notify--form_xlomp_20","notify--status":"_notify--status_xlomp_36","notify--status--success":"_notify--status--success_xlomp_50","notify--status--error":"_notify--status--error_xlomp_50","notify--modal--body":"_notify--modal--body_xlomp_99","notify--loading":"_notify--loading_xlomp_102","notify--selector":"_notify--selector_xlomp_122","notify--selector--header":"_notify--selector--header_xlomp_138","modal-modifier":"_modal-modifier_xlomp_168"};function $i(e){const n=decodeURIComponent(window.document.cookie).split(";");for(const s of n){const[o,a]=s.trim().split("=");if(o===e)return a}}function Ns(e,t,n={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...n};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in o)o[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${o[i].toUTCString()}`:typeof o[i]=="boolean"?a+=`; ${o[i]?"true":"false"}`:a+=`=${o[i]}`);window.document.cookie=a}var zi={CUSTOM_VIEW_CART:{name:"custom_view_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","total_discount","subtotal","items"]},ADD_TO_WISHLIST:{name:"add_to_wishlist",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_TO_CART:{name:"add_to_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},REMOVE_FROM_CART:{name:"remove_from_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_COUPON:{name:"add_coupon",destinations:["DataLayer"],requiredParams:["brand","region","coupon","coupon_message","seller_cod_name"]},SEARCH:{name:"search",destinations:["DataLayer"],requiredParams:["brand","search_term","search_found","search_quantity"]},SEARCH_ZIPCODE:{name:"search_zipcode",destinations:["DataLayer"],requiredParams:["brand","region","shippings","zipcode","flag_pickup"]},VIEW_PROMOTION:{name:"view_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_PROMOTION:{name:"select_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_CONTENT:{name:"select_content",destinations:["DataLayer"],requiredParams:["brand","content_type"]},SELECT_ITEM:{name:"select_item",destinations:["DataLayer"],requiredParams:["brand","region","items","line_items"]},VIEW_ITEM:{name:"view_item",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","available_grid","items"]},VIEW_ITEM_LIST:{name:"view_item_list",destinations:["DataLayer"],requiredParams:["region","brand","line_items","items"]},BEGIN_CHECKOUT:{name:"begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_BEGIN_CHECKOUT:{name:"custom_begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},AUTH_ACTION:{name:"auth_action",requiredParams:["region"]},ADD_PERSONAL_INFO:{name:"add_personal_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","subtotal"]},CUSTOM_ADD_SHIPPING_INFO:{name:"add_shipping_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","shipping","shipping_tier","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_ADD_PAYMENT_INFO:{name:"add_payment_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","payment_type","subtotal","items"]},ORDER_REVIEWED:{name:"order_reviewed",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","payment_type"]},PURCHASE:{name:"purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_PURCHASE:{name:"custom_purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_USER_INFO:{name:"custom_user_info",destinations:["DataLayer"],requiredParams:["user_info"]},NOTIFY_ME:{name:"notify_me",destinations:["DataLayer"],requiredParams:["brand","line_items","size","item_ref"]}};function ip(e,t,n){const s=t.window,o=Object.assign({},t);if(delete o.window,s){s.dataLayer=s.dataLayer||[],s.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function cp(e,t,n){console.log(`%c[DT - ${n}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var Fi=[["vale","vale crédito"],["pagaleve","pix"],["pix parcel","pix parcelado"],["pix","pix"],["apple","apple pay"],["google","google pay"],["boleto","boleto"],["paypal","paypal"],["cred","cartão"],["visa","cartão"],["master","cartão"],["amex","cartão"],["elo","cartão"],["hiper","cartão"],["diner","cartão"],["deb","cartão"]];function lp(e,t,n){cp({id:e,custom_data:t},"#00c851",n)}var up={DataLayer:ip,Dito:lp};async function dp(e,t){const n=zi[e];n&&await Promise.allSettled(n.destinations.map(async s=>{try{await up[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function mp(e){try{return await(await fetch(`/api/catalog_system/pub/products/search?fq=productId:${e}`)).json()}catch(t){console.log("[DT] Erro ao buscar dados do produto",t)}}function pp(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Bi(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),n=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return n?n[1].replace("-","_"):null}async function fp(e){const t=Bi(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const n=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!n.ok)throw new Error(`Erro na API: ${n.status}`);const s=await n.json();return(s==null?void 0:s[0])||null}catch(n){return console.error("Erro ao buscar dados do produto:",n),null}}function Ui(e,t){var n,s,o,a;const i=(s=(n=e==null?void 0:e.shippingData)==null?void 0:n.logisticsInfo)==null?void 0:s.find(l=>l.itemId===t.id),c=(o=i==null?void 0:i.slas)==null?void 0:o.find(l=>l.id===i.selectedSla);return(a=c==null?void 0:c.pickupStoreInfo)!=null&&a.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function Hi(e){var t,n;const s=await mp(e.productId||e.productID||e.item_group_id);return s.length&&(n=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?n:null}function Ln(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function yt(e){const t=[()=>{var n;return((n=e==null?void 0:e.productCategories)==null?void 0:n[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const n of t){const s=n();if(s!=null)return s}return null}function Yt(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var n,s,o,a,i;return(i=(a=(o=(s=(n=e==null?void 0:e.category)==null?void 0:n.split)==null?void 0:s.call(n,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const n of t){const s=n();if(s!=null)return s}return null}function qi(e){var t;const n=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(n)&&n.length?n.join(","):null}var hp={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function Js(e){if(!e)return null;const t=e.toLowerCase().trim();return hp[t]||null}function tt(e){var t;let n=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))n=e;else if(Array.isArray(e))n=e.map(a=>{var i;return((i=a.additionalInfo)==null?void 0:i.brandName)||a.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)n=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?Js(e):null;const s=n.map(Js).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function _p(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const n=e.orderForm.items;return tt(n)}function gp(e){var t;const{item:n}=e;return tt(((t=n==null?void 0:n.additionalInfo)==null?void 0:t.brandName)||n.brand||n.item_brand)}function yp(e,t){if(e!=null&&e.brand)return tt(e.brand)||e.brand||null;switch(t){case"CUSTOM_VIEW_CART":case"ADD_COUPON":case"ADD_PERSONAL_INFO":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"SEARCH_ZIPCODE":case"ORDER_REVIEWED":case"PURCHASE":case"CUSTOM_PURCHASE":return _p(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return gp(e);default:return null}}async function vp(e){var t;const n=((t=e.orderForm)==null?void 0:t.items)||[];return n.length?await Promise.all(n.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:Yt(s),item_category4:qi(s),item_shipping_tier:Ui(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:tt((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await Hi(s)||s.id||null,item_name:s.name||s.id||null,item_category:yt(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:Ln(s)}})):[]}async function xp(e,t){var n,s,o;const{item:a,orderForm:i}=e;return[{index:0,quantity:1,item_id:a.productId||a.item_group_id||a.sku||null,item_category2:Yt(a),item_category4:qi(a),item_shipping_tier:t==="REMOVE_FROM_CART"?Ui(i,a):null,price:a.listPrice||parseFloat((a.price/100).toFixed(2))||0,item_ref:a.refId||a.item_ref||(a==null?void 0:a.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((n=a.additionalInfo)==null?void 0:n.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await Hi(a)||null,item_name:a.name||a.item_name||null,item_category:yt(a)||null,item_variant:(a.skuName||a.item_variant||a.name).split(/[-/]/)[0].trim()||null,item_variant2:a.size||((s=a==null?void 0:a.itemAttributes)==null?void 0:s.size)||((o=(a.skuName||a.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:Ln(a),item_list_name:yt(a)||null,item_url:a.item_url||null}]}async function bp(e){return((e==null?void 0:e.list)||[]).map(t=>{var n,s,o,a;return{price:((n=t==null?void 0:t.price)==null?void 0:n.list)||(t==null?void 0:t.price)||((s=t==null?void 0:t.offers)==null?void 0:s.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.additionalProperty.find(i=>i.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:tt((o=t==null?void 0:t.brand)==null?void 0:o.name)||tt(e.brand)||tt(t==null?void 0:t.item_brand)||null,item_name:(t==null?void 0:t.productName)||(t==null?void 0:t.alternateName)||(t==null?void 0:t.item_name)||null,item_category:yt(t)||null,item_variant:((a=t==null?void 0:t.name)==null?void 0:a.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:Yt(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||null,discount:Ln(t)||null,item_list_name:(e==null?void 0:e.itemListName)||yt(t)||null}})}async function jp(e){var t,n,s;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(a=>a.name==="RefId").value||null,item_brand:tt(o.brand.name)||tt(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:yt(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:Yt(o)||((s=(n=o==null?void 0:o.category)==null?void 0:n.split(">")[1])==null?void 0:s.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:Ln(o)||null,item_sku:(o==null?void 0:o.sku)||(o==null?void 0:o.productId)||null,item_url:o.url||o.item_url||null,seller_id:o.seller||null}]}async function Cp(e){var t;if(!pp(e==null?void 0:e.bannerUrl))return[];const s=await fp(e==null?void 0:e.bannerUrl),o=s==null?void 0:s.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:Bi(e==null?void 0:e.bannerUrl),item_brand:tt(s.brand)||null,item_name:(s==null?void 0:s.productName)||(s==null?void 0:s.alternateName)||(s==null?void 0:s.item_name)||null,item_category:yt(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:Yt(s)||null,item_id:(s==null?void 0:s.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function Sp(e,t){if(e!=null&&e.items)return e.items;switch(t){case"CUSTOM_VIEW_CART":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"PURCHASE":case"CUSTOM_PURCHASE":return vp(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return xp(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return bp(e);case"VIEW_ITEM":return jp(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return Cp(e);default:return null}}function Ep(e){var t,n,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((n=e.orderForm.paymentData)==null?void 0:n.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(h=>h==null?void 0:h.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(h=>String(h.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=Fi.find(([h])=>u.includes(h));return m?m[1]:null}function Pp(e){var t,n,s,o;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!a.length)return null;const i=((n=a[0])==null?void 0:n.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=Fi.find(([u])=>c.includes(u));return l?l[1]:null}function Np(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return Ep(e);case"PURCHASE":case"CUSTOM_PURCHASE":return Pp(e);default:return null}}var Ip={brand:yp,items:Sp,payment_type:Np,user_info:async(e,t)=>{var n;const o=(n={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},crisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.lojacrisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:n[e.platform||"store"];if(!o)return null;try{const a=`${o}/_v/user-info`;return await(await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})})).json()}catch{return null}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(n=>n.productID):(e.orderForm.items||[]).map(n=>n.productId).join(","),currency:(e,t)=>{var n,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(n=e.item)==null?void 0:n.offers)==null?void 0:s.priceCurrency)||"BRL":((a=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:a.currencyCode)||null},value:(e,t)=>{var n;return e!=null&&e.value?e.value:e.item?e.item.price:((n=e.orderForm)==null?void 0:n.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var n,s;const a=(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).find(i=>i.id==="Discounts");return a?Math.abs(a.value)/100:0},subtotal:(e,t)=>{var n,s;return(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).filter(i=>i.id==="Items").reduce((i,c)=>i+(c.value||0),0)/100||0},coupon_message:(e,t)=>{var n;if(e.couponMessage)return e.couponMessage;const s=((n=e.orderForm)==null?void 0:n.messages)||[];if(s.length===0)return null;const o=s.filter(a=>a.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(a=>a.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var n,s;return e.appliedCoupon||((s=(n=e==null?void 0:e.orderForm)==null?void 0:n.marketingData)==null?void 0:s.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var n;const s=e.orderForm;return s?(((n=s.shippingData)==null?void 0:n.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const n=e.orderForm;if(!n)return null;const s={};for(const a of n.shippingData.logisticsInfo){const i=n.items[a.itemIndex];if(i)for(const c of a.slas){const l=c.name;s[l]||(s[l]={shipping_tier:c.name,delivery_time:parseInt(c.shippingEstimate),shipping:parseFloat((c.price/100).toFixed(1)),line_items:[]}),s[l].line_items.push(i.id)}}return Object.values(s).map(a=>({shipping:a.shipping,shipping_tier:a.shipping_tier,delivery_time:a.delivery_time,line_items:a.line_items.join(",")}))||null},shipping:(e,t)=>{var n,s,o;return((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const m=(l=c.slas)==null?void 0:l.find(h=>h.id===c.selectedSla);return i+((u=m==null?void 0:m.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var n,s,o,a;const c=((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).find(p=>p.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(p=>p.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:m,pickupStoreInfo:h}=l;return u==="pickup-in-point"?`retirada em loja${h!=null&&h.friendlyName?`: ${h.friendlyName}`:""}`:u==="delivery"?`receba em casa${m?`: ${m}`:""}`:null},transaction_id:(e,t)=>{var n,s;return((s=(n=e.orderForm)==null?void 0:n.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function wp(e={},t){const n=zi[t];return n?Object.fromEntries(await Promise.all(n.requiredParams.map(async o=>{const a=Ip[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function Rp(e,t={}){try{const n=await wp(t,e);return await dp(e,Object.assign({},n,{window:t.window}))}catch(n){return console.error(`[DT] Error tracking event ${e}:`,n)}}const Ap=({accountName:e=""})=>{const{sendDataLayerEvent:t}=oe(),{user:n}=kt(),{cartStore:s}=xe();return g.useEffect(()=>{if(!n)return;(async()=>{const{userId:a,email:i,firstName:c,lastName:l,phone:u,homePhone:m,postalCode:h,street:p,number:f,city:_,gender:y}=n,v=new TextEncoder().encode(a),b=await crypto.subtle.digest("SHA-256",v),j=Array.from(new Uint8Array(b)).map(x=>x.toString(16).padStart(2,"0")).join("");i&&Rp("CUSTOM_USER_INFO",{userEmail:i,platform:"store",account:e}),t({functionKey:"readyEvents",data:{readyData:{user_id:j,email:i,first_name:c,last_name:l,phone:u||m,zip:h,street:p,street_number:f,city:_,gender:y,orderform_id:s==null?void 0:s.id}}})})()},[n,s.id]),null},Vi=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Tp=({children:e,AUTH_TOKEN_COOKIE:t,accountName:n})=>{var h;const{shipping:s,cartStore:o}=xe(),[a,i]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(p=>p.json()).then(p=>{const{userCredits:f,..._}=p,{wishlist:y,...v}=_;i({amount:f==null?void 0:f.amount,boxes:f==null?void 0:f.boxes,toExpire:f==null?void 0:f.toExpire,user:v,loading:!1,wishlist:(typeof y=="string"?y.split(","):y)??[]})})}catch(p){console.error("my credits request",p),i({...a,loading:!1})}},[i]),l=g.useCallback(()=>{Ns(t),c()},[c]),u=g.useCallback(()=>a.boxes?a.boxes.reduce((p,f)=>f.gift_card_box.refid==="C1643"?(p.cashback+=f.amount,p):(p.credits+=f.amount,p),{cashback:0,credits:0}):{cashback:0,credits:0},[a]),m=g.useCallback(async()=>{var p,f,_;if((p=a.user)!=null&&p.postalCode&&(o!=null&&o.id)&&!(o!=null&&o.loading)&&!((_=(f=o==null?void 0:o.shippingData)==null?void 0:f.address)!=null&&_.postalCode))try{await s(a.user.postalCode)}catch(y){console.error("Error auto-filling CEP:",y)}},[(h=a.user)==null?void 0:h.postalCode]);return g.useEffect(()=>{c()},[c]),g.useEffect(()=>{m()},[m]),r.jsxs(Vi.Provider,{value:g.useMemo(()=>({...a,getCurrentCredits:u,logout:l}),[a,u,l]),children:[r.jsx(Ap,{accountName:n}),e]})},kt=()=>{const e=g.useContext(Vi);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Wi=({color:e,delay:t=3e3,sku:n,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:m}=oe(),{user:h}=kt(),p=h!=null&&h.firstName?`${h==null?void 0:h.firstName} ${h==null?void 0:h.lastName}`:"";return r.jsx("div",{className:Xe["notify--form"],children:r.jsxs("form",{action:"POST",onSubmit:async f=>{var v;f.preventDefault();const _=f.currentTarget,y=((v=_.querySelector("input"))==null?void 0:v.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:p,email:y,sku:n==null?void 0:n.skuID})}).then(b=>s(b.ok)).finally(()=>{o(!1),_.reset(),m({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:n==null?void 0:n.size,item_id:n==null?void 0:n.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var b;(b=document.body)==null||b.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(null)},t)})},children:[r.jsx(d.TextField.Structure,{input:r.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:f=>u(!f.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?r.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):r.jsx(r.Fragment,{})}),r.jsx(d.Button,{disabled:!(l===!1||!n)||!n,type:"submit",size:"large",children:i.button})]})})};Wi.displayName="Notify.Form";const Gi=({isLoading:e=!1})=>r.jsx("div",{className:Xe["notify--loading"],"data-loading":e,children:r.jsx(d.Spinner,{})});Gi.displayName="Notify.Loading";const Is={"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"},Ki=({children:e,...t})=>r.jsx("div",{...t,className:Is["product-variation-list--list"],children:e});Ki.displayName="ProductVariationList.List";const Xi=({fill:e="#1352C7",src:t="",type:n="size",text:s,...o})=>{const{nextimage:a}=ce();return n==="size"?r.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),r.jsx(d.ToggleSize.Text,{children:s})]}):r.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),n==="color"?r.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):r.jsx(d.ToggleStyle.Texture,{title:"texture",children:r.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};Xi.displayName="ProductVariationList.Option";const Yi=({children:e,...t})=>r.jsx("div",{className:Is["product-variation-list"],...t,children:e});Yi.displayName="ProductVariationList.Root";const Qi=({children:e,title:t,...n})=>r.jsxs("div",{...n,className:Is["product-variation-list--title"],children:[t?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.SectionWrapper,{children:r.jsx("p",{children:t})})}):r.jsx(r.Fragment,{}),e]});Qi.displayName="ProductVariationList.Title";const Qe={List:Ki,Option:Xi,Title:Qi,Root:Yi},Op=(e,t)=>{if(!e||!t)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(s=>e[s]===t[s])},Zi=({children:e,label:t="",skus:n,sku:s,setSku:o})=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe["notify--selector--header"],children:e}),r.jsxs(Qe.Root,{className:Xe["notify--selector"],children:[r.jsx(Qe.Title,{title:t}),r.jsx(Qe.List,{children:Array.isArray(n)&&n.map((a,i)=>{const c=Op(s,a);return r.jsx(Qe.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});Zi.displayName="Notify.Selector";const eo=({type:e,icon:t,title:n,subtitle:s})=>r.jsx("div",{className:Xe[`notify--status--${e}`],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{children:n}),r.jsx("h3",{children:s})]})})}),Ji=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:n})=>r.jsxs("div",{className:Xe["notify--status"],"data-status":e,children:[r.jsx(eo,{...n.success,icon:t.check_circle,type:"success"}),r.jsx(eo,{...n.error,icon:t.alert_circle,type:"error"})]});Ji.displayName="Notify.Status";const ws=({color:e,open:t,setVisible:n,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[h,p]=g.useState(!1),[f,_]=g.useState(null),{isMobile:y}=ne();return r.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:n,variant:y?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:Xe["modal-modifier"],children:[r.jsx(d.Modal.Header,{navigation:"top",className:Xe["notify--header-modifier"],children:r.jsx(Di,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),r.jsxs(d.Modal.Body,{className:Xe["notify--modal--body"],children:[r.jsxs("div",{className:Xe["notify--container"],children:[r.jsxs(Zi,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[r.jsx("p",{children:l.subtitle}),r.jsx("span",{children:l.description})]}),r.jsx(Wi,{delay:4e3,sku:o,setStatus:_,setIsLoading:p,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),r.jsx(Gi,{isLoading:h}),r.jsx("div",{className:Xe["notify--selector--header"],children:r.jsx("span",{children:l.legal})})]}),r.jsx(Ji,{status:f,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};ws.displayName="Notify";const kn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=On(e??[]);return r.jsx(ws,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};kn.displayName="PDC.Notification";const ec=g.createContext({}),tc=({banners:e,children:t})=>{const{searchParams:n,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=Me(),{router:u}=ce(),{sendDataLayerEvent:m}=oe(),{isMobile:h}=ne(),{state:p}=ze(),{addPage:f,createPages:_,updateProducts:y,...v}=sp(),b=h?8:16,C=h?2:4,j=g.useRef(!1),x=g.useRef(p),[P,S]=g.useState(!1),[E,I]=g.useState(null),[A,O]=g.useState([]),L=g.useCallback(F=>{F&&"pagination"in F&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:F.products}}})},[m]),M=g.useCallback(F=>{if(F.pagination.nextPage===!0){const Y=F.page+1,G=Xr(e,Y,C,s);f({...p,page:Y},G,L)}},[f,e,L,C,s,p]),Q=g.useCallback(F=>{F.loading===!1&&y({...p,page:F.page},L)},[L,y,p]),D=g.useCallback(F=>{const Y=new URLSearchParams(n);F.page!==Number(Y.get("page")??1)&&(Y.set("page",String(F.page)),u.replace(`?${Y.toString()}`,{scroll:!1}))},[u,n]),U=g.useCallback((F,Y)=>{const G=Y?On([Y]):null;O(F),I(G!=null&&G.length?G[0]:null),S(!0)},[]);return g.useEffect(()=>{const F=!j.current,Y=wi(x.current,p),G=Xr(e,p.page,C);F?_(p,G,L,s):Y&&(_(p,G,L,s),x.current=p),j.current=!0},[e,_,L,C,s,p]),r.jsxs(ec.Provider,{value:g.useMemo(()=>({...v,addPage:f,addNewPage:M,createPages:_,gap:b,columns:C,handleNotify:U,updatePage:Q,updateProducts:y,updateParamPage:D}),[f,M,_,U,b,C,v,Q,y,D]),children:[t,r.jsx(kn,{open:P,sku:E,skus:A,setSku:I,setVisible:S,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},ot=()=>{const e=g.useContext(ec);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},nc=g.createContext({gridBanners:void 0,banners:[]}),Lp=({children:e,data:t,device:n,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=ne(),i=(t==null?void 0:t.sections.filter(h=>h.name!=="List Product Banners"))??[],c=i.slice(0,Qs),l=i.slice(Qs,i.length),u=t==null?void 0:t.sections.find(h=>h.name==="List Product Banners"),m=g.useMemo(()=>{var h,p;return((p=(h=u==null?void 0:u.data)==null?void 0:h.banners)==null?void 0:p.map(f=>({...f.banner,columns:f.bannerWidth,position_grid:f.bannerPosition})))??[]},[u]);return a&&n==="mobile"||!a&&n==="desktop"?r.jsxs(nc.Provider,{value:{gridBanners:u,banners:m},children:[r.jsx(s,{data:c??[]}),r.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,r.jsx(s,{data:l??[]})]})]}):r.jsx(r.Fragment,{})},Mn=()=>{const e=g.useContext(nc);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},rc=g.createContext({}),sc=({children:e,filters:t,PLP_FILTERS:n,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return r.jsx(rc.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},Mt=()=>{const e=g.useContext(rc);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},oc=g.createContext({product:void 0}),kp=({children:e,data:t,productId:n,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>r.jsxs(oc.Provider,{value:{productId:n},children:[e,r.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:r.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),ac=()=>{const e=g.useContext(oc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Mp=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Dp(e,t=1e3){let n=!1;return(...s)=>{n||(e(...s),n=!0,setTimeout(()=>{n=!1},t))}}function $p(e,t=1e3){let n;return(...s)=>{clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}const ic=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,zt=(e,t)=>Math.floor(t==="days"?e/(1e3*60*60*24):t==="hours"?e%(1e3*60*60*24)/(1e3*60*60):t==="minutes"?e%(1e3*60*60)/(1e3*60):e%(1e3*60)/1e3),zp=e=>{const t=nm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},Fp=["name","email","phone","date","cpf","cep"],to={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}$/},cc=({type:e,input:t,required:n=!1})=>{if(typeof t!="string"||!n&&t===""||!to[e])return!0;const s=t.trim();return to[e].test(s)},Bp=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,n=typeof e=="string"?e.match(t):null;return n?n[2].replace(/-/g," "):Vm},Up=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Fp,debounce:$p,getAltTextFromUrl:Bp,getAuthenticatedUser:zp,getCookie:$i,getDaysHoursMinutesSeconds:zt,getMilliSeconds:ic,removeAccentsAndReplaceSpaces:Mp,setCookie:Ns,throttle:Dp,validateInput:cc},Symbol.toStringTag,{value:"Module"})),Hp=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((s,o)=>(t[o.master_data_field]="none",{...s,[o.master_data_field]:o}),{}))??{},mountedInputsStatus:t}},qp=({formData:e,mountedFields:t,inputsStatus:n,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...n};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,m)=>{var f;if(m==="terms-and-conditions")return;const h=(f=t[m])==null?void 0:f.required;if(h&&!u){l[m]="required",i=!0;return}cc({type:t[m].type,input:u,required:h})||(l[m]="error",c=!0),typeof u=="string"&&e.set(m,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},lc=g.createContext({}),uc=({children:e,masterDataEmailField:t,fields:n,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=oe(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>Hp({fields:n}),[n]),m=g.useRef(!1),[h,p]=g.useState("idle"),[f,_]=g.useState(u),y=async({searchFields:S,entity:E})=>{const I=await ht.post("/api/master-data/search",{body:{masterDataEntity:E,searchFields:S,headers:{"REST-Range":"resources=0-49"}}});return console.info(I),I.data},v=async({documentId:S,fieldsToBeUpdated:E,entity:I})=>(await ht.post("/api/master-data/update",{dataEntityName:I,documentId:S,fieldsToBeUpdated:E})).status,b=g.useCallback(async({payload:S,response:E},I,A)=>{var D;const{email:O,...L}=S,[M]=await y({searchFields:{[I]:O},entity:A??o.newsletter}),Q=Array.isArray(M)?(D=M[0])==null?void 0:D.id:void 0;return M&&await v({documentId:Q,fieldsToBeUpdated:L,entity:A??o.newsletter})!==204?{...E,status:"error"}:{...E,status:"success"}},[]),C=g.useCallback(async({formData:S},E,I)=>{const A={status:"idle",inputsStatus:{}},O={};S.forEach((L,M)=>{O[M]=L});try{const M=(await ht.post("/api/master-data",{body:{payload:O,masterDataEntity:E??o.newsletter}})).data;return(M==null?void 0:M.Message)==="duplicated entry"?b({payload:O,response:A},I,E):M!=null&&M.Id?{...A,status:"success"}:{...A,status:"error"}}catch(L){return console.error("error",L),{...A,status:"error"}}},[b]),j=g.useCallback(async(S,E,I)=>{S.preventDefault();const A=new FormData(S.target);if(A.append("acceptedTerms",m.current?"true":"false"),m.current){const L=new Hr.TZDate(new Date,"America/Sao_Paulo").toISOString();A.append("termsAcceptedAt",L)}E&&Object.keys(E).forEach(L=>{A.append(L,E[L])});const O=await C({formData:A},I??"",t);O&&(p(O==null?void 0:O.status),_(O.inputsStatus),O.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,p,_,i]),x=g.useCallback(S=>{const E=new FormData(S.currentTarget.parentElement),{hasEmptyFields:I,hasErrors:A,inputStatusToUpdate:O}=qp({formData:E,mountedFields:l,inputsStatus:f,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:p});if(_(O),I||A){S.preventDefault();return}p("loading")},[l,f,c,m]),P=g.useCallback(()=>{p("idle"),_(u)},[u]);return r.jsx(lc.Provider,{value:g.useMemo(()=>({formStatus:h,handleSubmit:j,setFormStatus:p,inputsStatus:f,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:x,checkboxRef:m,masterDataEmailField:t,fields:n,variant:s,resetNewsletter:P}),[h,j,p,f,_,x,c,m,t,n,s,P]),children:e})},Rs=()=>{const e=g.useContext(lc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},dc={contexts:{addToCart:{hook:Ct,provider:vi},cart:{hook:xe,provider:Bm},cms:{FlagsAndTags:{context:us,hook:mt,provider:rm}},newsletter:{hook:Rs,provider:uc},events:{hook:oe,provider:dm},global:{hook:ne,provider:Nm,mediator:Xa},header:{hook:Ee,provider:$m},menuMobile:{hook:xs,provider:gi},next:{hook:ce,provider:Im},pdp:{provider:sm},PDPContent:{provider:kp,hook:ac},plp:{provider:ep,hook:Es},plpFilter:{hook:Mt,provider:sc},PLPContent:{provider:Lp,hook:Mn},plpInfinite:{provider:tc,hook:ot},pdpdata:{provider:mm},searchFacets:{hook:Pi,provider:Ei},searchProducts:{hook:Xt,provider:Ss},searchRoot:{hook:js,provider:bs},searchSearch:{hook:ze,provider:Cs},session:{hook:kt,provider:Tp},ui:{hook:Vt,provider:Ka}},hooks:{useBackPDC:ga,useClipboard:pm,useDisableZoom:Na,useLocalStorage:hm,useOnScreen:ds,useSentinel:An,useTouchZoomPan:Ia},stores:{cart:Em,header:Rm,pdp:Mm,wishlist:Dm}},Vp={cart:jm,events:um,plp:np,product:T.productHelpers,utils:Up},As={helpers:Vp},He={"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"},mc=({brand:e,className:t,name:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[r.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:r.jsx("p",{className:"typography-style-body-md",children:n})})})]});mc.displayName="AddToCart.Card.Name";const pc=({className:e,listPrice:t,price:n,quantity:s,productId:o,...a})=>{const i=T.formatPriceToCurrency(n/100),c=T.formatPriceToCurrency(t/100);return r.jsx("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:r.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.ValuesWrapper,{children:n!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};pc.displayName="AddToCart.Card.PriceQuantity";const Wp="_skeleton_12b79_1",Gp={skeleton:Wp},fc=({style:e})=>r.jsx("div",{style:e,className:Gp.skeleton}),Kp="_image_1y08u_1",Xp={image:Kp},Yp=({alt:e,className:t,objectFit:n,...s})=>{const{nextimage:o}=ce();return r.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(Xp.image,t),"data-object-fit":n??"cover"})},Qp=({videoRef:e,...t})=>r.jsx("video",{...t,ref:e,children:r.jsx("track",{kind:"captions"})}),Ie={Image:Yp,Video:Qp},hc=({className:e,productGroupID:t,size:n,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=Ct(),[c,l]=g.useState(s??"");return g.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const h=m.images.find(p=>a.includes(p.imageLabel));h!=null&&h.imageUrl?l(h.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[r.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:r.jsx(d.ToggleStyle.Texture,{children:c?r.jsx(Ie.Image,{alt:"",src:c??"",width:164,height:164,style:i}):r.jsx(fc,{})})}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),n&&r.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:n})]})]})};hc.displayName="AddToCart.Card.StyleSize";const{helpers:Zp}=As,_c=({className:e,item:t,texture:n,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:h}}=Ct(),{size:p}=Zp.product.getColorAndSizeFromSkuName(i??o,h);return r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[r.jsx(mc,{brand:a.name,name:o}),r.jsx(pc,{price:u,listPrice:m,quantity:l,productId:t.id}),r.jsx(hc,{size:p,texture:n,productGroupID:c})]})};_c.displayName="AddToCart.Card.Content";const gc=({image:e,thumbnail:t=!1})=>r.jsx(Ie.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});gc.displayName="AddToCart.Card";const yc=({className:e,item:t,texture:n,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=T.updatedResizedImg(a.url,{width:200,height:300});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[r.jsx(gc,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&r.jsx(_c,{item:t,texture:n})]})};yc.displayName="AddToCart.Card";const vc=({className:e,children:t,title:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[r.jsx("div",{className:He["add-to-cart--content--title"],children:n&&r.jsx("h2",{children:n})}),t,r.jsx(_t.Footer,{})]});vc.displayName="AddToCart.Layout.Content";const xc=({className:e,...t})=>{var f,_;const{isMobile:n,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=Ct(),{cartStore:{totalizers:a},setIsOpen:i}=xe(),c=(f=a.find(y=>y.id==="Discounts"))==null?void 0:f.value,l=((_=a.find(y=>y.id==="Items"))==null?void 0:_.value)??0,u=a.find(y=>y.id==="Shipping"),h=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,p=T.formatPriceToCurrency(h??0);return r.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[r.jsxs("div",{className:He["add-to-cart--footer--total"],children:[r.jsx("span",{children:"Subtotal:"}),r.jsx("span",{children:p})]}),r.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),n?r.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):r.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};xc.displayName="AddToCart.Layout.Footer";const bc=({children:e,className:t,thumbnail:n=!1,...s})=>{const{cartStore:{options:o}}=xe(),{recentlyAddedProducts:a}=Vt(),i=a.length>3?4:a.length;return r.jsxs("div",{...s,className:He["add-to-cart--items"],"data-thumbnail":n,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var u;const l=(u=o==null?void 0:o.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return r.jsx(_t.Card,{item:c,thumbnail:n,texture:l},c.itemOffered.sku)}),e]})};bc.displayName="AddToCart.Layout.Items";const jc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:n,setIsOpen:s}=Ct(),{isMobile:o}=ne();return r.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:o??!1,isOpen:n,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[r.jsx(d.Modal.Header,{navigation:"top",children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),r.jsx(d.Modal.Body,{children:e})]})};jc.displayName="AddToCart.Modal";const Jp=({children:e})=>{const{count:t,handleClose:n,setIsOpen:s}=Ct(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&n(),o.current=t},[t,n,s]),r.jsx(r.Fragment,{children:e})},Cc=({children:e,component:t,CONSTANTS:n,...s})=>{const{recentlyAddedProducts:o}=Vt(),{isMobile:a}=ne(),i=o.length>3?4:o.length;return r.jsx(vi,{...s,count:i,isMobile:a,CONSTANTS:n,children:r.jsx(Jp,{children:a?r.jsxs(r.Fragment,{children:[r.jsx(_t.Modal,{Z_INDEX_WAR:n.Z_INDEX_WAR,children:t}),e]}):r.jsx(_t.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:n.Z_INDEX_WAR,children:e})})})};Cc.displayName="AddToCart.Root";const Sc=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=Ct();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:n.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:r.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};Sc.displayName="AddToCart.Tooltip";const _t={Card:yc,Content:vc,Footer:xc,Items:bc,Modal:jc,Root:Cc,Tooltip:Sc},Ts=({title:e,...t})=>{const{recentlyAddedProducts:n}=Vt(),{isMobile:s}=ne(),o=n.length>3?4:n.length,a=n.length>(o??1),i=n.length>1;return r.jsx(_t.Root,{isMobile:s,count:n.length,component:r.jsx(_t.Content,{title:e,children:r.jsx(_t.Items,{thumbnail:i,children:a&&r.jsx(d.Badge.Count,{count:n.length-o,size:"medium",variant:"secondary"})})}),...t})};Ts.displayName="AddToCart";const no={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},ef=({children:e,className:t,classNameButton:n,adornment:s,iconPosition:o,scrollToOptions:a,style:i,...c})=>{const l={top:(a==null?void 0:a.top)??0,left:(a==null?void 0:a.left)??0,behavior:(a==null?void 0:a.behavior)??"smooth"},m=o&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},h=()=>{window&&window.document.body.scrollTo({...l})};return r.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(no["card-modifier"],t),style:{...i,padding:0},children:r.jsxs("button",{className:d.helpers.classNameConcat(no["backtotop-btn"],n),onClick:h,style:{...m},"data-orientation":o,children:[s,e]})})},tf="_container_1sy8s_16",lt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:tf,"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"},nf=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:n})=>{const s=Object.values(e.products).length;return r.jsxs("div",{className:lt["add-itens-to-cart-container"],children:[r.jsxs("div",{className:lt["add-itens-to-cart-container-values"],children:[r.jsx("div",{className:lt["add-itens-to-cart-qty-products"],children:r.jsx("span",{children:s===0?n.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?n.BUY_PACKAGE.group_cart.select_product:n.BUY_PACKAGE.group_cart.select_product+"s"}`})}),r.jsx("div",{className:lt["add-itens-to-cart-total"],children:r.jsx("span",{children:T.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:n.FREIGHT_CALCULATION.messages.free_tax})})})]}),r.jsx(d.Button,{onClick:t,className:lt["add-button"],size:"large",disabled:s===0,variant:"primary",children:n.BUY_BUTTON_LABELS.add_to_cart})]})},rf=e=>e.reduce((t,n)=>{var o;const s=t.find(a=>a.node.id===n.node.id);if(!s)return[...t,n];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=n.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),sf=({selectedProduct:e,productId:t,prevState:n,mainSellerId:s})=>{const{products:o,totalPrice:a}=n;try{if(!e){const{[t]:u,...m}=o;return{...n,totalPrice:a-u.price,products:m}}const i=T.getValidOffer(e.offers.offers,s);if(!i)return n;const c=i.seller.identifier,l=i.price;if(o[t]){const{price:u}=o[t];return o[t]={...o[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,products:{...o}}}return{totalPrice:a+l,products:{...o,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),n}},Ec=g.createContext({}),of=({children:e,item:t,index:n,shelfTitle:s,...o})=>{const[a,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=oe(),h=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:n+1},event:y}})},p=()=>{h("add_to_wishlist")},f=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:n}}})},_=()=>{s&&(m.current={item_list_name:s}),h("select_item")};return r.jsx(Ec.Provider,{value:g.useMemo(()=>({...o,index:n,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:p,sendSelectItemEvent:_,sendAddToCartEvent:f}),[o,t,c,a]),children:e})},Ke=()=>{const e=g.useContext(Ec);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Re={"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"},Pc=({callback:e,children:t,className:n,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=Ke();return i?r.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--actions"],n),children:[r.jsxs(pe.Wrapper,{type:"actions--group",children:[r.jsx(pe.Price,{}),r.jsx("div",{className:Re["product-card--actions--selectors"],children:!o&&r.jsx(pe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};Pc.displayName="ProductCard.Actions";const Nc=({className:e,isKit:t,...n})=>{const{addToCart:s}=xe(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ke(),m=()=>{var f;if(!a)return;const p=T.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);p&&s({id:a==null?void 0:a.sku,quantity:1,seller:p.seller.identifier},{id:c.id,texture:(f=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:f.url}),l()},h=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return r.jsx(d.Button,{...n,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?n.onClick:m,children:i?"Avise-me quando chegar":h})};Nc.displayName="ProductCard.Actions.BuyButton";const af={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Rt=({size:e,adornment:t,title:n,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>r.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(af["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[r.jsx(d.SnackBar.Content,{adornment:t,title:n,subtitle:s}),o&&r.jsx(d.SnackBar.Support,{children:o})]});Rt.displayName="SnackBar";const Bt={"wishlist--snack":"_wishlist--snack_3qi1o_9","wishlist--snack--actions":"_wishlist--snack--actions_3qi1o_25","wishlist-grid":"_wishlist-grid_3qi1o_31","wishlist-grid--container":"_wishlist-grid--container_3qi1o_39","pdc-empty-modifier":"_pdc-empty-modifier_3qi1o_49"};var Yr={exports:{}},Oe={};Oe._=Oe._interop_require_default=cf;function cf(e){return e&&e.__esModule?e:{default:e}}var rn={exports:{}},Qn={},ro;function Ic(){return ro||(ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{assign:function(){return a},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}});function n(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function s(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function o(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,m]=l;Array.isArray(m)?m.forEach(h=>c.append(u,s(h))):c.set(u,s(m))}),c}function a(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];return l.forEach(m=>{Array.from(m.keys()).forEach(h=>i.delete(h)),m.forEach((h,p)=>i.append(p,h))}),i}}(Qn)),Qn}var Zn={},sn={},so;function Dn(){if(so)return sn;so=1;function e(n){if(typeof WeakMap!="function")return null;var s=new WeakMap,o=new WeakMap;return(e=function(a){return a?o:s})(n)}sn._=sn._interop_require_wildcard=t;function t(n,s){if(!s&&n&&n.__esModule)return n;if(n===null||typeof n!="object"&&typeof n!="function")return{default:n};var o=e(s);if(o&&o.has(n))return o.get(n);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in n)if(c!=="default"&&Object.prototype.hasOwnProperty.call(n,c)){var l=i?Object.getOwnPropertyDescriptor(n,c):null;l&&(l.get||l.set)?Object.defineProperty(a,c,l):a[c]=n[c]}return a.default=n,o&&o.set(n,a),a}return sn}var oo;function wc(){return oo||(oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=Dn()._(Ic()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:m}=l,h=l.protocol||"",p=l.pathname||"",f=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:m&&(y=u+(~m.indexOf(":")?"["+m+"]":m),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(s.urlQueryToSearchParams(_)));let v=l.search||_&&"?"+_||"";return h&&!h.endsWith(":")&&(h+=":"),l.slashes||(!h||o.test(h))&&y!==!1?(y="//"+(y||""),p&&p[0]!=="/"&&(p="/"+p)):y||(y=""),f&&f[0]!=="#"&&(f="#"+f),v&&v[0]!=="?"&&(v="?"+v),p=p.replace(/[?#]/g,encodeURIComponent),v=v.replace("#","%23"),""+h+y+p+v+f}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(l){return process.env.NODE_ENV==="development"&&l!==null&&typeof l=="object"&&Object.keys(l).forEach(u=>{i.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),a(l)}}(Zn)),Zn}var Jn={},ao;function lf(){return ao||(ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(n,s){const o={};return Object.keys(n).forEach(a=>{s.includes(a)||(o[a]=n[a])}),o}}(Jn)),Jn}var er={},io;function $n(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,P){for(var S in P)Object.defineProperty(x,S,{enumerable:!0,get:P[S]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return v},SP:function(){return p},ST:function(){return f},WEB_VITALS:function(){return n},execOnce:function(){return s},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const n=["CLS","FCP","FID","INP","LCP","TTFB"];function s(x){let P=!1,S;return function(){for(var E=arguments.length,I=new Array(E),A=0;A<E;A++)I[A]=arguments[A];return P||(P=!0,S=x(...I)),S}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=x=>o.test(x);function i(){const{protocol:x,hostname:P,port:S}=window.location;return x+"//"+P+(S?":"+S:"")}function c(){const{href:x}=window.location,P=i();return x.substring(P.length)}function l(x){return typeof x=="string"?x:x.displayName||x.name||"Unknown"}function u(x){return x.finished||x.headersSent}function m(x){const P=x.split("?");return P[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(P[1]?"?"+P.slice(1).join("?"):"")}async function h(x,P){if(process.env.NODE_ENV!=="production"){var S;if((S=x.prototype)!=null&&S.getInitialProps){const A='"'+l(x)+'.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(A)}}const E=P.res||P.ctx&&P.ctx.res;if(!x.getInitialProps)return P.ctx&&P.Component?{pageProps:await h(P.Component,P.ctx)}:{};const I=await x.getInitialProps(P);if(E&&u(E))return I;if(!I){const A='"'+l(x)+'.getInitialProps()" should resolve to an object. But found "'+I+'" instead.';throw new Error(A)}return process.env.NODE_ENV!=="production"&&Object.keys(I).length===0&&!P.ctx&&console.warn(""+l(x)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),I}const p=typeof performance<"u",f=p&&["mark","measure","getEntriesByName"].every(x=>typeof performance[x]=="function");class _ extends Error{}class y extends Error{}class v extends Error{constructor(P){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+P}}class b extends Error{constructor(P,S){super(),this.message="Failed to load static file for page: "+P+" "+S}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(x){return JSON.stringify({message:x.message,stack:x.stack})}}(er)),er}var on={exports:{}},tr={},co;function Rc(){return co||(co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.replace(/\/$/,"")||"/"}}(tr)),tr}var nr={},lo;function Os(){return lo||(lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(n){const s=n.indexOf("#"),o=n.indexOf("?"),a=o>-1&&(s<0||o<s);return a||s>-1?{pathname:n.substring(0,a?o:s),query:a?n.substring(o,s>-1?s:void 0):"",hash:s>-1?n.slice(s):""}:{pathname:n,query:"",hash:""}}}(nr)),nr}var uo;function zn(){return uo||(uo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const n=Rc(),s=Os(),o=a=>{if(!a.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return a;const{pathname:i,query:c,hash:l}=(0,s.parsePath)(a);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,n.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,n.removeTrailingSlash)(i)+c+l};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(on,on.exports)),on.exports}var rr={},an={exports:{}},sr={},mo;function Ac(){return mo||(mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return n}});const t=Os();function n(s,o){if(typeof s!="string")return!1;const{pathname:a}=(0,t.parsePath)(s);return a===o||a.startsWith(o+"/")}}(sr)),sr}var po;function uf(){return po||(po=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const n=Ac(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,n.pathHasPrefix)(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)}(an,an.exports)),an.exports}var fo;function Tc(){return fo||(fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=$n(),n=uf();function s(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(o,a);return i.origin===a&&(0,n.hasBasePath)(i.pathname)}catch{return!1}}}(rr)),rr}var or={},ar={},ho;function df(){return ho||(ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class t{insert(o){this._insert(o.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(o){o===void 0&&(o="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+o+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const c=o==="/"?"/":o.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(o,a,i){if(o.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=o[0];if(c.startsWith("[")&&c.endsWith("]")){let m=function(h,p){if(h!==null&&h!==p)throw new Error("You cannot use different slug names for the same dynamic path ('"+h+"' !== '"+p+"').");a.forEach(f=>{if(f===p)throw new Error('You cannot have the same slug name "'+p+'" 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 "'+p+'" differ only by non-word symbols within a single dynamic path')}),a.push(p)},l=c.slice(1,-1),u=!1;if(l.startsWith("[")&&l.endsWith("]")&&(l=l.slice(1,-1),u=!0),l.startsWith("...")&&(l=l.substring(3),i=!0),l.startsWith("[")||l.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+l+"').");if(l.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+l+"').");if(i)if(u){if(this.restSlugName!=null)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+o[0]+'" ).');m(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 "'+o[0]+'").');m(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');m(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(o.slice(1),a,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(ar)),ar}var ir={},cr={},lr={},ur={},_o;function mf(){return _o||(_o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.startsWith("/")?n:"/"+n}}(ur)),ur}var dr={},go;function pf(){return go||(go=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return n}});function n(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"}(dr)),dr}var yo;function ff(){return yo||(yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return a}});const n=mf(),s=pf();function o(i){return(0,n.ensureLeadingSlash)(i.split("/").reduce((c,l,u,m)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===m.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(lr)),lr}var vo;function Oc(){return vo||(vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return s},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return o}});const n=ff(),s=["(..)(..)","(.)","(..)","(...)"];function o(i){return i.split("/").find(c=>s.find(l=>c.startsWith(l)))!==void 0}function a(i){let c,l,u;for(const m of i.split("/"))if(l=s.find(h=>m.startsWith(h)),l){[c,u]=i.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${i}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,n.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const m=c.split("/");if(m.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=m.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(cr)),cr}var xo;function hf(){return xo||(xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Oc(),n=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),n.test(o)}}(ir)),ir}var bo;function _f(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const n=df(),s=hf()}(or)),or}var mr={},pr={},jo;function gf(){return jo||(jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return n}});const t=$n();function n(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=m=>{try{return decodeURIComponent(m)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(m=>{const h=a[m],p=c[h.pos];p!==void 0&&(u[m]=~p.indexOf("/")?p.split("/").map(f=>l(f)):h.repeat?[l(p)]:l(p))}),u}}}(pr)),pr}var fr={},hr={},Co;function yf(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(q,K){for(var _e in K)Object.defineProperty(q,_e,{enumerable:!0,get:K[_e]})}t(e,{ACTION_SUFFIX:function(){return l},APP_DIR_ALIAS:function(){return L},CACHE_ONE_YEAR:function(){return x},DOT_NEXT_ALIAS:function(){return A},ESLINT_DEFAULT_DIRS:function(){return ae},GSP_NO_RETURNED_VALUE:function(){return se},GSSP_COMPONENT_MEMBER_ERROR:function(){return J},GSSP_NO_RETURNED_VALUE:function(){return ie},INSTRUMENTATION_HOOK_FILENAME:function(){return E},MIDDLEWARE_FILENAME:function(){return P},MIDDLEWARE_LOCATION_REGEXP:function(){return S},NEXT_BODY_SUFFIX:function(){return h},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return j},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return _},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return y},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return f},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return C},NEXT_CACHE_TAGS_HEADER:function(){return p},NEXT_CACHE_TAG_MAX_ITEMS:function(){return v},NEXT_CACHE_TAG_MAX_LENGTH:function(){return b},NEXT_DATA_SUFFIX:function(){return u},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return s},NEXT_META_SUFFIX:function(){return m},NEXT_QUERY_PARAM_PREFIX:function(){return n},NON_STANDARD_NODE_ENV:function(){return w},PAGES_DIR_ALIAS:function(){return I},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return Y},ROOT_DIR_ALIAS:function(){return O},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return F},RSC_ACTION_ENCRYPTION_ALIAS:function(){return U},RSC_ACTION_PROXY_ALIAS:function(){return D},RSC_ACTION_VALIDATE_ALIAS:function(){return Q},RSC_MOD_REF_PROXY_ALIAS:function(){return M},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return c},SERVER_PROPS_EXPORT_ERROR:function(){return le},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return H},SERVER_PROPS_SSG_CONFLICT:function(){return Z},SERVER_RUNTIME:function(){return he},SSG_FALLBACK_EXPORT_ERROR:function(){return W},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return G},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return re},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return $},WEBPACK_LAYERS:function(){return R},WEBPACK_RESOURCE_QUERIES:function(){return Ne}});const n="nxtP",s="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".rsc",l=".action",u=".json",m=".meta",h=".body",p="x-next-cache-tags",f="x-next-cache-soft-tags",_="x-next-revalidated-tags",y="x-next-revalidate-tag-token",v=128,b=256,C=1024,j="_N_T_",x=31536e3,P="middleware",S=`(?:src/)?${P}`,E="instrumentation",I="private-next-pages",A="private-dot-next",O="private-next-root-dir",L="private-next-app-dir",M="private-next-rsc-mod-ref-proxy",Q="private-next-rsc-action-validate",D="private-next-rsc-server-reference",U="private-next-rsc-action-encryption",F="private-next-rsc-action-client-wrapper",Y="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",G="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",H="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",Z="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",re="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",le="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",se="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",ie="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",$="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",J="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",w='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',W="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",ae=["app","pages","components","lib","src"],he={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},N={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},R={...N,GROUP:{serverOnly:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.instrument],clientOnly:[N.serverSideRendering,N.appPagesBrowser],nonClientServerTarget:[N.middleware,N.api],app:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.serverSideRendering,N.appPagesBrowser,N.shared,N.instrument]}},Ne={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}}(hr)),hr}var _r={},So;function vf(){return So||(So=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(n,"\\$&"):o}}(_r)),_r}var Eo;function xf(){return Eo||(Eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,y){for(var v in y)Object.defineProperty(_,v,{enumerable:!0,get:y[v]})}t(e,{getNamedMiddlewareRegex:function(){return f},getNamedRouteRegex:function(){return p},getRouteRegex:function(){return l},parseParameter:function(){return i}});const n=yf(),s=Oc(),o=vf(),a=Rc();function i(_){const y=_.startsWith("[")&&_.endsWith("]");y&&(_=_.slice(1,-1));const v=_.startsWith("...");return v&&(_=_.slice(3)),{key:_,repeat:v,optional:y}}function c(_){const y=(0,a.removeTrailingSlash)(_).slice(1).split("/"),v={};let b=1;return{parameterizedRoute:y.map(C=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(P=>C.startsWith(P)),x=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&x){const{key:P,optional:S,repeat:E}=i(x[1]);return v[P]={pos:b++,repeat:E,optional:S},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(x){const{key:P,repeat:S,optional:E}=i(x[1]);return v[P]={pos:b++,repeat:S,optional:E},S?E?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(C)}).join(""),groups:v}}function l(_){const{parameterizedRoute:y,groups:v}=c(_);return{re:new RegExp("^"+y+"(?:/)?$"),groups:v}}function u(){let _=0;return()=>{let y="",v=++_;for(;v>0;)y+=String.fromCharCode(97+(v-1)%26),v=Math.floor((v-1)/26);return y}}function m(_){let{interceptionMarker:y,getSafeRouteKey:v,segment:b,routeKeys:C,keyPrefix:j}=_;const{key:x,optional:P,repeat:S}=i(b);let E=x.replace(/\W/g,"");j&&(E=""+j+E);let I=!1;(E.length===0||E.length>30)&&(I=!0),isNaN(parseInt(E.slice(0,1)))||(I=!0),I&&(E=v()),j?C[E]=""+j+x:C[E]=x;const A=y?(0,o.escapeStringRegexp)(y):"";return S?P?"(?:/"+A+"(?<"+E+">.+?))?":"/"+A+"(?<"+E+">.+?)":"/"+A+"(?<"+E+">[^/]+?)"}function h(_,y){const v=(0,a.removeTrailingSlash)(_).slice(1).split("/"),b=u(),C={};return{namedParameterizedRoute:v.map(j=>{const x=s.INTERCEPTION_ROUTE_MARKERS.some(S=>j.startsWith(S)),P=j.match(/\[((?:\[.*\])|.+)\]/);if(x&&P){const[S]=j.split(P[0]);return m({getSafeRouteKey:b,interceptionMarker:S,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return P?m({getSafeRouteKey:b,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function p(_,y){const v=h(_,y);return{...l(_),namedRegex:"^"+v.namedParameterizedRoute+"(?:/)?$",routeKeys:v.routeKeys}}function f(_,y){const{parameterizedRoute:v}=c(_),{catchAll:b=!0}=y;if(v==="/")return{namedRegex:"^/"+(b?".*":"")+"$"};const{namedParameterizedRoute:C}=h(_,!1);let j=b?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(fr)),fr}var Po;function bf(){return Po||(Po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=gf(),n=xf();function s(o,a,i){let c="";const l=(0,n.getRouteRegex)(o),u=l.groups,m=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const h=Object.keys(u);return h.every(p=>{let f=m[p]||"";const{repeat:_,optional:y}=u[p];let v="["+(_?"...":"")+p+"]";return y&&(v=(f?"":"/")+"["+v+"]"),_&&!Array.isArray(f)&&(f=[f]),(y||p in m)&&(c=c.replace(v,_?f.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(f))||"/")})||(c=""),{params:h,result:c}}}(mr)),mr}var No;function jf(){return No||(No=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const n=Ic(),s=wc(),o=lf(),a=$n(),i=zn(),c=Tc(),l=_f(),u=bf();function m(h,p,f){let _,y=typeof p=="string"?p:(0,s.formatWithValidation)(p);const v=y.match(/^[a-zA-Z]{1,}:\/\//),b=v?y.slice(v[0].length):y;if((b.split("?",1)[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 j=(0,a.normalizeRepeatedSlashes)(b);y=(v?v[0]:"")+j}if(!(0,c.isLocalURL)(y))return f?[y]:y;try{_=new URL(y.startsWith("#")?h.asPath:h.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let x="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&f){const S=(0,n.searchParamsToUrlQuery)(j.searchParams),{result:E,params:I}=(0,u.interpolateAs)(j.pathname,j.pathname,S);E&&(x=(0,s.formatWithValidation)({pathname:E,hash:j.hash,query:(0,o.omit)(S,I)}))}const P=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return f?[P,x||P]:P}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)}(rn,rn.exports)),rn.exports}var cn={exports:{}},gr={},yr={},Io;function Lc(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return n}});const t=Os();function n(s,o){if(!s.startsWith("/")||!o)return s;const{pathname:a,query:i,hash:c}=(0,t.parsePath)(s);return""+o+a+i+c}}(yr)),yr}var wo;function Cf(){return wo||(wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return s}});const t=Lc(),n=Ac();function s(o,a,i,c){if(!a||a===i)return o;const l=o.toLowerCase();return!c&&((0,n.pathHasPrefix)(l,"/api")||(0,n.pathHasPrefix)(l,"/"+a.toLowerCase()))?o:(0,t.addPathPrefix)(o,"/"+a)}}(gr)),gr}var Ro;function Sf(){return Ro||(Ro=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const n=zn(),s=function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,n.normalizePathTrailingSlash)(Cf().addLocale(o,...i)):o};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(cn,cn.exports)),cn.exports}var vr={},Ao;function kc(){return Ao||(Ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(vr)),vr}var xr={},To;function Ef(){return To||(To=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,m){for(var h in m)Object.defineProperty(u,h,{enumerable:!0,get:m[h]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=Oe._(g),o=s.default.createContext(null),a=s.default.createContext(null),i=s.default.createContext(null),c=s.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",a.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",c.displayName="TemplateContext");const l=s.default.createContext(new Set)}(xr)),xr}var ln={exports:{}},un={exports:{}},Oo;function Mc(){return Oo||(Oo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return s}});const s=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(un,un.exports)),un.exports}var Lo;function Pf(){return Lo||(Lo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const n=g,s=Mc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(m){const h={root:m.root||null,margin:m.rootMargin||""},p=i.find(v=>v.root===h.root&&v.margin===h.margin);let f;if(p&&(f=a.get(p),f))return f;const _=new Map,y=new IntersectionObserver(v=>{v.forEach(b=>{const C=_.get(b.target),j=b.isIntersecting||b.intersectionRatio>0;C&&j&&C(j)})},m);return f={id:h,observer:y,elements:_},i.push(h),a.set(h,f),f}function l(m,h,p){const{id:f,observer:_,elements:y}=c(p);return y.set(m,h),_.observe(m),function(){if(y.delete(m),_.unobserve(m),y.size===0){_.disconnect(),a.delete(f);const b=i.findIndex(C=>C.root===f.root&&C.margin===f.margin);b>-1&&i.splice(b,1)}}}function u(m){let{rootRef:h,rootMargin:p,disabled:f}=m;const _=f||!o,[y,v]=(0,n.useState)(!1),b=(0,n.useRef)(null),C=(0,n.useCallback)(x=>{b.current=x},[]);(0,n.useEffect)(()=>{if(o){if(_||y)return;const x=b.current;if(x&&x.tagName)return l(x,S=>S&&v(S),{root:h==null?void 0:h.current,rootMargin:p})}else if(!y){const x=(0,s.requestIdleCallback)(()=>v(!0));return()=>(0,s.cancelIdleCallback)(x)}},[_,p,h,y,b.current]);const j=(0,n.useCallback)(()=>{v(!1)},[]);return[C,y,j]}(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)}(ln,ln.exports)),ln.exports}var dn={exports:{}},mn={exports:{}},br={},ko;function Nf(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(n,s){let o;const a=n.split("/");return(s||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(o=i,a.splice(1,1),n=a.join("/")||"/",!0):!1),{pathname:n,detectedLocale:o}}}(br)),br}var Mo;function If(){return Mo||(Mo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const n=(s,o)=>process.env.__NEXT_I18N_SUPPORT?Nf().normalizeLocalePath(s,o):{pathname:s,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)}(mn,mn.exports)),mn.exports}var pn={exports:{}},jr={},Do;function wf(){return Do||(Do=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(n,s,o){if(n){o&&(o=o.toLowerCase());for(const c of n){var a,i;const l=(a=c.domain)==null?void 0:a.split(":",1)[0].toLowerCase();if(s===l||o===c.defaultLocale.toLowerCase()||(i=c.locales)!=null&&i.some(u=>u.toLowerCase()===o))return c}}}}(jr)),jr}var $o;function Rf(){return $o||($o=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return n}});const n=function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return wf().detectDomainLocale(...o)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(pn,pn.exports)),pn.exports}var zo;function Af(){return zo||(zo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const n=zn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=If().normalizeLocalePath,m=Rf().detectDomainLocale,h=i||u(a,c).detectedLocale,p=m(l,void 0,h);if(p){const f="http"+(p.http?"":"s")+"://",_=h===p.defaultLocale?"":"/"+h;return""+f+p.domain+(0,n.normalizePathTrailingSlash)(""+s+_+a)}return!1}else return!1}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(dn,dn.exports)),dn.exports}var fn={exports:{}},Fo;function Tf(){return Fo||(Fo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const n=Lc(),s=zn(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,n.addPathPrefix)(i,o))}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(fn,fn.exports)),fn.exports}var hn={exports:{}},Bo;function Of(){return Bo||(Bo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(f,_){for(var y in _)Object.defineProperty(f,y,{enumerable:!0,get:_[y]})}n(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return h},PrefetchKind:function(){return m},isThenable:function(){return p}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var m;(function(f){f.AUTO="auto",f.FULL="full",f.TEMPORARY="temporary"})(m||(m={}));var h;(function(f){f.fresh="fresh",f.reusable="reusable",f.expired="expired",f.stale="stale"})(h||(h={}));function p(f){return f&&(typeof f=="object"||typeof f=="function")&&typeof f.then=="function"}(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)}(hn,hn.exports)),hn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});const n=Oe,s=r,o=n._(g),a=jf(),i=Tc(),c=wc(),l=$n(),u=Sf(),m=kc(),h=Ef(),p=Pf(),f=Af(),_=Tf(),y=Of(),v=new Set;function b(E,I,A,O,L,M){if(typeof window>"u"||!M&&!(0,i.isLocalURL)(I))return;if(!O.bypassPrefetchedCheck){const D=typeof O.locale<"u"?O.locale:"locale"in E?E.locale:void 0,U=I+"%"+A+"%"+D;if(v.has(U))return;v.add(U)}(async()=>M?E.prefetch(I,L):E.prefetch(I,A,O))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function C(E){const A=E.currentTarget.getAttribute("target");return A&&A!=="_self"||E.metaKey||E.ctrlKey||E.shiftKey||E.altKey||E.nativeEvent&&E.nativeEvent.which===2}function j(E,I,A,O,L,M,Q,D,U){const{nodeName:F}=E.currentTarget;if(F.toUpperCase()==="A"&&(C(E)||!U&&!(0,i.isLocalURL)(A)))return;E.preventDefault();const G=()=>{const H=Q??!0;"beforePopState"in I?I[L?"replace":"push"](A,O,{shallow:M,locale:D,scroll:H}):I[L?"replace":"push"](O||A,{scroll:H})};U?o.default.startTransition(G):G()}function x(E){return typeof E=="string"?E:(0,c.formatUrl)(E)}const S=o.default.forwardRef(function(I,A){let O;const{href:L,as:M,children:Q,prefetch:D=null,passHref:U,replace:F,shallow:Y,scroll:G,locale:H,onClick:Z,onMouseEnter:re,onTouchStart:le,legacyBehavior:se=!1,...ie}=I;O=Q,se&&(typeof O=="string"||typeof O=="number")&&(O=(0,s.jsx)("a",{children:O}));const $=o.default.useContext(m.RouterContext),J=o.default.useContext(h.AppRouterContext),w=$??J,W=!$,ae=D!==!1,he=D===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let z=function(B){return new Error("Failed prop type: The prop `"+B.key+"` expects a "+B.expected+" in `<Link>`, but got `"+B.actual+"` instead."+(typeof window<"u"?`
|
|
1
|
+
"use strict";var em=Object.defineProperty;var tm=(e,t,n)=>t in e?em(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tn=(e,t,n)=>tm(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),g=require("react"),T=require("./index-CKV97AXT.js"),Ze=require("idb-keyval"),xt=require("zustand"),Ur=require("js-cookie"),d=require("@soma-vertical-web/core-components"),ht=require("axios"),Hr=require("@date-fns/tz"),nm=require("jose"),wt=require("@soma-vertical-web/foundations"),ls=require("react-dom"),Ye=require("draft-js"),_a=require("react-intersection-observer"),us=g.createContext({}),rm=({data:e,children:t})=>r.jsx(us.Provider,{value:{tags:e==null?void 0:e.config},children:t}),mt=()=>{const{tags:e}=g.useContext(us),t=g.useCallback(n=>{var c,l,u,m;const s=(l=(c=e==null?void 0:e.commercial)==null?void 0:c.items)==null?void 0:l.find(h=>{var p;return(p=n??[])==null?void 0:p.find(f=>f.id===h.key)}),o=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(h=>{var p;return(p=n??[])==null?void 0:p.find(f=>f.id===h.key)}),a=e==null?void 0:e.flagPdp,i=(n==null?void 0:n.find(h=>{var p;return h.id===((p=e==null?void 0:e.flagGoldenPdp)==null?void 0:p.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:o,flagPdp:a,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},ga=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},ya=g.createContext({}),sm=({children:e,gridScrollBack:t})=>{const n=g.useRef(null);return ga({gridScrollBack:t}),r.jsx(ya.Provider,{value:{sizesContainerRef:n},children:e})},va=()=>{const e=g.useContext(ya);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},it=({event:e,data:t})=>{const n=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&n.push({ecommerce:null}),n.push({...e&&{event:`custom_${e}`},...t})},Ce={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:n,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,h={...n==="view_item"?{currency:Ce.configs.currency,value:m,grade_disponivel:l??(u?xa(u):"")}:{},...n==="add_to_wishlist"||n==="remove_from_wishlist"?{value:m,currency:Ce.configs.currency}:{}},p=nn({data:s,customData:{...o,...i,...a},configs:Ce.configs});it({event:n,data:{...c,ecommerce:{...i,...h,items:[p]}}}),typeof t=="function"&&t(p,h)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:n,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>nn({data:{...c},customData:{...n,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Ce.configs}));it({event:"view_item_list",data:{...o,ecommerce:{...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:n},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=n.map(h=>{var y,v,b,C,j,x,P,S,E;const p=o==null?void 0:o.find(I=>(h.productId??h.id)===I.productId);let f={...i,...c};if(p){const I=ja(),A=Ca(I,p);A&&(f={...f,...A}),t==="add_to_cart"&&(i||c)&&qr({persistedData:I,type:"add",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&qr({persistedData:I,type:"remove",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)})}u+=h.price??((b=(v=(y=p==null?void 0:p.offers)==null?void 0:y.offers)==null?void 0:v[0])==null?void 0:b.price)??0;const _=(p==null?void 0:p.size)??T.getColorAndSizeFromSkuName((p==null?void 0:p.skuName)??(p==null?void 0:p.name)??((C=h.itemOffered)==null?void 0:C.skuName),Ce.configs.NAME_SPLIT_SYMBOL).size;return nn({data:h,customData:{...s,...f??{...i,...c},item_sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)??((j=h.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??h.quantity??1,item_variant2:_,seller_id:(p==null?void 0:p.sellerId)??(p==null?void 0:p.seller)??((E=(S=(P=(x=p==null?void 0:p.offers)==null?void 0:x.offers)==null?void 0:P[0])==null?void 0:S.seller)==null?void 0:E.identifier)??h.seller},configs:Ce.configs})});it({event:t,data:{...l,ecommerce:{value:a??u,currency:Ce.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:n,outsideEcommerceData:s}=e,o={},a={};Array.isArray(t==null?void 0:t.selectedFacets)&&((i=t==null?void 0:t.selectedFacets)!=null&&i.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:c,value:l})=>{var h;const u=((h=Ce.configs.PLP_FILTERS.find(p=>p.key===c))==null?void 0:h.eventLabel)??c,m=(o==null?void 0:o[u])||[];u==="price_range"&&l.replace(":","-"),o[u]=[...m,l]}),Object.keys(o).forEach(c=>a[c]=o[c].join(", "))),it({event:"filter",data:{...s,...a,...n}})},viewCartEvent:e=>{var m,h,p,f,_,y,v,b,C,j;const{commonData:t,outsideEcommerceData:n}=e,{cartStore:s}=t;if(!s)return;const o=window.localStorage.getItem("persistedCartEventsData"),a=o?JSON.parse(o):{},i=s.items.map(x=>{const{promotionInfo:P,itemList:S}=a[x.id]??{};return nn({data:{...x,price:x.price/100,listPrice:x.listPrice/100},customData:{...P,...S,item_sku:x.id??x.itemOffered.sku,quantity:x.quantity??1},configs:Ce.configs})}),c=(((m=s.totalizers.find(x=>x.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((h=s.totalizers.find(x=>x.name==="Total dos Descontos"))==null?void 0:h.value)??0)/100,u=((p=s.marketingData)==null?void 0:p.utmiCampaign)===Ce.configs.VENDOR_CODE?(f=s.marketingData)==null?void 0:f.utmCampaign:(y=String((_=s.openTextField)==null?void 0:_.value))==null?void 0:y.split(" - ")[0];it({event:"view_cart",data:{...n,ecommerce:{currency:Ce.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((b=(v=s.shippingData)==null?void 0:v.address)!=null&&b.postalCode),...u?{seller_coupon_name:u}:{},...((C=s.marketingData)==null?void 0:C.coupon)&&{sale_coupon_name:(j=s.marketingData)==null?void 0:j.coupon},subtotal:c,items:i}}})},readyEvents:e=>{const{event:t,readyData:n}=e;it({event:t,data:{...n}})}},xa=e=>e.reduce((t,n)=>(n.available&&t.push(n.value),t),[]).toString(),om=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Ce.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},nn=({data:e,customData:t,configs:n})=>({...am(e,n==null?void 0:n.MAIN_IMAGE),...im(e),...cm(e),...lm(e),...t}),ba=()=>{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("_"))??[]:[]},ja=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Ca=(e,t)=>e==null?void 0:e[t],qr=({persistedData:e,type:t,sku:n,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[n]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[n]:s}));return}e&&t==="remove"&&(delete e[n],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},am=(e,t="1")=>{var a,i,c,l,u,m,h,p,f,_,y;const n=e.productReference??e.gtin??e.productRefId,s=e.image??((i=(a=e.items)==null?void 0:a[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),o=s==null?void 0:s.find(v=>v.alternateName===t||v.imageLabel===t||v.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((h=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:h.productGroupID),item_ref:/_\d$/.test(n)?n.slice(0,-2):n,item_name:e.productTitle??e.productName??e.name??T.splitNameAndSizeFromFullName((p=e.itemOffered)==null?void 0:p.name,Ce.configs.NAME_SPLIT_SYMBOL).name,item_brand:((f=e.brand)==null?void 0:f.brandName)??((_=e.brand)==null?void 0:_.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${Ce.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},Xs=e=>Array.isArray(e)?e.reduce((t,n)=>(n.length>t.length&&(t=n),t),""):e,im=e=>{var u,m;const{categories:t,categoriesIds:n}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=n??((m=e.itemOffered)==null?void 0:m.categoriesIds),a=Xs(s),i=Xs(o),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Ce.configs.categoryOff)?"Bazar":"Coleção",...c[1]&&{item_category2:c[1]},...c.length>2&&{item_category3:c[c.length-1]},item_category_id:l[l.length-1],...l.length>1&&{item_parent_category_id:l[l.length-2]}}},cm=e=>{var o,a,i,c,l,u;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((c=(i=(a=e.isVariantOf)==null?void 0:a.hasVariant)==null?void 0:i[0])==null?void 0:c.name)??((u=(l=e.items)==null?void 0:l[0])==null?void 0:u.name),{color:n,size:s}=T.getColorAndSizeFromSkuName(t,Ce.configs.NAME_SPLIT_SYMBOL);return{item_variant:n,...e.itemOffered&&{item_variant2:s}}},lm=e=>{var l,u;const{price:t,listPrice:n,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=n??((u=e.offers)==null?void 0:u.highPrice)??0,i=a?a-o:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:o??a},...a&&{list_price:a,discount:c},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Ce.configs.currency}},Sa=()=>{const[e,t]=ba(),[n,s]=e.split("-"),o=n.includes("shop")||n.includes("sale")?n:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},um=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Ce,findDataInPersistedData:Ca,getAvailablesSizes:xa,getCategories:om,getPageCategoryAndDepartmentFromSlug:Sa,getPersistedData:ja,getProductListInfoFromHead:ba,pushDatalayer:it,updatePersistedData:qr},Symbol.toStringTag,{value:"Module"})),Ea=g.createContext({}),dm=({children:e,evtFunctionsConfigs:t})=>{const n=g.useRef({}),s=g.useRef(null),o=g.useRef(null),a=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:m,data:h,callBack:p,timeout:f=100})=>{window.dataLayer||(window.dataLayer=[]),Ce.configs=t;try{typeof Ce[m]=="function"&&setTimeout(()=>{var _;h.promotionInfo=n.current,(_=o.current)!=null&&_.item_list_name&&(h.itemList=o.current),Ce[m](h,p)},f)}catch(_){it({event:"error_event",data:{error_message:(_==null?void 0:_.message)??_}})}},l=({content:m})=>{c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:m.replace("::",":")}}})},u=({updatePromotionRef:m,promotion:h,index:p})=>{m&&(n.current={...h}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...h,...p!==void 0&&{index:p}}}}})};return r.jsx(Ea.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:n,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},oe=()=>g.useContext(Ea),Pa=g.createContext({}),mm=({children:e,productData:t,isKit:n,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var D,U;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=oe(),{productId:l,productName:u,items:m,items:[{images:h,Videos:p}],description:f,["Composição"]:_="",productReference:y,categories:[v]}=t,{getAvailableProductTag:b}=mt(),C=b(Object.entries(t.clusterHighlights).map(F=>({id:F[0],name:F[1]}))),j=v.slice(1,-1).split("/"),{installments:x,price:P,listPrice:S,sizes:E,allSizesAvailable:I}=T.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:o}),A=T.getThumbImage({images:h,TEXTURE_IMAGE:a}),O=[{label:`${s.product.description}`,value:"description",content:f},{label:`${s.product.materiais}`,value:"composition",content:_}],L=((U=T.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,o))==null?void 0:U.color)??t["Cores Filtráveis"][0]??"",M=()=>({commonData:{...t,sizes:E,price:P,listPrice:S,installments:x},customData:{installments:x==null?void 0:x.count,installment_value:Number(x==null?void 0:x.value).toFixed(2)}}),Q=({sku:F,size:Y})=>{const{commonData:G,customData:H}=M();i({functionKey:"productEvents",data:{event:"view_item",commonData:G,customData:{...H,...F&&{item_sku:F},...Y&&{item_variant2:Y}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:F,customData:Y}=M();i({functionKey:"productEvents",data:{event:"select_item",commonData:F,customData:{...Y,index:c.current.index}}}),c.current.trigger=!1}Q({})},[]),r.jsx(Pa.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:m,sizes:E,allSizesAvailable:I,installments:x,price:P,listPrice:S,thumbImage:A,images:h,video:p[0],descriptionContent:O,breadcrumbList:j,isKit:n,colorName:L,handleViewItemEvent:Q},children:e})},Le=()=>{const e=g.useContext(Pa);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},pm=()=>{const[e,t]=g.useState(null);return[e,async s=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(s),t(s),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},Na=()=>{g.useEffect(()=>{const e=t=>{t.preventDefault()};return document.addEventListener("gesturestart",e),document.addEventListener("gesturechange",e),document.addEventListener("dblclick",e),document.addEventListener("wheel",t=>{t.ctrlKey&&e(t)}),()=>{document.removeEventListener("gesturestart",e),document.removeEventListener("gesturechange",e),document.removeEventListener("dblclick",e),document.removeEventListener("wheel",e)}},[])},fm=typeof window>"u",hm=(e,t)=>{const[n,s]=g.useState(()=>{if(fm)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return g.useEffect(()=>{const a=i=>{i.storageArea===localStorage&&i.key===e&&s(JSON.parse(i.newValue))};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}},[e,t]),[n,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function ds(e,t,n){const[s,o]=g.useState(!1),{threshold:a}=n||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(n!=null&&n.delay){i&&clearTimeout(i),i=setTimeout(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},n.delay);return}o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:a||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),s}const An=({callback:e,onEnterViewportOnce:t,options:n})=>{const s=g.useRef(null);return g.useEffect(()=>{const o=s.current;if(!o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(a.unobserve(o),a.disconnect()))},n);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,n]),{element:s}},Ia=({defaultScale:e=1,maxScale:t=3})=>{const n=g.useRef(null),s=g.useRef(null),[o,a]=g.useState(e),i=g.useRef(0),c=g.useRef({x:0,y:0}),l=g.useRef({x:0,y:0}),u=()=>{if(!s.current||!n.current)return{minX:0,maxX:0,minY:0,maxY:0};const f=n.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,v=_.height,b=Math.min(0,(f.width-y)/2),C=Math.max(0,(y-f.width)/2),j=Math.min(0,(f.height-v)/2),x=Math.max(0,(v-f.height)/2);return{minX:b,maxX:C,minY:j,maxY:x}},m=(f,_,y)=>{if(s.current){const v=s.current.children[0];v&&requestAnimationFrame(()=>{v.style.transform=`translate(calc(-50% + ${f}px), calc(-50% + ${_}px)) scale(${y})`})}},h=g.useCallback(f=>{const{minX:_,maxX:y,minY:v,maxY:b}=u(),{x:C,y:j}=l.current,x=Math.max(_,Math.min(y,C)),P=Math.max(v,Math.min(b,j));if(f.touches.length>1){const S=f.touches[0],E=f.touches[1],I=S.pageX-E.pageX,A=S.pageY-E.pageY;i.current=Math.sqrt(I*I+A*A),c.current={x:(S.pageX+E.pageX)/2,y:(S.pageY+E.pageY)/2}}else f.touches.length===1&&(c.current={x:f.touches[0].pageX-x,y:f.touches[0].pageY-P})},[o,l]),p=g.useCallback(f=>{if(!s.current||!n.current)return;const{minX:_,maxX:y,minY:v,maxY:b}=u();if(f.touches.length>1){f.preventDefault();const C=f.touches[0],j=f.touches[1],x=C.pageX-j.pageX,P=C.pageY-j.pageY,S=Math.sqrt(x*x+P*P);if(!i.current){i.current=S;return}const E=S/i.current,I=Math.max(1,Math.min(t,o*E));if(o===I)return;a(I);const A=(C.pageX+j.pageX)/2,O=(C.pageY+j.pageY)/2;let L=A-c.current.x,M=O-c.current.y;L=Math.max(_,Math.min(y,L)),M=Math.max(v,Math.min(b,M)),l.current={x:L,y:M},i.current=S,m(L,M,I)}else if(f.touches.length===1){const C=f.touches[0].pageX,j=f.touches[0].pageY;let x=C-c.current.x,P=j-c.current.y;x=Math.max(_,Math.min(y,x)),P=Math.max(v,Math.min(b,P)),l.current={x,y:P},m(x,P,o)}},[t,o]);return g.useEffect(()=>(document.addEventListener("touchstart",h),document.addEventListener("touchmove",p,{passive:!1}),()=>{document.removeEventListener("touchstart",h),document.removeEventListener("touchmove",p)}),[p,h]),{containerRef:n,imgRef:s,scale:o}},_m={attachment:"ATTACHMENT",specification:"SPECIFICATION",attribute:"ATTRIBUTE"},qe=Promise.resolve(!1),Vr={id:"",isOpen:!1,items:[],loading:!1,marketingData:null,messages:[],openTextField:{},paymentData:null,shippingData:null,totalizers:[],itemMetadata:[],recentlyAddedProducts:[],addCoupon:()=>qe,addItem:()=>qe,addSellerCode:()=>qe,addMarketingData:()=>qe,emptyCart:()=>({}),removeItem:()=>qe,setIsOpen:()=>({}),shipping:()=>qe,shippingUpdate:()=>qe,toggleServiceToProduct:()=>qe,updateItemQuantity:()=>qe,insertProfileEmail:()=>qe,setRecentlyAddedProducts:()=>({})},ms=e=>e===0,wa=(e,t)=>{if(!e||e.length===0)return[];let n="";const s=[],o=e.match(/\d+/g)??[];for(const a of o){const i=t[Number(a)];i&&(n+=(n?"/":"")+i,s.push(n))}return s},Ra=(e,t)=>{const{availability:n,additionalInfo:{brandName:s},bundleItems:o,id:a,uniqueId:i,detailUrl:c,ean:l,imageUrl:u,name:m,listPrice:h,quantity:p,price:f,priceDefinition:_,productCategories:y,productCategoryIds:v,productId:b,refId:C,seller:j,referenceId:x,offerings:P,productRefId:S,skuName:E,sellingPrice:I}=e;return{availability:n,bundleItems:o,referenceId:x,productRefId:S,id:a,ean:l,uniqueId:i,itemOffered:{additionalProperty:[],brand:{name:s},categories:wa(v,y),categoriesIds:v,gtin:C,image:[{alternateName:(t==null?void 0:t.MAIN_IMAGE)??"1",url:u}],name:m,isVariationOf:{name:m,productGroupID:b},sku:a,slug:c,skuName:E},listPrice:h,quantity:p,offerings:P,price:f,priceDefinition:_,sellingPrice:I,seller:j}},Aa=(e,t)=>{const n=e.map(s=>({id:s.uniqueId,quantity:s.quantity,seller:s.seller}));return Array.isArray(t)?[...n,...t]:[...n,t]},Ta=(e,t)=>{const n=e.find(s=>s.id===t);if(n){const s=e.map((o,a)=>{var i,c;return{id:((i=o.itemOffered)==null?void 0:i.sku)??"",index:a,quantity:(n==null?void 0:n.id)===((c=o.itemOffered)==null?void 0:c.sku)?0:o.quantity,seller:o.seller??""}});return{updateItems:s,filterItems:s.filter(o=>o.id!==t)}}return{updateItems:[],filterItems:[]}},Oa=(e,t,n)=>e.filter(s=>s.availability!=="withoutStock"&&s.availability!=="https://schema.org/OutOfStock").map((s,o)=>{var a,i;return s.id===t?{id:s.id,index:o,quantity:n,seller:s.seller,sku:((a=s.itemOffered)==null?void 0:a.sku)??""}:{id:s.id,index:o,quantity:s.quantity,seller:s.seller,sku:((i=s.itemOffered)==null?void 0:i.sku)??""}}),Wr=(e,t)=>e.filter(n=>n.availability!=="withoutStock").findIndex(({id:n})=>n===t),gm=(e,t)=>{var n;return Array.isArray(e)?(((n=e==null?void 0:e.find(s=>{var o;return((o=s==null?void 0:s.id)==null?void 0:o.toLowerCase())===t}))==null?void 0:n.value)??0)/100:0},ym=e=>{const t=e.reduce((o,a)=>{const i=ms(a.price)?0:a.quantity;return o+i},0),n=e.reduce((o,a)=>o+a.price*a.quantity,0),s=e.reduce((o,a)=>o+a.listPrice*a.quantity,0);return{totalItems:t,total:n,subTotal:s}},vm=e=>Array.isArray(e)?e.filter(t=>t.availability!=="withoutStock").reduce((t,n)=>t+(ms(n==null?void 0:n.price)?0:n.quantity),0):0,La=(e,t)=>{const{items:n,orderFormId:s,...o}=e;return{...o,id:s,items:Array.isArray(n)?n.map(a=>Ra(a,t)):[]}},ka=(e,t)=>{const n=e.find(s=>s.id===t);return n?n.availability==="unavailableItemFulfillment":!1},xm=(e,t)=>{const n=e.sku,s=e.isVariantOf.hasVariant.find(o=>o.sku===n);return s?s.name.split(t)[1]:"--"},Pt=(e,t,n=!1)=>!e&&t!==""?{code:300,value:t,statusOk:n}:e===t?{code:200,value:t,statusOk:n}:{code:400,value:t,statusOk:n},bm=(e,t)=>{const n=new Set;return[e,...t].filter(s=>!n.has(s)&&n.add(s),n)},Ma=(e,t)=>t&&Array.isArray(t)&&t.find(s=>s.id===e)?Promise.resolve(e):Promise.resolve(!1),Da=(e,t)=>t?Promise.resolve(e[t]):Promise.resolve(!1),$a=async e=>{try{const t=await e();if(typeof t!="boolean")return t}catch(t){console.error(`[Error orderForm]: ${t}`)}return!1},za=(e,t)=>{if(t!==-1){const n=Number(e);return n?n+1:1}return e??1},Fa=(e,t)=>Array.isArray(e)?e.filter(n=>t==null?void 0:t.some(s=>s.id===n.id)):[],Ba=async(e,t)=>e.then(n=>[...n??[],...t??[]]),Te=async(e,t,n,s)=>{const{priority:o="auto",body:a}=t;return fetch(e,{headers:{"Content-Type":"application/json"},priority:o,method:"POST",body:JSON.stringify(a)}).then(async i=>{const c=await i.json();return n?c:La(c,s)})},Ua=(e,t,n)=>({notifications:[...e.notifications,{id:Date.now(),message:t,callback:n}]}),Ha=e=>[...Array.isArray(e)?e:[e],"faststore"],qa=e=>{const t=e.get("utm_source")||ft("utm_source"),n=e.get("utm_campaign")||ft("utm_campaign"),s=e.get("utm_medium")||ft("utm_medium"),o=e.get("utmi_cp")||ft("utmi_cp"),a=e.get("utmi_pc")||ft("utmi_pc"),i=e.get("utmi_p")||ft("utmi_p");return{...t&&{utmSource:t},...s&&{utmMedium:s},...n&&{utmCampaign:n},...o&&{utmiCampaign:o},...a&&{utmiPart:a},...i&&{utmipage:i}}},ft=e=>{if(!e||typeof window>"u")return;const t=window.location.href;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),s=n.exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null},Va=(e,t,n="BR")=>{const s=t,o={country:n,addressType:"",postalCode:e||null,city:"",state:"",street:"",number:"",neighborhood:"",complement:"",reference:"",geoCoordinates:[]};if(s){const a=typeof s=="object"&&"latitude"in s?s.latitude:null,i=typeof s=="object"&&"longitude"in s?s.longitude:null;o.geoCoordinates=typeof a=="number"&&typeof i=="number"?{latitude:a,longitude:i}:null}return[o]},jm=Object.freeze(Object.defineProperty({__proto__:null,VALUE_REFERENCES:_m,addItemOrder:Aa,addNotification:Ua,createItemOrder:Ra,createNewAddress:Va,fetchCartAPI:Te,findItemIndex:Wr,findOptions:Fa,findTotalizerValue:gm,getCategories:wa,getCode:Pt,getQuantity:za,getRemoveId:Ma,getSize:xm,getTotalItems:vm,getTotalizer:ym,getUrlParameter:ft,getValue:Da,initialState:Vr,isGift:ms,marketingTagsBuilder:Ha,mergeOptionsPromise:Ba,mountMarketingData:qa,orderFormValues:La,promiseDefault:qe,removeQuantity:Ta,updateItemSellerExternal:ka,updateOrderFormPromise:$a,updateQuantity:Oa,wishlistArray:bm},Symbol.toStringTag,{value:"Module"})),Cm=()=>{const e=async(f,_)=>Te("/api/checkout/order-form/coupon",{body:{orderFormId:f,coupon:_}}),t=async(f,_,y={},v)=>{if(v)if(_){const b=_.includes(" - ")?_.split(" - ")[0]:_,C=await Te("/api/checkout/order-form/seller-code",{body:{orderFormId:f,sellerCode:b}},!0);return C instanceof Object&&y.name in C&&C[y.status]===!0?Te("/api/checkout/order-form/attachments",{body:{orderFormId:f,sellerCode:b,sellerName:C[y.name]}}).then(x=>({...x,openTextField:{...(x==null?void 0:x.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:b}})}else return Te("/api/checkout/order-form/attachments",{body:{orderFormId:f,sellerCode:"",sellerName:""}})},n=async(f,_)=>Te("/api/checkout/order-form/attachments/marketing-data",{body:{orderFormId:f,marketingData:_}}),s=async(f,_,y)=>Te("/api/checkout/order-form/items",{body:{orderFormId:f,orderItems:Aa(_,y)}}),o=async(f,_,y,v=!1)=>Te("/api/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:f,remove:v}}),a=async f=>Te("/api/checkout/order-form/items/remove-all",{body:{orderFormId:f}}),i=async(f,_="low")=>Te("/api/checkout/order-form",{priority:_,body:{orderFormId:f??""}}),c=async(f,_)=>Te("/api/checkout/order-form/profile",{body:{orderFormId:f,email:_}}),l=async(f,_,y)=>{const v=Ta(_,y);return Te("/api/checkout/order-form/items/update",{body:{orderItems:v.updateItems,orderFormId:f}})},u=async(f,_,y,v,b,C,j)=>{var S,E;const x=j?{startDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.startDate,endDateUtc:(E=C==null?void 0:C.deliveryWindow)==null?void 0:E.endDate}:null,P={logisticsInfo:Array.from({length:v},(I,A)=>({itemIndex:A,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:x})),selectedAddresses:b,clearAddressIfPostalCodeNotFound:!0};return Te("/api/checkout/order-form/shipping",{body:{...P,orderFormId:f,country:y,postalCode:_}})},m=async(f,_,y)=>Te("/api/checkout/order-form/shipping/update",{body:{orderFormId:f,options:_,selectedAddresses:y}}),h=async(f,_,y,v)=>{const b=Oa(_,y,v);return Te("/api/checkout/order-form/items/update",{body:{orderFormId:f,orderItems:b}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:n,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(f,_,y,v,b)=>h(f,_,y,v).then(C=>C&&Array.isArray(C.items)?ka(C.items,y)?h(f,_,y,b):C:!1)}},Gr="soma::cart",$t="soma::options",gt=xt.create((e,t)=>{const n=Cm(),s=async(o,a,i)=>{e({loading:!0});const c=await $a(o);if(typeof c!="boolean"){e({...c});const l=await Ba(Ze.get($t),i);return Ze.set($t,l),Da(c,a).finally(()=>e({loading:!1,options:l}))}return qe};if(typeof window<"u"){const o=async a=>{if(a){const i=await Ze.get($t).then(u=>Fa(u,a.items));Ze.set(Gr,a),Ze.set($t,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>n.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Ze.get(Gr).then(a=>n.getOrderForm(a?a.id:"").then(o)),{...Vr,addCoupon:async a=>s(()=>n.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>n.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>n.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>n.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>n.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>n.removeItem(t().id,t().items,a),"items");return Ma(a,i)},shipping:async(a,i="BR")=>s(()=>n.shipping(t().id,a??"",i,t().items.length,Va(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return n.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>n.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return n.updateItemQuantity(l,u,a,i,((m=u.find(h=>h.id===a))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>n.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return Vr}),Sm=()=>gt(e=>e),Wa=xt.create(e=>({notifications:[],actions:{addNotification:(t,n)=>e(s=>Ua(s,t,n)),removeNotification:t=>e(n=>({notifications:n.notifications.filter(s=>s.id!==t)}))}})),ps=()=>Wa(e=>e.notifications),fs=()=>Wa(e=>e.actions),Em=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:$t,KEY_INDEXED_STORE:Gr,useCartStore:gt,useGetCartStoreState:Sm,useGetNotificationActions:fs,useGetNotificationsStore:ps},Symbol.toStringTag,{value:"Module"})),Pm=6e3,Ga=g.createContext({}),Ka=({children:e,...t})=>{const{items:n}=gt(),[s,o]=g.useState([]),a=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>n.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[n,s]);return g.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},Pm))},[s]),r.jsx(Ga.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},Vt=()=>{const e=g.useContext(Ga);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Xa{constructor(){tn(this,"events",{});tn(this,"prevData",{})}subscribe(t,n){return this.events[t]||(this.events[t]=[]),this.events[t].push(n),()=>{this.events[t]=this.events[t].filter(s=>s!==n)}}publish(t,n){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=n,s(n)})}}const Ya=g.createContext({}),Nm=({children:e,headerConfigs:t,pathname:n,...s})=>{const[o,a]=g.useState(!0),[i,c]=g.useState(!1),l=n==="/",u=g.useRef(new Xa),m=f=>f?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},h=m(l),p=g.useRef(h);return g.useEffect(()=>{var y;const f=((y=new URLSearchParams(window.location.search))==null?void 0:y.toString())??"";(f.includes("utm_")||f.includes("gclid"))&&(Ur.get("lastMedias")||Ur.set("lastMedias",`${f}`,{expires:1/24}));const _=()=>{const v=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,b=window.innerWidth<1024||!!v.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);i||c(!0),o!==b&&(a(b),c(!0))};return i||_(),window.addEventListener("resize",_,{passive:!0}),()=>window.removeEventListener("resize",_)},[o,i]),g.useEffect(()=>{const f=m(l);u.current.publish("header:change_variant",f.headerVariant),u.current.publish("header:change_position",f.position),p.current=f},[l]),r.jsx(Ya.Provider,{value:{isMobile:o,mediatorRef:u,currentHeaderConfigsRef:p,deviceValidated:i,...s},children:r.jsx(Ka,{children:e})})},ne=()=>g.useContext(Ya),Qa=g.createContext({}),Im=({children:e,...t})=>r.jsx(Qa.Provider,{value:{...t},children:e}),ce=()=>g.useContext(Qa),bt=(e,t)=>xt.create(n=>{const s=()=>n({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>n({value:o}),reset:s}}}),Ht={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Wt=new Set,wm=()=>{Wt.forEach(e=>{e()})},Za=xt.create((e,t)=>{const n=()=>e({value:Ht.category});return Wt.add(n),{value:Ht.category,actions:{reset:n,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),Ja=()=>Za(e=>e.value),Gt=()=>Za(e=>e.actions),ei=bt(Ht.menuMobileIsOpen,Wt),ti=()=>ei(e=>e.value),ni=()=>ei(e=>e.actions),ri=bt(Ht.searchModalIsOpen,Wt),si=()=>ri(e=>e.value),Tn=()=>ri(e=>e.actions),oi=bt(Ht.userMenuIsOpen,Wt),hs=()=>oi(e=>e.value),_s=()=>oi(e=>e.actions),Rm=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:wm,useActionsHeaderCategory:Gt,useActionsMenuMobileIsOpen:ni,useActionsSearchModalIsOpen:Tn,useActionsUserMenuIsOpen:_s,useGetHeaderCategoryStore:Ja,useGetMenuMobileIsOpen:ti,useGetSearchModalIsOpen:si,useGetUserMenuIsOpen:hs},Symbol.toStringTag,{value:"Module"})),Tt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Ot=new Set,Am=()=>{Ot.forEach(e=>{e()})},ai=xt.create(e=>{const t=()=>e({value:Tt.selectedSkuInfo});return Ot.add(t),{value:Tt.selectedSkuInfo,actions:{setValue:n=>e(s=>({value:{...s,...n}})),reset:t}}}),Kt=()=>ai(e=>e.value),ii=()=>ai(e=>e.actions),ci=bt(Tt.openLetMeKnow,Ot),Tm=()=>ci(e=>e.value),Om=()=>ci(e=>e.actions),li=bt(Tt.showNotify,Ot),ui=()=>li(e=>e.value),gs=()=>li(e=>e.actions),di=bt(Tt.showBottomNavigation,Ot),Lm=()=>di(e=>e.value),km=()=>di(e=>e.actions),mi=bt(Tt.openMeasurements,Ot),pi=()=>mi(e=>e.value),fi=()=>mi(e=>e.actions),Mm=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Am,useActionsPDPOpenLetMeKnow:Om,useActionsPDPOpenMeasurements:fi,useActionsPDPSelectedSkuInfo:ii,useActionsPDPShowBottomNavigation:km,useActionsPDPShowNotify:gs,useGetPDPOpenLetMeKnow:Tm,useGetPDPOpenMeasurements:pi,useGetPDPSelectedSkuInfo:Kt,useGetPDPShowBottomNavigation:Lm,useGetPDPShowNotify:ui},Symbol.toStringTag,{value:"Module"})),Ys={feedback:{active:!1,action:"add"},list:[]},ys=xt.create((e,t)=>({value:Ys,actions:{reset:()=>e({value:Ys}),setValue:s=>e(()=>({value:s})),toggleProduct:s=>e(o=>o.value.list.includes(s)?{value:{feedback:{active:!0,action:"remove"},list:o.value.list.filter(a=>a!==s)}}:{value:{feedback:{active:!0,action:"add"},list:[...o.value.list,s]}}),updateList:s=>e(o=>({value:{...o.value,list:s}})),resetFeedback:()=>e(s=>({value:{...s.value,feedback:{active:!1,action:""}}}))}})),Lt=()=>ys(e=>e.value.list),vs=()=>ys(e=>e.value.feedback),jt=()=>ys(e=>e.actions),Dm=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:jt,useGetWishlistFeedbackStore:vs,useGetWishlistStore:Lt},Symbol.toStringTag,{value:"Module"})),hi=g.createContext({}),$m=({children:e,headerData:t,...n})=>{var m,h;const s=g.useRef(null),o=g.useRef(null),a=g.useRef(null),i=g.useRef(null),c=g.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=ne();return(m=l.current)==null||m.subscribe("header:change_variant",p=>{var b,C,j;if(p&&u.current&&(u.current.bannerVariant=p),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),v=_?y:p??((b=u.current)==null?void 0:b.bannerVariant)??"default";v!==((C=u.current)==null?void 0:C.headerVariant)&&(s.current.setAttribute("data-bottomdivider",String(_)),s.current.setAttribute("data-variant",String(v)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",v),u.current&&(u.current.headerVariant=v))}),(h=l.current)==null||h.subscribe("header:change_position",p=>{s.current&&(s.current.style.position=p)}),g.useEffect(()=>{const p=new AbortController,f=d.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:p.signal});const _=y=>{var b;(b=y.target.closest("a"))==null||b.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:p.signal}),s.current.addEventListener("touchend",_,{signal:p.signal})),()=>{p.abort()}},[]),r.jsx(hi.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...n},children:e})},Ee=()=>g.useContext(hi),_i=g.createContext({}),gi=({children:e,...t})=>r.jsx(_i.Provider,{value:g.useMemo(()=>t,[t]),children:e}),xs=()=>{const e=g.useContext(_i);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},zm=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Fm=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?zm(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+n}},yi=g.createContext({}),vi=({children:e,delay:t=600,gap:n=20,...s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,m]=g.useState({left:0,top:0}),h=g.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return g.useEffect(()=>{if(typeof window>"u")return;const p=window.document.querySelector("#cart-button"),f=window.document.querySelector("#add-to-cart--tooltip");if(p&&f){const{left:_,top:y}=Fm(f,p,n??0);m({left:_,top:y}),l(!1)}},[n,o]),r.jsx(yi.Provider,{value:g.useMemo(()=>({...s,...u,handleClose:h,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[s,u,h,c,o,a,l]),children:e})},Ct=()=>{const e=g.useContext(yi);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},xi=g.createContext({}),Bm=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:n,data:s,...o})=>{var re,le,se,ie;const a=gt(),{setRecentlyAdded:i}=Vt(),c=g.useRef(""),l=ps(),{addNotification:u,removeNotification:m}=fs(),[h,p]=g.useState(null),{addCoupon:f,addItem:_,addSellerCode:y,addMarketingData:v,emptyCart:b,isOpen:C,removeItem:j,shipping:x,shippingUpdate:P,toggleServiceToProduct:S,updateItemQuantity:E}=a;g.useEffect(()=>{(async()=>{var w,W;if(!a.id||!((W=(w=s==null?void 0:s.promotion)==null?void 0:w.promotionCart)!=null&&W.idPromotion))return;const J=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:a.id,promotionId:s.promotion.promotionCart.idPromotion,web:(s==null?void 0:s.promotion.promotionCart.versionAPI)==="Original"})}).then(ae=>ae.json());p(J)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(le=(re=s==null?void 0:s.promotion)==null?void 0:re.promotionCart)==null?void 0:le.idPromotion,(ie=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:ie.versionAPI]),g.useEffect(()=>{const $=Ur.get("lastMedias");if(a.id&&$&&c.current!==$){c.current=$;const J=new URLSearchParams($),w=qa(J);v(w)}},[a,v]);const I=g.useCallback(async($,J)=>(J==="coupon"?f($):y($,t??{})).then(W=>{if(typeof W!="boolean"&&W instanceof Object){if(J==="seller"&&"value"in W){const{statusOk:ae,value:he}=W,N=String(he??"").split(" - ");return Pt((N==null?void 0:N[0])??"",$,!!ae)}return Pt(String(W.coupon),$,!0)}return Pt("","")}).catch(()=>Promise.resolve({code:400})),[f,y]),A=g.useCallback(($,J,w)=>{const{id:W}=$;E(W,J,w)},[E]),O=g.useCallback(($,J,w=!1)=>{if(!$)return;const{id:W}=$,ae=Wr(a.items,W);if(ae!==-1&&!w){const he=Number(a.items[ae].quantity),N=a.items[ae]?he+1:1;A($,N,J)}else _({id:W,quantity:($==null?void 0:$.quantity)??1,seller:$.seller});C||i(he=>[...he,$])},[_,A,a.items,C,i]),L=g.useCallback(($,J)=>{if(!$||!Array.isArray($))return;i(W=>[...W,...$]);const w=$.map(W=>{const{id:ae,quantity:he,seller:N}=W,R=Wr(a.items,ae),Ne=za(he??1,R);return{id:ae,quantity:Ne,seller:N}});_(w,J)},[_,a.items,i]),M=g.useCallback(async($,J,w)=>$?j($).then(()=>(u(J??`${n}`,w),Pt($,$))):Promise.resolve(Pt("","Product id required")),[u,j]),Q=g.useCallback(()=>{a.items.length>0&&b()},[b,a.items]),D=g.useCallback(($,J="BRA")=>x($,J),[x]),U=g.useCallback($=>{$&&P($)},[P]),F=g.useCallback(async($,J,w=!1)=>{const W=a.items.findIndex(he=>he.uniqueId===$);return a.items[W]&&W>=0?S(J,W,w):!1},[a.items,S]),Y=g.useCallback(async($,J)=>E($,J).then(w=>{if(Array.isArray(w)){const W=w.find(ae=>ae.id===$);if(W&&(W==null?void 0:W.quantity)<J)return String(W.quantity)}return!1}),[E]),G=g.useCallback(async()=>{await v({...a.marketingData,coupon:""})},[v,a.marketingData]),H=g.useCallback(async()=>{await v({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[v,a.marketingData]),Z=g.useCallback(async()=>{await x("","BRA")},[x]);return r.jsx(xi.Provider,{value:g.useMemo(()=>({...o,data:s,addCouponSeller:I,addToCart:O,addItemsToCart:L,cartStore:a,notifications:l,clearCart:Q,addNotification:u,isOpen:a.isOpen,removeNotification:m,removeToCart:M,setIsOpen:a.setIsOpen,shipping:D,shippingUpdateOption:U,toggleGiftItemCart:F,updateItemQuantity:Y,removeCoupon:G,removeSellerCode:H,removeCEP:Z,promotionRules:h,setPromotionRules:p}),[o,s,I,O,L,l,Q,u,a,m,M,D,U,F,Y,G,H,Z,h,p]),children:e})},xe=()=>{const e=g.useContext(xi);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},bi=g.createContext({}),bs=({children:e,fetch:t})=>{const n=g.useRef(!0),[s,o]=g.useState(null),[a,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{n.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();o(u.data),n.current=!1}catch{n.current=!0,i(!0)}})()},[t]),r.jsx(bi.Provider,{value:g.useMemo(()=>({data:s,isLoading:n.current??!1,isError:a}),[s,a,n]),children:e})},js=()=>{const e=g.useContext(bi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},ji=g.createContext({}),Cs=({children:e,sort:t,state:n,count:s,collectionId:o,brand:a,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=g.useMemo(()=>{var u;return o?[{key:"productclusterids",value:o.toString()}]:a?[{key:"brand",value:a}]:(u=n.base)!=null&&u.length?n.base.slice(1).split("/").map((m,h)=>({key:`category-${h+1}`,value:m})):[]},[n.base,o]);return r.jsx(ji.Provider,{value:g.useMemo(()=>({state:{...n,facets:[...l,...n.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,n,i]),children:e})},ze=()=>{const e=g.useContext(ji);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e},Ci=g.createContext({}),Um=({children:e,...t})=>r.jsx(Ci.Provider,{value:t,children:e}),Me=()=>{const e=g.useContext(Ci);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Si=g.createContext({}),Hm=({children:e,selectedFacets:t})=>{const{data:n,...s}=js(),{router:o}=ce(),{searchParams:a,PLP_SORT_DEFAULT:i}=Me(),c=g.useCallback((p,f)=>{if(f){if(p.key.toLocaleLowerCase()==="price"){const _=f.getAll("facets");f.delete("facets"),_.forEach(y=>{const[v]=y.split("/");v!==p.key&&f.append("facets",y)})}f.set("page","1"),f.append("facets",`${p.key}/${p.value}`),o.push(`?${f.toString()}`)}},[o]),l=g.useCallback(()=>{const p=new URLSearchParams;p.set("sort",i),p.set("page","1"),o.push(`?${p.toString()}`)},[o]),u=g.useCallback((p,f)=>{if(!f||!f.has&&!f.has("facets"))return;const _=f.getAll("facets");f.delete("facets"),f.set("page","1"),_.forEach(y=>{const[v,b]=y.split("/");(v!==p.key||b!==p.value)&&f.append("facets",y)}),o.push(`?${f.toString()}`)},[o]),m=g.useCallback(p=>{const f=a?new URLSearchParams(a):new URLSearchParams;for(const[,_]of f.entries()){const[y,v]=_.split("/");if(y===p.key&&v===p.value)return u(p,f)}return c(p,f)},[c,u,a]),h=g.useCallback(p=>{const f=a?new URLSearchParams(a):new URLSearchParams;f.set("sort",p.replace("_",":")),o.push(`?${f.toString()}`)},[o,a]);return r.jsx(Si.Provider,{value:g.useMemo(()=>({...s,breadcrumb:n&&"breadcrumb"in n?n==null?void 0:n.breadcrumb:[],deleteAllFacets:l,facets:n&&"facets"in n?n==null?void 0:n.facets:[],selectedFacets:t,onToggleFacet:m,onSort:h,searchParams:a}),[n,l,h,m,s,t,a]),children:e})},Ei=({children:e,forceUpdate:t})=>{const{state:n}=ze();return r.jsx(bs,{fetch:()=>fetch("/api/search/facets",{method:"POST",body:JSON.stringify({...n,forceUpdate:t}),priority:"low"}),children:r.jsx(Hm,{selectedFacets:(n==null?void 0:n.facets)??[],children:e})})},Pi=()=>{const e=g.useContext(Si);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},Dt={placeholder:"Ordernar por",options:{score_desc:"Mais Relevantes",orders_desc:"Mais Vendidos",price_desc:"Maior Preço",price_asc:"Menor Preço",release_desc:"Novidades",discount_desc:"Maior Desconto",name_asc:"De A a Z"}},qm={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Vm="Imagem do produto",Qs=1,Wm="Sair",Gm=e=>e.exit,Zs=({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"}],Km=(e,t)=>{const n=(t??"").split("@")[0];return e?`Olá${n.length?", ":" "}${n}!`:"Olá!"},Xm=e=>"Seja bem vindo!",Ym="Marque a caixa para aceitar os termos de política de privacidade.",Qm="Algumas informações estão incorretas ou não foram preenchidas",Zm="Enviar",Ni=g.createContext({}),Jm=({children:e})=>{const{data:t,...n}=js(),[s,o]=g.useState(0),{sendDataLayerEvent:a}=oe();return g.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){a({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&o(i)}},[t,a,o]),r.jsx(Ni.Provider,{value:g.useMemo(()=>({...n,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:qm,total:s}),[t,n,s]),children:e})},Ss=({children:e,query:t,forceUpdate:n})=>{const{count:s,state:o}=ze(),a={...o,count:s};return r.jsx(bs,{fetch:()=>fetch("/api/search/product",{method:"POST",body:JSON.stringify({...a,query:t,forceUpdate:n,facets:o.facets??[]})}),children:r.jsx(Jm,{children:e})})},Xt=()=>{const e=g.useContext(Ni);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},Ii=g.createContext({}),ep=({children:e,slug:t,searchParams:n,collectionId:s,brand:o,itemsPerPage:a=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ce(),l=g.useRef(""),[u,m]=g.useState(!1),h=g.useMemo(()=>{const f=new URL(c,"http://localhost"),_=(n==null?void 0:n.getAll("facets"))??[],y=(n==null?void 0:n.get("page"))??"1",v=(n==null?void 0:n.get("sort"))??(s?"":i);return f.searchParams.set("page",String(y)),f.searchParams.set("sort",String(v)),n!=null&&n.get("query")?(f.searchParams.set("query",n.get("query")),f):(f.searchParams.set("base",Array.isArray(t)?t.join("/"):t),f.searchParams.set("facets",_.join(",")),f)},[s,c,n,t]),p=g.useMemo(()=>{if(Array.isArray(n==null?void 0:n.getAll("facets")))return T.parseSearchState(h,n.getAll("facets")??[""]);const f=(n==null?void 0:n.getAll("facets"))??[];return T.parseSearchState(h,f)},[h,n]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),r.jsx(Ii.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:m}),[u,m]),children:r.jsx(Cs,{ITEMS_PER_PAGE:a,searchParams:n??new URLSearchParams,state:g.useMemo(()=>({...p}),[p]),collectionId:s,brand:o,children:e})})},Es=()=>{const e=g.useContext(Ii);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Sn=(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((o,a)=>Sn(o,t[a]));if(Array.isArray(t))return!1;const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&Sn(e[o],t[o]))},wi=(e,t,n="page")=>Object.keys(t).some(s=>s===n?!1:!Sn(t[s],e[s])),Kr=async e=>{const t=await fetch("/api/search/product",{method:"POST",body:JSON.stringify(e),priority:"high"});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const n=await t.json();return n==null?void 0:n.data},Ri=()=>({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}}}),Ai=(e,t,n,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*n;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%n;if(m+c.columns>n){l+=n-m;continue}if(!Array.from({length:c.columns}).some((f,_)=>o.has(l+_))){for(let f=0;f<c.columns;f++)o.add(l+f);a.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:o,placedBanners:a}},Xr=(e,t,n,s=24)=>{const{placedBanners:o,taken:a}=Ai(e??[],t,n),i=[];let c=0;try{for(;i.length<t*s;)a.has(c)||i.push(c),c++;return{banners:o,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},bn=(e,t,n=24)=>Array.from({length:e},(s,o)=>{const a=o+1;return{loading:e===a,page:a,pagination:t!=null&&t.products.length&&e===a?t==null?void 0:t.pagination:Ps(),products:t!=null&&t.products.length&&e===a?t==null?void 0:t.products:Array.from({length:n},()=>Ri())}}),Ti=(e,t)=>[...e,{loading:!1,page:t,pagination:Ps(),products:[]}],Ps=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),tp=(e,t,n,s,o)=>{const a=e[e.length-1],i=(a==null?void 0:a.products.length)??o,c=(e.length-1)*o+i-1,l=n[c];return t.filter((u,m)=>{const h=s[m];return h<=l||o>i&&h>l})},Oi=(e,t)=>{const n=new Map;for(const o of e){const a=Math.floor(o/t);n.has(a)||n.set(a,[]),n.get(a).push(o)}const s=[];for(const[,o]of n){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},Li=(e,t)=>{if(!e)return[];const n=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return Oi(n,t)},ki=e=>Array.isArray(e)?e.map((t,n)=>({href:`/${e.slice(0,n+1).join("/")}`,name:t})):[],np=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:ki,createPage:Ti,createPages:bn,createPagination:Ps,createProduct:Ri,deepEqual:Sn,fetchPage:Kr,getBanners:Ai,getPositions:Xr,getProductsWithVideo:Li,getRandomVideoPerRow:Oi,getVisibleBanners:tp,hasStateChangedExceptPage:wi},Symbol.toStringTag,{value:"Module"})),rp=50,sp=xt.create((e,t)=>{const n=i=>Math.min(i,rp),s=async(i,c)=>{const l=n(i.page);try{const u=await Kr({...i,page:l});o(l,m=>c?c(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),o(l,m=>({...m,loading:!1}))}},o=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},a=async(i,c)=>{await s(i,(l,u)=>(typeof c=="function"&&c(u),{...l,...u,loading:!0}))};return{banners:[],load:!1,pages:[],total:0,positions:[],products:[],createPages:async(i,c,l,u)=>{var h,p,f;const m=n(Number(i==null?void 0:i.page));e({...c,pages:bn(m,void 0,u)});try{const _=await Kr({...i,page:m});if(_){if(!_.products.length&&((h=_==null?void 0:_.pagination)==null?void 0:h.total)<m){a({...i,page:(p=_==null?void 0:_.pagination)==null?void 0:p.total},l),e({pages:bn((f=_==null?void 0:_.pagination)==null?void 0:f.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:bn(m,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${_}`)}},addPage:(i,c,l)=>{const{pages:u}=t(),m=n(i==null?void 0:i.page);u.some(h=>h.page===m)||(e({...c,pages:Ti(u,m)}),a(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===n(i==null?void 0:i.page));l!=null&&l.loading||a(i,c)}}}),op=(e,t,n,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=n){const c=e.slice(i,i+n),l=c.findIndex(u=>{var m;return(m=u.node)==null?void 0:m.video});for(let u=0;u<c.length;u++){const m=i+u,h=s+m,p=t.find(_=>_.position_grid===h+1),f=h+o+1;p&&(o+=p.columns),a.push({position:f,canPlayVideo:u===l})}}return a},Mi=(e,t,n)=>{const s=(t-1)*n,o=t*n;return e>=s&&e<=o},On=e=>{var t;return(t=e==null?void 0:e.map(n=>({disable:T.disableSKU(n),size:T.getSKUName(n),skuID:"sku"in n&&n.sku})))==null?void 0:t.filter(n=>n.disable)},ap=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:op,getSkusNotify:On,isPositionInCurrentPage:Mi},Symbol.toStringTag,{value:"Module"})),Di=({isMobile:e,ICONS:t,NOTIFY_INFO:n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),r.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:n.title})]});Di.displayName="Notify.Controls";const Xe={"notify--header-modifier":"_notify--header-modifier_xlomp_1","notify--container":"_notify--container_xlomp_4","notify--form":"_notify--form_xlomp_20","notify--status":"_notify--status_xlomp_36","notify--status--success":"_notify--status--success_xlomp_50","notify--status--error":"_notify--status--error_xlomp_50","notify--modal--body":"_notify--modal--body_xlomp_99","notify--loading":"_notify--loading_xlomp_102","notify--selector":"_notify--selector_xlomp_122","notify--selector--header":"_notify--selector--header_xlomp_138","modal-modifier":"_modal-modifier_xlomp_168"};function $i(e){const n=decodeURIComponent(window.document.cookie).split(";");for(const s of n){const[o,a]=s.trim().split("=");if(o===e)return a}}function Ns(e,t,n={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...n};let a=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in o)o[i]!==void 0&&(a+=`; ${i}`,i==="expires"?a+=`=${o[i].toUTCString()}`:typeof o[i]=="boolean"?a+=`; ${o[i]?"true":"false"}`:a+=`=${o[i]}`);window.document.cookie=a}var zi={CUSTOM_VIEW_CART:{name:"custom_view_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","total_discount","subtotal","items"]},ADD_TO_WISHLIST:{name:"add_to_wishlist",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_TO_CART:{name:"add_to_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},REMOVE_FROM_CART:{name:"remove_from_cart",destinations:["DataLayer"],requiredParams:["brand","region","line_items","currency","value","items"]},ADD_COUPON:{name:"add_coupon",destinations:["DataLayer"],requiredParams:["brand","region","coupon","coupon_message","seller_cod_name"]},SEARCH:{name:"search",destinations:["DataLayer"],requiredParams:["brand","search_term","search_found","search_quantity"]},SEARCH_ZIPCODE:{name:"search_zipcode",destinations:["DataLayer"],requiredParams:["brand","region","shippings","zipcode","flag_pickup"]},VIEW_PROMOTION:{name:"view_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_PROMOTION:{name:"select_promotion",destinations:["DataLayer"],requiredParams:["brand","region","currency","promotion_name","creative_slot","creative_name","items"]},SELECT_CONTENT:{name:"select_content",destinations:["DataLayer"],requiredParams:["brand","content_type"]},SELECT_ITEM:{name:"select_item",destinations:["DataLayer"],requiredParams:["brand","region","items","line_items"]},VIEW_ITEM:{name:"view_item",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","available_grid","items"]},VIEW_ITEM_LIST:{name:"view_item_list",destinations:["DataLayer"],requiredParams:["region","brand","line_items","items"]},BEGIN_CHECKOUT:{name:"begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_BEGIN_CHECKOUT:{name:"custom_begin_checkout",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","items"]},AUTH_ACTION:{name:"auth_action",requiredParams:["region"]},ADD_PERSONAL_INFO:{name:"add_personal_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","subtotal"]},CUSTOM_ADD_SHIPPING_INFO:{name:"add_shipping_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","shipping","shipping_tier","line_items","currency","value","total_discount","subtotal","items"]},CUSTOM_ADD_PAYMENT_INFO:{name:"add_payment_info",destinations:["DataLayer"],requiredParams:["brand","pre_filled","line_items","currency","value","total_discount","payment_type","subtotal","items"]},ORDER_REVIEWED:{name:"order_reviewed",destinations:["DataLayer"],requiredParams:["brand","line_items","currency","value","total_discount","subtotal","payment_type"]},PURCHASE:{name:"purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_PURCHASE:{name:"custom_purchase",destinations:["DataLayer"],requiredParams:["brand","shipping_tier","line_items","currency","value","shipping","transaction_id","total_discount","payment_type","seller_cod_name","subtotal","coupon","items"]},CUSTOM_USER_INFO:{name:"custom_user_info",destinations:["DataLayer"],requiredParams:["user_info"]},NOTIFY_ME:{name:"notify_me",destinations:["DataLayer"],requiredParams:["brand","line_items","size","item_ref"]}};function ip(e,t,n){const s=t.window,o=Object.assign({},t);if(delete o.window,s){s.dataLayer=s.dataLayer||[],s.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function cp(e,t,n){console.log(`%c[DT - ${n}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var Fi=[["vale","vale crédito"],["pagaleve","pix"],["pix parcel","pix parcelado"],["pix","pix"],["apple","apple pay"],["google","google pay"],["boleto","boleto"],["paypal","paypal"],["cred","cartão"],["visa","cartão"],["master","cartão"],["amex","cartão"],["elo","cartão"],["hiper","cartão"],["diner","cartão"],["deb","cartão"]];function lp(e,t,n){cp({id:e,custom_data:t},"#00c851",n)}var up={DataLayer:ip,Dito:lp};async function dp(e,t){const n=zi[e];n&&await Promise.allSettled(n.destinations.map(async s=>{try{await up[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function mp(e){try{return await(await fetch(`/api/catalog_system/pub/products/search?fq=productId:${e}`)).json()}catch(t){console.log("[DT] Erro ao buscar dados do produto",t)}}function pp(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Bi(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),n=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return n?n[1].replace("-","_"):null}async function fp(e){const t=Bi(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const n=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!n.ok)throw new Error(`Erro na API: ${n.status}`);const s=await n.json();return(s==null?void 0:s[0])||null}catch(n){return console.error("Erro ao buscar dados do produto:",n),null}}function Ui(e,t){var n,s,o,a;const i=(s=(n=e==null?void 0:e.shippingData)==null?void 0:n.logisticsInfo)==null?void 0:s.find(l=>l.itemId===t.id),c=(o=i==null?void 0:i.slas)==null?void 0:o.find(l=>l.id===i.selectedSla);return(a=c==null?void 0:c.pickupStoreInfo)!=null&&a.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function Hi(e){var t,n;const s=await mp(e.productId||e.productID||e.item_group_id);return s.length&&(n=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?n:null}function Ln(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function yt(e){const t=[()=>{var n;return((n=e==null?void 0:e.productCategories)==null?void 0:n[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const n of t){const s=n();if(s!=null)return s}return null}function Yt(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var n,s,o,a,i;return(i=(a=(o=(s=(n=e==null?void 0:e.category)==null?void 0:n.split)==null?void 0:s.call(n,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const n of t){const s=n();if(s!=null)return s}return null}function qi(e){var t;const n=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(n)&&n.length?n.join(","):null}var hp={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function Js(e){if(!e)return null;const t=e.toLowerCase().trim();return hp[t]||null}function tt(e){var t;let n=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))n=e;else if(Array.isArray(e))n=e.map(a=>{var i;return((i=a.additionalInfo)==null?void 0:i.brandName)||a.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)n=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?Js(e):null;const s=n.map(Js).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function _p(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const n=e.orderForm.items;return tt(n)}function gp(e){var t;const{item:n}=e;return tt(((t=n==null?void 0:n.additionalInfo)==null?void 0:t.brandName)||n.brand||n.item_brand)}function yp(e,t){if(e!=null&&e.brand)return tt(e.brand)||e.brand||null;switch(t){case"CUSTOM_VIEW_CART":case"ADD_COUPON":case"ADD_PERSONAL_INFO":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"SEARCH_ZIPCODE":case"ORDER_REVIEWED":case"PURCHASE":case"CUSTOM_PURCHASE":return _p(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return gp(e);default:return null}}async function vp(e){var t;const n=((t=e.orderForm)==null?void 0:t.items)||[];return n.length?await Promise.all(n.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:Yt(s),item_category4:qi(s),item_shipping_tier:Ui(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:tt((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await Hi(s)||s.id||null,item_name:s.name||s.id||null,item_category:yt(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:Ln(s)}})):[]}async function xp(e,t){var n,s,o;const{item:a,orderForm:i}=e;return[{index:0,quantity:1,item_id:a.productId||a.item_group_id||a.sku||null,item_category2:Yt(a),item_category4:qi(a),item_shipping_tier:t==="REMOVE_FROM_CART"?Ui(i,a):null,price:a.listPrice||parseFloat((a.price/100).toFixed(2))||0,item_ref:a.refId||a.item_ref||(a==null?void 0:a.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((n=a.additionalInfo)==null?void 0:n.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await Hi(a)||null,item_name:a.name||a.item_name||null,item_category:yt(a)||null,item_variant:(a.skuName||a.item_variant||a.name).split(/[-/]/)[0].trim()||null,item_variant2:a.size||((s=a==null?void 0:a.itemAttributes)==null?void 0:s.size)||((o=(a.skuName||a.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:Ln(a),item_list_name:yt(a)||null,item_url:a.item_url||null}]}async function bp(e){return((e==null?void 0:e.list)||[]).map(t=>{var n,s,o,a;return{price:((n=t==null?void 0:t.price)==null?void 0:n.list)||(t==null?void 0:t.price)||((s=t==null?void 0:t.offers)==null?void 0:s.lowPrice)||0,quantity:1,item_ref:(t==null?void 0:t.ref)||(t==null?void 0:t.item_ref)||(t==null?void 0:t.additionalProperty.find(i=>i.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:tt((o=t==null?void 0:t.brand)==null?void 0:o.name)||tt(e.brand)||tt(t==null?void 0:t.item_brand)||null,item_name:(t==null?void 0:t.productName)||(t==null?void 0:t.alternateName)||(t==null?void 0:t.item_name)||null,item_category:yt(t)||null,item_variant:((a=t==null?void 0:t.name)==null?void 0:a.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:Yt(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||null,discount:Ln(t)||null,item_list_name:(e==null?void 0:e.itemListName)||yt(t)||null}})}async function jp(e){var t,n,s;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(a=>a.name==="RefId").value||null,item_brand:tt(o.brand.name)||tt(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:yt(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:Yt(o)||((s=(n=o==null?void 0:o.category)==null?void 0:n.split(">")[1])==null?void 0:s.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:Ln(o)||null,item_sku:(o==null?void 0:o.sku)||(o==null?void 0:o.productId)||null,item_url:o.url||o.item_url||null,seller_id:o.seller||null}]}async function Cp(e){var t;if(!pp(e==null?void 0:e.bannerUrl))return[];const s=await fp(e==null?void 0:e.bannerUrl),o=s==null?void 0:s.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:Bi(e==null?void 0:e.bannerUrl),item_brand:tt(s.brand)||null,item_name:(s==null?void 0:s.productName)||(s==null?void 0:s.alternateName)||(s==null?void 0:s.item_name)||null,item_category:yt(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:Yt(s)||null,item_id:(s==null?void 0:s.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function Sp(e,t){if(e!=null&&e.items)return e.items;switch(t){case"CUSTOM_VIEW_CART":case"BEGIN_CHECKOUT":case"CUSTOM_BEGIN_CHECKOUT":case"CUSTOM_ADD_SHIPPING_INFO":case"CUSTOM_ADD_PAYMENT_INFO":case"PURCHASE":case"CUSTOM_PURCHASE":return vp(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return xp(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return bp(e);case"VIEW_ITEM":return jp(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return Cp(e);default:return null}}function Ep(e){var t,n,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((n=e.orderForm.paymentData)==null?void 0:n.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(h=>h==null?void 0:h.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(h=>String(h.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=Fi.find(([h])=>u.includes(h));return m?m[1]:null}function Pp(e){var t,n,s,o;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!a.length)return null;const i=((n=a[0])==null?void 0:n.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=Fi.find(([u])=>c.includes(u));return l?l[1]:null}function Np(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return Ep(e);case"PURCHASE":case"CUSTOM_PURCHASE":return Pp(e);default:return null}}var Ip={brand:yp,items:Sp,payment_type:Np,user_info:async(e,t)=>{var n;const o=(n={animale:{store:"https://www.animale.com.br",checkout:"https://secure.animale.com.br"},farm:{store:"https://lojafarm.myvtex.com"},mariafilo:{store:"https://mariafilo.myvtex.com",checkout:"https://secure.mariafilo.com.br"},crisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.lojacrisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:n[e.platform||"store"];if(!o)return null;try{const a=`${o}/_v/user-info`;return await(await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})})).json()}catch{return null}},content_type:(e,t)=>"regiao".concat(":"+e.category).concat(e.subcategory?":"+e.subcategory:"").concat(":"+e.componentName)||null,region:(e,t)=>e.region||null,line_items:(e,t)=>e!=null&&e.lineItems?e.lineItems:e!=null&&e.item?[e.item.productId||e.item.productID||e.item.item_id]:e!=null&&e.list?e.list.map(n=>n.productID):(e.orderForm.items||[]).map(n=>n.productId).join(","),currency:(e,t)=>{var n,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(n=e.item)==null?void 0:n.offers)==null?void 0:s.priceCurrency)||"BRL":((a=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:a.currencyCode)||null},value:(e,t)=>{var n;return e!=null&&e.value?e.value:e.item?e.item.price:((n=e.orderForm)==null?void 0:n.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var n,s;const a=(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).find(i=>i.id==="Discounts");return a?Math.abs(a.value)/100:0},subtotal:(e,t)=>{var n,s;return(((n=e.orderForm)==null?void 0:n.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).filter(i=>i.id==="Items").reduce((i,c)=>i+(c.value||0),0)/100||0},coupon_message:(e,t)=>{var n;if(e.couponMessage)return e.couponMessage;const s=((n=e.orderForm)==null?void 0:n.messages)||[];if(s.length===0)return null;const o=s.filter(a=>a.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(a=>a.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var n,s;return e.appliedCoupon||((s=(n=e==null?void 0:e.orderForm)==null?void 0:n.marketingData)==null?void 0:s.coupon)||null},pre_filled:(e,t)=>!!e.preFilled,search_term:(e,t)=>e.searchTerm||null,search_found:(e,t)=>!!e.searchFound,search_quantity:(e,t)=>e.searchQuantity||0,promotion_name:(e,t)=>e.promotionName||null,creative_name:(e,t)=>e.creativeName||null,creative_slot:(e,t)=>e.creativeSlot||null,zipcode:(e,t)=>e.zipCode||null,size:(e,t)=>e.size||null,item_ref:(e,t)=>e.itemRef||null,flag_pickup:(e,t)=>{var n;const s=e.orderForm;return s?(((n=s.shippingData)==null?void 0:n.logisticsInfo)||[]).some(i=>{var c;return(c=i.slas)==null?void 0:c.some(l=>l.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const n=e.orderForm;if(!n)return null;const s={};for(const a of n.shippingData.logisticsInfo){const i=n.items[a.itemIndex];if(i)for(const c of a.slas){const l=c.name;s[l]||(s[l]={shipping_tier:c.name,delivery_time:parseInt(c.shippingEstimate),shipping:parseFloat((c.price/100).toFixed(1)),line_items:[]}),s[l].line_items.push(i.id)}}return Object.values(s).map(a=>({shipping:a.shipping,shipping_tier:a.shipping_tier,delivery_time:a.delivery_time,line_items:a.line_items.join(",")}))||null},shipping:(e,t)=>{var n,s,o;return((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const m=(l=c.slas)==null?void 0:l.find(h=>h.id===c.selectedSla);return i+((u=m==null?void 0:m.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var n,s,o,a;const c=((o=(s=(n=e==null?void 0:e.orderForm)==null?void 0:n.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).find(p=>p.selectedSla);if(!c)return null;const l=(a=c.slas)==null?void 0:a.find(p=>p.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:m,pickupStoreInfo:h}=l;return u==="pickup-in-point"?`retirada em loja${h!=null&&h.friendlyName?`: ${h.friendlyName}`:""}`:u==="delivery"?`receba em casa${m?`: ${m}`:""}`:null},transaction_id:(e,t)=>{var n,s;return((s=(n=e.orderForm)==null?void 0:n.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function wp(e={},t){const n=zi[t];return n?Object.fromEntries(await Promise.all(n.requiredParams.map(async o=>{const a=Ip[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function Rp(e,t={}){try{const n=await wp(t,e);return await dp(e,Object.assign({},n,{window:t.window}))}catch(n){return console.error(`[DT] Error tracking event ${e}:`,n)}}const Ap=({accountName:e=""})=>{const{sendDataLayerEvent:t}=oe(),{user:n}=kt(),{cartStore:s}=xe();return g.useEffect(()=>{if(!n)return;(async()=>{const{userId:a,email:i,firstName:c,lastName:l,phone:u,homePhone:m,postalCode:h,street:p,number:f,city:_,gender:y}=n,v=new TextEncoder().encode(a),b=await crypto.subtle.digest("SHA-256",v),j=Array.from(new Uint8Array(b)).map(x=>x.toString(16).padStart(2,"0")).join("");i&&Rp("CUSTOM_USER_INFO",{userEmail:i,platform:"store",account:e}),t({functionKey:"readyEvents",data:{readyData:{user_id:j,email:i,first_name:c,last_name:l,phone:u||m,zip:h,street:p,street_number:f,city:_,gender:y,orderform_id:s==null?void 0:s.id}}})})()},[n,s.id]),null},Vi=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),Tp=({children:e,AUTH_TOKEN_COOKIE:t,accountName:n})=>{var h;const{shipping:s,cartStore:o}=xe(),[a,i]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(p=>p.json()).then(p=>{const{userCredits:f,..._}=p,{wishlist:y,...v}=_;i({amount:f==null?void 0:f.amount,boxes:f==null?void 0:f.boxes,toExpire:f==null?void 0:f.toExpire,user:v,loading:!1,wishlist:(typeof y=="string"?y.split(","):y)??[]})})}catch(p){console.error("my credits request",p),i({...a,loading:!1})}},[i]),l=g.useCallback(()=>{Ns(t),c()},[c]),u=g.useCallback(()=>a.boxes?a.boxes.reduce((p,f)=>f.gift_card_box.refid==="C1643"?(p.cashback+=f.amount,p):(p.credits+=f.amount,p),{cashback:0,credits:0}):{cashback:0,credits:0},[a]),m=g.useCallback(async()=>{var p,f,_;if((p=a.user)!=null&&p.postalCode&&(o!=null&&o.id)&&!(o!=null&&o.loading)&&!((_=(f=o==null?void 0:o.shippingData)==null?void 0:f.address)!=null&&_.postalCode))try{await s(a.user.postalCode)}catch(y){console.error("Error auto-filling CEP:",y)}},[(h=a.user)==null?void 0:h.postalCode]);return g.useEffect(()=>{c()},[c]),g.useEffect(()=>{m()},[m]),r.jsxs(Vi.Provider,{value:g.useMemo(()=>({...a,getCurrentCredits:u,logout:l}),[a,u,l]),children:[r.jsx(Ap,{accountName:n}),e]})},kt=()=>{const e=g.useContext(Vi);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Wi=({color:e,delay:t=3e3,sku:n,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:m}=oe(),{user:h}=kt(),p=h!=null&&h.firstName?`${h==null?void 0:h.firstName} ${h==null?void 0:h.lastName}`:"";return r.jsx("div",{className:Xe["notify--form"],children:r.jsxs("form",{action:"POST",onSubmit:async f=>{var v;f.preventDefault();const _=f.currentTarget,y=((v=_.querySelector("input"))==null?void 0:v.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:p,email:y,sku:n==null?void 0:n.skuID})}).then(b=>s(b.ok)).finally(()=>{o(!1),_.reset(),m({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:n==null?void 0:n.size,item_id:n==null?void 0:n.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var b;(b=document.body)==null||b.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(null)},t)})},children:[r.jsx(d.TextField.Structure,{input:r.jsx(d.TextField.Input,{feedback:typeof l=="boolean"&&l?"error":"none",type:"email",label:i.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:f=>u(!f.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?r.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):r.jsx(r.Fragment,{})}),r.jsx(d.Button,{disabled:!(l===!1||!n)||!n,type:"submit",size:"large",children:i.button})]})})};Wi.displayName="Notify.Form";const Gi=({isLoading:e=!1})=>r.jsx("div",{className:Xe["notify--loading"],"data-loading":e,children:r.jsx(d.Spinner,{})});Gi.displayName="Notify.Loading";const Is={"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"},Ki=({children:e,...t})=>r.jsx("div",{...t,className:Is["product-variation-list--list"],children:e});Ki.displayName="ProductVariationList.List";const Xi=({fill:e="#1352C7",src:t="",type:n="size",text:s,...o})=>{const{nextimage:a}=ce();return n==="size"?r.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),r.jsx(d.ToggleSize.Text,{children:s})]}):r.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),n==="color"?r.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):r.jsx(d.ToggleStyle.Texture,{title:"texture",children:r.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};Xi.displayName="ProductVariationList.Option";const Yi=({children:e,...t})=>r.jsx("div",{className:Is["product-variation-list"],...t,children:e});Yi.displayName="ProductVariationList.Root";const Qi=({children:e,title:t,...n})=>r.jsxs("div",{...n,className:Is["product-variation-list--title"],children:[t?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.SectionWrapper,{children:r.jsx("p",{children:t})})}):r.jsx(r.Fragment,{}),e]});Qi.displayName="ProductVariationList.Title";const Qe={List:Ki,Option:Xi,Title:Qi,Root:Yi},Op=(e,t)=>{if(!e||!t)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(s=>e[s]===t[s])},Zi=({children:e,label:t="",skus:n,sku:s,setSku:o})=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe["notify--selector--header"],children:e}),r.jsxs(Qe.Root,{className:Xe["notify--selector"],children:[r.jsx(Qe.Title,{title:t}),r.jsx(Qe.List,{children:Array.isArray(n)&&n.map((a,i)=>{const c=Op(s,a);return r.jsx(Qe.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});Zi.displayName="Notify.Selector";const eo=({type:e,icon:t,title:n,subtitle:s})=>r.jsx("div",{className:Xe[`notify--status--${e}`],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{children:n}),r.jsx("h3",{children:s})]})})}),Ji=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:n})=>r.jsxs("div",{className:Xe["notify--status"],"data-status":e,children:[r.jsx(eo,{...n.success,icon:t.check_circle,type:"success"}),r.jsx(eo,{...n.error,icon:t.alert_circle,type:"error"})]});Ji.displayName="Notify.Status";const ws=({color:e,open:t,setVisible:n,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[h,p]=g.useState(!1),[f,_]=g.useState(null),{isMobile:y}=ne();return r.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:n,variant:y?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:Xe["modal-modifier"],children:[r.jsx(d.Modal.Header,{navigation:"top",className:Xe["notify--header-modifier"],children:r.jsx(Di,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),r.jsxs(d.Modal.Body,{className:Xe["notify--modal--body"],children:[r.jsxs("div",{className:Xe["notify--container"],children:[r.jsxs(Zi,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[r.jsx("p",{children:l.subtitle}),r.jsx("span",{children:l.description})]}),r.jsx(Wi,{delay:4e3,sku:o,setStatus:_,setIsLoading:p,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),r.jsx(Gi,{isLoading:h}),r.jsx("div",{className:Xe["notify--selector--header"],children:r.jsx("span",{children:l.legal})})]}),r.jsx(Ji,{status:f,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};ws.displayName="Notify";const kn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=On(e??[]);return r.jsx(ws,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})};kn.displayName="PDC.Notification";const ec=g.createContext({}),tc=({banners:e,children:t})=>{const{searchParams:n,ITEMS_PER_PAGE:s,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=Me(),{router:u}=ce(),{sendDataLayerEvent:m}=oe(),{isMobile:h}=ne(),{state:p}=ze(),{addPage:f,createPages:_,updateProducts:y,...v}=sp(),b=h?8:16,C=h?2:4,j=g.useRef(!1),x=g.useRef(p),[P,S]=g.useState(!1),[E,I]=g.useState(null),[A,O]=g.useState([]),L=g.useCallback(F=>{F&&"pagination"in F&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:F.products}}})},[m]),M=g.useCallback(F=>{if(F.pagination.nextPage===!0){const Y=F.page+1,G=Xr(e,Y,C,s);f({...p,page:Y},G,L)}},[f,e,L,C,s,p]),Q=g.useCallback(F=>{F.loading===!1&&y({...p,page:F.page},L)},[L,y,p]),D=g.useCallback(F=>{const Y=new URLSearchParams(n);F.page!==Number(Y.get("page")??1)&&(Y.set("page",String(F.page)),u.replace(`?${Y.toString()}`,{scroll:!1}))},[u,n]),U=g.useCallback((F,Y)=>{const G=Y?On([Y]):null;O(F),I(G!=null&&G.length?G[0]:null),S(!0)},[]);return g.useEffect(()=>{const F=!j.current,Y=wi(x.current,p),G=Xr(e,p.page,C);F?_(p,G,L,s):Y&&(_(p,G,L,s),x.current=p),j.current=!0},[e,_,L,C,s,p]),r.jsxs(ec.Provider,{value:g.useMemo(()=>({...v,addPage:f,addNewPage:M,createPages:_,gap:b,columns:C,handleNotify:U,updatePage:Q,updateProducts:y,updateParamPage:D}),[f,M,_,U,b,C,v,Q,y,D]),children:[t,r.jsx(kn,{open:P,sku:E,skus:A,setSku:I,setVisible:S,ICONS:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},ot=()=>{const e=g.useContext(ec);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},nc=g.createContext({gridBanners:void 0,banners:[]}),Lp=({children:e,data:t,device:n,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=ne(),i=(t==null?void 0:t.sections.filter(h=>h.name!=="List Product Banners"))??[],c=i.slice(0,Qs),l=i.slice(Qs,i.length),u=t==null?void 0:t.sections.find(h=>h.name==="List Product Banners"),m=g.useMemo(()=>{var h,p;return((p=(h=u==null?void 0:u.data)==null?void 0:h.banners)==null?void 0:p.map(f=>({...f.banner,columns:f.bannerWidth,position_grid:f.bannerPosition})))??[]},[u]);return a&&n==="mobile"||!a&&n==="desktop"?r.jsxs(nc.Provider,{value:{gridBanners:u,banners:m},children:[r.jsx(s,{data:c??[]}),r.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,r.jsx(s,{data:l??[]})]})]}):r.jsx(r.Fragment,{})},Mn=()=>{const e=g.useContext(nc);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},rc=g.createContext({}),sc=({children:e,filters:t,PLP_FILTERS:n,...s})=>{var a;const o=(a=t.facets)==null?void 0:a.filter(i=>n.find(c=>c.key===i.key));return r.jsx(rc.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:o}}),[t,o,s]),children:e})},Mt=()=>{const e=g.useContext(rc);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},oc=g.createContext({product:void 0}),kp=({children:e,data:t,productId:n,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>r.jsxs(oc.Provider,{value:{productId:n},children:[e,r.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:r.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),ac=()=>{const e=g.useContext(oc);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Mp=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function Dp(e,t=1e3){let n=!1;return(...s)=>{n||(e(...s),n=!0,setTimeout(()=>{n=!1},t))}}function $p(e,t=1e3){let n;return(...s)=>{clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}const ic=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,zt=(e,t)=>Math.floor(t==="days"?e/(1e3*60*60*24):t==="hours"?e%(1e3*60*60*24)/(1e3*60*60):t==="minutes"?e%(1e3*60*60)/(1e3*60):e%(1e3*60)/1e3),zp=e=>{const t=nm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},Fp=["name","email","phone","date","cpf","cep"],to={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}$/},cc=({type:e,input:t,required:n=!1})=>{if(typeof t!="string"||!n&&t===""||!to[e])return!0;const s=t.trim();return to[e].test(s)},Bp=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,n=typeof e=="string"?e.match(t):null;return n?n[2].replace(/-/g," "):Vm},Up=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:Fp,debounce:$p,getAltTextFromUrl:Bp,getAuthenticatedUser:zp,getCookie:$i,getDaysHoursMinutesSeconds:zt,getMilliSeconds:ic,removeAccentsAndReplaceSpaces:Mp,setCookie:Ns,throttle:Dp,validateInput:cc},Symbol.toStringTag,{value:"Module"})),Hp=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((s,o)=>(t[o.master_data_field]="none",{...s,[o.master_data_field]:o}),{}))??{},mountedInputsStatus:t}},qp=({formData:e,mountedFields:t,inputsStatus:n,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...n};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,m)=>{var f;if(m==="terms-and-conditions")return;const h=(f=t[m])==null?void 0:f.required;if(h&&!u){l[m]="required",i=!0;return}cc({type:t[m].type,input:u,required:h})||(l[m]="error",c=!0),typeof u=="string"&&e.set(m,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},lc=g.createContext({}),uc=({children:e,masterDataEmailField:t,fields:n,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:o,NEWSLETTER_CONFIGS:a}})=>{const{sendDataLayerEvent:i}=oe(),c=a.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>Hp({fields:n}),[n]),m=g.useRef(!1),[h,p]=g.useState("idle"),[f,_]=g.useState(u),y=async({searchFields:S,entity:E})=>{const I=await ht.post("/api/master-data/search",{body:{masterDataEntity:E,searchFields:S,headers:{"REST-Range":"resources=0-49"}}});return console.info(I),I.data},v=async({documentId:S,fieldsToBeUpdated:E,entity:I})=>(await ht.post("/api/master-data/update",{dataEntityName:I,documentId:S,fieldsToBeUpdated:E})).status,b=g.useCallback(async({payload:S,response:E},I,A)=>{var D;const{email:O,...L}=S,[M]=await y({searchFields:{[I]:O},entity:A??o.newsletter}),Q=Array.isArray(M)?(D=M[0])==null?void 0:D.id:void 0;return M&&await v({documentId:Q,fieldsToBeUpdated:L,entity:A??o.newsletter})!==204?{...E,status:"error"}:{...E,status:"success"}},[]),C=g.useCallback(async({formData:S},E,I)=>{const A={status:"idle",inputsStatus:{}},O={};S.forEach((L,M)=>{O[M]=L});try{const M=(await ht.post("/api/master-data",{body:{payload:O,masterDataEntity:E??o.newsletter}})).data;return(M==null?void 0:M.Message)==="duplicated entry"?b({payload:O,response:A},I,E):M!=null&&M.Id?{...A,status:"success"}:{...A,status:"error"}}catch(L){return console.error("error",L),{...A,status:"error"}}},[b]),j=g.useCallback(async(S,E,I)=>{S.preventDefault();const A=new FormData(S.target);if(A.append("acceptedTerms",m.current?"true":"false"),m.current){const L=new Hr.TZDate(new Date,"America/Sao_Paulo").toISOString();A.append("termsAcceptedAt",L)}E&&Object.keys(E).forEach(L=>{A.append(L,E[L])});const O=await C({formData:A},I??"",t);O&&(p(O==null?void 0:O.status),_(O.inputsStatus),O.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,p,_,i]),x=g.useCallback(S=>{const E=new FormData(S.currentTarget.parentElement),{hasEmptyFields:I,hasErrors:A,inputStatusToUpdate:O}=qp({formData:E,mountedFields:l,inputsStatus:f,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:p});if(_(O),I||A){S.preventDefault();return}p("loading")},[l,f,c,m]),P=g.useCallback(()=>{p("idle"),_(u)},[u]);return r.jsx(lc.Provider,{value:g.useMemo(()=>({formStatus:h,handleSubmit:j,setFormStatus:p,inputsStatus:f,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:x,checkboxRef:m,masterDataEmailField:t,fields:n,variant:s,resetNewsletter:P}),[h,j,p,f,_,x,c,m,t,n,s,P]),children:e})},Rs=()=>{const e=g.useContext(lc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},dc={contexts:{addToCart:{hook:Ct,provider:vi},cart:{hook:xe,provider:Bm},cms:{FlagsAndTags:{context:us,hook:mt,provider:rm}},newsletter:{hook:Rs,provider:uc},events:{hook:oe,provider:dm},global:{hook:ne,provider:Nm,mediator:Xa},header:{hook:Ee,provider:$m},menuMobile:{hook:xs,provider:gi},next:{hook:ce,provider:Im},pdp:{provider:sm},PDPContent:{provider:kp,hook:ac},plp:{provider:ep,hook:Es},plpFilter:{hook:Mt,provider:sc},PLPContent:{provider:Lp,hook:Mn},plpInfinite:{provider:tc,hook:ot},pdpdata:{provider:mm},searchFacets:{hook:Pi,provider:Ei},searchProducts:{hook:Xt,provider:Ss},searchRoot:{hook:js,provider:bs},searchSearch:{hook:ze,provider:Cs},session:{hook:kt,provider:Tp},ui:{hook:Vt,provider:Ka}},hooks:{useBackPDC:ga,useClipboard:pm,useDisableZoom:Na,useLocalStorage:hm,useOnScreen:ds,useSentinel:An,useTouchZoomPan:Ia},stores:{cart:Em,header:Rm,pdp:Mm,wishlist:Dm}},Vp={cart:jm,events:um,plp:np,product:T.productHelpers,utils:Up},As={helpers:Vp},He={"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"},mc=({brand:e,className:t,name:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[r.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:r.jsx("p",{className:"typography-style-body-md",children:n})})})]});mc.displayName="AddToCart.Card.Name";const pc=({className:e,listPrice:t,price:n,quantity:s,productId:o,...a})=>{const i=T.formatPriceToCurrency(n/100),c=T.formatPriceToCurrency(t/100);return r.jsx("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:r.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:r.jsx(d.ProductInfo.ValuesWrapper,{children:n!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};pc.displayName="AddToCart.Card.PriceQuantity";const Wp="_skeleton_12b79_1",Gp={skeleton:Wp},fc=({style:e})=>r.jsx("div",{style:e,className:Gp.skeleton}),Kp="_image_1y08u_1",Xp={image:Kp},Yp=({alt:e,className:t,objectFit:n,...s})=>{const{nextimage:o}=ce();return r.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(Xp.image,t),"data-object-fit":n??"cover"})},Qp=({videoRef:e,...t})=>r.jsx("video",{...t,ref:e,children:r.jsx("track",{kind:"captions"})}),Ie={Image:Yp,Video:Qp},hc=({className:e,productGroupID:t,size:n,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=Ct(),[c,l]=g.useState(s??"");return g.useEffect(()=>{c||fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const h=m.images.find(p=>a.includes(p.imageLabel));h!=null&&h.imageUrl?l(h.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[r.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:r.jsx(d.ToggleStyle.Texture,{children:c?r.jsx(Ie.Image,{alt:"",src:c??"",width:164,height:164,style:i}):r.jsx(fc,{})})}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),n&&r.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:n})]})]})};hc.displayName="AddToCart.Card.StyleSize";const{helpers:Zp}=As,_c=({className:e,item:t,texture:n,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:h}}=Ct(),{size:p}=Zp.product.getColorAndSizeFromSkuName(i??o,h);return r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[r.jsx(mc,{brand:a.name,name:o}),r.jsx(pc,{price:u,listPrice:m,quantity:l,productId:t.id}),r.jsx(hc,{size:p,texture:n,productGroupID:c})]})};_c.displayName="AddToCart.Card.Content";const gc=({image:e,thumbnail:t=!1})=>r.jsx(Ie.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});gc.displayName="AddToCart.Card";const yc=({className:e,item:t,texture:n,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=T.updatedResizedImg(a.url,{width:200,height:300});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[r.jsx(gc,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&r.jsx(_c,{item:t,texture:n})]})};yc.displayName="AddToCart.Card";const vc=({className:e,children:t,title:n,...s})=>r.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[r.jsx("div",{className:He["add-to-cart--content--title"],children:n&&r.jsx("h2",{children:n})}),t,r.jsx(_t.Footer,{})]});vc.displayName="AddToCart.Layout.Content";const xc=({className:e,...t})=>{var f,_;const{isMobile:n,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=Ct(),{cartStore:{totalizers:a},setIsOpen:i}=xe(),c=(f=a.find(y=>y.id==="Discounts"))==null?void 0:f.value,l=((_=a.find(y=>y.id==="Items"))==null?void 0:_.value)??0,u=a.find(y=>y.id==="Shipping"),h=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,p=T.formatPriceToCurrency(h??0);return r.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[r.jsxs("div",{className:He["add-to-cart--footer--total"],children:[r.jsx("span",{children:"Subtotal:"}),r.jsx("span",{children:p})]}),r.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),n?r.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):r.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};xc.displayName="AddToCart.Layout.Footer";const bc=({children:e,className:t,thumbnail:n=!1,...s})=>{const{cartStore:{options:o}}=xe(),{recentlyAddedProducts:a}=Vt(),i=a.length>3?4:a.length;return r.jsxs("div",{...s,className:He["add-to-cart--items"],"data-thumbnail":n,children:[Array.isArray(a)&&a.filter((c,l)=>l<i).map(c=>{var u;const l=(u=o==null?void 0:o.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return r.jsx(_t.Card,{item:c,thumbnail:n,texture:l},c.itemOffered.sku)}),e]})};bc.displayName="AddToCart.Layout.Items";const jc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:n,setIsOpen:s}=Ct(),{isMobile:o}=ne();return r.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:o??!1,isOpen:n,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[r.jsx(d.Modal.Header,{navigation:"top",children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),r.jsx(d.Modal.Body,{children:e})]})};jc.displayName="AddToCart.Modal";const Jp=({children:e})=>{const{count:t,handleClose:n,setIsOpen:s}=Ct(),o=g.useRef(t);return g.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&n(),o.current=t},[t,n,s]),r.jsx(r.Fragment,{children:e})},Cc=({children:e,component:t,CONSTANTS:n,...s})=>{const{recentlyAddedProducts:o}=Vt(),{isMobile:a}=ne(),i=o.length>3?4:o.length;return r.jsx(vi,{...s,count:i,isMobile:a,CONSTANTS:n,children:r.jsx(Jp,{children:a?r.jsxs(r.Fragment,{children:[r.jsx(_t.Modal,{Z_INDEX_WAR:n.Z_INDEX_WAR,children:t}),e]}):r.jsx(_t.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:n.Z_INDEX_WAR,children:e})})})};Cc.displayName="AddToCart.Root";const Sc=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=Ct();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:n.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:r.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};Sc.displayName="AddToCart.Tooltip";const _t={Card:yc,Content:vc,Footer:xc,Items:bc,Modal:jc,Root:Cc,Tooltip:Sc},Ts=({title:e,...t})=>{const{recentlyAddedProducts:n}=Vt(),{isMobile:s}=ne(),o=n.length>3?4:n.length,a=n.length>(o??1),i=n.length>1;return r.jsx(_t.Root,{isMobile:s,count:n.length,component:r.jsx(_t.Content,{title:e,children:r.jsx(_t.Items,{thumbnail:i,children:a&&r.jsx(d.Badge.Count,{count:n.length-o,size:"medium",variant:"secondary"})})}),...t})};Ts.displayName="AddToCart";const no={"backtotop-btn":"_backtotop-btn_1shb6_1","card-modifier":"_card-modifier_1shb6_27"},ef=({children:e,className:t,classNameButton:n,adornment:s,iconPosition:o,scrollToOptions:a,style:i,...c})=>{const l={top:(a==null?void 0:a.top)??0,left:(a==null?void 0:a.left)??0,behavior:(a==null?void 0:a.behavior)??"smooth"},m=o&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},h=()=>{window&&window.document.body.scrollTo({...l})};return r.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(no["card-modifier"],t),style:{...i,padding:0},children:r.jsxs("button",{className:d.helpers.classNameConcat(no["backtotop-btn"],n),onClick:h,style:{...m},"data-orientation":o,children:[s,e]})})},tf="_container_1sy8s_16",lt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:tf,"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"},nf=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:n})=>{const s=Object.values(e.products).length;return r.jsxs("div",{className:lt["add-itens-to-cart-container"],children:[r.jsxs("div",{className:lt["add-itens-to-cart-container-values"],children:[r.jsx("div",{className:lt["add-itens-to-cart-qty-products"],children:r.jsx("span",{children:s===0?n.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?n.BUY_PACKAGE.group_cart.select_product:n.BUY_PACKAGE.group_cart.select_product+"s"}`})}),r.jsx("div",{className:lt["add-itens-to-cart-total"],children:r.jsx("span",{children:T.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:n.FREIGHT_CALCULATION.messages.free_tax})})})]}),r.jsx(d.Button,{onClick:t,className:lt["add-button"],size:"large",disabled:s===0,variant:"primary",children:n.BUY_BUTTON_LABELS.add_to_cart})]})},rf=e=>e.reduce((t,n)=>{var o;const s=t.find(a=>a.node.id===n.node.id);if(!s)return[...t,n];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=n.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),sf=({selectedProduct:e,productId:t,prevState:n,mainSellerId:s})=>{const{products:o,totalPrice:a}=n;try{if(!e){const{[t]:u,...m}=o;return{...n,totalPrice:a-u.price,products:m}}const i=T.getValidOffer(e.offers.offers,s);if(!i)return n;const c=i.seller.identifier,l=i.price;if(o[t]){const{price:u}=o[t];return o[t]={...o[t],price:l,id:e.sku,seller:c},{totalPrice:a+l-u,products:{...o}}}return{totalPrice:a+l,products:{...o,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),n}},Ec=g.createContext({}),of=({children:e,item:t,index:n,shelfTitle:s,...o})=>{const[a,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=oe(),h=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:n+1},event:y}})},p=()=>{h("add_to_wishlist")},f=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:n}}})},_=()=>{s&&(m.current={item_list_name:s}),h("select_item")};return r.jsx(Ec.Provider,{value:g.useMemo(()=>({...o,index:n,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:p,sendSelectItemEvent:_,sendAddToCartEvent:f}),[o,t,c,a]),children:e})},Ke=()=>{const e=g.useContext(Ec);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Re={"product-card--actions":"_product-card--actions_bndjh_1","product-card--actions--group":"_product-card--actions--group_bndjh_9","product-card--actions--selectors":"_product-card--actions--selectors_bndjh_21","product-card--body":"_product-card--body_bndjh_33","product-card--header":"_product-card--header_bndjh_47","product-card--footer":"_product-card--footer_bndjh_67","product-card--image":"_product-card--image_bndjh_90","product-card--image--container":"_product-card--image--container_bndjh_97","product-card--outstock":"_product-card--outstock_bndjh_133","product-card--price":"_product-card--price_bndjh_155","product-card--title":"_product-card--title_bndjh_177","product-card--title--tag":"_product-card--title--tag_bndjh_183","product-card--title--content":"_product-card--title--content_bndjh_200","product-card--selectors--size":"_product-card--selectors--size_bndjh_240","product-card--selectors--size--button":"_product-card--selectors--size--button_bndjh_266","product-card--selectors--size--skus":"_product-card--selectors--size--skus_bndjh_275","product-card--selectors--style":"_product-card--selectors--style_bndjh_289","product-card--selectors--style--more":"_product-card--selectors--style--more_bndjh_299","product-card--video":"_product-card--video_bndjh_316","product-card--wrapper":"_product-card--wrapper_bndjh_342"},Pc=({callback:e,children:t,className:n,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=Ke();return i?r.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--actions"],n),children:[r.jsxs(pe.Wrapper,{type:"actions--group",children:[r.jsx(pe.Price,{}),r.jsx("div",{className:Re["product-card--actions--selectors"],children:!o&&r.jsx(pe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};Pc.displayName="ProductCard.Actions";const Nc=({className:e,isKit:t,...n})=>{const{addToCart:s}=xe(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ke(),m=()=>{var f;if(!a)return;const p=T.getValidOffer(a.offers.offers,u.StoreConfig_MainSellerId);p&&s({id:a==null?void 0:a.sku,quantity:1,seller:p.seller.identifier},{id:c.id,texture:(f=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:f.url}),l()},h=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return r.jsx(d.Button,{...n,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?n.onClick:m,children:i?"Avise-me quando chegar":h})};Nc.displayName="ProductCard.Actions.BuyButton";const af={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Rt=({size:e,adornment:t,title:n,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>r.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(af["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[r.jsx(d.SnackBar.Content,{adornment:t,title:n,subtitle:s}),o&&r.jsx(d.SnackBar.Support,{children:o})]});Rt.displayName="SnackBar";const Bt={"wishlist--snack":"_wishlist--snack_3qi1o_9","wishlist--snack--actions":"_wishlist--snack--actions_3qi1o_25","wishlist-grid":"_wishlist-grid_3qi1o_31","wishlist-grid--container":"_wishlist-grid--container_3qi1o_39","pdc-empty-modifier":"_pdc-empty-modifier_3qi1o_49"};var Yr={exports:{}},Oe={};Oe._=Oe._interop_require_default=cf;function cf(e){return e&&e.__esModule?e:{default:e}}var rn={exports:{}},Qn={},ro;function Ic(){return ro||(ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{assign:function(){return a},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}});function n(i){const c={};return i.forEach((l,u)=>{typeof c[u]>"u"?c[u]=l:Array.isArray(c[u])?c[u].push(l):c[u]=[c[u],l]}),c}function s(i){return typeof i=="string"||typeof i=="number"&&!isNaN(i)||typeof i=="boolean"?String(i):""}function o(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,m]=l;Array.isArray(m)?m.forEach(h=>c.append(u,s(h))):c.set(u,s(m))}),c}function a(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];return l.forEach(m=>{Array.from(m.keys()).forEach(h=>i.delete(h)),m.forEach((h,p)=>i.append(p,h))}),i}}(Qn)),Qn}var Zn={},sn={},so;function Dn(){if(so)return sn;so=1;function e(n){if(typeof WeakMap!="function")return null;var s=new WeakMap,o=new WeakMap;return(e=function(a){return a?o:s})(n)}sn._=sn._interop_require_wildcard=t;function t(n,s){if(!s&&n&&n.__esModule)return n;if(n===null||typeof n!="object"&&typeof n!="function")return{default:n};var o=e(s);if(o&&o.has(n))return o.get(n);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in n)if(c!=="default"&&Object.prototype.hasOwnProperty.call(n,c)){var l=i?Object.getOwnPropertyDescriptor(n,c):null;l&&(l.get||l.set)?Object.defineProperty(a,c,l):a[c]=n[c]}return a.default=n,o&&o.set(n,a),a}return sn}var oo;function wc(){return oo||(oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=Dn()._(Ic()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:m}=l,h=l.protocol||"",p=l.pathname||"",f=l.hash||"",_=l.query||"",y=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?y=u+l.host:m&&(y=u+(~m.indexOf(":")?"["+m+"]":m),l.port&&(y+=":"+l.port)),_&&typeof _=="object"&&(_=String(s.urlQueryToSearchParams(_)));let v=l.search||_&&"?"+_||"";return h&&!h.endsWith(":")&&(h+=":"),l.slashes||(!h||o.test(h))&&y!==!1?(y="//"+(y||""),p&&p[0]!=="/"&&(p="/"+p)):y||(y=""),f&&f[0]!=="#"&&(f="#"+f),v&&v[0]!=="?"&&(v="?"+v),p=p.replace(/[?#]/g,encodeURIComponent),v=v.replace("#","%23"),""+h+y+p+v+f}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(l){return process.env.NODE_ENV==="development"&&l!==null&&typeof l=="object"&&Object.keys(l).forEach(u=>{i.includes(u)||console.warn("Unknown key passed via urlObject into url.format: "+u)}),a(l)}}(Zn)),Zn}var Jn={},ao;function lf(){return ao||(ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(n,s){const o={};return Object.keys(n).forEach(a=>{s.includes(a)||(o[a]=n[a])}),o}}(Jn)),Jn}var er={},io;function $n(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,P){for(var S in P)Object.defineProperty(x,S,{enumerable:!0,get:P[S]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return v},SP:function(){return p},ST:function(){return f},WEB_VITALS:function(){return n},execOnce:function(){return s},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const n=["CLS","FCP","FID","INP","LCP","TTFB"];function s(x){let P=!1,S;return function(){for(var E=arguments.length,I=new Array(E),A=0;A<E;A++)I[A]=arguments[A];return P||(P=!0,S=x(...I)),S}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=x=>o.test(x);function i(){const{protocol:x,hostname:P,port:S}=window.location;return x+"//"+P+(S?":"+S:"")}function c(){const{href:x}=window.location,P=i();return x.substring(P.length)}function l(x){return typeof x=="string"?x:x.displayName||x.name||"Unknown"}function u(x){return x.finished||x.headersSent}function m(x){const P=x.split("?");return P[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(P[1]?"?"+P.slice(1).join("?"):"")}async function h(x,P){if(process.env.NODE_ENV!=="production"){var S;if((S=x.prototype)!=null&&S.getInitialProps){const A='"'+l(x)+'.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(A)}}const E=P.res||P.ctx&&P.ctx.res;if(!x.getInitialProps)return P.ctx&&P.Component?{pageProps:await h(P.Component,P.ctx)}:{};const I=await x.getInitialProps(P);if(E&&u(E))return I;if(!I){const A='"'+l(x)+'.getInitialProps()" should resolve to an object. But found "'+I+'" instead.';throw new Error(A)}return process.env.NODE_ENV!=="production"&&Object.keys(I).length===0&&!P.ctx&&console.warn(""+l(x)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),I}const p=typeof performance<"u",f=p&&["mark","measure","getEntriesByName"].every(x=>typeof performance[x]=="function");class _ extends Error{}class y extends Error{}class v extends Error{constructor(P){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+P}}class b extends Error{constructor(P,S){super(),this.message="Failed to load static file for page: "+P+" "+S}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(x){return JSON.stringify({message:x.message,stack:x.stack})}}(er)),er}var on={exports:{}},tr={},co;function Rc(){return co||(co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"removeTrailingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.replace(/\/$/,"")||"/"}}(tr)),tr}var nr={},lo;function Os(){return lo||(lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return t}});function t(n){const s=n.indexOf("#"),o=n.indexOf("?"),a=o>-1&&(s<0||o<s);return a||s>-1?{pathname:n.substring(0,a?o:s),query:a?n.substring(o,s>-1?s:void 0):"",hash:s>-1?n.slice(s):""}:{pathname:n,query:"",hash:""}}}(nr)),nr}var uo;function zn(){return uo||(uo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const n=Rc(),s=Os(),o=a=>{if(!a.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return a;const{pathname:i,query:c,hash:l}=(0,s.parsePath)(a);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,n.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,n.removeTrailingSlash)(i)+c+l};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(on,on.exports)),on.exports}var rr={},an={exports:{}},sr={},mo;function Ac(){return mo||(mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"pathHasPrefix",{enumerable:!0,get:function(){return n}});const t=Os();function n(s,o){if(typeof s!="string")return!1;const{pathname:a}=(0,t.parsePath)(s);return a===o||a.startsWith(o+"/")}}(sr)),sr}var po;function uf(){return po||(po=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const n=Ac(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,n.pathHasPrefix)(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)}(an,an.exports)),an.exports}var fo;function Tc(){return fo||(fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=$n(),n=uf();function s(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const a=(0,t.getLocationOrigin)(),i=new URL(o,a);return i.origin===a&&(0,n.hasBasePath)(i.pathname)}catch{return!1}}}(rr)),rr}var or={},ar={},ho;function df(){return ho||(ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class t{insert(o){this._insert(o.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(o){o===void 0&&(o="/");const a=[...this.children.keys()].sort();this.slugName!==null&&a.splice(a.indexOf("[]"),1),this.restSlugName!==null&&a.splice(a.indexOf("[...]"),1),this.optionalRestSlugName!==null&&a.splice(a.indexOf("[[...]]"),1);const i=a.map(c=>this.children.get(c)._smoosh(""+o+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const c=o==="/"?"/":o.slice(0,-1);if(this.optionalRestSlugName!=null)throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("'+c+'" and "'+c+"[[..."+this.optionalRestSlugName+']]").');i.unshift(c)}return this.restSlugName!==null&&i.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(o,a,i){if(o.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=o[0];if(c.startsWith("[")&&c.endsWith("]")){let m=function(h,p){if(h!==null&&h!==p)throw new Error("You cannot use different slug names for the same dynamic path ('"+h+"' !== '"+p+"').");a.forEach(f=>{if(f===p)throw new Error('You cannot have the same slug name "'+p+'" 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 "'+p+'" differ only by non-word symbols within a single dynamic path')}),a.push(p)},l=c.slice(1,-1),u=!1;if(l.startsWith("[")&&l.endsWith("]")&&(l=l.slice(1,-1),u=!0),l.startsWith("...")&&(l=l.substring(3),i=!0),l.startsWith("[")||l.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+l+"').");if(l.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+l+"').");if(i)if(u){if(this.restSlugName!=null)throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+o[0]+'" ).');m(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 "'+o[0]+'").');m(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');m(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(o.slice(1),a,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(ar)),ar}var ir={},cr={},lr={},ur={},_o;function mf(){return _o||(_o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(n){return n.startsWith("/")?n:"/"+n}}(ur)),ur}var dr={},go;function pf(){return go||(go=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return n}});function n(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"}(dr)),dr}var yo;function ff(){return yo||(yo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return a}});const n=mf(),s=pf();function o(i){return(0,n.ensureLeadingSlash)(i.split("/").reduce((c,l,u,m)=>!l||(0,s.isGroupSegment)(l)||l[0]==="@"||(l==="page"||l==="route")&&u===m.length-1?c:c+"/"+l,""))}function a(i){return i.replace(/\.rsc($|\?)/,"$1")}}(lr)),lr}var vo;function Oc(){return vo||(vo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return s},extractInterceptionRouteInformation:function(){return a},isInterceptionRouteAppPath:function(){return o}});const n=ff(),s=["(..)(..)","(.)","(..)","(...)"];function o(i){return i.split("/").find(c=>s.find(l=>c.startsWith(l)))!==void 0}function a(i){let c,l,u;for(const m of i.split("/"))if(l=s.find(h=>m.startsWith(h)),l){[c,u]=i.split(l,2);break}if(!c||!l||!u)throw new Error(`Invalid interception route: ${i}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(c=(0,n.normalizeAppPath)(c),l){case"(.)":c==="/"?u=`/${u}`:u=c+"/"+u;break;case"(..)":if(c==="/")throw new Error(`Invalid interception route: ${i}. Cannot use (..) marker at the root level, use (.) instead.`);u=c.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":const m=c.split("/");if(m.length<=2)throw new Error(`Invalid interception route: ${i}. Cannot use (..)(..) marker at the root level or one level up.`);u=m.slice(0,-2).concat(u).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:c,interceptedRoute:u}}}(cr)),cr}var xo;function hf(){return xo||(xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Oc(),n=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),n.test(o)}}(ir)),ir}var bo;function _f(){return bo||(bo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const n=df(),s=hf()}(or)),or}var mr={},pr={},jo;function gf(){return jo||(jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return n}});const t=$n();function n(s){let{re:o,groups:a}=s;return i=>{const c=o.exec(i);if(!c)return!1;const l=m=>{try{return decodeURIComponent(m)}catch{throw new t.DecodeError("failed to decode param")}},u={};return Object.keys(a).forEach(m=>{const h=a[m],p=c[h.pos];p!==void 0&&(u[m]=~p.indexOf("/")?p.split("/").map(f=>l(f)):h.repeat?[l(p)]:l(p))}),u}}}(pr)),pr}var fr={},hr={},Co;function yf(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(q,K){for(var _e in K)Object.defineProperty(q,_e,{enumerable:!0,get:K[_e]})}t(e,{ACTION_SUFFIX:function(){return l},APP_DIR_ALIAS:function(){return L},CACHE_ONE_YEAR:function(){return x},DOT_NEXT_ALIAS:function(){return A},ESLINT_DEFAULT_DIRS:function(){return ae},GSP_NO_RETURNED_VALUE:function(){return se},GSSP_COMPONENT_MEMBER_ERROR:function(){return J},GSSP_NO_RETURNED_VALUE:function(){return ie},INSTRUMENTATION_HOOK_FILENAME:function(){return E},MIDDLEWARE_FILENAME:function(){return P},MIDDLEWARE_LOCATION_REGEXP:function(){return S},NEXT_BODY_SUFFIX:function(){return h},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return j},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return _},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return y},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return f},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return C},NEXT_CACHE_TAGS_HEADER:function(){return p},NEXT_CACHE_TAG_MAX_ITEMS:function(){return v},NEXT_CACHE_TAG_MAX_LENGTH:function(){return b},NEXT_DATA_SUFFIX:function(){return u},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return s},NEXT_META_SUFFIX:function(){return m},NEXT_QUERY_PARAM_PREFIX:function(){return n},NON_STANDARD_NODE_ENV:function(){return w},PAGES_DIR_ALIAS:function(){return I},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return Y},ROOT_DIR_ALIAS:function(){return O},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return F},RSC_ACTION_ENCRYPTION_ALIAS:function(){return U},RSC_ACTION_PROXY_ALIAS:function(){return D},RSC_ACTION_VALIDATE_ALIAS:function(){return Q},RSC_MOD_REF_PROXY_ALIAS:function(){return M},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return c},SERVER_PROPS_EXPORT_ERROR:function(){return le},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return H},SERVER_PROPS_SSG_CONFLICT:function(){return Z},SERVER_RUNTIME:function(){return he},SSG_FALLBACK_EXPORT_ERROR:function(){return W},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return G},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return re},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return $},WEBPACK_LAYERS:function(){return R},WEBPACK_RESOURCE_QUERIES:function(){return Ne}});const n="nxtP",s="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".rsc",l=".action",u=".json",m=".meta",h=".body",p="x-next-cache-tags",f="x-next-cache-soft-tags",_="x-next-revalidated-tags",y="x-next-revalidate-tag-token",v=128,b=256,C=1024,j="_N_T_",x=31536e3,P="middleware",S=`(?:src/)?${P}`,E="instrumentation",I="private-next-pages",A="private-dot-next",O="private-next-root-dir",L="private-next-app-dir",M="private-next-rsc-mod-ref-proxy",Q="private-next-rsc-action-validate",D="private-next-rsc-server-reference",U="private-next-rsc-action-encryption",F="private-next-rsc-action-client-wrapper",Y="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",G="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",H="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",Z="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",re="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",le="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",se="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",ie="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",$="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",J="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",w='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',W="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",ae=["app","pages","components","lib","src"],he={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},N={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},R={...N,GROUP:{serverOnly:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.instrument],clientOnly:[N.serverSideRendering,N.appPagesBrowser],nonClientServerTarget:[N.middleware,N.api],app:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.serverSideRendering,N.appPagesBrowser,N.shared,N.instrument]}},Ne={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}}(hr)),hr}var _r={},So;function vf(){return So||(So=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(n,"\\$&"):o}}(_r)),_r}var Eo;function xf(){return Eo||(Eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,y){for(var v in y)Object.defineProperty(_,v,{enumerable:!0,get:y[v]})}t(e,{getNamedMiddlewareRegex:function(){return f},getNamedRouteRegex:function(){return p},getRouteRegex:function(){return l},parseParameter:function(){return i}});const n=yf(),s=Oc(),o=vf(),a=Rc();function i(_){const y=_.startsWith("[")&&_.endsWith("]");y&&(_=_.slice(1,-1));const v=_.startsWith("...");return v&&(_=_.slice(3)),{key:_,repeat:v,optional:y}}function c(_){const y=(0,a.removeTrailingSlash)(_).slice(1).split("/"),v={};let b=1;return{parameterizedRoute:y.map(C=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(P=>C.startsWith(P)),x=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&x){const{key:P,optional:S,repeat:E}=i(x[1]);return v[P]={pos:b++,repeat:E,optional:S},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(x){const{key:P,repeat:S,optional:E}=i(x[1]);return v[P]={pos:b++,repeat:S,optional:E},S?E?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(C)}).join(""),groups:v}}function l(_){const{parameterizedRoute:y,groups:v}=c(_);return{re:new RegExp("^"+y+"(?:/)?$"),groups:v}}function u(){let _=0;return()=>{let y="",v=++_;for(;v>0;)y+=String.fromCharCode(97+(v-1)%26),v=Math.floor((v-1)/26);return y}}function m(_){let{interceptionMarker:y,getSafeRouteKey:v,segment:b,routeKeys:C,keyPrefix:j}=_;const{key:x,optional:P,repeat:S}=i(b);let E=x.replace(/\W/g,"");j&&(E=""+j+E);let I=!1;(E.length===0||E.length>30)&&(I=!0),isNaN(parseInt(E.slice(0,1)))||(I=!0),I&&(E=v()),j?C[E]=""+j+x:C[E]=x;const A=y?(0,o.escapeStringRegexp)(y):"";return S?P?"(?:/"+A+"(?<"+E+">.+?))?":"/"+A+"(?<"+E+">.+?)":"/"+A+"(?<"+E+">[^/]+?)"}function h(_,y){const v=(0,a.removeTrailingSlash)(_).slice(1).split("/"),b=u(),C={};return{namedParameterizedRoute:v.map(j=>{const x=s.INTERCEPTION_ROUTE_MARKERS.some(S=>j.startsWith(S)),P=j.match(/\[((?:\[.*\])|.+)\]/);if(x&&P){const[S]=j.split(P[0]);return m({getSafeRouteKey:b,interceptionMarker:S,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return P?m({getSafeRouteKey:b,segment:P[1],routeKeys:C,keyPrefix:y?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function p(_,y){const v=h(_,y);return{...l(_),namedRegex:"^"+v.namedParameterizedRoute+"(?:/)?$",routeKeys:v.routeKeys}}function f(_,y){const{parameterizedRoute:v}=c(_),{catchAll:b=!0}=y;if(v==="/")return{namedRegex:"^/"+(b?".*":"")+"$"};const{namedParameterizedRoute:C}=h(_,!1);let j=b?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(fr)),fr}var Po;function bf(){return Po||(Po=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=gf(),n=xf();function s(o,a,i){let c="";const l=(0,n.getRouteRegex)(o),u=l.groups,m=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const h=Object.keys(u);return h.every(p=>{let f=m[p]||"";const{repeat:_,optional:y}=u[p];let v="["+(_?"...":"")+p+"]";return y&&(v=(f?"":"/")+"["+v+"]"),_&&!Array.isArray(f)&&(f=[f]),(y||p in m)&&(c=c.replace(v,_?f.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(f))||"/")})||(c=""),{params:h,result:c}}}(mr)),mr}var No;function jf(){return No||(No=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const n=Ic(),s=wc(),o=lf(),a=$n(),i=zn(),c=Tc(),l=_f(),u=bf();function m(h,p,f){let _,y=typeof p=="string"?p:(0,s.formatWithValidation)(p);const v=y.match(/^[a-zA-Z]{1,}:\/\//),b=v?y.slice(v[0].length):y;if((b.split("?",1)[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 j=(0,a.normalizeRepeatedSlashes)(b);y=(v?v[0]:"")+j}if(!(0,c.isLocalURL)(y))return f?[y]:y;try{_=new URL(y.startsWith("#")?h.asPath:h.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let x="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&f){const S=(0,n.searchParamsToUrlQuery)(j.searchParams),{result:E,params:I}=(0,u.interpolateAs)(j.pathname,j.pathname,S);E&&(x=(0,s.formatWithValidation)({pathname:E,hash:j.hash,query:(0,o.omit)(S,I)}))}const P=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return f?[P,x||P]:P}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)}(rn,rn.exports)),rn.exports}var cn={exports:{}},gr={},yr={},Io;function Lc(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addPathPrefix",{enumerable:!0,get:function(){return n}});const t=Os();function n(s,o){if(!s.startsWith("/")||!o)return s;const{pathname:a,query:i,hash:c}=(0,t.parsePath)(s);return""+o+a+i+c}}(yr)),yr}var wo;function Cf(){return wo||(wo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLocale",{enumerable:!0,get:function(){return s}});const t=Lc(),n=Ac();function s(o,a,i,c){if(!a||a===i)return o;const l=o.toLowerCase();return!c&&((0,n.pathHasPrefix)(l,"/api")||(0,n.pathHasPrefix)(l,"/"+a.toLowerCase()))?o:(0,t.addPathPrefix)(o,"/"+a)}}(gr)),gr}var Ro;function Sf(){return Ro||(Ro=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const n=zn(),s=function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,n.normalizePathTrailingSlash)(Cf().addLocale(o,...i)):o};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(cn,cn.exports)),cn.exports}var vr={},Ao;function kc(){return Ao||(Ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(vr)),vr}var xr={},To;function Ef(){return To||(To=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,m){for(var h in m)Object.defineProperty(u,h,{enumerable:!0,get:m[h]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=Oe._(g),o=s.default.createContext(null),a=s.default.createContext(null),i=s.default.createContext(null),c=s.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",a.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",c.displayName="TemplateContext");const l=s.default.createContext(new Set)}(xr)),xr}var ln={exports:{}},un={exports:{}},Oo;function Mc(){return Oo||(Oo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}n(t,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return s}});const s=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let i=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(un,un.exports)),un.exports}var Lo;function Pf(){return Lo||(Lo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const n=g,s=Mc(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(m){const h={root:m.root||null,margin:m.rootMargin||""},p=i.find(v=>v.root===h.root&&v.margin===h.margin);let f;if(p&&(f=a.get(p),f))return f;const _=new Map,y=new IntersectionObserver(v=>{v.forEach(b=>{const C=_.get(b.target),j=b.isIntersecting||b.intersectionRatio>0;C&&j&&C(j)})},m);return f={id:h,observer:y,elements:_},i.push(h),a.set(h,f),f}function l(m,h,p){const{id:f,observer:_,elements:y}=c(p);return y.set(m,h),_.observe(m),function(){if(y.delete(m),_.unobserve(m),y.size===0){_.disconnect(),a.delete(f);const b=i.findIndex(C=>C.root===f.root&&C.margin===f.margin);b>-1&&i.splice(b,1)}}}function u(m){let{rootRef:h,rootMargin:p,disabled:f}=m;const _=f||!o,[y,v]=(0,n.useState)(!1),b=(0,n.useRef)(null),C=(0,n.useCallback)(x=>{b.current=x},[]);(0,n.useEffect)(()=>{if(o){if(_||y)return;const x=b.current;if(x&&x.tagName)return l(x,S=>S&&v(S),{root:h==null?void 0:h.current,rootMargin:p})}else if(!y){const x=(0,s.requestIdleCallback)(()=>v(!0));return()=>(0,s.cancelIdleCallback)(x)}},[_,p,h,y,b.current]);const j=(0,n.useCallback)(()=>{v(!1)},[]);return[C,y,j]}(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)}(ln,ln.exports)),ln.exports}var dn={exports:{}},mn={exports:{}},br={},ko;function Nf(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"normalizeLocalePath",{enumerable:!0,get:function(){return t}});function t(n,s){let o;const a=n.split("/");return(s||[]).some(i=>a[1]&&a[1].toLowerCase()===i.toLowerCase()?(o=i,a.splice(1,1),n=a.join("/")||"/",!0):!1),{pathname:n,detectedLocale:o}}}(br)),br}var Mo;function If(){return Mo||(Mo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});const n=(s,o)=>process.env.__NEXT_I18N_SUPPORT?Nf().normalizeLocalePath(s,o):{pathname:s,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)}(mn,mn.exports)),mn.exports}var pn={exports:{}},jr={},Do;function wf(){return Do||(Do=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"detectDomainLocale",{enumerable:!0,get:function(){return t}});function t(n,s,o){if(n){o&&(o=o.toLowerCase());for(const c of n){var a,i;const l=(a=c.domain)==null?void 0:a.split(":",1)[0].toLowerCase();if(s===l||o===c.defaultLocale.toLowerCase()||(i=c.locales)!=null&&i.some(u=>u.toLowerCase()===o))return c}}}}(jr)),jr}var $o;function Rf(){return $o||($o=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return n}});const n=function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return wf().detectDomainLocale(...o)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(pn,pn.exports)),pn.exports}var zo;function Af(){return zo||(zo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const n=zn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=If().normalizeLocalePath,m=Rf().detectDomainLocale,h=i||u(a,c).detectedLocale,p=m(l,void 0,h);if(p){const f="http"+(p.http?"":"s")+"://",_=h===p.defaultLocale?"":"/"+h;return""+f+p.domain+(0,n.normalizePathTrailingSlash)(""+s+_+a)}return!1}else return!1}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(dn,dn.exports)),dn.exports}var fn={exports:{}},Fo;function Tf(){return Fo||(Fo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const n=Lc(),s=zn(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,n.addPathPrefix)(i,o))}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(fn,fn.exports)),fn.exports}var hn={exports:{}},Bo;function Of(){return Bo||(Bo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(f,_){for(var y in _)Object.defineProperty(f,y,{enumerable:!0,get:_[y]})}n(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return h},PrefetchKind:function(){return m},isThenable:function(){return p}});const s="refresh",o="navigate",a="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var m;(function(f){f.AUTO="auto",f.FULL="full",f.TEMPORARY="temporary"})(m||(m={}));var h;(function(f){f.fresh="fresh",f.reusable="reusable",f.expired="expired",f.stale="stale"})(h||(h={}));function p(f){return f&&(typeof f=="object"||typeof f=="function")&&typeof f.then=="function"}(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)}(hn,hn.exports)),hn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});const n=Oe,s=r,o=n._(g),a=jf(),i=Tc(),c=wc(),l=$n(),u=Sf(),m=kc(),h=Ef(),p=Pf(),f=Af(),_=Tf(),y=Of(),v=new Set;function b(E,I,A,O,L,M){if(typeof window>"u"||!M&&!(0,i.isLocalURL)(I))return;if(!O.bypassPrefetchedCheck){const D=typeof O.locale<"u"?O.locale:"locale"in E?E.locale:void 0,U=I+"%"+A+"%"+D;if(v.has(U))return;v.add(U)}(async()=>M?E.prefetch(I,L):E.prefetch(I,A,O))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function C(E){const A=E.currentTarget.getAttribute("target");return A&&A!=="_self"||E.metaKey||E.ctrlKey||E.shiftKey||E.altKey||E.nativeEvent&&E.nativeEvent.which===2}function j(E,I,A,O,L,M,Q,D,U){const{nodeName:F}=E.currentTarget;if(F.toUpperCase()==="A"&&(C(E)||!U&&!(0,i.isLocalURL)(A)))return;E.preventDefault();const G=()=>{const H=Q??!0;"beforePopState"in I?I[L?"replace":"push"](A,O,{shallow:M,locale:D,scroll:H}):I[L?"replace":"push"](O||A,{scroll:H})};U?o.default.startTransition(G):G()}function x(E){return typeof E=="string"?E:(0,c.formatUrl)(E)}const S=o.default.forwardRef(function(I,A){let O;const{href:L,as:M,children:Q,prefetch:D=null,passHref:U,replace:F,shallow:Y,scroll:G,locale:H,onClick:Z,onMouseEnter:re,onTouchStart:le,legacyBehavior:se=!1,...ie}=I;O=Q,se&&(typeof O=="string"||typeof O=="number")&&(O=(0,s.jsx)("a",{children:O}));const $=o.default.useContext(m.RouterContext),J=o.default.useContext(h.AppRouterContext),w=$??J,W=!$,ae=D!==!1,he=D===null?y.PrefetchKind.AUTO:y.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let z=function(B){return new Error("Failed prop type: The prop `"+B.key+"` expects a "+B.expected+" in `<Link>`, but got `"+B.actual+"` instead."+(typeof window<"u"?`
|
|
2
2
|
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(B=>{if(B==="href"&&(I[B]==null||typeof I[B]!="string"&&typeof I[B]!="object"))throw z({key:B,expected:"`string` or `object`",actual:I[B]===null?"null":typeof I[B]})}),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(B=>{const ee=typeof I[B];if(B==="as"){if(I[B]&&ee!=="string"&&ee!=="object")throw z({key:B,expected:"`string` or `object`",actual:ee})}else if(B==="locale"){if(I[B]&&ee!=="string")throw z({key:B,expected:"`string`",actual:ee})}else if(B==="onClick"||B==="onMouseEnter"||B==="onTouchStart"){if(I[B]&&ee!=="function")throw z({key:B,expected:"`function`",actual:ee})}else if((B==="replace"||B==="scroll"||B==="shallow"||B==="passHref"||B==="prefetch"||B==="legacyBehavior")&&I[B]!=null&&ee!=="boolean")throw z({key:B,expected:"`boolean`",actual:ee})});const k=o.default.useRef(!1);I.prefetch&&!k.current&&!W&&(k.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"&&W&&!M){let z;if(typeof L=="string"?z=L:typeof L=="object"&&typeof L.pathname=="string"&&(z=L.pathname),z&&z.split("/").some(ye=>ye.startsWith("[")&&ye.endsWith("]")))throw new Error("Dynamic href `"+z+"` 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:N,as:R}=o.default.useMemo(()=>{if(!$){const ye=x(L);return{href:ye,as:M?x(M):ye}}const[z,me]=(0,a.resolveHref)($,L,!0);return{href:z,as:M?(0,a.resolveHref)($,M):me||z}},[$,L,M]),Ne=o.default.useRef(N),q=o.default.useRef(R);let K;if(se)if(process.env.NODE_ENV==="development"){Z&&console.warn('"onClick" was passed to <Link> with `href` of `'+L+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),re&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+L+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{K=o.default.Children.only(O)}catch{throw O?new Error("Multiple children were passed to <Link> with `href` of `"+L+"` 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 `"+L+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else K=o.default.Children.only(O);else if(process.env.NODE_ENV==="development"&&(O==null?void 0:O.type)==="a")throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
|
|
4
|
-
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const _e=se?K&&typeof K=="object"&&K.ref:A,[we,be,ge]=(0,p.useIntersection)({rootMargin:"200px"}),Ae=o.default.useCallback(z=>{(q.current!==R||Ne.current!==N)&&(ge(),q.current=R,Ne.current=N),we(z),_e&&(typeof _e=="function"?_e(z):typeof _e=="object"&&(_e.current=z))},[R,_e,N,ge,we]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&w&&(!be||!ae||b(w,N,R,{locale:H},{kind:he},W))},[R,N,be,H,ae,$==null?void 0:$.locale,w,W,he]);const je={ref:Ae,onClick(z){if(process.env.NODE_ENV!=="production"&&!z)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!se&&typeof Z=="function"&&Z(z),se&&K.props&&typeof K.props.onClick=="function"&&K.props.onClick(z),w&&(z.defaultPrevented||j(z,w,N,R,F,Y,G,H,W))},onMouseEnter(z){!se&&typeof re=="function"&&re(z),se&&K.props&&typeof K.props.onMouseEnter=="function"&&K.props.onMouseEnter(z),w&&((!ae||process.env.NODE_ENV==="development")&&W||b(w,N,R,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(me){!se&&typeof le=="function"&&le(me),se&&K.props&&typeof K.props.onTouchStart=="function"&&K.props.onTouchStart(me),w&&(!ae&&W||b(w,N,R,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))}};if((0,l.isAbsoluteUrl)(R))je.href=R;else if(!se||U||K.type==="a"&&!("href"in K.props)){const z=typeof H<"u"?H:$==null?void 0:$.locale,me=($==null?void 0:$.isLocaleDomain)&&(0,f.getDomainLocale)(R,z,$==null?void 0:$.locales,$==null?void 0:$.domainLocales);je.href=me||(0,_.addBasePath)((0,u.addLocale)(R,z,$==null?void 0:$.defaultLocale))}return se?o.default.cloneElement(K,je):(0,s.jsx)("a",{...ie,...je,children:O})});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Yr,Yr.exports);var Lf=Yr.exports,kf=Lf;const De=T.getDefaultExportFromCjs(kf),Mf="_link_w24h0_1",Df="_wrapper_w24h0_98",$f="_text_w24h0_106",Cr={link:Mf,wrapper:Df,text:$f},$e=({children:e,adornments:t,className:n,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const h=d.helpers.ValidateProp({fieldTypes:wt.SizesSmallExtended,property:i,fallback:"medium"}),p=d.helpers.ValidateProp({fieldTypes:wt.Mode,property:a,fallback:"default"});return r.jsx(De,{...m,className:d.helpers.classNameConcat(Cr.link,n),href:o&&o.length>0?o:"#","data-size":h,"data-variant":p,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:Cr.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:Cr.text,"data-size":h,children:e}),t==null?void 0:t.end]})})},zf=({ICONS:e})=>{const{resetFeedback:t}=jt();return r.jsxs("div",{className:Bt["wishlist--snack--actions"],children:[r.jsx($e,{href:"/favoritos",children:"Ver Favoritos"}),r.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:r.jsx(d.Icon,{name:e.close})}})]})},Ls=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=vs(),{resetFeedback:o}=jt(),a=g.useRef(null);return g.useEffect(()=>{a.current&&clearTimeout(a.current),s&&(a.current=setTimeout(()=>{o()},5e3))},[s,o]),(s==null?void 0:s.active)&&r.jsx(Rt,{Z_INDEX_WAR:n,className:Bt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(zf,{ICONS:t}),size:"medium"})};Ls.displayName="WishList.Feedback";const ks={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Dc=({className:e,children:t,columns:n=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>n%i===0?"initial":s||n<2?c:c.split("/").reverse().join("/"),[n,i,s]);return r.jsx("div",{...l,className:d.helpers.classNameConcat(ks["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:o/2},children:t})};Dc.displayName="ProductList.Banner";const $c=({isKit:e,parent:t,productId:n,setNotify:s,CONSTANTS:o})=>{const{router:a}=ce(),i=g.useRef(!1),c=g.useRef(null),[l,u]=g.useState([]),m=y=>a.push(y??""),h=new Map,p=async y=>{try{if(h.has(y)){u(h.get(y));return}const v=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:y,filterTexture:o.TEXTURE_IMAGE}),priority:"low"});if(!v.ok)throw new Error("Erro ao buscar similares.");const b=await v.json();h.set(y,b),u(b)}catch(v){console.error(v)}},f=g.useCallback(y=>{!n||!y||(typeof p=="function"&&p(n),i.current=!0)},[n]),_=g.useCallback((y,v)=>{if(!y.isIntersecting){o.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(y.intersectionRatio>=v.threshold&&!i.current){if(o.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{f(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}f(!0)}},[f]);return g.useEffect(()=>{if(e||!t.current)return;const y={root:null,threshold:.1},v=new IntersectionObserver(([b])=>{_(b,y)},y);return v.observe(t.current),()=>{c.current&&clearTimeout(c.current),v.disconnect()}},[_,t,e]),r.jsx(pe.Actions,{...l,callback:m,isKit:e,children:!e&&r.jsx(pe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};$c.displayName="ProductList.Card.Actions";const zc=({className:e,children:t,gap:n=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:h,...p})=>{const f=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((b,C)=>{var j;typeof u=="function"&&u((j=b.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),v=s.name.substring(0,4).toLowerCase()==="kit ";return r.jsxs("div",{...p,className:d.helpers.classNameConcat(ks["product-list--card"],e),"data-mobile":o,"data-order":a,ref:f,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(pe.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:h,children:[r.jsx(pe.Header,{product:s,tag:i==null?void 0:i.commercial}),r.jsx(pe.Media,{showVideo:m,hasPriority:!0}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:i==null?void 0:i.institucional}),r.jsx($c,{productId:s.isVariantOf.productGroupID,parent:f,setNotify:y,isKit:v,CONSTANTS:h}),!v&&r.jsx(pe.OutStock,{callback:y})]}),r.jsx(pe.Wrapper,{type:"footer",children:_&&r.jsx(pe.BuyButton,{isKit:v})})]}),t]})};zc.displayName="ProductList.Card";const Fc=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(ks["product-list"],t),children:e});Fc.displayName="ProductList.Grid";const nt={Banner:Dc,Card:zc,Root:Fc,helpers:ap},Ff="_pdc_alo7z_1",Ge={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:Ff},Ms=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:s}=ce(),{isMobile:o}=ne(),a=()=>{s.push(n==null?void 0:n.link)};return r.jsxs("div",{className:d.helpers.classNameConcat(Ge["pdc--empty"],e),children:[r.jsxs(d.TextStructure.DivWrapper,{className:Ge["pdc--empty-wrapper"],children:[r.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:n.subtitle})]}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:r.jsx("b",{children:n.text})})]})};Ms.displayName="PDC.Empty";const Fn=e=>r.jsx("div",{...e,className:Ge["pdc--infinite--next-page"],children:r.jsx(d.Spinner,{className:Ge["pdc--infinite--next-page--spinner"]})});Fn.displayName="PDC.Spinner";function Bc({CONSTANTS:e}){const{sendDataLayerEvent:t}=oe(),{isMobile:n}=ne(),{getAvailableProductTag:s}=mt(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=Lt(),u=l.join(","),m=n?16:32;return g.useEffect(()=>{const h=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(p=>p.json()).then(p=>{a(p),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:p}}})}).catch(p=>console.error(p)):a([]),c(!1)};if(l.length){h();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[u]),r.jsx("section",{className:Bt["wishlist-grid"],children:r.jsxs("div",{className:Bt["wishlist-grid--container"],children:[i&&r.jsx(Fn,{}),!l.length&&!(o!=null&&o.length)&&!i&&r.jsx(Ms,{className:Bt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(nt.Root,{children:Array.isArray(o)&&o.map((h,p)=>{const f=h.node.cluster.highlights||[],_=s(f);return r.jsx(nt.Card,{gap:m,isMobile:n??!1,item:h.node,tag:_,index:p,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,MAIN_IMAGE:e.MAIN_IMAGE,PLP_GRID_SCROLL_BACK:e.PLP_GRID_SCROLL_BACK,PLP_INFINITE_SCROLL:e.PLP_INFINITE_SCROLL,PLP_SIZE_ORDER:e.PLP_SIZE_ORDER,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:e.PLP_SHOW_VIDEO_ON_PRODUCT_CARD,PLP_PRODUCT_SIMILAR_DELAY:e.PLP_PRODUCT_SIMILAR_DELAY,PRODUCT_CARD_IMAGE_ASPECT_RATIO:e.PRODUCT_CARD_IMAGE_ASPECT_RATIO,PRODUCT_CARD_TEXTS:e.PRODUCT_CARD_TEXTS,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:e.PRODUCT_CARD_TOP_WISHLIST_TOGGLE,PRODUCT_IMAGE_DIMENSIONS:e.PRODUCT_IMAGE_DIMENSIONS,SECOND_IMAGE:e.SECOND_IMAGE,StoreConfig_MainSellerId:e.StoreConfig_MainSellerId,TEXTURE_IMAGE:e.TEXTURE_IMAGE,Z_INDEX_WAR:e.Z_INDEX_WAR,ICONS:e.ICONS}},h.node.sku)})})]})})}Bc.displayName="Wishlist.Grid";const Bf=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],Uc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=kt(),o=Lt(),a=vs(),{updateList:i}=jt();return g.useEffect(()=>{var l,u;a.active&&Ze.set("fs::wishlist",o);const c=async()=>{var m;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(m=s==null?void 0:s.user)==null?void 0:m.id})}).catch(h=>{console.error("Error updating wishlist:",h)})};a.active&&((l=s.user)!=null&&l.id)&&o.length!==((u=s.wishlist)==null?void 0:u.length)&&c()},[a,s,o]),g.useEffect(()=>{var u;const c=async()=>{const m=await Ze.get("fs::wishlist");m&&(m==null?void 0:m.length)!==o.length&&i(m)},l=async()=>{var f;const m=await Ze.get("fs::wishlist")??[],h=s.wishlist?typeof s.wishlist[0]=="object"?Bf(s.wishlist):s.wishlist:[],p=[...new Set([...m,...h])];i(p),Ze.set("fs::wishlist",o),h.length!==p.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:p,docId:(f=s.user)==null?void 0:f.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=s.user)!=null&&u.id){l();return}c()},[s,i,o]),r.jsx(Ls,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};Uc.displayName="Wishlist.Init";const Hc=({product:e,priceInfo:t,size:n="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=oe(),c=Lt(),{toggleProduct:l}=jt(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{size:n,name:c.includes(u)?o.favorite_true:o.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...s,border:"none"},variant:"tertiary"})};Hc.displayName="WishList.Toggle";const qc={Feedback:Ls,Toggle:Hc,Grid:Bc,Init:Uc},Vc=({product:e,tag:t,size:n="small"})=>{const{CONSTANTS:s}=Ke(),{tags:o}=mt(),a=e.offers.offers[0],i=T.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return r.jsxs(pe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&r.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?r.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?r.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:n,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(qc.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};Vc.displayName="ProductCard.Actions.Header";const Wc=({className:e,children:t,hasPriority:n=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:h,CONSTANTS:p}=Ke(),f=T.getFirstImages({images:c,label:{first:p.MAIN_IMAGE,second:p.SECOND_IMAGE}});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--image"],e),ref:a,style:{aspectRatio:p.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(De,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),p.PLP_INFINITE_SCROLL&&sessionStorage.setItem(p.PLP_GRID_SCROLL_BACK.order,String(h))},children:r.jsx("div",{className:Re["product-card--image--container"],children:Array.isArray(f)&&f.map(({url:_,alternateName:y},v)=>g.createElement(Ie.Image,{...p.PRODUCT_IMAGE_DIMENSIONS.product_card,style:p.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:v,...n&&{priority:v===0&&i<4},objectFit:"cover",src:_}))})}),p.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&r.jsx(pe.Video,{url:u,poster:f[0].url}),t]})};Wc.displayName="ProductCard.Media.Media";const Gc=({className:e,callback:t,children:n,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ke(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...s,className:d.helpers.classNameConcat(Re["product-card--outstock"],e),children:[r.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),r.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};Gc.displayName="ProductCard.OutStock";const Kc=({children:e,className:t="",index:n,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>r.jsx(of,{item:o,isMobile:s,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...m,className:d.helpers.classNameConcat(Re["product-card--wrapper"],t),"data-size":a,children:e})});Kc.displayName="ProductCard.Root";const Xc=({disabled:e,label:t,size:n,value:s,onClick:o,...a})=>r.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:o,children:[r.jsx(d.ToggleSize.DisabledAdornment,{}),r.jsx(d.ToggleSize.Text,{children:t})]});Xc.displayName="ProductCard.SizeSelector.Item";const Yc=({active:e=!1,callback:t,selectedSku:n=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ke();s.productId=a.id;const u=T.disableSKU(s),m=T.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const h=g.useCallback(f=>{const _=n===f?null:f;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,n]),p=g.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}h(s)},[s,o,h,u,a]);return r.jsx(Xc,{active:e,disabled:u,label:m,onClick:()=>p(),size:i?"x-small":"small",value:s})};Yc.displayName="ProductCard.SizeSelector.SkuItem";const Qc=({items:e,getLabel:t,PLP_SIZE_ORDER:n})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=n.indexOf(a)-n.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],Zc=({callback:e,className:t="",children:n,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ke(),u=g.useMemo(()=>Array.isArray(c)?Qc({items:c,getLabel:m=>T.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return r.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--selectors--size"],t),"data-mobile":i,children:[r.jsx("div",{className:Re["product-card--selectors--size--skus"],children:u.map((m,h)=>r.jsx(Yc,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${h}--${m.sku}`))}),r.jsx("div",{className:Re["product-card--selectors--size--button"],children:n})]})};Zc.displayName="ProductCard.SizeSelector";const Qr=({alt:e="",callback:t,more:n,total:s=4,src:o,url:a,...i})=>r.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsxs(d.ToggleStyle.Texture,{children:[o&&r.jsx(Ie.Image,{alt:e??o,src:o,height:34,width:34}),n&&r.jsx(d.TextStructure.DivWrapper,{className:Re["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",s]})})]})]}),Uf=({children:e,callback:t,data:n,total:s=4,size:o,...a})=>{const{index:i}=Ke(),{triggerSelectItemEventRef:c}=oe();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,s).map((l,u)=>r.jsx(Qr,{callback:m=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(m)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:o},u)),Array.isArray(n)&&(n==null?void 0:n.length)>s&&r.jsx(Qr,{size:o,total:n.length-s,more:!0})]})},Jc=({callback:e,className:t,data:n,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=Ke(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return r.jsx(Uf,{...a,callback:e,className:d.helpers.classNameConcat(Re["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(Qr,{active:!0,size:"x-small",src:l.url})})};Jc.displayName="ProductCard.StyleSelector";const el=({className:e,hasDecimal:t,...n})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Ke();l.current.priceInfo={price:o,listPrice:a};const u=T.formatPriceToCurrency(a,t),m=T.formatPriceToCurrency(o,t),h=T.formatPriceToCurrency(c??0),p=s?"horizontal":"stacked";return r.jsx("div",{...n,className:d.helpers.classNameConcat(Re["product-card--price"],e),"data-mobile":s,children:r.jsx(d.ProductInfo.Root,{size:"small",layout:p,children:r.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:p,children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?r.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${h}`,size:"small"}):null]})})})};el.displayName="ProductCard.Price";const tl=({tag:e,className:t})=>{const{item:{name:n}}=Ke();return r.jsxs("div",{className:d.helpers.classNameConcat(Re["product-card--title"],t),children:[r.jsx("div",{className:Re["product-card--title--tag"],children:e?r.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?r.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):r.jsx("div",{})}),r.jsx("div",{className:Re["product-card--title--content"],children:n&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h3",{children:n})})})})]})};tl.displayName="ProductCard.Title";const nl=({className:e,url:t,poster:n,...s})=>{const{element:o}=Ke();return g.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(m=>{m.forEach(h=>{T.setVideoPlay(h.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,o]),r.jsx("div",{...s,className:d.helpers.classNameConcat(Re["product-card--video"],e),children:t&&r.jsx(Ie.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};nl.displayName="ProductCard.Media.Video";const rl=({children:e,className:t,type:n,...s})=>r.jsx("div",{...s,className:d.helpers.classNameConcat(Re[`product-card--${n}`],t),children:e});rl.displayName="ProductCard.Wrapper";const pe={Actions:Pc,BuyButton:Nc,Header:Vc,Media:Wc,Root:Kc,OutStock:Gc,Price:el,SizeSelector:Zc,StyleSelector:Jc,Title:tl,Video:nl,Wrapper:rl},Hf="_carousel_245ib_1",qf="_shelf__container_245ib_14",Vf="_shelf_without_carousel_245ib_34",Wf="_card_container_245ib_50",It={carousel:Hf,"custom-controllers":"_custom-controllers_245ib_5",shelf__container:qf,"controllers-arrows-bullets":"_controllers-arrows-bullets_245ib_23",shelf_without_carousel:Vf,card_container:Wf},Uo=({title:e})=>r.jsx("div",{className:It.shelf__container,children:e&&r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",T.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",T.responsive["responsive-desktop-flex"]),children:e})]})})}),Gf=({children:e,ICONS:t,itemsPerPage:n,title:s})=>{const{isMobile:o}=ne(),a=n[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=g.Children.toArray(e).length;return o||m>=4?r.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:It.carousel,children:[r.jsxs("div",{className:It["custom-controllers"],children:[s&&r.jsx(Uo,{title:s}),a<m&&r.jsxs(d.Carousel.Controller,{className:It["controllers-arrows-bullets"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&r.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]})]}),r.jsx(d.Carousel.Body,{children:g.Children.map(e,(p,f)=>r.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:p},`${s}_${f}`))})]}):r.jsxs(r.Fragment,{children:[s&&r.jsx(Uo,{title:s}),r.jsx("div",{className:It.shelf_without_carousel,children:e})]})},sl=({className:e,item:t,isMobile:n,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=mt(),{availability:{status:l}}=t,u=h=>{const p=h.filter(f=>!a.CONSTANTS.TEXTURE_IMAGE.includes(f.keywords));return n?p.splice(0,2):p},m=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:It.card_container,children:r.jsxs(pe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:o,children:[r.jsx(pe.Header,{product:t,tag:m==null?void 0:m.commercial}),r.jsx(pe.Media,{}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:m==null?void 0:m.institucional}),r.jsx(pe.Actions,{})]}),r.jsx(pe.Wrapper,{type:"footer"})]})})};sl.displayName="ProductList.Card";const qt={Shelf:Gf,Card:sl},ol=({CONSTANTS:e,inView:t,products:n,innerRef:s})=>{const o=g.useMemo(()=>rf(n),[n]),{isMobile:a}=ne(),{addItemsToCart:i}=xe(),{sendDataLayerEvent:c}=oe(),{getAvailableProductTag:l}=mt(),[u,m]=g.useState({totalPrice:0,products:{}}),h=()=>{const f=Object.values(u.products);i(f),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:f.map(_=>{const y=o.find(v=>v.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:f,price:u.totalPrice}}})},p=({selectedProduct:f,productId:_})=>{const y=sf({selectedProduct:f,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(y)};return g.useEffect(()=>{if(!t||o.length===0)return;const f=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:f},outsideEcommerceData:{item_list_name:f}}})},[t]),r.jsxs("div",{className:lt.container,ref:s,children:[r.jsx("div",{className:lt["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:r.jsx(qt.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:o.length>=3?2.2:o.length},ICONS:e.ICONS,children:Array.isArray(o)&&o.map(({node:f},_)=>{var b,C,j;const y=l(f.cluster.highlights),{availability:{status:v}}=f;return v?r.jsxs(pe.Root,{item:{...f,image:As.helpers.product.getFirstImages({images:f.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[r.jsx(pe.Header,{product:f,tag:y.commercial}),r.jsx(pe.Media,{}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:{value:(b=y.institucional)==null?void 0:b.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),r.jsx(pe.Actions,{children:r.jsx(pe.SizeSelector,{callback:x=>p({selectedProduct:x,productId:f.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},f.id):null})})}),r.jsx("div",{className:lt["add-cart-container"],children:r.jsx(nf,{handleAddAllToCart:h,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Ds={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},$s=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=xe(),{handleSelectContent:s}=oe(),{CONSTANTS:o}=Ee(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:r.jsxs(d.Badge.AutoPositioner,{children:[r.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),r.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};$s.displayName="Header.Bag";const Qt=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(De,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,al=()=>{const{headerData:e}=Ee(),{handleSelectContent:t}=oe(),{reset:n,updateValue:s}=Gt(),o=a=>{a?s(a):n()};return r.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(Qt,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:r.jsx(d.Header.CategoryItem,{className:Ds["btn-header"],value:a.submenuId??null,adornment:{start:r.jsx(d.Icon,{name:a.iconStart}),end:r.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};al.displayName="Header.Categories";function Kf(){const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee(),{setValue:n}=Tn();return r.jsx(d.Header.SupportItem,{onClick:()=>{n(!0),e({content:"header:search"})},children:r.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const Xf={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Yf={"observer-wrapper":"_observer-wrapper_r43gk_1"},Bn=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=ds(c,o,n),{sendDataLayerEvent:u}=oe();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(Yf["observer-wrapper"],a),children:e})},il=({thumbnails:e,category:t,isMobile:n=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=oe(),a=50/e.length;return r.jsx("div",{className:Xf["menu-subcategories-container"],children:e.map((i,c)=>{const l=n?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return r.jsx(Bn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(De,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[r.jsx(Ie.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&r.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};il.displayName="Menu.Thumbnail";const Zr={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},cl=({children:e,dividerOnRight:t=!0,subMenu:n,...s})=>{var l;const{router:o}=ce(),{reset:a}=Gt(),{handleSelectContent:i}=oe(),{CONSTANTS:c}=Ee();return r.jsxs("div",{...s,className:Zr["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,m)=>{var f,_,y,v;const h=u.listCollapseDesk&&!((f=u.see_all)!=null&&f.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},p=u.listCollapseDesk&&!((_=u.see_all)!=null&&_.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:r.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return r.jsxs(d.ComponentList.Structure,{children:[r.jsx(Qt,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${n.label??""}`}))},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{children:u.label})})})}),r.jsx(d.ComponentList.List,{columns:1,...h,className:Zr["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,C)=>r.jsx(d.ComponentList.ListItem,{id:`list-item-${b.label}-${C}`,children:r.jsx($e,{href:b.link??"#",size:"x-small",title:b.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${b.label??""}:${n.label??""}`})},children:b.label})},`list-item-${b.label}-${C}`))}),((v=u.see_all)==null?void 0:v.link)&&r.jsx(d.ComponentList.Support,{...p,size:"small",onClick:()=>{var b;(b=u.see_all)!=null&&b.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&r.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};cl.displayName="Menu.Categories";const ll=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:s}=Ee();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:Zr["menu-desktop"],style:{...n.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(d.Utils.Divider,{size:"small"})]})};ll.displayName="Menu.MenuRoot";const Sr={Root:ll,Categories:cl,Thumbnail:il},ul=()=>{const{headerData:e,CONSTANTS:t}=Ee(),n=Ja(),{reset:s}=Gt();return r.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,a)=>{const{thumbnails:i,label:c,id:l}=o,u=l===n,m=i==null?void 0:i.some(h=>!!h.srcDesk);return r.jsxs(Sr.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(Sr.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(i)&&r.jsx(Sr.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};ul.displayName="Header.SubMenu";const dl=()=>{const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee();return r.jsx(De,{href:"/favoritos",children:r.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:r.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};dl.displayName="Header.WishList";const Qf="_root_im5yf_125",Ve={"user-menu--credits":"_user-menu--credits_im5yf_1","user-menu--content":"_user-menu--content_im5yf_10","user-menu--login":"_user-menu--login_im5yf_30","user-menu--login--content":"_user-menu--login--content_im5yf_37","user-menu--menu":"_user-menu--menu_im5yf_64","user-menu--tooltip":"_user-menu--tooltip_im5yf_92","tooltip-modifier":"_tooltip-modifier_im5yf_103","modal-controls-modifier":"_modal-controls-modifier_im5yf_108","modal-header-modifier":"_modal-header-modifier_im5yf_116",root:Qf},ml=({className:e,children:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Ve["user-menu--content"],e),children:t});ml.displayName="UserMenu.Content";var pl=(e=>(e.Account="account",e))(pl||{});const fl=({className:e,cashBack:t,credits:n,link:s,total:o,...a})=>{const i=t?T.formatPriceToCurrency(t):void 0,c=n?T.formatPriceToCurrency(n):void 0,l=o?T.formatPriceToCurrency(o):void 0;return r.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(Ve["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:pl.Account})};fl.displayName="UserMenu.Credits";const hl=({className:e,children:t,description:n,text:s,...o})=>{const{isMobile:a}=ne();return r.jsx("div",{...o,className:d.helpers.classNameConcat(Ve["user-menu--login"],e),"data-mobile":a,children:r.jsxs("div",{className:Ve["user-menu--login--content"],children:[r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[r.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),r.jsx("p",{children:n})]})}),t]})})};hl.displayName="UserMenu.Login";const _l=({className:e,isLogged:t,onLogoutClick:n,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?Zs:Zs({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return r.jsxs("ul",{className:d.helpers.classNameConcat(Ve["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>r.jsx("li",{children:r.jsx($e,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:r.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?r.jsx("li",{children:r.jsx($e,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(d.Icon,{name:Gm(s)})},children:Wm})}):r.jsx(r.Fragment,{})]})};_l.displayName="UserMenu.Menu";const gl=e=>{const t=g.useRef(null),n=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=g.useCallback(a=>{a.key==="Escape"&&e()},[e]);return g.useEffect(()=>(document.addEventListener("mousedown",n),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[n,o,s]),{ref:t}},Zf=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Jf=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:s,left:o,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?Zf(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+n}},yl=g.createContext({}),eh=({children:e,delay:t=600,gap:n=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[m,h]=g.useState({left:0,top:0}),{ref:p}=gl(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(p!=null&&p.current)){const{left:f,top:_}=Jf(p.current,a,n??0);h({left:f,top:_}),u(!1)}},[n,s,a,p]),r.jsx(yl.Provider,{value:g.useMemo(()=>({...i,...m,contentRef:p,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,m,p,l,s,o,u,a]),children:e})},vl=()=>{const e=g.useContext(yl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},xl=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:s,setIsOpen:o}=vl();return r.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:o,variant:"sideBottom",className:Ve["modal-root-modifier"],style:{zIndex:n.user_menu_mobile},children:[r.jsx(d.Modal.Header,{navigation:"top",className:Ve["modal-header-modifier"],children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:Ve["modal-controls-modifier"]})}),r.jsx(d.Modal.Body,{children:e})]})};xl.displayName="UserMenu.Modal";const bl=({children:e,component:t,Z_INDEX_WAR:n,isMobile:s,...o})=>r.jsx(eh,{...o,className:Ve.root,children:s?r.jsxs(r.Fragment,{children:[r.jsx(ct.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(ct.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});bl.displayName="UserMenu.Root";const jl=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=vl();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),className:d.helpers.classNameConcat(Ve["user-menu--tooltip"],Ve["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:n.user_menu},children:r.jsx("div",{className:Ve["user-menu--tooltip"],children:e})})};jl.displayName="UserMenu.Tooltip";const ct={Credits:fl,Content:ml,Login:hl,Menu:_l,Modal:xl,Root:bl,Tooltip:jl},Un=({children:e,isOpen:t,setIsOpen:n,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var f,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Ee(),l=kt(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((f=l.user)!=null&&f.userId),{cashback:h,credits:p}=g.useMemo(()=>{var v,b;return{credits:((v=l==null?void 0:l.getCurrentCredits())==null?void 0:v.credits)??0,cashback:((b=l==null?void 0:l.getCurrentCredits())==null?void 0:b.cashback)??0}},[l]);return r.jsx(ct.Root,{component:r.jsxs(ct.Content,{children:[r.jsx(ct.Login,{description:Xm(m),text:Km(m,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!m&&r.jsx(d.Button,{size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),p+h&&m?r.jsx(ct.Credits,{credits:p,cashBack:h,link:`${a.secureSubdomain}/account#/meus-creditos`,total:p+h}):r.jsx(r.Fragment,{}),r.jsx(d.Utils.Divider,{}),r.jsx(ct.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:m,className:T.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),r.jsx(ct.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:m,className:T.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:n,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Un.displayName="UserMenu";const Cl=({storeConfig:e})=>{const{CONSTANTS:t}=Ee(),{handleSelectContent:n}=oe(),{reset:s}=Gt(),{setValue:o}=_s(),a=hs(),i=g.useRef(null);return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",onMouseEnter:s,children:r.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{n({content:"header:logo"})}})})}),r.jsx(al,{}),r.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[r.jsx(Kf,{}),r.jsx(Un,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:r.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),n({content:"header:user_menu"})},className:Ds["btn-login"],innerRef:i,children:r.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(dl,{}),r.jsx($s,{id:"cart-button"})]})]}),r.jsx(ul,{})]})};Cl.displayName="Header.HeaderDesktopWrapper";const Fe={"menu--banners":"_menu--banners_j3ev9_1","menu--banners--item":"_menu--banners--item_j3ev9_6","menu--banners--item--text":"_menu--banners--item--text_j3ev9_17","menu--banners--list":"_menu--banners--list_j3ev9_21","menu--dummy-close":"_menu--dummy-close_j3ev9_46","menu--body":"_menu--body_j3ev9_54","menu--categories":"_menu--categories_j3ev9_67","menu--categories--title":"_menu--categories--title_j3ev9_80","menu--step":"_menu--step_j3ev9_92","menu--sub-category":"_menu--sub-category_j3ev9_108","menu--sub-category--item":"_menu--sub-category--item_j3ev9_115","menu--sub-category--list":"_menu--sub-category--list_j3ev9_121"},Sl=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:s,submenuId:o,label:a,...i})=>r.jsx("button",{...i,className:Fe["menu--banners--item"],children:n?r.jsxs(d.Banner.Container,{children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{alt:t??n,height:128,src:n,width:343,unoptimized:!0})}),r.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Fe["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});Sl.displayName="Menu.Mobile.Category";const El=({label:e,...t})=>{const{CONSTANTS:n}=Ee();return r.jsx(d.Button,{...t,adornment:{end:r.jsx(d.Icon,{name:n.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};El.displayName="Menu.Mobile.Body.Category";const Pl=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>r.jsx("div",{...s,className:Fe["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>r.jsx($e,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>n(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Pl.displayName="Menu.Mobile.List";const Nl=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Fe["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((s,o)=>r.jsxs("div",{className:Fe["menu--sub-category--item"],children:[r.jsx(Ut.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),r.jsx(Ut.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):r.jsx(r.Fragment,{})};Nl.displayName="Menu.Mobile.Body.SubCategory";const Il=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>{var c;const{router:o}=ce(),{handleSelectContent:a}=oe(),{CONSTANTS:i}=Ee();return r.jsxs("div",{...s,className:Fe["menu--categories--title"],children:[r.jsx(Qt,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&r.jsx(d.ComponentList.Support,{adornment:{end:r.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;n(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&o.push(e.see_all.link)},children:e.see_all.label})]})};Il.displayName="Menu.Mobile";const Ut={Banner:Sl,Category:El,List:Pl,SubCategory:Nl,Title:Il},wl=g.createContext({}),th=({children:e})=>{const[t,n]=g.useState(null),s=g.useCallback(()=>{n(null)},[]),o=a=>{a!==t&&n(a)};return r.jsx(wl.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},Rl=()=>g.useContext(wl),Al=e=>{const{router:t}=ce(),{headerData:n}=Ee(),{handleSelectContent:s}=oe(),{currentCategory:o,setCurrentCategory:a}=Rl(),i=g.useRef(null),c=()=>{if(i.current){const f=i.current;f&&(a(null),f==null||f.click())}},l=(f,_)=>{s({content:`menu:${f}`}),t.push(_),c()},u=(f,_)=>{s({content:`menu:${f}:${_}`}),c()},m=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],h=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[],p=f=>{f.submenuId?a(f.submenuId):l(f.label,f.link)};return r.jsxs("div",{...e,className:Fe["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Fe["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Fe["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Fe["menu--banners"],children:r.jsx("div",{className:Fe["menu--banners--list"],children:m.map((f,_)=>g.createElement(Ut.Banner,{...f,key:_,onClick:()=>l(f.label,f.link)},f.mobileBannerAlt))})}),r.jsx("div",{className:Fe["menu--categories"],children:m.map((f,_)=>r.jsx(Ut.Category,{label:f.label,onClick:()=>p(f)},_))})]}),r.jsx("div",{className:Fe["menu--step"],"data-active":!!o,children:r.jsx(Ut.SubCategory,{current:h.find(f=>f.id===o),onHandleOut:u})})]})};Al.displayName="Menu.Mobile.Body";const nh={"menu--header":"_menu--header_1ozdf_1"},Tl=()=>{var o;const{headerData:e}=Ee(),{currentCategory:t,setCurrentCategory:n}=Rl(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return r.jsxs("div",{className:nh["menu--header"],children:[r.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),s&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),r.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>n(null)})]})};Tl.displayName="Menu.Mobile.Header";var Jr={exports:{}};function rh(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Er={},Pr={},Ho;function sh(){return Ho||(Ho=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Pr)),Pr}var qo;function oh(){return qo||(qo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return f}});const n=Oe._(g),s=sh();function o(_){return _&&_.default?_.default:_}const a=[],i=[];let c=!1;function l(_){let y=_(),v={loading:!0,loaded:null,error:null};return v.promise=y.then(b=>(v.loading=!1,v.loaded=b,b)).catch(b=>{throw v.loading=!1,v.error=b,b}),v}function u(_,y){let v=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),b=null;function C(){if(!b){const P=new m(_,v);b={getCurrentValue:P.getCurrentValue.bind(P),subscribe:P.subscribe.bind(P),retry:P.retry.bind(P),promise:P.promise.bind(P)}}return b.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const P=v.webpack&&typeof rh.resolveWeak=="function"?v.webpack():v.modules;P&&i.push(S=>{for(const E of P)if(S.includes(E))return C()})}function j(){C();const P=n.default.useContext(s.LoadableContext);P&&Array.isArray(v.modules)&&v.modules.forEach(S=>{P(S)})}function x(P,S){j();const E=n.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return n.default.useImperativeHandle(S,()=>({retry:b.retry}),[]),n.default.useMemo(()=>E.loading||E.error?n.default.createElement(v.loading,{isLoading:E.loading,pastDelay:E.pastDelay,timedOut:E.timedOut,error:E.error,retry:b.retry}):E.loaded?n.default.createElement(o(E.loaded),P):null,[P,E])}return x.preload=()=>C(),x.displayName="LoadableComponent",n.default.forwardRef(x)}class m{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:v}=this;y.loading&&(typeof v.delay=="number"&&(v.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},v.delay)),typeof v.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},v.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(b=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(v=>v())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,v){this._loadFn=y,this._opts=v,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function h(_){return u(l,_)}function p(_,y){let v=[];for(;_.length;){let b=_.pop();v.push(b(y))}return Promise.all(v).then(()=>{if(_.length)return p(_,y)})}h.preloadAll=()=>new Promise((_,y)=>{p(a).then(_,y)}),h.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const v=()=>(c=!0,y());p(i,_).then(v,v)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=h.preloadReady);const f=h}(Er)),Er}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(m,h){for(var p in h)Object.defineProperty(m,p,{enumerable:!0,get:h[p]})}n(t,{default:function(){return u},noSSR:function(){return l}});const s=Oe,o=r,a=s._(oh()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,h){if(delete h.webpack,delete h.modules,!i)return m(h);const p=h.loading;return()=>(0,o.jsx)(p,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,h){let p=a.default,f={loading:v=>{let{error:b,isLoading:C,pastDelay:j}=v;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(b)return(0,o.jsxs)("p",{children:[b.message,(0,o.jsx)("br",{}),b.stack]})}return null}};m instanceof Promise?f.loader=()=>m:typeof m=="function"?f.loader=m:typeof m=="object"&&(f={...f,...m}),f={...f,...h};const _=f.loader,y=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return f.loadableGenerated&&(f={...f,...f.loadableGenerated},delete f.loadableGenerated),typeof f.ssr=="boolean"&&!f.ssr?(delete f.webpack,delete f.modules,l(p,f)):p({...f,loader:y})}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Jr,Jr.exports);var ah=Jr.exports,ih=ah;const Ol=T.getDefaultExportFromCjs(ih),En={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Ll=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=xs(),{CONSTANTS:s}=Ee();return r.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(En["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx(Tl,{}),r.jsx(d.Modal.Body,{className:En["menu--root"],children:e})]})};Ll.displayName="Menu.MenuRoot";const ch=Ol(()=>Promise.resolve(Ll),{ssr:!1}),kl=({children:e,last:t=!1,...n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...n,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:En.divider})]});kl.displayName="Menu.NavigationBarItem";const Ml=()=>{const{setUserMenuIsOpen:e}=xs(),{handleSelectContent:t}=oe(),{CONSTANTS:n}=Ee(),{router:s}=ce(),o=[{iconNameStart:n.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:n.header.MENU_INFO.login.button_text},{iconNameStart:n.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:n.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:n.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:En["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(kl,{...a,key:i},a.text))})};Ml.displayName="Menu.NavigationBar";const Nr={Body:Al,NavigationBar:Ml,Root:ch},Dl=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:n}=Ee(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=n.header,{handleSelectContent:a}=oe(),{setValue:i}=Tn(),{setValue:c}=ni(),{setValue:l}=_s(),u=hs(),m=ti(),{isMobile:h}=ne();return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",children:r.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),r.jsxs(d.Header.Support,{children:[r.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:r.jsx(d.Icon,{name:o.search,size:"medium"})}),r.jsx($s,{}),r.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[r.jsx("span",{ref:t}),r.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),h&&r.jsx(gi,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:r.jsx(Un,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:r.jsxs(Nr.Root,{children:[r.jsx(Nr.Body,{}),s?r.jsx(Nr.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};Dl.displayName="Header.HeaderMobileWrapper";const lh=g.createContext({}),uh=({children:e})=>{const{sendDataLayerEvent:t}=oe(),{cartStore:n,isOpen:s}=xe();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[s]),g.useEffect(()=>{var a,i,c;if(n.id&&!((i=(a=n.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=n;ht.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:Ha(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);const o=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return r.jsx(lh.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},dh="var(--color-background-brand-primary-lighter)",mh="_fadeInOut_1l5ow_1",ph="_fadeOut_1l5ow_1",te={brandPrimaryLighter:dh,"mc--cashback":"_mc--cashback_1l5ow_1","mc--cashback--positive":"_mc--cashback--positive_1l5ow_21","mc--cashback--alert":"_mc--cashback--alert_1l5ow_24","mc--container--actions":"_mc--container--actions_1l5ow_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1l5ow_36","mc-container-actions--toggle-size-modifier":"_mc-container-actions--toggle-size-modifier_1l5ow_55","mc--footer":"_mc--footer_1l5ow_63","mc--footer--actions":"_mc--footer--actions_1l5ow_72","mc--footer--actions-button":"_mc--footer--actions-button_1l5ow_77","mc--footer--total":"_mc--footer--total_1l5ow_93","mc--footer--total--info":"_mc--footer--total--info_1l5ow_98","mc--footer--total--info--content":"_mc--footer--total--info--content_1l5ow_103","mc--field":"_mc--field_1l5ow_149","mc--body":"_mc--body_1l5ow_189","mc--body--products":"_mc--body--products_1l5ow_196","mc--body--empty--feedback":"_mc--body--empty--feedback_1l5ow_204","mc--body--empty--text":"_mc--body--empty--text_1l5ow_209","mc--body--promotion":"_mc--body--promotion_1l5ow_222","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1l5ow_225","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1l5ow_248","mc--body--coupon-tag":"_mc--body--coupon-tag_1l5ow_260","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1l5ow_278","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1l5ow_284","mc--header":"_mc--header_1l5ow_290","mc--header--subtitle":"_mc--header--subtitle_1l5ow_316","mc--notify":"_mc--notify_1l5ow_357","mc--notify--content":"_mc--notify--content_1l5ow_372","mc--notify--item":"_mc--notify--item_1l5ow_385",fadeInOut:mh,fadeOut:ph,"mc--card":"_mc--card_1l5ow_447","mc--card--actions":"_mc--card--actions_1l5ow_452","mc--card--actions--secondary":"_mc--card--actions--secondary_1l5ow_460","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1l5ow_487","mc--card--actions--gift":"_mc--card--actions--gift_1l5ow_501","mc--card--content-info":"_mc--card--content-info_1l5ow_514","mc--card--details":"_mc--card--details_1l5ow_521","mc--card--link":"_mc--card--link_1l5ow_526","mc--product--unavailable":"_mc--product--unavailable_1l5ow_534","mc--card--name":"_mc--card--name_1l5ow_537","mc--card--price":"_mc--card--price_1l5ow_552","mc--card--price--old-price":"_mc--card--price--old-price_1l5ow_562","mc--card--price--price-details":"_mc--card--price--price-details_1l5ow_566","mc--card--product-link":"_mc--card--product-link_1l5ow_577","mc--discount":"_mc--discount_1l5ow_587","mc--discount--header":"_mc--discount--header_1l5ow_590","inputs--tooltip":"_inputs--tooltip_1l5ow_590","mc--discount--body":"_mc--discount--body_1l5ow_609","minicart--modal-modifier":"_minicart--modal-modifier_1l5ow_630"},$l=({item:{id:e,message:t,callback:n},removeNotification:s,ICONS:o})=>{const a=g.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return r.jsx("div",{className:te["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:r.jsxs(d.SnackBar.Structure,{size:"medium",children:[r.jsx(d.SnackBar.Content,{title:t}),r.jsxs(d.SnackBar.Support,{children:[typeof n=="function"&&r.jsx(d.Button,{onClick:()=>{n(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),r.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};$l.displayName="MiniCart.Notify.Item";const zl=({ICONS:e})=>{const t=ps(),{removeNotification:n}=fs(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?r.jsx("div",{className:te["mc--notify"],children:r.jsx("div",{className:te["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>r.jsx($l,{item:o,removeNotification:n,ICONS:e},o.id))})}):null};zl.displayName="MiniCart.Notifications";const fh=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:s,...o})=>{const a=Lt(),{toggleProduct:i}=jt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${s.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},Fl=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=xe(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:h,quantity:p}=t,f=(_,y,v)=>{i(l,_.title,()=>{typeof v=="function"&&v(),a({id:l,quantity:y,seller:m},{id:l,texture:_.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:te["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&r.jsx(fh,{...o,product:t,handleSendEvent:e,onHandleRemove:f,ICONS:n,MINICART_CONFIG:s}),r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:n.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{f({texture:"mini-cart",title:`${s.messages.remove}`},p),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&r.jsx(Nt.Gift,{uniqueId:u,bundleItems:c,offerings:h,ICONS:n,MINICART_CONFIG:s})]})};Fl.displayName="MiniCart.Card.Actions";const Bl=({bundleItems:e,offerings:t,uniqueId:n,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=xe(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[h]=t;if(h){i(!0);const p=e.some(f=>f.id===h.id);c(n,String(h.id),p).then(()=>i(!1))}}},u=t[0],m=e.find(h=>h.id===u.id);return u&&"id"in u?r.jsx("div",{className:te["mc--card--actions--gift"],children:r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};Bl.displayName="MiniCart.Card.Gift";const Ul=({itemOffered:e})=>{const t=T.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return r.jsx(De,{href:`${e==null?void 0:e.slug}`,className:te["mc--card--product-link"],children:r.jsx(Ie.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Ul.displayName="MiniCart.Card.Media";const Hl=({name:e,skuName:t,tagName:n,className:s})=>r.jsxs(r.Fragment,{children:[n&&r.jsx(d.Tag,{variant:"quaternary",title:n,style:{textTransform:"uppercase"},children:n}),r.jsx("p",{className:d.helpers.classNameConcat(te["mc--card--name"],s),children:T.getProductNameWithoutSku(e??"",t??"")})]});Hl.displayName="MiniCart.Card.Name";const ql=({total:e,totalList:t})=>r.jsx(d.ProductInfo.Root,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:te["mc--card--price"],children:r.jsx(d.ProductInfo.Wrapper,{className:te["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:T.formatPriceToCurrency(t),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:T.formatPriceToCurrency(e),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:T.formatPriceToCurrency(e),size:"small"})})})})});ql.displayName="MiniCart.ProductPrice";const Vl=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{var u;const[s,o]=g.useState(""),a=g.useRef(null),{cartStore:{options:i}}=xe(),c=e.itemOffered.isVariationOf.productGroupID,l=g.useCallback(()=>{var h;const m=(h=i==null?void 0:i.find(p=>p.id===c))==null?void 0:h.texture;if(m){o(m);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(p=>p.json()).then(p=>{const f=p.data[0].items.find(_=>_.itemId===e.id);if(f){const _=f.images.find(y=>t.includes(y.imageLabel));if(_!=null&&_.imageUrl){o(_.imageUrl);return}o(f.images[0].imageUrl)}}).catch(p=>{console.error(p)})},[i,c,e.id]);return g.useEffect(()=>{if(!a.current)return;const m=new IntersectionObserver(h=>{h[0].isIntersecting&&l()});return m.observe(a.current),()=>{m.disconnect()}},[l]),r.jsx("div",{ref:a,children:r.jsx(d.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(d.ToggleStyle.Texture,{children:s?r.jsx(Ie.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:n}):r.jsx(fc,{})})})})};Vl.displayName="MiniCart.Card.Style";const Wl=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=T.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",n);return r.jsxs(d.Utils.Row,{alignItems:"center",children:[r.jsx(Vl,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&r.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:te["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${te.brandPrimaryLighter}`},children:r.jsx(d.ToggleSize.Text,{children:a})})]})};Wl.displayName="MiniCart.Card.Sku";const Nt={Actions:Fl,Gift:Bl,Media:Ul,Name:Hl,Price:ql,Sku:Wl},hh=e=>{var t;return{price:e.sellingPrice/100,listPrice:e.listPrice/100,totalPrice:(((t=e.priceDefinition)==null?void 0:t.total)??0)/100,totalListPrice:e.listPrice*e.quantity/100}},Gl=({available:e=!0,index:t,product:n,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var h,p;const{sendDataLayerEvent:l}=oe(),u=hh(n),m=(f,_)=>{const y={commonData:{...n,...u},customData:{index:t},event:f};if(_==="skuEvents"){const v={...n,...u};y.supportData={selectedSkus:[v]},y.commonData.products=[v]}l({functionKey:_,data:y})};return r.jsxs("div",{className:d.helpers.classNameConcat(te["mc--card"],e?"":te["mc--card--unavailable"]),children:[r.jsx(Nt.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:te["mc--card--content-info"],children:[r.jsx(Nt.Name,{name:((h=n.itemOffered)==null?void 0:h.name)??"",skuName:(p=n.itemOffered)==null?void 0:p.skuName}),r.jsxs("div",{className:te["mc--card--details"],children:[r.jsx("div",{className:te["mc--card--actions"],children:e?r.jsx(Nt.Price,{total:u.price,totalList:u.listPrice}):r.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),r.jsxs("div",{className:te["mc--card--actions--secondary"],children:[e&&r.jsx(Nt.Sku,{product:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),r.jsx(Nt.Actions,{handleSendEvent:m,product:n,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};Gl.displayName="MiniCart.Card";const Kl=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:s}=kt(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?r.jsxs("div",{className:d.helpers.classNameConcat(te["mc--cashback"],te[`mc--cashback--${e}`]),children:[r.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),r.jsxs("p",{children:[r.jsx("span",{children:T.formatPriceToCurrency(o)})," ",n.title]})]}):null};Kl.displayName="MiniCart.Cashback";const Xl=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=xe(),[l,u]=g.useState(!1),[m,h]=g.useState(!1),p=g.useCallback(()=>{let v="";return e==="coupon"?v=(i==null?void 0:i.coupon)??"":v=String((c==null?void 0:c.value)??""),v.toUpperCase()??""},[i,c,e]),[f,_]=g.useState(!!p()),y=async v=>{h(!0),!!p()&&(e==="coupon"?await o():await a(),_(!1),u(!1)),await s(v,e).then(C=>{if(!C.statusOk&&v||C.code!==200){v?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>h(!1))};return r.jsx(ke.Field,{hasError:l,hasSuccess:f,isLoading:m,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:p(),MINICART_CONFIG:n,ICONS:t})};Xl.displayName="MiniCart.CouponSeller";const Yl=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:s}=ce(),o=()=>{s.push(n.link)};return r.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:te["mc--body--empty--feedback"],children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("p",{className:`typography-style-body-xs ${te["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),r.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:r.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Yl.displayName="MiniCart.Feedback";const _h=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},Ql=({feedback:e,hasError:t,onHandler:n,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?r.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?r.jsx(d.Icon,{name:c.check_circle}):null,h=()=>{if(o==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},p=()=>{if(o==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},f=y=>{const v=y.currentTarget.value;if(v===""&&typeof n=="function"||s&&String(i).length>0&&v!==String(i)||t&&v!==String(i)){u(""),n("");return}if(o==="cep"){const C=_h(v);u(C)}else u(v)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof n=="function"){const v=y.currentTarget.value;n(v)}};return r.jsx(d.TextField.Input,{adornment:{end:m()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:h,onBlur:p,onChange:f,onKeyDown:_})};Ql.displayName="MiniCart.Field.Input";const Zl=({title:e,ICONS:t,MINICART_CONFIG:n,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,h=()=>i?"error":String(m).length&&a?"success":"none",p=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(m!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,m,i]),f=h();return r.jsx("div",{ref:o,children:r.jsx(d.TextField.Structure,{className:te["mc--field"],input:r.jsx(Ql,{...s,feedback:f,title:e,ICONS:t}),right:r.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(m).length&&a||i?"Remover":"Aplicar",onClick:()=>p(),disabled:c,children:String(m).length&&a||i?r.jsx(d.Icon,{name:"close",size:"small"}):`${n.messages.promo_code_button}`}),supportText:u==="cep"&&f==="success"?r.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};Zl.displayName="MiniCart.Field";const Vo=e=>{const t=e*100;return Math.round(t)},gh=e=>(e/100).toFixed(2).replace(".",","),yh=(e,t)=>{const{valueType:n,remainingValueToActivate:s}=e;if(n==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(n==="price"){const o=s===100?"Falta":"Faltam",a=gh(s);return`${o} R$ ${a} ${t}`}return t},Jl=({ICONS:e})=>{var b;const{promotionRules:t,data:n,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=xe(),{sendDataLayerEvent:l}=oe(),u=(b=n==null?void 0:n.promotion)==null?void 0:b.promotionCart,m=g.useRef(!1),{router:h}=ce();if(g.useEffect(()=>{(u==null?void 0:u.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(u==null?void 0:u.cupom)&&!m.current&&(a==null?void 0:a.coupon)!==u.cupom&&(m.current=!0,i(u.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&l({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:s}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(m.current=!1)},[u==null?void 0:u.selectPromotion,t==null?void 0:t.remainingValueToActivate,u==null?void 0:u.cupom,a==null?void 0:a.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||o.length===0)return null;const p=u.title,f=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,v=u.linkLabel;return r.jsxs("div",{className:te["mc--body--promotion"],children:[t.remainingValueToActivate>0&&r.jsx(d.Closeness,{className:te["mc--body--promotion--closeness"],title:yh(t,p),subtitle:f,percentage:Vo(t.completeness),iconLink:e.arrow_right,linkLabel:v,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),h.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&r.jsx(d.Closeness,{className:`${te["mc--body--promotion--closeness"]} ${te["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:Vo(t.completeness)})]})};Jl.displayName="MiniCart.Modal.Body.Promotion";const eu=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:n,cartStore:{items:s,marketingData:o},addCouponSeller:a}=xe(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(o==null?void 0:o.coupon)===(i==null?void 0:i.valueCupom),[l,u]=g.useState(!1),[m,h]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{m&&setTimeout(()=>{h(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const p=async()=>{if(!n.items.length){h(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return r.jsxs("div",{className:te["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[r.jsx("div",{className:te["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),r.jsx("div",{className:te["mc--body--coupon-tag--button"],children:r.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:p,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};eu.displayName="MiniCart.Modal.Body.CouponTag";const tu=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=xe();return r.jsxs(d.Modal.Body,{className:te["mc--body"],children:[e,r.jsx(Jl,{ICONS:t}),r.jsx(eu,{TIPBAR_CONFIGS:i}),r.jsx("div",{className:te["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((m,h)=>{const p=u.find(f=>{var _;return f.code==="withoutStock"&&((_=f.fields)==null?void 0:_.ean)===m.ean})!==void 0;return r.jsx(ke.Card,{available:!m.availability.includes("outStock")||!p,index:h,product:m,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${h}`)}):r.jsx(ke.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:o})})]})};tu.displayName="MiniCart.Body";const nu=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{const{cartStore:s}=xe();if(s.items.length===0)return null;const o=()=>{var i;const a=new URLSearchParams({orderFormId:s.id,...((i=s.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:s.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return r.jsxs(d.Modal.Footer,{className:te["mc--footer"],children:[e,r.jsx("div",{className:te["mc--footer--actions"],children:r.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:te["mc--footer--actions-button"],onClick:o,children:n.messages.checkout_button})})]})};nu.displayName="MiniCart.Modal.Footer";const ru=({children:e,ICONS:t,MINICART_CONFIG:n,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return r.jsxs(r.Fragment,{children:[o&&r.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:r.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:te["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),r.jsxs(d.Accordion.Wrapper,{className:te["mc--discount"],children:[r.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(te["mc--discount--header"]),startOpen:n.promotion_input_starts_open,children:r.jsxs(d.TextStructure.Root,{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("h3",{className:"typography-style-body-sm",children:[n.messages.promo_code_title," "]})}),r.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:r.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),r.jsx(d.Accordion.Body,{className:te["mc--discount--body"],children:e})]})]})};ru.displayName="MiniCart.Discount";const su=({discount:e,shipping:t,total:n})=>{var l,u;const{data:s}=xe(),o=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=n-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":T.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:T.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${T.formatPriceToCurrency(a/100)}`}];return r.jsx("div",{className:te["mc--footer--total"],children:Array.isArray(c)&&c.map((m,h)=>r.jsxs("div",{className:te["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[r.jsx("p",{children:m.title}),r.jsxs("div",{className:te["mc--footer--total--info--content"],children:[m.message&&(o==null?void 0:o.active)==="Ativar"&&r.jsx(d.Tag,{variant:"primary",title:m.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:m.message}),r.jsx(d.ProductInfo.Price,{className:te["mc--footer--total--info"],label:m.title,value:m.value})]})]},h))})};su.displayName="MiniCart.Modal.Footer.Resume.Items";const ou=()=>{var o,a,i;const{totalizers:e}=gt(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,n=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return r.jsx(su,{discount:n??0,total:t,shipping:s})};ou.displayName="MiniCart.Modal.Footer.Totals";const au=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=ne(),{cartStore:{items:s}}=xe(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return r.jsx(d.Modal.Header,{navigation:"top",className:te["mc--header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),r.jsx("span",{className:te["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),r.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};au.displayName="MiniCart.Modal.Header";const iu=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:s,removeCEP:o}=xe(),{sendDataLayerEvent:a}=oe(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),m=g.useCallback(()=>{var C;const b=((C=n==null?void 0:n.address)==null?void 0:C.postalCode)??"";return b.length===8&&!b.includes("-")?`${b.slice(0,5)}-${b.slice(5)}`:b},[n]),[h,p]=g.useState(!!m()),f=()=>{p(!1),c(!1)},_=b=>{var C;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(C=b.logisticsInfo)==null?void 0:C.reduce((j,x)=>{var A;const P=(A=x==null?void 0:x.slas)==null?void 0:A.find(O=>(O==null?void 0:O.id)===(x==null?void 0:x.selectedSla));if(!P)return j;const S=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),E=Number((((P==null?void 0:P.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=x==null?void 0:x.selectedSla,j.delivery_time=S.toString(),j.shipping=E,j.flag_retirada=(x==null?void 0:x.selectedDeliveryChannel)==="delivery"?"false":"true",j;const I=parseInt(j.delivery_time??"0");return S>I&&(j.delivery_time=S.toString()),j.shipping=(j.shipping??0)+E,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async b=>{const C=b.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await ht.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},v=async b=>{if(u(!0),!!m()||!(b!=null&&b.trim())){await o(),f(),u(!1);return}if(!await y(b)){c(!0),p(!1),u(!1);return}try{const P=await s(b);if(c(!1),P){p(!0);const S=_(P);S&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:S}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(ke.Field,{hasSuccess:h,hasError:i,isLoading:l,onHandler:v,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};iu.displayName="MiniCart.Shipping";const cu=()=>{var n,s;const{data:e}=xe(),t=(s=(n=e==null?void 0:e.flags)==null?void 0:n.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?r.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?r.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};cu.displayName="MiniCart.TagMessage";const ke={Body:tu,Card:Gl,Cashback:Kl,CouponSeller:Xl,Discount:ru,Field:Zl,Feedback:Yl,Shipping:iu,Footer:nu,Header:au,TagMessage:cu,Totals:ou},vh=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:h}=xe(),{isMobile:p}=ne();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(te["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:h,style:{zIndex:c.modal},variant:p?"sideBottom":"sideRight",children:[r.jsx(ke.Header,{ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,children:r.jsx(ke.TagMessage,{})}),r.jsxs(ke.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[r.jsxs(ke.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[r.jsx(ke.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),r.jsx(ke.Totals,{})]}),r.jsx(zl,{ICONS:e})]})},lu=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ee(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return r.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(Ds["header-animation"],o),children:r.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsxs(th,{children:[r.jsx("div",{className:T.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(Dl,{storeConfig:s})}),r.jsx("div",{className:T.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(Cl,{storeConfig:s})})]}),r.jsx(uh,{children:r.jsx(vh,{...m,minicartStyleModifiers:t})}),r.jsx(Ts,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};lu.displayName="Header";const xh="_shippingFreight_6z8rf_6",bh="_shippingFreight__postalCodeGrid_6z8rf_10",jh="_shippingFreight__grid_6z8rf_14",Ch="_shippingFreight__grid__title_6z8rf_18",Sh="_shippingFreight__grid__remember_6z8rf_29",Eh="_postalCodeContainer_6z8rf_44",Ph="_deliveryStatusBar__tag_6z8rf_49",Nh="_deliveryStatusBarError__tag_6z8rf_66",Ih="_deliveryInfo_6z8rf_74",wh="_deliveryInfo__content_6z8rf_78",Rh="_deliveryInfo__text_6z8rf_84",Ah="_deliveryInfo__title_6z8rf_89",Th="_deliveryInfo__subtitle_6z8rf_99",Oh="_deliveryInfo__tooltipIcon_6z8rf_109",Lh="_deliveryInfo__tooltip_6z8rf_109",kh="_freightGrid_6z8rf_148",Mh="_freightContainer_6z8rf_155",Dh="_freightOption__content_6z8rf_160",$h="_freightOption__value_6z8rf_166",zh="_freightOption__title_6z8rf_177",Fh="_freightOption__title_item_6z8rf_181",Bh="_freightOption__paragraph_6z8rf_192",ue={shippingFreight:xh,shippingFreight__postalCodeGrid:bh,shippingFreight__grid:jh,shippingFreight__grid__title:Ch,shippingFreight__grid__remember:Sh,postalCodeContainer:Eh,deliveryStatusBar__tag:Ph,deliveryStatusBarError__tag:Nh,deliveryInfo:Ih,deliveryInfo__content:wh,deliveryInfo__text:Rh,deliveryInfo__title:Ah,deliveryInfo__subtitle:Th,deliveryInfo__tooltipIcon:Oh,deliveryInfo__tooltip:Lh,freightGrid:kh,freightContainer:Mh,freightOption__content:Dh,freightOption__value:$h,freightOption__title:zh,freightOption__title_item:Fh,freightOption__paragraph:Bh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Uh=({icon:e,title:t,subtitle:n,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),m=g.useRef(null),h=()=>u(p=>!p);return r.jsxs("div",{className:ue.deliveryInfo,ref:m,children:[r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsx("div",{children:r.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),r.jsxs("div",{className:ue.deliveryInfo__content,children:[r.jsx("div",{className:ue.deliveryInfo__icon,children:r.jsx(d.Icon,{name:e,size:"medium"})}),r.jsxs("div",{className:ue.deliveryInfo__text,children:[r.jsxs("span",{className:ue.deliveryInfo__title,children:[t," ",s," ",o]}),n&&r.jsx("span",{className:ue.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:ue.deliveryInfo__tooltipIcon,onMouseEnter:h,onMouseLeave:h,"aria-label":"Mostrar descrição",children:[r.jsx("span",{children:r.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&r.jsx("div",{className:ue.deliveryInfo__tooltip,children:a})]})]})]})},Hh=({value:e,title:t,paragraph:n})=>r.jsx("div",{className:ue.freightOption,children:r.jsxs("div",{className:ue.freightOption__content,children:[r.jsx("span",{className:ue.freightOption__value,children:e}),r.jsx("span",{className:ue.freightOption__title,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:ue.footer__item,children:[r.jsx("span",{className:ue.freightOption__title_item,children:t}),n&&r.jsx("span",{className:ue.freightOption__paragraph,children:n})]})})})]})}),qh=({children:e})=>r.jsx("div",{className:ue.freightContainer,children:e}),Vh=({children:e})=>r.jsx("div",{className:ue.freightGrid,children:e}),Wh=({children:e})=>r.jsx("div",{className:ue.postalCodeContainer,children:e}),Wo=({message:e,seller:t="",size:n="small",setError:s})=>r.jsx("div",{className:s?ue.deliveryStatusBarError:ue.deliveryStatusBar,children:r.jsxs(d.Tag,{title:e,className:s?ue.deliveryStatusBarError__tag:ue.deliveryStatusBar__tag,size:n,children:[e," ",!s&&t]})}),Gh=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Kh=e=>{var n,s,o;const t=[];return(o=(s=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[0])==null?void 0:s.slas)==null||o.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},Xh=({component:e,parent:t,top:n,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return r.jsx(r.Fragment,{children:u?r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},Yh=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var L,M,Q,D;const m=gt(),h=gt(U=>U.shipping),[p,f]=g.useState(),[_,y]=g.useState(!1),[v,b]=g.useState(!1),[C,j]=g.useState(!1),x=(M=(L=m.shippingData)==null?void 0:L.address)==null?void 0:M.postalCode,P=!(p!=null&&p.length)&&x?x:p,S=g.useRef(null),E=async U=>{const Y=U.target.value.replace(/\D/g,"").slice(0,8);Y.length>5?f(Y.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):f(Y)},I=async U=>{const F=U.target.value.replace(/\D/g,"");try{if((await ht.get(`https://viacep.com.br/ws/${F}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),b(!0);return}a&&a(""),b(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},A=async()=>{y(!0);try{const U=await ht.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:P});e(Kh(U.data))}catch(U){console.error("Erro ao atualizar o documento:",U)}finally{y(!1),h(P,"BRA")}},O=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await I({target:{value:P}}),_||(A(),i(!0))};return r.jsxs("div",{ref:S,style:{position:"relative"},children:[!s&&C?r.jsx(Xh,{component:c,isOpen:C,parent:S.current,toolTipZIndex:u,freightConfig:l}):r.jsx(r.Fragment,{}),r.jsx("div",{style:{position:"relative"},children:r.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:r.jsx(d.TextField.Input,{defaultValue:(D=(Q=m.shippingData)==null?void 0:Q.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:p,sizeVariant:n,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:E,onKeyDown:U=>{U.key==="Enter"&&O()},className:ue["input-modifier"],feedback:v?"error":"none"}),right:r.jsx(d.Button,{onClick:O,size:n,title:"button",children:_?r.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},Qh=({children:e,freightConfig:t})=>r.jsxs("div",{className:ue.shippingFreight,children:[r.jsxs("div",{className:ue.shippingFreight__grid,children:[r.jsx("span",{className:ue.shippingFreight__grid__title,children:t.messages.title}),r.jsx("span",{className:ue.shippingFreight__grid__remember,children:r.jsx($e,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),r.jsx("div",{className:ue.shippingFreight__postalCodeGrid,children:e})]}),Zh=({children:e})=>r.jsx("div",{className:ue.freightContainer,children:e}),uu=({className:e,sellerId:t,skuId:n,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=oe(),[u,m]=g.useState(""),[h,p]=g.useState([]),[f,_]=g.useState(""),[y,v]=g.useState(!1),b=j=>m(j),C=j=>{p(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(x=>({shipping_tier:x.id,delivery_time:x.shippingEstimate.replace("bd",""),flag_pickup:x.name.toLowerCase().includes("retirada")?"true":"false",shipping:x.price,currency:c.currency||"BRL"}))}}})};return r.jsxs(Zh,{className:e,children:[r.jsxs(Qh,{freightConfig:c.freightConfig,children:[r.jsx(Wh,{children:r.jsx(Yh,{onUpdateFreightItems:C,skuId:n,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:v,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),f?r.jsx(Wo,{size:o,message:f,setError:_}):h.length>0&&r.jsx(Wo,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!f?h.length>0&&r.jsxs(qh,{children:[r.jsx(Vh,{children:h.filter(({id:j})=>!j.includes("Retirada")).map(j=>r.jsx(Hh,{id:j.id,value:T.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${Gh(j.shippingEstimate)}`,radioValue:u,changeValue:b},j.id))}),c.deliveryInfoBoxesAllowed?r.jsx(Uh,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):r.jsx(r.Fragment,{})]}):null]})},vt={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_1243w_1","pdc-navigation--content":"_pdc-navigation--content_1243w_28","pdc-navigation--filters":"_pdc-navigation--filters_1243w_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_1243w_67","pdc-navigation--selected":"_pdc-navigation--selected_1243w_139","pdc-navigation--selected--container":"_pdc-navigation--selected--container_1243w_152","pdc-navigation":"_pdc-navigation_1243w_28"},Jh=({children:e,href:t,isLast:n,title:s,ICONS:o})=>r.jsx(d.BreadCrumb.Item,{adornment:{end:n&&r.jsx(d.Icon,{name:o.arrow_right})},children:n?r.jsx($e,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),du=()=>{var a;const{state:e}=ze(),{ICONS:t}=Me(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),o=ki(s);return r.jsx("div",{className:vt["pcd-navigation--breadcrumb"],children:r.jsx(d.BreadCrumb.DivWrapper,{children:r.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(Jh,{...i,isLast:c!==o.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," "),ICONS:t},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};du.displayName="PLPNavigation.BreadCrumb";const mu=({children:e,...t})=>r.jsxs("div",{...t,className:vt["pdc-navigation--content"],children:[r.jsx(dt.Filters,{}),e]});mu.displayName="PLPNavigation.Content";const e_="_sort_35wro_1",Hn={sort:e_,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},t_=({children:e,sortListOpen:t,btnAdornment:n,style:s,...o})=>r.jsx(d.Button,{...o,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:Hn["sort-button"],children:e}),n_=e=>r.jsx(d.RadioButton.Radio,{...e}),r_=({children:e,className:t,name:n,...s})=>r.jsx(d.RadioButton.Group,{...s,name:n||"sort-group",className:d.helpers.classNameConcat(Hn["sort-list"],t),children:e}),s_=({children:e,className:t,shadow:n=!0,padding:s="small",height:o="fit-content",...a})=>r.jsx(d.Card,{...a,shadow:n,className:d.helpers.classNameConcat(Hn["sort-list-wrapper"],t),padding:s,height:o,children:e}),pu=g.forwardRef(({children:e,className:t,...n},s)=>r.jsx("div",{...n,ref:s,className:d.helpers.classNameConcat(Hn.sort,t),children:e}));pu.displayName="SortRoot";const qn=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:s,ICONS:o,...a})=>{var p;const i=(p=s==null?void 0:s.get("sort"))==null?void 0:p.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=oe();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=gl(()=>n(!1)),h=f=>{const _=f.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Dt.options[_]}}}),n(!1)};return r.jsxs(pu,{...a,ref:m,children:[r.jsx(t_,{btnAdornment:{listOpen:r.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:r.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?Dt.options[c]:Dt.placeholder},"sort-button"),t&&r.jsx(s_,{children:r.jsx(r_,{name:"sort-group",value:c??"",onChange:h,children:Object.keys(Dt.options).map(f=>r.jsx(n_,{label:Dt.options[f],value:f},f))})})]})};qn.displayName="Sort";const fu=g.createContext({}),o_=({children:e,...t})=>{const[n,s]=g.useState(!1);return r.jsx(fu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:s}),[t,n,s]),children:e})},a_=()=>{const e=g.useContext(fu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},hu=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:s}=a_(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=Me();return r.jsxs("div",{className:vt["pdc-navigation--filters"],children:[r.jsx(dt.BreadCrumb,{}),r.jsxs("div",{className:vt["pdc-navigation--filters--content"],children:[r.jsx(qn,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(dt.Total,{})]})]})};hu.displayName="PLPNavigation.Filters";const _u=({children:e,onSort:t,setOpenFilters:n,style:s,...o})=>{const a=g.useRef(null);return r.jsx(o_,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...o,className:vt["pdc-navigation"],ref:a,style:{...s},children:r.jsx(dt.Content,{children:e})})})};_u.displayName="Root";const gu=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:vt["pdc-navigation--selected"],children:r.jsx("div",{className:vt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:r.jsx(dt.SelectedItem,{callback:e,facet:s},s.value)):null})});gu.displayName="PLPNavigation.Selected";const zs=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,Fs=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(s=>s.value===e))==null?void 0:n.color)??"#F2F2F2"},yu=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(s=>s.key===e))==null?void 0:n.label},vu=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(s=>s.key===e))==null?void 0:n.order)??0},es=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],s=T.formatPriceToCurrency(Number(n));return`${T.formatPriceToCurrency(Number(t))} até ${s}`},xu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),n=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[n,s]},bu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:zs,createTagPrice:es,getAbsoluteMinMax:xu,getColor:Fs,getName:yu,getOrder:vu},Symbol.toStringTag,{value:"Module"})),We={"filter--empty":"_filter--empty_1mjas_1","filter--item":"_filter--item_1mjas_14","filter--item--price":"_filter--item--price_1mjas_19","filter--item--toggle":"_filter--item--toggle_1mjas_19","filter--item--toggle--container":"_filter--item--toggle--container_1mjas_30","filter--modal--body":"_filter--modal--body_1mjas_79","filter--modal--body--content":"_filter--modal--body--content_1mjas_87","filter--modal--footer":"_filter--modal--footer_1mjas_96","filter--modal":"_filter--modal_1mjas_79","filter--loading":"_filter--loading_1mjas_176","filter--selected":"_filter--selected_1mjas_206","filter--selected--content":"_filter--selected--content_1mjas_210"},ju=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:s,onToggleFacet:o}=Mt();return r.jsxs("div",{...n,className:We["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>r.jsx(st.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&r.jsx(st.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};ju.displayName="Filter.Item.Content";const Cu=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return r.jsxs("div",{className:We["filter--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h4",{children:e.title}),r.jsx("p",{children:e.subtitle})]}),r.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Cu.displayName="Filter.Empty";const Su=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:s,...o})=>{const a=vu({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(st.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(st.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(st.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?r.jsx(st.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...o,className:We["filter--item"],style:{order:a},children:r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:t.key,closeIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h4",{className:"typography-style-body-sm",children:yu({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),r.jsx(d.Accordion.Body,{children:i()})]})})};Su.displayName="Filter.Item";const Eu=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:s,...o})=>r.jsx(Qe.Root,{...o,children:r.jsx(Qe.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(Qe.Option,{active:i,"data-color":zs({key:a,PLP_FILTERS:n}),fill:Fs({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});Eu.displayName="Filter.Item.Color";const Pu=({facet:e,...t})=>{var u,m;const{filters:{selected:n},price:s,onToggleFacet:o}=Mt(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=n==null?void 0:n.find(({key:h})=>h==="price"))==null?void 0:u.value)==null?void 0:m.split(":").map(Number))??[a,i];return r.jsx("div",{...t,className:We["filter--item--price"],children:r.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:h=>{var p,f;h&&o({key:"price",value:`${(p=h.range)==null?void 0:p.min}:${(f=h.range)==null?void 0:f.max}`})},children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-min-value":!0})})}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-max-value":!0})})})]})})};Pu.displayName="Filter.Item.Price";const Nu=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...s})=>{const o=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(Qe.Root,{...s,children:r.jsx(Qe.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>r.jsx(Qe.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};Nu.displayName="Filter.Item.Sizes";const Iu=({columns:e,facetKey:t,onToggleFacet:n,values:s,ICONS:o,...a})=>r.jsx("div",{...a,className:We["filter--item--toggle"],children:r.jsx("div",{className:We["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>r.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});Iu.displayName="Filter.Item.Toggle";const wu=({...e})=>{const{isLoading:t}=Mt();return r.jsx("div",{className:We["filter--loading"],"data-active":t,...e,children:r.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};wu.displayName="Filter.Loading";const Ru=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var m;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Mt();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(We["filter--modal"],t),isMobile:n??!1,isOpen:c,parent:l,setIsOpen:u,variant:n?"sideBottom":"sideRight",style:{zIndex:99},children:[r.jsxs(d.Modal.Header,{navigation:"top",children:[r.jsx(d.Modal.Controls,{navigation:"top",isMobile:n,children:r.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(d.Modal.Title,{navigation:"top",title:s})]}),r.jsxs(d.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:We["filter--modal--body"],children:e}),r.jsx(st.Loading,{})]}),r.jsx(d.Modal.Footer,{children:r.jsxs("div",{className:We["filter--modal--footer"],children:[r.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),r.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Ru.displayName="Filter.Modal";const Au=({children:e,className:t,isMobile:n,CONSTANTS:s,...o})=>r.jsx(sc,{...o,PLP_FILTERS:s.PLP_FILTERS,children:r.jsx(st.Modal,{className:t,isMobile:n,CONSTANTS:s,children:e})});Au.displayName="Filter.Root";const Tu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:s,onToggleFacet:o}=Mt();return r.jsx("div",{className:We["filter--selected"],children:r.jsx("div",{className:We["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(d.Tag,{title:a==="price"?es({value:i}):i,adornment:{end:r.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:Fs({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:zs({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?es({value:i}):i},i))})})};Tu.displayName="Filter.Selected";const st={Colors:Eu,Content:ju,Empty:Cu,Modal:Ru,Item:Su,Root:Au,Loading:wu,Selected:Tu,Price:Pu,Sizes:Nu,Toggle:Iu},{checkedColor:i_,createTagPrice:Go,getColor:c_}=bu,Ou=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=Me();return r.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?Go({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(d.Icon,{name:n.close,size:"x-small"})},colorSquare:c_({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:i_({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Go({value:t.value}):t.value.toUpperCase()})};Ou.displayName="PLPNavigation.Selected.Item";const Lu=()=>r.jsx(d.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Lu.displayName="PLPNavigation.Total";const dt={BreadCrumb:du,Content:mu,Filters:hu,Root:_u,Selected:gu,SelectedItem:Ou,Total:Lu},l_="_footer__bottom_198g6_2",u_="_footer__wrapper_198g6_10",d_="_footer__main_198g6_39",m_="_footer__legalInformation_198g6_55",p_="_footer__column_198g6_77",f_="_footer__columnContent_198g6_87",h_="_footer__item_198g6_91",__="_footer__itemLink_198g6_107",g_="_footer__columnTitle_198g6_122",y_="_footer__columnTitleIcon_198g6_134",v_="_footer__iconList_198g6_147",x_="_footer__itemSmallText_198g6_157",b_="_payment_198g6_168",j_="_footer__iconContainer_198g6_173",C_="_footer__iconListSubHeader_198g6_178",S_="_accordionWrapper_198g6_200",E_="_accordionHeader_198g6_204",P_="_accordionTextWrapper_198g6_208",de={footer__bottom:l_,footer__wrapper:u_,footer__main:d_,footer__legalInformation:m_,footer__column:p_,footer__columnContent:f_,footer__item:h_,footer__itemLink:__,footer__columnTitle:g_,footer__columnTitleIcon:y_,footer__iconList:v_,footer__itemSmallText:x_,payment:b_,footer__iconContainer:j_,footer__iconListSubHeader:C_,accordionWrapper:S_,accordionHeader:E_,accordionTextWrapper:P_,"footer--stamps":"_footer--stamps_198g6_247","footer--stamps--company":"_footer--stamps--company_198g6_254","support-container":"_support-container_198g6_258","support-section":"_support-section_198g6_277","support-text":"_support-text_198g6_319","support-items":"_support-items_198g6_329","support-item":"_support-item_198g6_329"};var ku={},Bs={},Vn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=n=>{};if(process.env.NODE_ENV!=="production"){const n=new Set;t=s=>{n.has(s)||console.warn(s),n.add(s)}}})(Vn);var Mu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,m=a?a*40:s,h=i?i*40:o,p=m&&h?"viewBox='0 0 "+m+" "+h+"'":"",f=p?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+p+"%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"}})(Mu);var Wn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return s}});const n=["default","imgix","cloudinary","akamai","custom"],s={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",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(Wn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return f}});const t=Vn,n=Mu,s=Wn,o=["lazy","eager",void 0];function a(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(a(_)||i(_))}const l=new Map;let u;function m(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function h(_,y,v){let{deviceSizes:b,allSizes:C}=_;if(v){const x=/(^|\s)(1?\d?\d)vw/g,P=[];for(let S;S=x.exec(v);S)P.push(parseInt(S[2]));if(P.length){const S=Math.min(...P)*.01;return{widths:C.filter(E=>E>=b[0]*S),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(x=>C.find(P=>P>=x)||C[C.length-1]))],kind:"x"}}function p(_){let{config:y,src:v,unoptimized:b,width:C,quality:j,sizes:x,loader:P}=_;if(b)return{src:v,srcSet:void 0,sizes:void 0};const{widths:S,kind:E}=h(y,C,x),I=S.length-1;return{sizes:!x&&E==="w"?"100vw":x,srcSet:S.map((A,O)=>P({config:y,src:v,quality:j,width:A})+" "+(E==="w"?A:O+1)+E).join(", "),src:P({config:y,src:v,quality:j,width:S[I]})}}function f(_,y){let{src:v,sizes:b,unoptimized:C=!1,priority:j=!1,loading:x,className:P,quality:S,width:E,height:I,fill:A=!1,style:O,overrideSrc:L,onLoad:M,onLoadingComplete:Q,placeholder:D="empty",blurDataURL:U,fetchPriority:F,decoding:Y="async",layout:G,objectFit:H,objectPosition:Z,lazyBoundary:re,lazyRoot:le,...se}=_;const{imgConf:ie,showAltText:$,blurComplete:J,defaultLoader:w}=y;let W,ae=ie||s.imageConfigDefault;if("allSizes"in ae)W=ae;else{var he;const X=[...ae.deviceSizes,...ae.imageSizes].sort((ee,fe)=>ee-fe),k=ae.deviceSizes.sort((ee,fe)=>ee-fe),B=(he=ae.qualities)==null?void 0:he.sort((ee,fe)=>ee-fe);W={...ae,allSizes:X,deviceSizes:k,qualities:B}}if(typeof w>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
4
|
+
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const _e=se?K&&typeof K=="object"&&K.ref:A,[we,be,ge]=(0,p.useIntersection)({rootMargin:"200px"}),Ae=o.default.useCallback(z=>{(q.current!==R||Ne.current!==N)&&(ge(),q.current=R,Ne.current=N),we(z),_e&&(typeof _e=="function"?_e(z):typeof _e=="object"&&(_e.current=z))},[R,_e,N,ge,we]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&w&&(!be||!ae||b(w,N,R,{locale:H},{kind:he},W))},[R,N,be,H,ae,$==null?void 0:$.locale,w,W,he]);const je={ref:Ae,onClick(z){if(process.env.NODE_ENV!=="production"&&!z)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!se&&typeof Z=="function"&&Z(z),se&&K.props&&typeof K.props.onClick=="function"&&K.props.onClick(z),w&&(z.defaultPrevented||j(z,w,N,R,F,Y,G,H,W))},onMouseEnter(z){!se&&typeof re=="function"&&re(z),se&&K.props&&typeof K.props.onMouseEnter=="function"&&K.props.onMouseEnter(z),w&&((!ae||process.env.NODE_ENV==="development")&&W||b(w,N,R,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(me){!se&&typeof le=="function"&&le(me),se&&K.props&&typeof K.props.onTouchStart=="function"&&K.props.onTouchStart(me),w&&(!ae&&W||b(w,N,R,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))}};if((0,l.isAbsoluteUrl)(R))je.href=R;else if(!se||U||K.type==="a"&&!("href"in K.props)){const z=typeof H<"u"?H:$==null?void 0:$.locale,me=($==null?void 0:$.isLocaleDomain)&&(0,f.getDomainLocale)(R,z,$==null?void 0:$.locales,$==null?void 0:$.domainLocales);je.href=me||(0,_.addBasePath)((0,u.addLocale)(R,z,$==null?void 0:$.defaultLocale))}return se?o.default.cloneElement(K,je):(0,s.jsx)("a",{...ie,...je,children:O})});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Yr,Yr.exports);var Lf=Yr.exports,kf=Lf;const De=T.getDefaultExportFromCjs(kf),Mf="_link_w24h0_1",Df="_wrapper_w24h0_98",$f="_text_w24h0_106",Cr={link:Mf,wrapper:Df,text:$f},$e=({children:e,adornments:t,className:n,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const h=d.helpers.ValidateProp({fieldTypes:wt.SizesSmallExtended,property:i,fallback:"medium"}),p=d.helpers.ValidateProp({fieldTypes:wt.Mode,property:a,fallback:"default"});return r.jsx(De,{...m,className:d.helpers.classNameConcat(Cr.link,n),href:o&&o.length>0?o:"#","data-size":h,"data-variant":p,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:r.jsxs("div",{className:Cr.wrapper,onClick:l,children:[t==null?void 0:t.start,r.jsx("p",{className:Cr.text,"data-size":h,children:e}),t==null?void 0:t.end]})})},zf=({ICONS:e})=>{const{resetFeedback:t}=jt();return r.jsxs("div",{className:Bt["wishlist--snack--actions"],children:[r.jsx($e,{href:"/favoritos",children:"Ver Favoritos"}),r.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:r.jsx(d.Icon,{name:e.close})}})]})},Ls=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=vs(),{resetFeedback:o}=jt(),a=g.useRef(null);return g.useEffect(()=>{a.current&&clearTimeout(a.current),s&&(a.current=setTimeout(()=>{o()},5e3))},[s,o]),(s==null?void 0:s.active)&&r.jsx(Rt,{Z_INDEX_WAR:n,className:Bt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:r.jsx(zf,{ICONS:t}),size:"medium"})};Ls.displayName="WishList.Feedback";const ks={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Dc=({className:e,children:t,columns:n=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>n%i===0?"initial":s||n<2?c:c.split("/").reverse().join("/"),[n,i,s]);return r.jsx("div",{...l,className:d.helpers.classNameConcat(ks["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${n/i*100}%`,order:a,padding:o/2},children:t})};Dc.displayName="ProductList.Banner";const $c=({isKit:e,parent:t,productId:n,setNotify:s,CONSTANTS:o})=>{const{router:a}=ce(),i=g.useRef(!1),c=g.useRef(null),[l,u]=g.useState([]),m=y=>a.push(y??""),h=new Map,p=async y=>{try{if(h.has(y)){u(h.get(y));return}const v=await fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:y,filterTexture:o.TEXTURE_IMAGE}),priority:"low"});if(!v.ok)throw new Error("Erro ao buscar similares.");const b=await v.json();h.set(y,b),u(b)}catch(v){console.error(v)}},f=g.useCallback(y=>{!n||!y||(typeof p=="function"&&p(n),i.current=!0)},[n]),_=g.useCallback((y,v)=>{if(!y.isIntersecting){o.PLP_INFINITE_SCROLL&&c.current&&(clearTimeout(c.current),c.current=null);return}if(y.intersectionRatio>=v.threshold&&!i.current){if(o.PLP_INFINITE_SCROLL){c.current=setTimeout(()=>{f(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}f(!0)}},[f]);return g.useEffect(()=>{if(e||!t.current)return;const y={root:null,threshold:.1},v=new IntersectionObserver(([b])=>{_(b,y)},y);return v.observe(t.current),()=>{c.current&&clearTimeout(c.current),v.disconnect()}},[_,t,e]),r.jsx(pe.Actions,{...l,callback:m,isKit:e,children:!e&&r.jsx(pe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};$c.displayName="ProductList.Card.Actions";const zc=({className:e,children:t,gap:n=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:h,...p})=>{const f=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((b,C)=>{var j;typeof u=="function"&&u((j=b.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),v=s.name.substring(0,4).toLowerCase()==="kit ";return r.jsxs("div",{...p,className:d.helpers.classNameConcat(ks["product-list--card"],e),"data-mobile":o,"data-order":a,ref:f,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:n/2},children:[r.jsxs(pe.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:h,children:[r.jsx(pe.Header,{product:s,tag:i==null?void 0:i.commercial}),r.jsx(pe.Media,{showVideo:m,hasPriority:!0}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:i==null?void 0:i.institucional}),r.jsx($c,{productId:s.isVariantOf.productGroupID,parent:f,setNotify:y,isKit:v,CONSTANTS:h}),!v&&r.jsx(pe.OutStock,{callback:y})]}),r.jsx(pe.Wrapper,{type:"footer",children:_&&r.jsx(pe.BuyButton,{isKit:v})})]}),t]})};zc.displayName="ProductList.Card";const Fc=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(ks["product-list"],t),children:e});Fc.displayName="ProductList.Grid";const nt={Banner:Dc,Card:zc,Root:Fc,helpers:ap},Ff="_pdc_alo7z_1",Ge={"pdc--empty":"_pdc--empty_alo7z_1","pdc--grid":"_pdc--grid_alo7z_17","pdc--grid--content":"_pdc--grid--content_alo7z_26","pdc--infinite":"_pdc--infinite_alo7z_41","pdc--infinite--loader":"_pdc--infinite--loader_alo7z_44","pdc--infinite--loader--page":"_pdc--infinite--loader--page_alo7z_54","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_alo7z_58","pdc--infinite--next-page":"_pdc--infinite--next-page_alo7z_91","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_alo7z_101","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_alo7z_111","pdc--pagination":"_pdc--pagination_alo7z_118",pdc:Ff},Ms=({className:e,ICONS:t,PLP_NOT_RESULT:n})=>{const{router:s}=ce(),{isMobile:o}=ne(),a=()=>{s.push(n==null?void 0:n.link)};return r.jsxs("div",{className:d.helpers.classNameConcat(Ge["pdc--empty"],e),children:[r.jsxs(d.TextStructure.DivWrapper,{className:Ge["pdc--empty-wrapper"],children:[r.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:n.title}),r.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:n.subtitle})]}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:r.jsx("b",{children:n.text})})]})};Ms.displayName="PDC.Empty";const Fn=e=>r.jsx("div",{...e,className:Ge["pdc--infinite--next-page"],children:r.jsx(d.Spinner,{className:Ge["pdc--infinite--next-page--spinner"]})});Fn.displayName="PDC.Spinner";function Bc({CONSTANTS:e}){const{sendDataLayerEvent:t}=oe(),{isMobile:n}=ne(),{getAvailableProductTag:s}=mt(),[o,a]=g.useState([]),[i,c]=g.useState(!0),l=Lt(),u=l.join(","),m=n?16:32;return g.useEffect(()=>{const h=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(p=>p.json()).then(p=>{a(p),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:p}}})}).catch(p=>console.error(p)):a([]),c(!1)};if(l.length){h();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[u]),r.jsx("section",{className:Bt["wishlist-grid"],children:r.jsxs("div",{className:Bt["wishlist-grid--container"],children:[i&&r.jsx(Fn,{}),!l.length&&!(o!=null&&o.length)&&!i&&r.jsx(Ms,{className:Bt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),r.jsx(nt.Root,{children:Array.isArray(o)&&o.map((h,p)=>{const f=h.node.cluster.highlights||[],_=s(f);return r.jsx(nt.Card,{gap:m,isMobile:n??!1,item:h.node,tag:_,index:p,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,MAIN_IMAGE:e.MAIN_IMAGE,PLP_GRID_SCROLL_BACK:e.PLP_GRID_SCROLL_BACK,PLP_INFINITE_SCROLL:e.PLP_INFINITE_SCROLL,PLP_SIZE_ORDER:e.PLP_SIZE_ORDER,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:e.PLP_SHOW_VIDEO_ON_PRODUCT_CARD,PLP_PRODUCT_SIMILAR_DELAY:e.PLP_PRODUCT_SIMILAR_DELAY,PRODUCT_CARD_IMAGE_ASPECT_RATIO:e.PRODUCT_CARD_IMAGE_ASPECT_RATIO,PRODUCT_CARD_TEXTS:e.PRODUCT_CARD_TEXTS,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:e.PRODUCT_CARD_TOP_WISHLIST_TOGGLE,PRODUCT_IMAGE_DIMENSIONS:e.PRODUCT_IMAGE_DIMENSIONS,SECOND_IMAGE:e.SECOND_IMAGE,StoreConfig_MainSellerId:e.StoreConfig_MainSellerId,TEXTURE_IMAGE:e.TEXTURE_IMAGE,Z_INDEX_WAR:e.Z_INDEX_WAR,ICONS:e.ICONS}},h.node.sku)})})]})})}Bc.displayName="Wishlist.Grid";const Bf=e=>e.map(t=>{var n;return(n=t.isVariantOf)==null?void 0:n.productGroupID})??[],Uc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:n})=>{const s=kt(),o=Lt(),a=vs(),{updateList:i}=jt();return g.useEffect(()=>{var l,u;a.active&&Ze.set("fs::wishlist",o);const c=async()=>{var m;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(m=s==null?void 0:s.user)==null?void 0:m.id})}).catch(h=>{console.error("Error updating wishlist:",h)})};a.active&&((l=s.user)!=null&&l.id)&&o.length!==((u=s.wishlist)==null?void 0:u.length)&&c()},[a,s,o]),g.useEffect(()=>{var u;const c=async()=>{const m=await Ze.get("fs::wishlist");m&&(m==null?void 0:m.length)!==o.length&&i(m)},l=async()=>{var f;const m=await Ze.get("fs::wishlist")??[],h=s.wishlist?typeof s.wishlist[0]=="object"?Bf(s.wishlist):s.wishlist:[],p=[...new Set([...m,...h])];i(p),Ze.set("fs::wishlist",o),h.length!==p.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:p,docId:(f=s.user)==null?void 0:f.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=s.user)!=null&&u.id){l();return}c()},[s,i,o]),r.jsx(Ls,{ICONS:t,Z_INDEX_WAR:n,WISHLIST_INFO:e})};Uc.displayName="Wishlist.Init";const Hc=({product:e,priceInfo:t,size:n="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=oe(),c=Lt(),{toggleProduct:l}=jt(),{isVariantOf:{productGroupID:u}}=e;return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{size:n,name:c.includes(u)?o.favorite_true:o.favorite_false})},onClick:()=>{l(u),a({functionKey:"productEvents",data:{event:c.includes(u)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:i.current},commonData:{...e,...t}}})},style:{...s,border:"none"},variant:"tertiary"})};Hc.displayName="WishList.Toggle";const qc={Feedback:Ls,Toggle:Hc,Grid:Bc,Init:Uc},Vc=({product:e,tag:t,size:n="small"})=>{const{CONSTANTS:s}=Ke(),{tags:o}=mt(),a=e.offers.offers[0],i=T.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return r.jsxs(pe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&r.jsxs(d.Tag,{title:`${i}% ${c==null?void 0:c.tagText}`,variant:"quaternary",size:"small",style:{background:c==null?void 0:c.tagColor,color:c==null?void 0:c.tagTextColor},children:[i,"% ",c==null?void 0:c.tagText]}),t?r.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?r.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:n,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&r.jsx(qc.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};Vc.displayName="ProductCard.Actions.Header";const Wc=({className:e,children:t,hasPriority:n=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:h,CONSTANTS:p}=Ke(),f=T.getFirstImages({images:c,label:{first:p.MAIN_IMAGE,second:p.SECOND_IMAGE}});return r.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--image"],e),ref:a,style:{aspectRatio:p.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[r.jsx(De,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),p.PLP_INFINITE_SCROLL&&sessionStorage.setItem(p.PLP_GRID_SCROLL_BACK.order,String(h))},children:r.jsx("div",{className:Re["product-card--image--container"],children:Array.isArray(f)&&f.map(({url:_,alternateName:y},v)=>g.createElement(Ie.Image,{...p.PRODUCT_IMAGE_DIMENSIONS.product_card,style:p.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:v,...n&&{priority:v===0&&i<4},objectFit:"cover",src:_}))})}),p.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&r.jsx(pe.Video,{url:u,poster:f[0].url}),t]})};Wc.displayName="ProductCard.Media.Media";const Gc=({className:e,callback:t,children:n,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ke(),{availability:{status:c}}=a;return c?null:r.jsxs("div",{...s,className:d.helpers.classNameConcat(Re["product-card--outstock"],e),children:[r.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),r.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(a)},children:i.notify})]})};Gc.displayName="ProductCard.OutStock";const Kc=({children:e,className:t="",index:n,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>r.jsx(of,{item:o,isMobile:s,outStock:c,order:i,size:a,index:n,shelfTitle:l,CONSTANTS:u,children:r.jsx("div",{...m,className:d.helpers.classNameConcat(Re["product-card--wrapper"],t),"data-size":a,children:e})});Kc.displayName="ProductCard.Root";const Xc=({disabled:e,label:t,size:n,value:s,onClick:o,...a})=>r.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:n,onClick:o,children:[r.jsx(d.ToggleSize.DisabledAdornment,{}),r.jsx(d.ToggleSize.Text,{children:t})]});Xc.displayName="ProductCard.SizeSelector.Item";const Yc=({active:e=!1,callback:t,selectedSku:n=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ke();s.productId=a.id;const u=T.disableSKU(s),m=T.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const h=g.useCallback(f=>{const _=n===f?null:f;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,n]),p=g.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}h(s)},[s,o,h,u,a]);return r.jsx(Xc,{active:e,disabled:u,label:m,onClick:()=>p(),size:i?"x-small":"small",value:s})};Yc.displayName="ProductCard.SizeSelector.SkuItem";const Qc=({items:e,getLabel:t,PLP_SIZE_ORDER:n})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=n.indexOf(a)-n.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],Zc=({callback:e,className:t="",children:n,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ke(),u=g.useMemo(()=>Array.isArray(c)?Qc({items:c,getLabel:m=>T.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return r.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--selectors--size"],t),"data-mobile":i,children:[r.jsx("div",{className:Re["product-card--selectors--size--skus"],children:u.map((m,h)=>r.jsx(Yc,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${h}--${m.sku}`))}),r.jsx("div",{className:Re["product-card--selectors--size--button"],children:n})]})};Zc.displayName="ProductCard.SizeSelector";const Qr=({alt:e="",callback:t,more:n,total:s=4,src:o,url:a,...i})=>r.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsxs(d.ToggleStyle.Texture,{children:[o&&r.jsx(Ie.Image,{alt:e??o,src:o,height:34,width:34}),n&&r.jsx(d.TextStructure.DivWrapper,{className:Re["product-card--selectors--style--more"],children:r.jsxs("p",{children:["+ ",s]})})]})]}),Uf=({children:e,callback:t,data:n,total:s=4,size:o,...a})=>{const{index:i}=Ke(),{triggerSelectItemEventRef:c}=oe();return r.jsxs("div",{...a,children:[e,Array.isArray(n)&&n.slice(0,s).map((l,u)=>r.jsx(Qr,{callback:m=>{c.current.trigger=!0,c.current.index=i,typeof t=="function"&&t(m)},src:(l==null?void 0:l.textureImage)??"",alt:l==null?void 0:l.textureAlt,url:l==null?void 0:l.slug,size:o},u)),Array.isArray(n)&&(n==null?void 0:n.length)>s&&r.jsx(Qr,{size:o,total:n.length-s,more:!0})]})},Jc=({callback:e,className:t,data:n,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=Ke(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return r.jsx(Uf,{...a,callback:e,className:d.helpers.classNameConcat(Re["product-card--selectors--style"],t),data:n,size:"x-small",children:l&&r.jsx(Qr,{active:!0,size:"x-small",src:l.url})})};Jc.displayName="ProductCard.StyleSelector";const el=({className:e,hasDecimal:t,...n})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=Ke();l.current.priceInfo={price:o,listPrice:a};const u=T.formatPriceToCurrency(a,t),m=T.formatPriceToCurrency(o,t),h=T.formatPriceToCurrency(c??0),p=s?"horizontal":"stacked";return r.jsx("div",{...n,className:d.helpers.classNameConcat(Re["product-card--price"],e),"data-mobile":s,children:r.jsx(d.ProductInfo.Root,{size:"small",layout:p,children:r.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:p,children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?r.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${h}`,size:"small"}):null]})})})};el.displayName="ProductCard.Price";const tl=({tag:e,className:t})=>{const{item:{name:n}}=Ke();return r.jsxs("div",{className:d.helpers.classNameConcat(Re["product-card--title"],t),children:[r.jsx("div",{className:Re["product-card--title--tag"],children:e?r.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?r.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):r.jsx("div",{})}),r.jsx("div",{className:Re["product-card--title--content"],children:n&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h3",{children:n})})})})]})};tl.displayName="ProductCard.Title";const nl=({className:e,url:t,poster:n,...s})=>{const{element:o}=Ke();return g.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(m=>{m.forEach(h=>{T.setVideoPlay(h.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{a&&(c.observe(a),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,o]),r.jsx("div",{...s,className:d.helpers.classNameConcat(Re["product-card--video"],e),children:t&&r.jsx(Ie.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:n})})};nl.displayName="ProductCard.Media.Video";const rl=({children:e,className:t,type:n,...s})=>r.jsx("div",{...s,className:d.helpers.classNameConcat(Re[`product-card--${n}`],t),children:e});rl.displayName="ProductCard.Wrapper";const pe={Actions:Pc,BuyButton:Nc,Header:Vc,Media:Wc,Root:Kc,OutStock:Gc,Price:el,SizeSelector:Zc,StyleSelector:Jc,Title:tl,Video:nl,Wrapper:rl},Hf="_carousel_rzsga_1",qf="_shelf__container_rzsga_14",Vf="_shelf_without_carousel_rzsga_34",Wf="_card_container_rzsga_55",It={carousel:Hf,"custom-controllers":"_custom-controllers_rzsga_5",shelf__container:qf,"controllers-arrows-bullets":"_controllers-arrows-bullets_rzsga_23",shelf_without_carousel:Vf,card_container:Wf},Uo=({title:e})=>r.jsx("div",{className:It.shelf__container,children:e&&r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",T.responsive["responsive-mobile-flex"]),children:e}),r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",T.responsive["responsive-desktop-flex"]),children:e})]})})}),Gf=({children:e,ICONS:t,itemsPerPage:n,title:s})=>{const{isMobile:o}=ne(),a=n[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=g.Children.toArray(e).length;return o||m>=4?r.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:It.carousel,children:[r.jsxs("div",{className:It["custom-controllers"],children:[s&&r.jsx(Uo,{title:s}),a<m&&r.jsxs(d.Carousel.Controller,{className:It["controllers-arrows-bullets"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&r.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]})]}),r.jsx(d.Carousel.Body,{children:g.Children.map(e,(p,f)=>r.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:p},`${s}_${f}`))})]}):r.jsxs(r.Fragment,{children:[s&&r.jsx(Uo,{title:s}),r.jsx("div",{className:It.shelf_without_carousel,children:e})]})},sl=({className:e,item:t,isMobile:n,size:s,shelfTitle:o,...a})=>{const i=g.useRef(null),{getAvailableProductTag:c}=mt(),{availability:{status:l}}=t,u=h=>{const p=h.filter(f=>!a.CONSTANTS.TEXTURE_IMAGE.includes(f.keywords));return n?p.splice(0,2):p},m=c(t.cluster.highlights);return r.jsx("div",{ref:i,className:It.card_container,children:r.jsxs(pe.Root,{...a,item:{...t,image:u(t.image)},isMobile:n,size:n?"small":"medium",outStock:!l,shelfTitle:o,children:[r.jsx(pe.Header,{product:t,tag:m==null?void 0:m.commercial}),r.jsx(pe.Media,{}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:m==null?void 0:m.institucional}),r.jsx(pe.Actions,{})]}),r.jsx(pe.Wrapper,{type:"footer"})]})})};sl.displayName="ProductList.Card";const qt={Shelf:Gf,Card:sl},ol=({CONSTANTS:e,inView:t,products:n,innerRef:s})=>{const o=g.useMemo(()=>rf(n),[n]),{isMobile:a}=ne(),{addItemsToCart:i}=xe(),{sendDataLayerEvent:c}=oe(),{getAvailableProductTag:l}=mt(),[u,m]=g.useState({totalPrice:0,products:{}}),h=()=>{const f=Object.values(u.products);i(f),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:f.map(_=>{const y=o.find(v=>v.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:f,price:u.totalPrice}}})},p=({selectedProduct:f,productId:_})=>{const y=sf({selectedProduct:f,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(y)};return g.useEffect(()=>{if(!t||o.length===0)return;const f=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:f},outsideEcommerceData:{item_list_name:f}}})},[t]),r.jsxs("div",{className:lt.container,ref:s,children:[r.jsx("div",{className:lt["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:r.jsx(qt.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:o.length>=3?2.2:o.length},ICONS:e.ICONS,children:Array.isArray(o)&&o.map(({node:f},_)=>{var b,C,j;const y=l(f.cluster.highlights),{availability:{status:v}}=f;return v?r.jsxs(pe.Root,{item:{...f,image:As.helpers.product.getFirstImages({images:f.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[r.jsx(pe.Header,{product:f,tag:y.commercial}),r.jsx(pe.Media,{}),r.jsxs(pe.Wrapper,{type:"body",children:[r.jsx(pe.Title,{tag:{value:(b=y.institucional)==null?void 0:b.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),r.jsx(pe.Actions,{children:r.jsx(pe.SizeSelector,{callback:x=>p({selectedProduct:x,productId:f.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},f.id):null})})}),r.jsx("div",{className:lt["add-cart-container"],children:r.jsx(nf,{handleAddAllToCart:h,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Ds={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},$s=({id:e})=>{const{setIsOpen:t,cartStore:{items:n}}=xe(),{handleSelectContent:s}=oe(),{CONSTANTS:o}=Ee(),a=n.reduce((i,c)=>i+(c.quantity??0),0);return r.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:r.jsxs(d.Badge.AutoPositioner,{children:[r.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),r.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};$s.displayName="Header.Bag";const Qt=({children:e,href:t,...n})=>t&&t!=="#"?r.jsx(De,{href:t.startsWith("/")?t:`/${t}`,...n,children:e}):e,al=()=>{const{headerData:e}=Ee(),{handleSelectContent:t}=oe(),{reset:n,updateValue:s}=Gt(),o=a=>{a?s(a):n()};return r.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>r.jsx(Qt,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:r.jsx(d.Header.CategoryItem,{className:Ds["btn-header"],value:a.submenuId??null,adornment:{start:r.jsx(d.Icon,{name:a.iconStart}),end:r.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};al.displayName="Header.Categories";function Kf(){const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee(),{setValue:n}=Tn();return r.jsx(d.Header.SupportItem,{onClick:()=>{n(!0),e({content:"header:search"})},children:r.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const Xf={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Yf={"observer-wrapper":"_observer-wrapper_r43gk_1"},Bn=({children:e,eventData:t,observerOptions:n,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=g.useRef(null),l=ds(c,o,n),{sendDataLayerEvent:u}=oe();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),r.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(Yf["observer-wrapper"],a),children:e})},il=({thumbnails:e,category:t,isMobile:n=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=oe(),a=50/e.length;return r.jsx("div",{className:Xf["menu-subcategories-container"],children:e.map((i,c)=>{const l=n?i.srcMobile:i.srcDesk;if(!l)return null;const u={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${c+1}`,promotion_id:l,promotion_name:i.promotion_name};return r.jsx(Bn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:r.jsxs(De,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[r.jsx(Ie.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&r.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};il.displayName="Menu.Thumbnail";const Zr={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},cl=({children:e,dividerOnRight:t=!0,subMenu:n,...s})=>{var l;const{router:o}=ce(),{reset:a}=Gt(),{handleSelectContent:i}=oe(),{CONSTANTS:c}=Ee();return r.jsxs("div",{...s,className:Zr["menu-categories"],children:[(l=n==null?void 0:n.subCategories)==null?void 0:l.map((u,m)=>{var f,_,y,v;const h=u.listCollapseDesk&&!((f=u.see_all)!=null&&f.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},p=u.listCollapseDesk&&!((_=u.see_all)!=null&&_.link)?{expansivesAdornments:{open:c.header.ICONS.add,close:c.header.ICONS.minus},expansivesLabels:{open:c.header.COMPONENT_LIST.listExpandLabel,close:c.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:{adornment:{end:r.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return r.jsxs(d.ComponentList.Structure,{children:[r.jsx(Qt,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${n.label??""}`}))},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{children:u.label})})})}),r.jsx(d.ComponentList.List,{columns:1,...h,className:Zr["submenu-categories"],children:(y=u.items)==null?void 0:y.map((b,C)=>r.jsx(d.ComponentList.ListItem,{id:`list-item-${b.label}-${C}`,children:r.jsx($e,{href:b.link??"#",size:"x-small",title:b.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${b.label??""}:${n.label??""}`})},children:b.label})},`list-item-${b.label}-${C}`))}),((v=u.see_all)==null?void 0:v.link)&&r.jsx(d.ComponentList.Support,{...p,size:"small",onClick:()=>{var b;(b=u.see_all)!=null&&b.link&&(a(),i({content:`menu:${u.label??""}:${n.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&r.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};cl.displayName="Menu.Categories";const ll=({children:e,dividerOnBottom:t=!0,...n})=>{const{CONSTANTS:s}=Ee();return r.jsxs(r.Fragment,{children:[r.jsx("div",{...n,className:Zr["menu-desktop"],style:{...n.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&r.jsx(d.Utils.Divider,{size:"small"})]})};ll.displayName="Menu.MenuRoot";const Sr={Root:ll,Categories:cl,Thumbnail:il},ul=()=>{const{headerData:e,CONSTANTS:t}=Ee(),n=Ja(),{reset:s}=Gt();return r.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,a)=>{const{thumbnails:i,label:c,id:l}=o,u=l===n,m=i==null?void 0:i.some(h=>!!h.srcDesk);return r.jsxs(Sr.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[r.jsx(Sr.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(i)&&r.jsx(Sr.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};ul.displayName="Header.SubMenu";const dl=()=>{const{handleSelectContent:e}=oe(),{CONSTANTS:t}=Ee();return r.jsx(De,{href:"/favoritos",children:r.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:r.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};dl.displayName="Header.WishList";const Qf="_root_im5yf_125",Ve={"user-menu--credits":"_user-menu--credits_im5yf_1","user-menu--content":"_user-menu--content_im5yf_10","user-menu--login":"_user-menu--login_im5yf_30","user-menu--login--content":"_user-menu--login--content_im5yf_37","user-menu--menu":"_user-menu--menu_im5yf_64","user-menu--tooltip":"_user-menu--tooltip_im5yf_92","tooltip-modifier":"_tooltip-modifier_im5yf_103","modal-controls-modifier":"_modal-controls-modifier_im5yf_108","modal-header-modifier":"_modal-header-modifier_im5yf_116",root:Qf},ml=({className:e,children:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Ve["user-menu--content"],e),children:t});ml.displayName="UserMenu.Content";var pl=(e=>(e.Account="account",e))(pl||{});const fl=({className:e,cashBack:t,credits:n,link:s,total:o,...a})=>{const i=t?T.formatPriceToCurrency(t):void 0,c=n?T.formatPriceToCurrency(n):void 0,l=o?T.formatPriceToCurrency(o):void 0;return r.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(Ve["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:pl.Account})};fl.displayName="UserMenu.Credits";const hl=({className:e,children:t,description:n,text:s,...o})=>{const{isMobile:a}=ne();return r.jsx("div",{...o,className:d.helpers.classNameConcat(Ve["user-menu--login"],e),"data-mobile":a,children:r.jsxs("div",{className:Ve["user-menu--login--content"],children:[r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[r.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),r.jsx("p",{children:n})]})}),t]})})};hl.displayName="UserMenu.Login";const _l=({className:e,isLogged:t,onLogoutClick:n,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?Zs:Zs({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return r.jsxs("ul",{className:d.helpers.classNameConcat(Ve["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>r.jsx("li",{children:r.jsx($e,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:r.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?r.jsx("li",{children:r.jsx($e,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:n,adornments:{start:r.jsx(d.Icon,{name:Gm(s)})},children:Wm})}):r.jsx(r.Fragment,{})]})};_l.displayName="UserMenu.Menu";const gl=e=>{const t=g.useRef(null),n=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=g.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=g.useCallback(a=>{a.key==="Escape"&&e()},[e]);return g.useEffect(()=>(document.addEventListener("mousedown",n),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[n,o,s]),{ref:t}},Zf=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Jf=(e,t,n)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:s,left:o,top:a,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?Zf(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+n}},yl=g.createContext({}),eh=({children:e,delay:t=600,gap:n=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[m,h]=g.useState({left:0,top:0}),{ref:p}=gl(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return g.useEffect(()=>{if(a&&(p!=null&&p.current)){const{left:f,top:_}=Jf(p.current,a,n??0);h({left:f,top:_}),u(!1)}},[n,s,a,p]),r.jsx(yl.Provider,{value:g.useMemo(()=>({...i,...m,contentRef:p,isLeaving:l,isOpen:s,setIsOpen:o,setIsLeaving:u,target:a}),[i,m,p,l,s,o,u,a]),children:e})},vl=()=>{const e=g.useContext(yl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},xl=({children:e,isMobile:t=!1,Z_INDEX_WAR:n})=>{const{isOpen:s,setIsOpen:o}=vl();return r.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:o,variant:"sideBottom",className:Ve["modal-root-modifier"],style:{zIndex:n.user_menu_mobile},children:[r.jsx(d.Modal.Header,{navigation:"top",className:Ve["modal-header-modifier"],children:r.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:Ve["modal-controls-modifier"]})}),r.jsx(d.Modal.Body,{children:e})]})};xl.displayName="UserMenu.Modal";const bl=({children:e,component:t,Z_INDEX_WAR:n,isMobile:s,...o})=>r.jsx(eh,{...o,className:Ve.root,children:s?r.jsxs(r.Fragment,{children:[r.jsx(ct.Modal,{Z_INDEX_WAR:n,children:t}),e]}):r.jsx(ct.Tooltip,{component:t,style:{width:304,zIndex:n.user_menu},Z_INDEX_WAR:n,children:e})});bl.displayName="UserMenu.Root";const jl=({children:e,component:t,Z_INDEX_WAR:n,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=vl();return r.jsx(d.Tooltip.Root,{arrow:"top-right",component:r.jsx("div",{...s,ref:o,children:t}),className:d.helpers.classNameConcat(Ve["user-menu--tooltip"],Ve["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:n.user_menu},children:r.jsx("div",{className:Ve["user-menu--tooltip"],children:e})})};jl.displayName="UserMenu.Tooltip";const ct={Credits:fl,Content:ml,Login:hl,Menu:_l,Modal:xl,Root:bl,Tooltip:jl},Un=({children:e,isOpen:t,setIsOpen:n,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var f,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Ee(),l=kt(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((f=l.user)!=null&&f.userId),{cashback:h,credits:p}=g.useMemo(()=>{var v,b;return{credits:((v=l==null?void 0:l.getCurrentCredits())==null?void 0:v.credits)??0,cashback:((b=l==null?void 0:l.getCurrentCredits())==null?void 0:b.cashback)??0}},[l]);return r.jsx(ct.Root,{component:r.jsxs(ct.Content,{children:[r.jsx(ct.Login,{description:Xm(m),text:Km(m,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((y=l==null?void 0:l.user)==null?void 0:y.email)),children:!m&&r.jsx(d.Button,{size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),p+h&&m?r.jsx(ct.Credits,{credits:p,cashBack:h,link:`${a.secureSubdomain}/account#/meus-creditos`,total:p+h}):r.jsx(r.Fragment,{}),r.jsx(d.Utils.Divider,{}),r.jsx(ct.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:m,className:T.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),r.jsx(ct.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:m,className:T.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:n,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Un.displayName="UserMenu";const Cl=({storeConfig:e})=>{const{CONSTANTS:t}=Ee(),{handleSelectContent:n}=oe(),{reset:s}=Gt(),{setValue:o}=_s(),a=hs(),i=g.useRef(null);return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",onMouseEnter:s,children:r.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{n({content:"header:logo"})}})})}),r.jsx(al,{}),r.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[r.jsx(Kf,{}),r.jsx(Un,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:r.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),n({content:"header:user_menu"})},className:Ds["btn-login"],innerRef:i,children:r.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),r.jsx(dl,{}),r.jsx($s,{id:"cart-button"})]})]}),r.jsx(ul,{})]})};Cl.displayName="Header.HeaderDesktopWrapper";const Fe={"menu--banners":"_menu--banners_j3ev9_1","menu--banners--item":"_menu--banners--item_j3ev9_6","menu--banners--item--text":"_menu--banners--item--text_j3ev9_17","menu--banners--list":"_menu--banners--list_j3ev9_21","menu--dummy-close":"_menu--dummy-close_j3ev9_46","menu--body":"_menu--body_j3ev9_54","menu--categories":"_menu--categories_j3ev9_67","menu--categories--title":"_menu--categories--title_j3ev9_80","menu--step":"_menu--step_j3ev9_92","menu--sub-category":"_menu--sub-category_j3ev9_108","menu--sub-category--item":"_menu--sub-category--item_j3ev9_115","menu--sub-category--list":"_menu--sub-category--list_j3ev9_121"},Sl=({children:e,mobileBannerAlt:t,mobileBannerSrc:n,textColor:s,submenuId:o,label:a,...i})=>r.jsx("button",{...i,className:Fe["menu--banners--item"],children:n?r.jsxs(d.Banner.Container,{children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{alt:t??n,height:128,src:n,width:343,unoptimized:!0})}),r.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:Fe["menu--banners--item--text"],children:r.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):r.jsx("h2",{...i,children:e})});Sl.displayName="Menu.Mobile.Category";const El=({label:e,...t})=>{const{CONSTANTS:n}=Ee();return r.jsx(d.Button,{...t,adornment:{end:r.jsx(d.Icon,{name:n.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};El.displayName="Menu.Mobile.Body.Category";const Pl=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>r.jsx("div",{...s,className:Fe["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>r.jsx($e,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>n(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Pl.displayName="Menu.Mobile.List";const Nl=({current:e,onHandleOut:t})=>{var n;return e?r.jsx("div",{className:Fe["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((n=e==null?void 0:e.subCategories)==null?void 0:n.map((s,o)=>r.jsxs("div",{className:Fe["menu--sub-category--item"],children:[r.jsx(Ut.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),r.jsx(Ut.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):r.jsx(r.Fragment,{})};Nl.displayName="Menu.Mobile.Body.SubCategory";const Il=({subCategory:e,submenuLabel:t,onHandleOut:n,...s})=>{var c;const{router:o}=ce(),{handleSelectContent:a}=oe(),{CONSTANTS:i}=Ee();return r.jsxs("div",{...s,className:Fe["menu--categories--title"],children:[r.jsx(Qt,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-md",children:e==null?void 0:e.label})})})}),((c=e==null?void 0:e.see_all)==null?void 0:c.link)&&r.jsx(d.ComponentList.Support,{adornment:{end:r.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;n(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&o.push(e.see_all.link)},children:e.see_all.label})]})};Il.displayName="Menu.Mobile";const Ut={Banner:Sl,Category:El,List:Pl,SubCategory:Nl,Title:Il},wl=g.createContext({}),th=({children:e})=>{const[t,n]=g.useState(null),s=g.useCallback(()=>{n(null)},[]),o=a=>{a!==t&&n(a)};return r.jsx(wl.Provider,{value:{currentCategory:t,setCurrentCategory:n,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},Rl=()=>g.useContext(wl),Al=e=>{const{router:t}=ce(),{headerData:n}=Ee(),{handleSelectContent:s}=oe(),{currentCategory:o,setCurrentCategory:a}=Rl(),i=g.useRef(null),c=()=>{if(i.current){const f=i.current;f&&(a(null),f==null||f.click())}},l=(f,_)=>{s({content:`menu:${f}`}),t.push(_),c()},u=(f,_)=>{s({content:`menu:${f}:${_}`}),c()},m=Array.isArray(n==null?void 0:n.categories)?n==null?void 0:n.categories:[],h=Array.isArray(n==null?void 0:n.subMenus)?n==null?void 0:n.subMenus:[],p=f=>{f.submenuId?a(f.submenuId):l(f.label,f.link)};return r.jsxs("div",{...e,className:Fe["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[r.jsx("button",{className:Fe["menu--dummy-close"],ref:i,"data-close":!0}),r.jsxs("div",{className:Fe["menu--step"],"data-active":"true",children:[r.jsx("div",{className:Fe["menu--banners"],children:r.jsx("div",{className:Fe["menu--banners--list"],children:m.map((f,_)=>g.createElement(Ut.Banner,{...f,key:_,onClick:()=>l(f.label,f.link)},f.mobileBannerAlt))})}),r.jsx("div",{className:Fe["menu--categories"],children:m.map((f,_)=>r.jsx(Ut.Category,{label:f.label,onClick:()=>p(f)},_))})]}),r.jsx("div",{className:Fe["menu--step"],"data-active":!!o,children:r.jsx(Ut.SubCategory,{current:h.find(f=>f.id===o),onHandleOut:u})})]})};Al.displayName="Menu.Mobile.Body";const nh={"menu--header":"_menu--header_1ozdf_1"},Tl=()=>{var o;const{headerData:e}=Ee(),{currentCategory:t,setCurrentCategory:n}=Rl(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return r.jsxs("div",{className:nh["menu--header"],children:[r.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>n(null)}),s&&r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:r.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),r.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>n(null)})]})};Tl.displayName="Menu.Mobile.Header";var Jr={exports:{}};function rh(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Er={},Pr={},Ho;function sh(){return Ho||(Ho=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=Oe._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Pr)),Pr}var qo;function oh(){return qo||(qo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return f}});const n=Oe._(g),s=sh();function o(_){return _&&_.default?_.default:_}const a=[],i=[];let c=!1;function l(_){let y=_(),v={loading:!0,loaded:null,error:null};return v.promise=y.then(b=>(v.loading=!1,v.loaded=b,b)).catch(b=>{throw v.loading=!1,v.error=b,b}),v}function u(_,y){let v=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),b=null;function C(){if(!b){const P=new m(_,v);b={getCurrentValue:P.getCurrentValue.bind(P),subscribe:P.subscribe.bind(P),retry:P.retry.bind(P),promise:P.promise.bind(P)}}return b.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const P=v.webpack&&typeof rh.resolveWeak=="function"?v.webpack():v.modules;P&&i.push(S=>{for(const E of P)if(S.includes(E))return C()})}function j(){C();const P=n.default.useContext(s.LoadableContext);P&&Array.isArray(v.modules)&&v.modules.forEach(S=>{P(S)})}function x(P,S){j();const E=n.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return n.default.useImperativeHandle(S,()=>({retry:b.retry}),[]),n.default.useMemo(()=>E.loading||E.error?n.default.createElement(v.loading,{isLoading:E.loading,pastDelay:E.pastDelay,timedOut:E.timedOut,error:E.error,retry:b.retry}):E.loaded?n.default.createElement(o(E.loaded),P):null,[P,E])}return x.preload=()=>C(),x.displayName="LoadableComponent",n.default.forwardRef(x)}class m{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:y,_opts:v}=this;y.loading&&(typeof v.delay=="number"&&(v.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},v.delay)),typeof v.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},v.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(b=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(y){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...y},this._callbacks.forEach(v=>v())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,v){this._loadFn=y,this._opts=v,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function h(_){return u(l,_)}function p(_,y){let v=[];for(;_.length;){let b=_.pop();v.push(b(y))}return Promise.all(v).then(()=>{if(_.length)return p(_,y)})}h.preloadAll=()=>new Promise((_,y)=>{p(a).then(_,y)}),h.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const v=()=>(c=!0,y());p(i,_).then(v,v)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=h.preloadReady);const f=h}(Er)),Er}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(m,h){for(var p in h)Object.defineProperty(m,p,{enumerable:!0,get:h[p]})}n(t,{default:function(){return u},noSSR:function(){return l}});const s=Oe,o=r,a=s._(oh()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,h){if(delete h.webpack,delete h.modules,!i)return m(h);const p=h.loading;return()=>(0,o.jsx)(p,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,h){let p=a.default,f={loading:v=>{let{error:b,isLoading:C,pastDelay:j}=v;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(b)return(0,o.jsxs)("p",{children:[b.message,(0,o.jsx)("br",{}),b.stack]})}return null}};m instanceof Promise?f.loader=()=>m:typeof m=="function"?f.loader=m:typeof m=="object"&&(f={...f,...m}),f={...f,...h};const _=f.loader,y=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return f.loadableGenerated&&(f={...f,...f.loadableGenerated},delete f.loadableGenerated),typeof f.ssr=="boolean"&&!f.ssr?(delete f.webpack,delete f.modules,l(p,f)):p({...f,loader:y})}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Jr,Jr.exports);var ah=Jr.exports,ih=ah;const Ol=T.getDefaultExportFromCjs(ih),En={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Ll=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:n}=xs(),{CONSTANTS:s}=Ee();return r.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(En["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:n,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[r.jsx(Tl,{}),r.jsx(d.Modal.Body,{className:En["menu--root"],children:e})]})};Ll.displayName="Menu.MenuRoot";const ch=Ol(()=>Promise.resolve(Ll),{ssr:!1}),kl=({children:e,last:t=!1,...n})=>r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...n,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:En.divider})]});kl.displayName="Menu.NavigationBarItem";const Ml=()=>{const{setUserMenuIsOpen:e}=xs(),{handleSelectContent:t}=oe(),{CONSTANTS:n}=Ee(),{router:s}=ce(),o=[{iconNameStart:n.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:n.header.MENU_INFO.login.button_text},{iconNameStart:n.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:n.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:n.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:n.header.MENU_INFO.store.button_text}];return r.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:En["menu--navigation-bar"],style:{zIndex:n.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>g.createElement(kl,{...a,key:i},a.text))})};Ml.displayName="Menu.NavigationBar";const Nr={Body:Al,NavigationBar:Ml,Root:ch},Dl=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:n}=Ee(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=n.header,{handleSelectContent:a}=oe(),{setValue:i}=Tn(),{setValue:c}=ni(),{setValue:l}=_s(),u=hs(),m=ti(),{isMobile:h}=ne();return r.jsxs(r.Fragment,{children:[r.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[r.jsx(d.Header.Logo,{style:{width:"100%"},children:r.jsx(De,{href:"/",children:r.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),r.jsxs(d.Header.Support,{children:[r.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:r.jsx(d.Icon,{name:o.search,size:"medium"})}),r.jsx($s,{}),r.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[r.jsx("span",{ref:t}),r.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),h&&r.jsx(gi,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:r.jsx(Un,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:r.jsxs(Nr.Root,{children:[r.jsx(Nr.Body,{}),s?r.jsx(Nr.NavigationBar,{}):r.jsx(r.Fragment,{})]})})})]})};Dl.displayName="Header.HeaderMobileWrapper";const lh=g.createContext({}),uh=({children:e})=>{const{sendDataLayerEvent:t}=oe(),{cartStore:n,isOpen:s}=xe();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:n}}})},[s]),g.useEffect(()=>{var a,i,c;if(n.id&&!((i=(a=n.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=n;ht.post("/api/checkout/order-form/attachments/marketing-data",{orderFormId:l,marketingData:{...n==null?void 0:n.marketingData,marketingTags:Ha(((c=n.marketingData)==null?void 0:c.marketingTags)??[])}}).catch(u=>{console.error(u)})}},[n]);const o=({cartItem:a,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...a,price:a.price/100,listPrice:a.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[a]}}})};return r.jsx(lh.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},dh="var(--color-background-brand-primary-lighter)",mh="_fadeInOut_1l5ow_1",ph="_fadeOut_1l5ow_1",te={brandPrimaryLighter:dh,"mc--cashback":"_mc--cashback_1l5ow_1","mc--cashback--positive":"_mc--cashback--positive_1l5ow_21","mc--cashback--alert":"_mc--cashback--alert_1l5ow_24","mc--container--actions":"_mc--container--actions_1l5ow_28","mc--container--actions--secondary":"_mc--container--actions--secondary_1l5ow_36","mc-container-actions--toggle-size-modifier":"_mc-container-actions--toggle-size-modifier_1l5ow_55","mc--footer":"_mc--footer_1l5ow_63","mc--footer--actions":"_mc--footer--actions_1l5ow_72","mc--footer--actions-button":"_mc--footer--actions-button_1l5ow_77","mc--footer--total":"_mc--footer--total_1l5ow_93","mc--footer--total--info":"_mc--footer--total--info_1l5ow_98","mc--footer--total--info--content":"_mc--footer--total--info--content_1l5ow_103","mc--field":"_mc--field_1l5ow_149","mc--body":"_mc--body_1l5ow_189","mc--body--products":"_mc--body--products_1l5ow_196","mc--body--empty--feedback":"_mc--body--empty--feedback_1l5ow_204","mc--body--empty--text":"_mc--body--empty--text_1l5ow_209","mc--body--promotion":"_mc--body--promotion_1l5ow_222","mc--body--promotion--closeness":"_mc--body--promotion--closeness_1l5ow_225","mc--body--promotion--closeness--success":"_mc--body--promotion--closeness--success_1l5ow_248","mc--body--coupon-tag":"_mc--body--coupon-tag_1l5ow_260","mc--body--coupon-tag--text":"_mc--body--coupon-tag--text_1l5ow_278","mc--body--coupon-tag--button":"_mc--body--coupon-tag--button_1l5ow_284","mc--header":"_mc--header_1l5ow_290","mc--header--subtitle":"_mc--header--subtitle_1l5ow_316","mc--notify":"_mc--notify_1l5ow_357","mc--notify--content":"_mc--notify--content_1l5ow_372","mc--notify--item":"_mc--notify--item_1l5ow_385",fadeInOut:mh,fadeOut:ph,"mc--card":"_mc--card_1l5ow_447","mc--card--actions":"_mc--card--actions_1l5ow_452","mc--card--actions--secondary":"_mc--card--actions--secondary_1l5ow_460","mc--card--actions--add-remove":"_mc--card--actions--add-remove_1l5ow_487","mc--card--actions--gift":"_mc--card--actions--gift_1l5ow_501","mc--card--content-info":"_mc--card--content-info_1l5ow_514","mc--card--details":"_mc--card--details_1l5ow_521","mc--card--link":"_mc--card--link_1l5ow_526","mc--product--unavailable":"_mc--product--unavailable_1l5ow_534","mc--card--name":"_mc--card--name_1l5ow_537","mc--card--price":"_mc--card--price_1l5ow_552","mc--card--price--old-price":"_mc--card--price--old-price_1l5ow_562","mc--card--price--price-details":"_mc--card--price--price-details_1l5ow_566","mc--card--product-link":"_mc--card--product-link_1l5ow_577","mc--discount":"_mc--discount_1l5ow_587","mc--discount--header":"_mc--discount--header_1l5ow_590","inputs--tooltip":"_inputs--tooltip_1l5ow_590","mc--discount--body":"_mc--discount--body_1l5ow_609","minicart--modal-modifier":"_minicart--modal-modifier_1l5ow_630"},$l=({item:{id:e,message:t,callback:n},removeNotification:s,ICONS:o})=>{const a=g.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return r.jsx("div",{className:te["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:r.jsxs(d.SnackBar.Structure,{size:"medium",children:[r.jsx(d.SnackBar.Content,{title:t}),r.jsxs(d.SnackBar.Support,{children:[typeof n=="function"&&r.jsx(d.Button,{onClick:()=>{n(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),r.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};$l.displayName="MiniCart.Notify.Item";const zl=({ICONS:e})=>{const t=ps(),{removeNotification:n}=fs(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?r.jsx("div",{className:te["mc--notify"],children:r.jsx("div",{className:te["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>r.jsx($l,{item:o,removeNotification:n,ICONS:e},o.id))})}):null};zl.displayName="MiniCart.Notifications";const fh=({handleSendEvent:e,onHandleRemove:t,product:n,MINICART_CONFIG:s,...o})=>{const a=Lt(),{toggleProduct:i}=jt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=n;return r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:`favorite-${a.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),a.includes(c)||t({texture:"mini-cart-wishlist",title:`${s.messages.add_wishlist}`},l,()=>i(c)),e(a.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},Fl=({handleSendEvent:e,product:t,ICONS:n,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=xe(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:h,quantity:p}=t,f=(_,y,v)=>{i(l,_.title,()=>{typeof v=="function"&&v(),a({id:l,quantity:y,seller:m},{id:l,texture:_.texture},!0)})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:te["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&r.jsx(fh,{...o,product:t,handleSendEvent:e,onHandleRemove:f,ICONS:n,MINICART_CONFIG:s}),r.jsx(d.Button,{...o,adornment:{end:r.jsx(d.Icon,{name:n.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{f({texture:"mini-cart",title:`${s.messages.remove}`},p),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&r.jsx(Nt.Gift,{uniqueId:u,bundleItems:c,offerings:h,ICONS:n,MINICART_CONFIG:s})]})};Fl.displayName="MiniCart.Card.Actions";const Bl=({bundleItems:e,offerings:t,uniqueId:n,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=g.useState(!1),{toggleGiftItemCart:c}=xe(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[h]=t;if(h){i(!0);const p=e.some(f=>f.id===h.id);c(n,String(h.id),p).then(()=>i(!1))}}},u=t[0],m=e.find(h=>h.id===u.id);return u&&"id"in u?r.jsx("div",{className:te["mc--card--actions--gift"],children:r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};Bl.displayName="MiniCart.Card.Gift";const Ul=({itemOffered:e})=>{const t=T.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return r.jsx(De,{href:`${e==null?void 0:e.slug}`,className:te["mc--card--product-link"],children:r.jsx(Ie.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Ul.displayName="MiniCart.Card.Media";const Hl=({name:e,skuName:t,tagName:n,className:s})=>r.jsxs(r.Fragment,{children:[n&&r.jsx(d.Tag,{variant:"quaternary",title:n,style:{textTransform:"uppercase"},children:n}),r.jsx("p",{className:d.helpers.classNameConcat(te["mc--card--name"],s),children:T.getProductNameWithoutSku(e??"",t??"")})]});Hl.displayName="MiniCart.Card.Name";const ql=({total:e,totalList:t})=>r.jsx(d.ProductInfo.Root,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:te["mc--card--price"],children:r.jsx(d.ProductInfo.Wrapper,{className:te["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:T.formatPriceToCurrency(t),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:T.formatPriceToCurrency(e),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:T.formatPriceToCurrency(e),size:"small"})})})})});ql.displayName="MiniCart.ProductPrice";const Vl=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:n})=>{var u;const[s,o]=g.useState(""),a=g.useRef(null),{cartStore:{options:i}}=xe(),c=e.itemOffered.isVariationOf.productGroupID,l=g.useCallback(()=>{var h;const m=(h=i==null?void 0:i.find(p=>p.id===c))==null?void 0:h.texture;if(m){o(m);return}fetch("/api/catalog/product/info",{method:"POST",priority:"low",body:JSON.stringify({ids:[c]})}).then(p=>p.json()).then(p=>{const f=p.data[0].items.find(_=>_.itemId===e.id);if(f){const _=f.images.find(y=>t.includes(y.imageLabel));if(_!=null&&_.imageUrl){o(_.imageUrl);return}o(f.images[0].imageUrl)}}).catch(p=>{console.error(p)})},[i,c,e.id]);return g.useEffect(()=>{if(!a.current)return;const m=new IntersectionObserver(h=>{h[0].isIntersecting&&l()});return m.observe(a.current),()=>{m.disconnect()}},[l]),r.jsx("div",{ref:a,children:r.jsx(d.ToggleStyle.Wrapper,{size:"small",style:n,children:r.jsx(d.ToggleStyle.Texture,{children:s?r.jsx(Ie.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:n}):r.jsx(fc,{})})})})};Vl.displayName="MiniCart.Card.Style";const Wl=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=T.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",n);return r.jsxs(d.Utils.Row,{alignItems:"center",children:[r.jsx(Vl,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),r.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&r.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:te["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${te.brandPrimaryLighter}`},children:r.jsx(d.ToggleSize.Text,{children:a})})]})};Wl.displayName="MiniCart.Card.Sku";const Nt={Actions:Fl,Gift:Bl,Media:Ul,Name:Hl,Price:ql,Sku:Wl},hh=e=>{var t;return{price:e.sellingPrice/100,listPrice:e.listPrice/100,totalPrice:(((t=e.priceDefinition)==null?void 0:t.total)??0)/100,totalListPrice:e.listPrice*e.quantity/100}},Gl=({available:e=!0,index:t,product:n,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var h,p;const{sendDataLayerEvent:l}=oe(),u=hh(n),m=(f,_)=>{const y={commonData:{...n,...u},customData:{index:t},event:f};if(_==="skuEvents"){const v={...n,...u};y.supportData={selectedSkus:[v]},y.commonData.products=[v]}l({functionKey:_,data:y})};return r.jsxs("div",{className:d.helpers.classNameConcat(te["mc--card"],e?"":te["mc--card--unavailable"]),children:[r.jsx(Nt.Media,{itemOffered:n.itemOffered}),r.jsxs("div",{className:te["mc--card--content-info"],children:[r.jsx(Nt.Name,{name:((h=n.itemOffered)==null?void 0:h.name)??"",skuName:(p=n.itemOffered)==null?void 0:p.skuName}),r.jsxs("div",{className:te["mc--card--details"],children:[r.jsx("div",{className:te["mc--card--actions"],children:e?r.jsx(Nt.Price,{total:u.price,totalList:u.listPrice}):r.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),r.jsxs("div",{className:te["mc--card--actions--secondary"],children:[e&&r.jsx(Nt.Sku,{product:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),r.jsx(Nt.Actions,{handleSendEvent:m,product:n,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};Gl.displayName="MiniCart.Card";const Kl=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:n})=>{var a;const{toExpire:s}=kt(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?r.jsxs("div",{className:d.helpers.classNameConcat(te["mc--cashback"],te[`mc--cashback--${e}`]),children:[r.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),r.jsxs("p",{children:[r.jsx("span",{children:T.formatPriceToCurrency(o)})," ",n.title]})]}):null};Kl.displayName="MiniCart.Cashback";const Xl=({type:e,ICONS:t,MINICART_CONFIG:n})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=xe(),[l,u]=g.useState(!1),[m,h]=g.useState(!1),p=g.useCallback(()=>{let v="";return e==="coupon"?v=(i==null?void 0:i.coupon)??"":v=String((c==null?void 0:c.value)??""),v.toUpperCase()??""},[i,c,e]),[f,_]=g.useState(!!p()),y=async v=>{h(!0),!!p()&&(e==="coupon"?await o():await a(),_(!1),u(!1)),await s(v,e).then(C=>{if(!C.statusOk&&v||C.code!==200){v?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>h(!1))};return r.jsx(ke.Field,{hasError:l,hasSuccess:f,isLoading:m,onHandler:y,type:e,title:e==="coupon"?`${n.messages.descount_cupom_placeholder}`:`${n.messages.sellers_code_placeholder}`,value:p(),MINICART_CONFIG:n,ICONS:t})};Xl.displayName="MiniCart.CouponSeller";const Yl=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:n})=>{const{router:s}=ce(),o=()=>{s.push(n.link)};return r.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:te["mc--body--empty--feedback"],children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("p",{className:`typography-style-body-xs ${te["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),r.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:r.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Yl.displayName="MiniCart.Feedback";const _h=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},Ql=({feedback:e,hasError:t,onHandler:n,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?r.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?r.jsx(d.Icon,{name:c.check_circle}):null,h=()=>{if(o==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},p=()=>{if(o==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},f=y=>{const v=y.currentTarget.value;if(v===""&&typeof n=="function"||s&&String(i).length>0&&v!==String(i)||t&&v!==String(i)){u(""),n("");return}if(o==="cep"){const C=_h(v);u(C)}else u(v)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof n=="function"){const v=y.currentTarget.value;n(v)}};return r.jsx(d.TextField.Input,{adornment:{end:m()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:h,onBlur:p,onChange:f,onKeyDown:_})};Ql.displayName="MiniCart.Field.Input";const Zl=({title:e,ICONS:t,MINICART_CONFIG:n,...s})=>{const o=g.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,h=()=>i?"error":String(m).length&&a?"success":"none",p=g.useCallback(()=>{if(o.current){const y=o.current.querySelector("input");y&&typeof l=="function"&&(m!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,m,i]),f=h();return r.jsx("div",{ref:o,children:r.jsx(d.TextField.Structure,{className:te["mc--field"],input:r.jsx(Ql,{...s,feedback:f,title:e,ICONS:t}),right:r.jsx(d.Button,{"data-has-success":!a,size:"medium",title:String(m).length&&a||i?"Remover":"Aplicar",onClick:()=>p(),disabled:c,children:String(m).length&&a||i?r.jsx(d.Icon,{name:"close",size:"small"}):`${n.messages.promo_code_button}`}),supportText:u==="cep"&&f==="success"?r.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};Zl.displayName="MiniCart.Field";const Vo=e=>{const t=e*100;return Math.round(t)},gh=e=>(e/100).toFixed(2).replace(".",","),yh=(e,t)=>{const{valueType:n,remainingValueToActivate:s}=e;if(n==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(n==="price"){const o=s===100?"Falta":"Faltam",a=gh(s);return`${o} R$ ${a} ${t}`}return t},Jl=({ICONS:e})=>{var b;const{promotionRules:t,data:n,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=xe(),{sendDataLayerEvent:l}=oe(),u=(b=n==null?void 0:n.promotion)==null?void 0:b.promotionCart,m=g.useRef(!1),{router:h}=ce();if(g.useEffect(()=>{(u==null?void 0:u.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(u==null?void 0:u.cupom)&&!m.current&&(a==null?void 0:a.coupon)!==u.cupom&&(m.current=!0,i(u.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&l({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:s}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(m.current=!1)},[u==null?void 0:u.selectPromotion,t==null?void 0:t.remainingValueToActivate,u==null?void 0:u.cupom,a==null?void 0:a.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||o.length===0)return null;const p=u.title,f=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,v=u.linkLabel;return r.jsxs("div",{className:te["mc--body--promotion"],children:[t.remainingValueToActivate>0&&r.jsx(d.Closeness,{className:te["mc--body--promotion--closeness"],title:yh(t,p),subtitle:f,percentage:Vo(t.completeness),iconLink:e.arrow_right,linkLabel:v,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),h.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&r.jsx(d.Closeness,{className:`${te["mc--body--promotion--closeness"]} ${te["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:Vo(t.completeness)})]})};Jl.displayName="MiniCart.Modal.Body.Promotion";const eu=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:n,cartStore:{items:s,marketingData:o},addCouponSeller:a}=xe(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(o==null?void 0:o.coupon)===(i==null?void 0:i.valueCupom),[l,u]=g.useState(!1),[m,h]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{m&&setTimeout(()=>{h(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const p=async()=>{if(!n.items.length){h(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return r.jsxs("div",{className:te["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[r.jsx("div",{className:te["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),r.jsx("div",{className:te["mc--body--coupon-tag--button"],children:r.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:p,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};eu.displayName="MiniCart.Modal.Body.CouponTag";const tu=({children:e,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=xe();return r.jsxs(d.Modal.Body,{className:te["mc--body"],children:[e,r.jsx(Jl,{ICONS:t}),r.jsx(eu,{TIPBAR_CONFIGS:i}),r.jsx("div",{className:te["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((m,h)=>{const p=u.find(f=>{var _;return f.code==="withoutStock"&&((_=f.fields)==null?void 0:_.ean)===m.ean})!==void 0;return r.jsx(ke.Card,{available:!m.availability.includes("outStock")||!p,index:h,product:m,ICONS:t,MINICART_CONFIG:n,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${h}`)}):r.jsx(ke.Feedback,{ICONS:t,MINICART_CONFIG:n,PLP_NOT_RESULT:o})})]})};tu.displayName="MiniCart.Body";const nu=({children:e,storeConfig:t,MINICART_CONFIG:n})=>{const{cartStore:s}=xe();if(s.items.length===0)return null;const o=()=>{var i;const a=new URLSearchParams({orderFormId:s.id,...((i=s.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:s.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${a.toString()}#/cart`};return r.jsxs(d.Modal.Footer,{className:te["mc--footer"],children:[e,r.jsx("div",{className:te["mc--footer--actions"],children:r.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:te["mc--footer--actions-button"],onClick:o,children:n.messages.checkout_button})})]})};nu.displayName="MiniCart.Modal.Footer";const ru=({children:e,ICONS:t,MINICART_CONFIG:n,Z_INDEX_WAR:s})=>{const[o,a]=g.useState(!1),i=g.useRef(null),c=()=>a(l=>!l);return r.jsxs(r.Fragment,{children:[o&&r.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:r.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:te["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),r.jsxs(d.Accordion.Wrapper,{className:te["mc--discount"],children:[r.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(te["mc--discount--header"]),startOpen:n.promotion_input_starts_open,children:r.jsxs(d.TextStructure.Root,{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsxs("h3",{className:"typography-style-body-sm",children:[n.messages.promo_code_title," "]})}),r.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:r.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),r.jsx(d.Accordion.Body,{className:te["mc--discount--body"],children:e})]})]})};ru.displayName="MiniCart.Discount";const su=({discount:e,shipping:t,total:n})=>{var l,u;const{data:s}=xe(),o=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=n-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":T.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:T.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${T.formatPriceToCurrency(a/100)}`}];return r.jsx("div",{className:te["mc--footer--total"],children:Array.isArray(c)&&c.map((m,h)=>r.jsxs("div",{className:te["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[r.jsx("p",{children:m.title}),r.jsxs("div",{className:te["mc--footer--total--info--content"],children:[m.message&&(o==null?void 0:o.active)==="Ativar"&&r.jsx(d.Tag,{variant:"primary",title:m.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:m.message}),r.jsx(d.ProductInfo.Price,{className:te["mc--footer--total--info"],label:m.title,value:m.value})]})]},h))})};su.displayName="MiniCart.Modal.Footer.Resume.Items";const ou=()=>{var o,a,i;const{totalizers:e}=gt(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,n=(a=e.find(c=>c.id==="Discounts"))==null?void 0:a.value,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return r.jsx(su,{discount:n??0,total:t,shipping:s})};ou.displayName="MiniCart.Modal.Footer.Totals";const au=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:n}=ne(),{cartStore:{items:s}}=xe(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return r.jsx(d.Modal.Header,{navigation:"top",className:te["mc--header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),r.jsx("span",{className:te["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),r.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};au.displayName="MiniCart.Modal.Header";const iu=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:n},shipping:s,removeCEP:o}=xe(),{sendDataLayerEvent:a}=oe(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),m=g.useCallback(()=>{var C;const b=((C=n==null?void 0:n.address)==null?void 0:C.postalCode)??"";return b.length===8&&!b.includes("-")?`${b.slice(0,5)}-${b.slice(5)}`:b},[n]),[h,p]=g.useState(!!m()),f=()=>{p(!1),c(!1)},_=b=>{var C;if(typeof b=="object"&&(b!=null&&b.logisticsInfo))return(C=b.logisticsInfo)==null?void 0:C.reduce((j,x)=>{var A;const P=(A=x==null?void 0:x.slas)==null?void 0:A.find(O=>(O==null?void 0:O.id)===(x==null?void 0:x.selectedSla));if(!P)return j;const S=parseInt(String((P==null?void 0:P.shippingEstimate)??"").replace("bd","")),E=Number((((P==null?void 0:P.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=x==null?void 0:x.selectedSla,j.delivery_time=S.toString(),j.shipping=E,j.flag_retirada=(x==null?void 0:x.selectedDeliveryChannel)==="delivery"?"false":"true",j;const I=parseInt(j.delivery_time??"0");return S>I&&(j.delivery_time=S.toString()),j.shipping=(j.shipping??0)+E,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async b=>{const C=b.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await ht.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},v=async b=>{if(u(!0),!!m()||!(b!=null&&b.trim())){await o(),f(),u(!1);return}if(!await y(b)){c(!0),p(!1),u(!1);return}try{const P=await s(b);if(c(!1),P){p(!0);const S=_(P);S&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:S}})}}catch{c(!0)}finally{u(!1)}};return r.jsx(ke.Field,{hasSuccess:h,hasError:i,isLoading:l,onHandler:v,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};iu.displayName="MiniCart.Shipping";const cu=()=>{var n,s;const{data:e}=xe(),t=(s=(n=e==null?void 0:e.flags)==null?void 0:n.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?r.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?r.jsx(d.Icon,{name:t==null?void 0:t.icon,style:{color:t==null?void 0:t.iconColor}}):null},style:{background:t==null?void 0:t.tagColor,color:t==null?void 0:t.textColor,width:"100%"},children:t==null?void 0:t.value}):null};cu.displayName="MiniCart.TagMessage";const ke={Body:tu,Card:Gl,Cashback:Kl,CouponSeller:Xl,Discount:ru,Field:Zl,Feedback:Yl,Shipping:iu,Footer:nu,Header:au,TagMessage:cu,Totals:ou},vh=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:a,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:h}=xe(),{isMobile:p}=ne();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(te["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:h,style:{zIndex:c.modal},variant:p?"sideBottom":"sideRight",children:[r.jsx(ke.Header,{ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,children:r.jsx(ke.TagMessage,{})}),r.jsxs(ke.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[r.jsxs(ke.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[r.jsx(ke.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),r.jsx(ke.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),r.jsx(ke.Totals,{})]}),r.jsx(zl,{ICONS:e})]})},lu=({tipBar:e,minicartStyleModifiers:t,menuV2:n,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ee(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return r.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(Ds["header-animation"],o),children:r.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[n??r.jsxs(th,{children:[r.jsx("div",{className:T.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:r.jsx(Dl,{storeConfig:s})}),r.jsx("div",{className:T.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:r.jsx(Cl,{storeConfig:s})})]}),r.jsx(uh,{children:r.jsx(vh,{...m,minicartStyleModifiers:t})}),r.jsx(Ts,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};lu.displayName="Header";const xh="_shippingFreight_6z8rf_6",bh="_shippingFreight__postalCodeGrid_6z8rf_10",jh="_shippingFreight__grid_6z8rf_14",Ch="_shippingFreight__grid__title_6z8rf_18",Sh="_shippingFreight__grid__remember_6z8rf_29",Eh="_postalCodeContainer_6z8rf_44",Ph="_deliveryStatusBar__tag_6z8rf_49",Nh="_deliveryStatusBarError__tag_6z8rf_66",Ih="_deliveryInfo_6z8rf_74",wh="_deliveryInfo__content_6z8rf_78",Rh="_deliveryInfo__text_6z8rf_84",Ah="_deliveryInfo__title_6z8rf_89",Th="_deliveryInfo__subtitle_6z8rf_99",Oh="_deliveryInfo__tooltipIcon_6z8rf_109",Lh="_deliveryInfo__tooltip_6z8rf_109",kh="_freightGrid_6z8rf_148",Mh="_freightContainer_6z8rf_155",Dh="_freightOption__content_6z8rf_160",$h="_freightOption__value_6z8rf_166",zh="_freightOption__title_6z8rf_177",Fh="_freightOption__title_item_6z8rf_181",Bh="_freightOption__paragraph_6z8rf_192",ue={shippingFreight:xh,shippingFreight__postalCodeGrid:bh,shippingFreight__grid:jh,shippingFreight__grid__title:Ch,shippingFreight__grid__remember:Sh,postalCodeContainer:Eh,deliveryStatusBar__tag:Ph,deliveryStatusBarError__tag:Nh,deliveryInfo:Ih,deliveryInfo__content:wh,deliveryInfo__text:Rh,deliveryInfo__title:Ah,deliveryInfo__subtitle:Th,deliveryInfo__tooltipIcon:Oh,deliveryInfo__tooltip:Lh,freightGrid:kh,freightContainer:Mh,freightOption__content:Dh,freightOption__value:$h,freightOption__title:zh,freightOption__title_item:Fh,freightOption__paragraph:Bh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},Uh=({icon:e,title:t,subtitle:n,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),m=g.useRef(null),h=()=>u(p=>!p);return r.jsxs("div",{className:ue.deliveryInfo,ref:m,children:[r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsx("div",{children:r.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),r.jsxs("div",{className:ue.deliveryInfo__content,children:[r.jsx("div",{className:ue.deliveryInfo__icon,children:r.jsx(d.Icon,{name:e,size:"medium"})}),r.jsxs("div",{className:ue.deliveryInfo__text,children:[r.jsxs("span",{className:ue.deliveryInfo__title,children:[t," ",s," ",o]}),n&&r.jsx("span",{className:ue.deliveryInfo__subtitle,children:n})]}),a&&r.jsxs("div",{className:ue.deliveryInfo__tooltipIcon,onMouseEnter:h,onMouseLeave:h,"aria-label":"Mostrar descrição",children:[r.jsx("span",{children:r.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&r.jsx("div",{className:ue.deliveryInfo__tooltip,children:a})]})]})]})},Hh=({value:e,title:t,paragraph:n})=>r.jsx("div",{className:ue.freightOption,children:r.jsxs("div",{className:ue.freightOption__content,children:[r.jsx("span",{className:ue.freightOption__value,children:e}),r.jsx("span",{className:ue.freightOption__title,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:ue.footer__item,children:[r.jsx("span",{className:ue.freightOption__title_item,children:t}),n&&r.jsx("span",{className:ue.freightOption__paragraph,children:n})]})})})]})}),qh=({children:e})=>r.jsx("div",{className:ue.freightContainer,children:e}),Vh=({children:e})=>r.jsx("div",{className:ue.freightGrid,children:e}),Wh=({children:e})=>r.jsx("div",{className:ue.postalCodeContainer,children:e}),Wo=({message:e,seller:t="",size:n="small",setError:s})=>r.jsx("div",{className:s?ue.deliveryStatusBarError:ue.deliveryStatusBar,children:r.jsxs(d.Tag,{title:e,className:s?ue.deliveryStatusBarError__tag:ue.deliveryStatusBar__tag,size:n,children:[e," ",!s&&t]})}),Gh=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Kh=e=>{var n,s,o;const t=[];return(o=(s=(n=e==null?void 0:e.logisticsInfo)==null?void 0:n[0])==null?void 0:s.slas)==null||o.forEach(a=>{t.push({id:a.id,name:a.name,price:a.price,shippingEstimate:a.shippingEstimate})}),t},Xh=({component:e,parent:t,top:n,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return r.jsx(r.Fragment,{children:u?r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):r.jsx(d.Tooltip.Root,{arrow:"bottom",component:r.jsxs("div",{...l,ref:a,children:[e,r.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:ue["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},Yh=({onUpdateFreightItems:e,sellerId:t,size:n,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var L,M,Q,D;const m=gt(),h=gt(U=>U.shipping),[p,f]=g.useState(),[_,y]=g.useState(!1),[v,b]=g.useState(!1),[C,j]=g.useState(!1),x=(M=(L=m.shippingData)==null?void 0:L.address)==null?void 0:M.postalCode,P=!(p!=null&&p.length)&&x?x:p,S=g.useRef(null),E=async U=>{const Y=U.target.value.replace(/\D/g,"").slice(0,8);Y.length>5?f(Y.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):f(Y)},I=async U=>{const F=U.target.value.replace(/\D/g,"");try{if((await ht.get(`https://viacep.com.br/ws/${F}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),b(!0);return}a&&a(""),b(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},A=async()=>{y(!0);try{const U=await ht.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:P});e(Kh(U.data))}catch(U){console.error("Erro ao atualizar o documento:",U)}finally{y(!1),h(P,"BRA")}},O=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await I({target:{value:P}}),_||(A(),i(!0))};return r.jsxs("div",{ref:S,style:{position:"relative"},children:[!s&&C?r.jsx(Xh,{component:c,isOpen:C,parent:S.current,toolTipZIndex:u,freightConfig:l}):r.jsx(r.Fragment,{}),r.jsx("div",{style:{position:"relative"},children:r.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:r.jsx(d.TextField.Input,{defaultValue:(D=(Q=m.shippingData)==null?void 0:Q.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:p,sizeVariant:n,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:E,onKeyDown:U=>{U.key==="Enter"&&O()},className:ue["input-modifier"],feedback:v?"error":"none"}),right:r.jsx(d.Button,{onClick:O,size:n,title:"button",children:_?r.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},Qh=({children:e,freightConfig:t})=>r.jsxs("div",{className:ue.shippingFreight,children:[r.jsxs("div",{className:ue.shippingFreight__grid,children:[r.jsx("span",{className:ue.shippingFreight__grid__title,children:t.messages.title}),r.jsx("span",{className:ue.shippingFreight__grid__remember,children:r.jsx($e,{href:"https://buscacepinter.correios.com.br/app/endereco/index.php",passHref:!0,target:"_blank",rel:"noopener noreferrer",size:"x-small",disablePadding:!1,title:t.messages.remember_cep,children:t.messages.remember_cep})})]}),r.jsx("div",{className:ue.shippingFreight__postalCodeGrid,children:e})]}),Zh=({children:e})=>r.jsx("div",{className:ue.freightContainer,children:e}),uu=({className:e,sellerId:t,skuId:n,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=oe(),[u,m]=g.useState(""),[h,p]=g.useState([]),[f,_]=g.useState(""),[y,v]=g.useState(!1),b=j=>m(j),C=j=>{p(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(x=>({shipping_tier:x.id,delivery_time:x.shippingEstimate.replace("bd",""),flag_pickup:x.name.toLowerCase().includes("retirada")?"true":"false",shipping:x.price,currency:c.currency||"BRL"}))}}})};return r.jsxs(Zh,{className:e,children:[r.jsxs(Qh,{freightConfig:c.freightConfig,children:[r.jsx(Wh,{children:r.jsx(Yh,{onUpdateFreightItems:C,skuId:n,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:v,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),f?r.jsx(Wo,{size:o,message:f,setError:_}):h.length>0&&r.jsx(Wo,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),y&&!f?h.length>0&&r.jsxs(qh,{children:[r.jsx(Vh,{children:h.filter(({id:j})=>!j.includes("Retirada")).map(j=>r.jsx(Hh,{id:j.id,value:T.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${Gh(j.shippingEstimate)}`,radioValue:u,changeValue:b},j.id))}),c.deliveryInfoBoxesAllowed?r.jsx(Uh,{icon:c.freightConfig.icons.delivery_truck,packageUnit:c.freightConfig.messages.unit_amout,title:c.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex??999}):r.jsx(r.Fragment,{})]}):null]})},vt={"pcd-navigation--breadcrumb":"_pcd-navigation--breadcrumb_1243w_1","pdc-navigation--content":"_pdc-navigation--content_1243w_28","pdc-navigation--filters":"_pdc-navigation--filters_1243w_54","pdc-navigation--filters--content":"_pdc-navigation--filters--content_1243w_67","pdc-navigation--selected":"_pdc-navigation--selected_1243w_139","pdc-navigation--selected--container":"_pdc-navigation--selected--container_1243w_152","pdc-navigation":"_pdc-navigation_1243w_28"},Jh=({children:e,href:t,isLast:n,title:s,ICONS:o})=>r.jsx(d.BreadCrumb.Item,{adornment:{end:n&&r.jsx(d.Icon,{name:o.arrow_right})},children:n?r.jsx($e,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),du=()=>{var a;const{state:e}=ze(),{ICONS:t}=Me(),n=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((a=e==null?void 0:e.base)!=null&&a.length?e.base:n??n).slice(1).split("/"),o=ki(s);return r.jsx("div",{className:vt["pcd-navigation--breadcrumb"],children:r.jsx(d.BreadCrumb.DivWrapper,{children:r.jsx(d.BreadCrumb.List,{children:Array.isArray(o)&&o.map((i,c)=>{var l,u;return g.createElement(Jh,{...i,isLast:c!==o.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," "),ICONS:t},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};du.displayName="PLPNavigation.BreadCrumb";const mu=({children:e,...t})=>r.jsxs("div",{...t,className:vt["pdc-navigation--content"],children:[r.jsx(dt.Filters,{}),e]});mu.displayName="PLPNavigation.Content";const e_="_sort_35wro_1",Hn={sort:e_,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},t_=({children:e,sortListOpen:t,btnAdornment:n,style:s,...o})=>r.jsx(d.Button,{...o,adornment:{end:t?n==null?void 0:n.listOpen:n==null?void 0:n.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:Hn["sort-button"],children:e}),n_=e=>r.jsx(d.RadioButton.Radio,{...e}),r_=({children:e,className:t,name:n,...s})=>r.jsx(d.RadioButton.Group,{...s,name:n||"sort-group",className:d.helpers.classNameConcat(Hn["sort-list"],t),children:e}),s_=({children:e,className:t,shadow:n=!0,padding:s="small",height:o="fit-content",...a})=>r.jsx(d.Card,{...a,shadow:n,className:d.helpers.classNameConcat(Hn["sort-list-wrapper"],t),padding:s,height:o,children:e}),pu=g.forwardRef(({children:e,className:t,...n},s)=>r.jsx("div",{...n,ref:s,className:d.helpers.classNameConcat(Hn.sort,t),children:e}));pu.displayName="SortRoot";const qn=({handleSelectValue:e,sortListOpen:t,setSortListOpen:n,searchParams:s,ICONS:o,...a})=>{var p;const i=(p=s==null?void 0:s.get("sort"))==null?void 0:p.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=oe();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=gl(()=>n(!1)),h=f=>{const _=f.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Dt.options[_]}}}),n(!1)};return r.jsxs(pu,{...a,ref:m,children:[r.jsx(t_,{btnAdornment:{listOpen:r.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:r.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>n(!t),children:c?Dt.options[c]:Dt.placeholder},"sort-button"),t&&r.jsx(s_,{children:r.jsx(r_,{name:"sort-group",value:c??"",onChange:h,children:Object.keys(Dt.options).map(f=>r.jsx(n_,{label:Dt.options[f],value:f},f))})})]})};qn.displayName="Sort";const fu=g.createContext({}),o_=({children:e,...t})=>{const[n,s]=g.useState(!1);return r.jsx(fu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:n,setOpenOrderBy:s}),[t,n,s]),children:e})},a_=()=>{const e=g.useContext(fu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},hu=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:n,setOpenOrderBy:s}=a_(),{ICONS:o,PDC_NAVIGATION:a,searchParams:i}=Me();return r.jsxs("div",{className:vt["pdc-navigation--filters"],children:[r.jsx(dt.BreadCrumb,{}),r.jsxs("div",{className:vt["pdc-navigation--filters--content"],children:[r.jsx(qn,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:i}),r.jsx(d.Button,{adornment:{end:r.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>n(!0),size:"small",variant:"tertiary",children:a.filter_button}),r.jsx(dt.Total,{})]})]})};hu.displayName="PLPNavigation.Filters";const _u=({children:e,onSort:t,setOpenFilters:n,style:s,...o})=>{const a=g.useRef(null);return r.jsx(o_,{onSort:t,setOpenFilters:n,children:r.jsx("div",{...o,className:vt["pdc-navigation"],ref:a,style:{...s},children:r.jsx(dt.Content,{children:e})})})};_u.displayName="Root";const gu=({callback:e,selected:t,...n})=>r.jsx("div",{...n,className:vt["pdc-navigation--selected"],children:r.jsx("div",{className:vt["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:r.jsx(dt.SelectedItem,{callback:e,facet:s},s.value)):null})});gu.displayName="PLPNavigation.Selected";const zs=({key:e,PLP_FILTERS:t})=>t.some(n=>n.key===e)?e==="cores-filtraveis":!1,Fs=({value:e,PLP_FILTERS_COLORS:t})=>{var n;return((n=t.find(s=>s.value===e))==null?void 0:n.color)??"#F2F2F2"},yu=({key:e,PLP_FILTERS:t})=>{var n;return(n=t.find(s=>s.key===e))==null?void 0:n.label},vu=({key:e,PLP_FILTERS:t})=>{var n;return((n=t.find(s=>s.key===e))==null?void 0:n.order)??0},es=({value:e})=>{const[t,n]=e.split(":").length===2?e.split(":"):[0,0],s=T.formatPriceToCurrency(Number(n));return`${T.formatPriceToCurrency(Number(t))} até ${s}`},xu=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),n=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[n,s]},bu=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:zs,createTagPrice:es,getAbsoluteMinMax:xu,getColor:Fs,getName:yu,getOrder:vu},Symbol.toStringTag,{value:"Module"})),We={"filter--empty":"_filter--empty_1mjas_1","filter--item":"_filter--item_1mjas_14","filter--item--price":"_filter--item--price_1mjas_19","filter--item--toggle":"_filter--item--toggle_1mjas_19","filter--item--toggle--container":"_filter--item--toggle--container_1mjas_30","filter--modal--body":"_filter--modal--body_1mjas_79","filter--modal--body--content":"_filter--modal--body--content_1mjas_87","filter--modal--footer":"_filter--modal--footer_1mjas_96","filter--modal":"_filter--modal_1mjas_79","filter--loading":"_filter--loading_1mjas_176","filter--selected":"_filter--selected_1mjas_206","filter--selected--content":"_filter--selected--content_1mjas_210"},ju=({columns:e=2,CONSTANTS:t,...n})=>{var a;const{filters:s,onToggleFacet:o}=Mt();return r.jsxs("div",{...n,className:We["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>r.jsx(st.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&r.jsx(st.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};ju.displayName="Filter.Item.Content";const Cu=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return r.jsxs("div",{className:We["filter--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h4",{children:e.title}),r.jsx("p",{children:e.subtitle})]}),r.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Cu.displayName="Filter.Empty";const Su=({columns:e,facet:t,onToggleFacet:n,CONSTANTS:s,...o})=>{const a=vu({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return r.jsx(st.Colors,{onToggleFacet:n,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return r.jsx(st.Sizes,{onToggleFacet:n,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return r.jsx(st.Toggle,{columns:e,facetKey:t.key,onToggleFacet:n,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?r.jsx(st.Price,{facet:t}):r.jsx("p",{children:"Filter not support!!!"})};return r.jsx("div",{...o,className:We["filter--item"],style:{order:a},children:r.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[r.jsx(d.Accordion.Header,{id:t.key,closeIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:r.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h4",{className:"typography-style-body-sm",children:yu({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),r.jsx(d.Accordion.Body,{children:i()})]})})};Su.displayName="Filter.Item";const Eu=({onToggleFacet:e,values:t,PLP_FILTERS:n,PLP_FILTERS_COLORS:s,...o})=>r.jsx(Qe.Root,{...o,children:r.jsx(Qe.List,{children:Array.isArray(t)&&t.map(({key:a,selected:i,value:c})=>r.jsx(Qe.Option,{active:i,"data-color":zs({key:a,PLP_FILTERS:n}),fill:Fs({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:a,value:c}),type:"color"},`${a}-${c}`))})});Eu.displayName="Filter.Item.Color";const Pu=({facet:e,...t})=>{var u,m;const{filters:{selected:n},price:s,onToggleFacet:o}=Mt(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=n==null?void 0:n.find(({key:h})=>h==="price"))==null?void 0:u.value)==null?void 0:m.split(":").map(Number))??[a,i];return r.jsx("div",{...t,className:We["filter--item--price"],children:r.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:h=>{var p,f;h&&o({key:"price",value:`${(p=h.range)==null?void 0:p.min}:${(f=h.range)==null?void 0:f.max}`})},children:[r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-min-value":!0})})}),r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{"data-max-value":!0})})})]})})};Pu.displayName="Filter.Item.Price";const Nu=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:n,...s})=>{const o=[...t].sort((a,i)=>{const c=n.indexOf(a.name),l=n.indexOf(i.name);return c-l});return r.jsx(Qe.Root,{...s,children:r.jsx(Qe.List,{children:Array.isArray(o)&&o.map(({key:a,selected:i,value:c})=>r.jsx(Qe.Option,{active:i,text:c,type:"size",onClick:()=>e({key:a,value:c})},c))})})};Nu.displayName="Filter.Item.Sizes";const Iu=({columns:e,facetKey:t,onToggleFacet:n,values:s,ICONS:o,...a})=>r.jsx("div",{...a,className:We["filter--item--toggle"],children:r.jsx("div",{className:We["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>r.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:r.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>n(i)},i.value))})});Iu.displayName="Filter.Item.Toggle";const wu=({...e})=>{const{isLoading:t}=Mt();return r.jsx("div",{className:We["filter--loading"],"data-active":t,...e,children:r.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};wu.displayName="Filter.Loading";const Ru=({children:e,className:t,isMobile:n=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var m;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Mt();return r.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(We["filter--modal"],t),isMobile:n??!1,isOpen:c,parent:l,setIsOpen:u,variant:n?"sideBottom":"sideRight",style:{zIndex:99},children:[r.jsxs(d.Modal.Header,{navigation:"top",children:[r.jsx(d.Modal.Controls,{navigation:"top",isMobile:n,children:r.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),r.jsx(d.Modal.Title,{navigation:"top",title:s})]}),r.jsxs(d.Modal.Body,{style:{width:500},children:[r.jsx("div",{className:We["filter--modal--body"],children:e}),r.jsx(st.Loading,{})]}),r.jsx(d.Modal.Footer,{children:r.jsxs("div",{className:We["filter--modal--footer"],children:[r.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),r.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Ru.displayName="Filter.Modal";const Au=({children:e,className:t,isMobile:n,CONSTANTS:s,...o})=>r.jsx(sc,{...o,PLP_FILTERS:s.PLP_FILTERS,children:r.jsx(st.Modal,{className:t,isMobile:n,CONSTANTS:s,children:e})});Au.displayName="Filter.Root";const Tu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:n})=>{const{filters:s,onToggleFacet:o}=Mt();return r.jsx("div",{className:We["filter--selected"],children:r.jsx("div",{className:We["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:r.jsx(d.Tag,{title:a==="price"?es({value:i}):i,adornment:{end:r.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:Fs({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:zs({key:a,PLP_FILTERS:n}),size:"medium",variant:"primary",children:a==="price"?es({value:i}):i},i))})})};Tu.displayName="Filter.Selected";const st={Colors:Eu,Content:ju,Empty:Cu,Modal:Ru,Item:Su,Root:Au,Loading:wu,Selected:Tu,Price:Pu,Sizes:Nu,Toggle:Iu},{checkedColor:i_,createTagPrice:Go,getColor:c_}=bu,Ou=({callback:e,facet:t})=>{const{ICONS:n,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}=Me();return r.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?Go({value:t.value}):t.value.toUpperCase(),adornment:{end:r.jsx(d.Icon,{name:n.close,size:"x-small"})},colorSquare:c_({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:i_({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Go({value:t.value}):t.value.toUpperCase()})};Ou.displayName="PLPNavigation.Selected.Item";const Lu=()=>r.jsx(d.TextStructure.Root,{children:r.jsx("p",{id:"pdc-navigation--total"})});Lu.displayName="PLPNavigation.Total";const dt={BreadCrumb:du,Content:mu,Filters:hu,Root:_u,Selected:gu,SelectedItem:Ou,Total:Lu},l_="_footer__bottom_198g6_2",u_="_footer__wrapper_198g6_10",d_="_footer__main_198g6_39",m_="_footer__legalInformation_198g6_55",p_="_footer__column_198g6_77",f_="_footer__columnContent_198g6_87",h_="_footer__item_198g6_91",__="_footer__itemLink_198g6_107",g_="_footer__columnTitle_198g6_122",y_="_footer__columnTitleIcon_198g6_134",v_="_footer__iconList_198g6_147",x_="_footer__itemSmallText_198g6_157",b_="_payment_198g6_168",j_="_footer__iconContainer_198g6_173",C_="_footer__iconListSubHeader_198g6_178",S_="_accordionWrapper_198g6_200",E_="_accordionHeader_198g6_204",P_="_accordionTextWrapper_198g6_208",de={footer__bottom:l_,footer__wrapper:u_,footer__main:d_,footer__legalInformation:m_,footer__column:p_,footer__columnContent:f_,footer__item:h_,footer__itemLink:__,footer__columnTitle:g_,footer__columnTitleIcon:y_,footer__iconList:v_,footer__itemSmallText:x_,payment:b_,footer__iconContainer:j_,footer__iconListSubHeader:C_,accordionWrapper:S_,accordionHeader:E_,accordionTextWrapper:P_,"footer--stamps":"_footer--stamps_198g6_247","footer--stamps--company":"_footer--stamps--company_198g6_254","support-container":"_support-container_198g6_258","support-section":"_support-section_198g6_277","support-text":"_support-text_198g6_319","support-items":"_support-items_198g6_329","support-item":"_support-item_198g6_329"};var ku={},Bs={},Vn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=n=>{};if(process.env.NODE_ENV!=="production"){const n=new Set;t=s=>{n.has(s)||console.warn(s),n.add(s)}}})(Vn);var Mu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(n){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=n;const u=20,m=a?a*40:s,h=i?i*40:o,p=m&&h?"viewBox='0 0 "+m+" "+h+"'":"",f=p?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+p+"%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"}})(Mu);var Wn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,a){for(var i in a)Object.defineProperty(o,i,{enumerable:!0,get:a[i]})}t(e,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return s}});const n=["default","imgix","cloudinary","akamai","custom"],s={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",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(Wn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return f}});const t=Vn,n=Mu,s=Wn,o=["lazy","eager",void 0];function a(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(a(_)||i(_))}const l=new Map;let u;function m(_){return typeof _>"u"?_:typeof _=="number"?Number.isFinite(_)?_:NaN:typeof _=="string"&&/^[0-9]+$/.test(_)?parseInt(_,10):NaN}function h(_,y,v){let{deviceSizes:b,allSizes:C}=_;if(v){const x=/(^|\s)(1?\d?\d)vw/g,P=[];for(let S;S=x.exec(v);S)P.push(parseInt(S[2]));if(P.length){const S=Math.min(...P)*.01;return{widths:C.filter(E=>E>=b[0]*S),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:b,kind:"w"}:{widths:[...new Set([y,y*2].map(x=>C.find(P=>P>=x)||C[C.length-1]))],kind:"x"}}function p(_){let{config:y,src:v,unoptimized:b,width:C,quality:j,sizes:x,loader:P}=_;if(b)return{src:v,srcSet:void 0,sizes:void 0};const{widths:S,kind:E}=h(y,C,x),I=S.length-1;return{sizes:!x&&E==="w"?"100vw":x,srcSet:S.map((A,O)=>P({config:y,src:v,quality:j,width:A})+" "+(E==="w"?A:O+1)+E).join(", "),src:P({config:y,src:v,quality:j,width:S[I]})}}function f(_,y){let{src:v,sizes:b,unoptimized:C=!1,priority:j=!1,loading:x,className:P,quality:S,width:E,height:I,fill:A=!1,style:O,overrideSrc:L,onLoad:M,onLoadingComplete:Q,placeholder:D="empty",blurDataURL:U,fetchPriority:F,decoding:Y="async",layout:G,objectFit:H,objectPosition:Z,lazyBoundary:re,lazyRoot:le,...se}=_;const{imgConf:ie,showAltText:$,blurComplete:J,defaultLoader:w}=y;let W,ae=ie||s.imageConfigDefault;if("allSizes"in ae)W=ae;else{var he;const X=[...ae.deviceSizes,...ae.imageSizes].sort((ee,fe)=>ee-fe),k=ae.deviceSizes.sort((ee,fe)=>ee-fe),B=(he=ae.qualities)==null?void 0:he.sort((ee,fe)=>ee-fe);W={...ae,allSizes:X,deviceSizes:k,qualities:B}}if(typeof w>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
5
5
|
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let N=se.loader||w;delete se.loader,delete se.srcSet;const R="__next_img_default"in N;if(R){if(W.loader==="custom")throw new Error('Image with src "'+v+`" is missing "loader" prop.
|
|
6
6
|
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const X=N;N=k=>{const{config:B,...ee}=k;return X(ee)}}if(G){G==="fill"&&(A=!0);const X={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},k={responsive:"100vw",fill:"100vw"},B=X[G];B&&(O={...O,...B});const ee=k[G];ee&&!b&&(b=ee)}let Ne="",q=m(E),K=m(I),_e,we;if(c(v)){const X=a(v)?v.default:v;if(!X.src)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(X));if(!X.height||!X.width)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(X));if(_e=X.blurWidth,we=X.blurHeight,U=U||X.blurDataURL,Ne=X.src,!A){if(!q&&!K)q=X.width,K=X.height;else if(q&&!K){const k=q/X.width;K=Math.round(X.height*k)}else if(!q&&K){const k=K/X.height;q=Math.round(X.width*k)}}}v=typeof v=="string"?v:Ne;let be=!j&&(x==="lazy"||typeof x>"u");(!v||v.startsWith("data:")||v.startsWith("blob:"))&&(C=!0,be=!1),W.unoptimized&&(C=!0),R&&v.endsWith(".svg")&&!W.dangerouslyAllowSVG&&(C=!0),j&&(F="high");const ge=m(S);if(process.env.NODE_ENV!=="production"){if(W.output==="export"&&R&&!C)throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");if(!v)C=!0;else if(A){if(E)throw new Error('Image with src "'+v+'" has both "width" and "fill" properties. Only one should be used.');if(I)throw new Error('Image with src "'+v+'" has both "height" and "fill" properties. Only one should be used.');if(O!=null&&O.position&&O.position!=="absolute")throw new Error('Image with src "'+v+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(O!=null&&O.width&&O.width!=="100%")throw new Error('Image with src "'+v+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(O!=null&&O.height&&O.height!=="100%")throw new Error('Image with src "'+v+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof q>"u")throw new Error('Image with src "'+v+'" is missing required "width" property.');if(isNaN(q))throw new Error('Image with src "'+v+'" has invalid "width" property. Expected a numeric value in pixels but received "'+E+'".');if(typeof K>"u")throw new Error('Image with src "'+v+'" is missing required "height" property.');if(isNaN(K))throw new Error('Image with src "'+v+'" has invalid "height" property. Expected a numeric value in pixels but received "'+I+'".')}if(!o.includes(x))throw new Error('Image with src "'+v+'" has invalid "loading" property. Provided "'+x+'" should be one of '+o.map(String).join(",")+".");if(j&&x==="lazy")throw new Error('Image with src "'+v+`" has both "priority" and "loading='lazy'" properties. Only one should be used.`);if(D!=="empty"&&D!=="blur"&&!D.startsWith("data:image/"))throw new Error('Image with src "'+v+'" has invalid "placeholder" property "'+D+'".');if(D!=="empty"&&q&&K&&q*K<1600&&(0,t.warnOnce)('Image with src "'+v+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),D==="blur"&&!U){const X=["jpeg","png","webp","avif"];throw new Error('Image with src "'+v+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
7
7
|
Possible solutions:
|
|
@@ -15,7 +15,7 @@ Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{u.
|
|
|
15
15
|
See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else S.type==="link"&&S.props.rel==="stylesheet"&&(0,h.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+S.props.href+`"). Use Document instead.
|
|
16
16
|
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(S,{key:I})})}function b(j){let{children:x}=j;const P=(0,i.useContext)(l.AmpStateContext),S=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:v,headManager:S,inAmpMode:(0,m.isInAmpMode)(P),children:x})}const C=b;(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)}(_n,_n.exports)),_n.exports}var Tr={},Jo;function A_(){return Jo||(Jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const n=Oe._(g),s=Wn,o=n.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(Tr)),Tr}var Or={},Lr={},kr={exports:{}},ea;function $u(){return ea||(ea=1,(()=>{var e={170:(o,a,i)=>{const c=i(510),l=()=>{if(typeof navigator<"u"&&navigator.platform){const m=navigator.platform.toLowerCase();return m==="win32"||m==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function u(m,h,p=!1){return h&&(h.windows===null||h.windows===void 0)&&(h={...h,windows:l()}),c(m,h,p)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",m="\\/",h="(?=.)",p="[^/]",f=`(?:${m}|$)`,_=`(?:^|${m})`,y=`${c}{1,2}${f}`,v=`(?!${c})`,b=`(?!${_}${y})`,C=`(?!${c}{0,1}${f})`,j=`(?!${y})`,x=`[^.${m}]`,P=`${p}*?`,E={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:m,ONE_CHAR:h,QMARK:p,END_ANCHOR:f,DOTS_SLASH:y,NO_DOT:v,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:x,STAR:P,START_ANCHOR:_,SEP:"/"},I={...E,SLASH_LITERAL:`[${a}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${a}])${c}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`,SEP:"\\"},A={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};o.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:A,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(O){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${O.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(O){return O===!0?I:E}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:m,REGEX_NON_SPECIAL_CHARS:h,REGEX_SPECIAL_CHARS_BACKREF:p,REPLACEMENTS:f}=c,_=(b,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...b,C);b.sort();const j=`[${b.join("-")}]`;try{new RegExp(j)}catch{return b.map(P=>l.escapeRegex(P)).join("..")}return j},y=(b,C)=>`Missing ${b}: "${C}" - use "\\\\${C}" to match literal characters`,v=(b,C)=>{if(typeof b!="string")throw new TypeError("Expected a string");b=f[b]||b;const j={...C},x=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let P=b.length;if(P>x)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${x}`);const S={type:"bos",value:"",output:j.prepend||""},E=[S],I=j.capture?"":"?:",A=c.globChars(j.windows),O=c.extglobChars(A),{DOT_LITERAL:L,PLUS_LITERAL:M,SLASH_LITERAL:Q,ONE_CHAR:D,DOTS_SLASH:U,NO_DOT:F,NO_DOT_SLASH:Y,NO_DOTS_SLASH:G,QMARK:H,QMARK_NO_DOT:Z,STAR:re,START_ANCHOR:le}=A,se=V=>`(${I}(?:(?!${le}${V.dot?U:L}).)*?)`,ie=j.dot?"":F,$=j.dot?H:Z;let J=j.bash===!0?se(j):re;j.capture&&(J=`(${J})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const w={input:b,index:-1,start:0,dot:j.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:E};b=l.removePrefix(b,w),P=b.length;const W=[],ae=[],he=[];let N=S,R;const Ne=()=>w.index===P-1,q=w.peek=(V=1)=>b[w.index+V],K=w.advance=()=>b[++w.index]||"",_e=()=>b.slice(w.index+1),we=(V="",X=0)=>{w.consumed+=V,w.index+=X},be=V=>{w.output+=V.output!=null?V.output:V.value,we(V.value)},ge=()=>{let V=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)K(),w.start++,V++;return V%2===0?!1:(w.negated=!0,w.start++,!0)},Ae=V=>{w[V]++,he.push(V)},je=V=>{w[V]--,he.pop()},z=V=>{if(N.type==="globstar"){const X=w.braces>0&&(V.type==="comma"||V.type==="brace"),k=V.extglob===!0||W.length&&(V.type==="pipe"||V.type==="paren");V.type!=="slash"&&V.type!=="paren"&&!X&&!k&&(w.output=w.output.slice(0,-N.output.length),N.type="star",N.value="*",N.output=J,w.output+=N.output)}if(W.length&&V.type!=="paren"&&(W[W.length-1].inner+=V.value),(V.value||V.output)&&be(V),N&&N.type==="text"&&V.type==="text"){N.output=(N.output||N.value)+V.value,N.value+=V.value;return}V.prev=N,E.push(V),N=V},me=(V,X)=>{const k={...O[X],conditions:1,inner:""};k.prev=N,k.parens=w.parens,k.output=w.output;const B=(j.capture?"(":"")+k.open;Ae("parens"),z({type:V,value:X,output:w.output?"":D}),z({type:"paren",extglob:!0,value:K(),output:B}),W.push(k)},ye=V=>{let X=V.close+(j.capture?")":""),k;if(V.type==="negate"){let B=J;if(V.inner&&V.inner.length>1&&V.inner.includes("/")&&(B=se(j)),(B!==J||Ne()||/^\)+$/.test(_e()))&&(X=V.close=`)$))${B}`),V.inner.includes("*")&&(k=_e())&&/^\.[^\\/.]+$/.test(k)){const ee=v(k,{...C,fastpaths:!1}).output;X=V.close=`)${ee})${B})`}V.prev.type==="bos"&&(w.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:R,output:X}),je("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(b)){let V=!1,X=b.replace(p,(k,B,ee,fe,Pe,Yn)=>fe==="\\"?(V=!0,k):fe==="?"?B?B+fe+(Pe?H.repeat(Pe.length):""):Yn===0?$+(Pe?H.repeat(Pe.length):""):H.repeat(ee.length):fe==="."?L.repeat(ee.length):fe==="*"?B?B+fe+(Pe?J:""):J:B?k:`\\${k}`);return V===!0&&(j.unescape===!0?X=X.replace(/\\/g,""):X=X.replace(/\\+/g,k=>k.length%2===0?"\\\\":k?"\\":"")),X===b&&j.contains===!0?(w.output=b,w):(w.output=l.wrapOutput(X,w,C),w)}for(;!Ne();){if(R=K(),R==="\0")continue;if(R==="\\"){const k=q();if(k==="/"&&j.bash!==!0||k==="."||k===";")continue;if(!k){R+="\\",z({type:"text",value:R});continue}const B=/^\\+/.exec(_e());let ee=0;if(B&&B[0].length>2&&(ee=B[0].length,w.index+=ee,ee%2!==0&&(R+="\\")),j.unescape===!0?R=K():R+=K(),w.brackets===0){z({type:"text",value:R});continue}}if(w.brackets>0&&(R!=="]"||N.value==="["||N.value==="[^")){if(j.posix!==!1&&R===":"){const k=N.value.slice(1);if(k.includes("[")&&(N.posix=!0,k.includes(":"))){const B=N.value.lastIndexOf("["),ee=N.value.slice(0,B),fe=N.value.slice(B+2),Pe=m[fe];if(Pe){N.value=ee+Pe,w.backtrack=!0,K(),!S.output&&E.indexOf(N)===1&&(S.output=D);continue}}}(R==="["&&q()!==":"||R==="-"&&q()==="]")&&(R=`\\${R}`),R==="]"&&(N.value==="["||N.value==="[^")&&(R=`\\${R}`),j.posix===!0&&R==="!"&&N.value==="["&&(R="^"),N.value+=R,be({value:R});continue}if(w.quotes===1&&R!=='"'){R=l.escapeRegex(R),N.value+=R,be({value:R});continue}if(R==='"'){w.quotes=w.quotes===1?0:1,j.keepQuotes===!0&&z({type:"text",value:R});continue}if(R==="("){Ae("parens"),z({type:"paren",value:R});continue}if(R===")"){if(w.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const k=W[W.length-1];if(k&&w.parens===k.parens+1){ye(W.pop());continue}z({type:"paren",value:R,output:w.parens?")":"\\)"}),je("parens");continue}if(R==="["){if(j.nobracket===!0||!_e().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));R=`\\${R}`}else Ae("brackets");z({type:"bracket",value:R});continue}if(R==="]"){if(j.nobracket===!0||N&&N.type==="bracket"&&N.value.length===1){z({type:"text",value:R,output:`\\${R}`});continue}if(w.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));z({type:"text",value:R,output:`\\${R}`});continue}je("brackets");const k=N.value.slice(1);if(N.posix!==!0&&k[0]==="^"&&!k.includes("/")&&(R=`/${R}`),N.value+=R,be({value:R}),j.literalBrackets===!1||l.hasRegexChars(k))continue;const B=l.escapeRegex(N.value);if(w.output=w.output.slice(0,-N.value.length),j.literalBrackets===!0){w.output+=B,N.value=B;continue}N.value=`(${I}${B}|${N.value})`,w.output+=N.value;continue}if(R==="{"&&j.nobrace!==!0){Ae("braces");const k={type:"brace",value:R,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};ae.push(k),z(k);continue}if(R==="}"){const k=ae[ae.length-1];if(j.nobrace===!0||!k){z({type:"text",value:R,output:R});continue}let B=")";if(k.dots===!0){const ee=E.slice(),fe=[];for(let Pe=ee.length-1;Pe>=0&&(E.pop(),ee[Pe].type!=="brace");Pe--)ee[Pe].type!=="dots"&&fe.unshift(ee[Pe].value);B=_(fe,j),w.backtrack=!0}if(k.comma!==!0&&k.dots!==!0){const ee=w.output.slice(0,k.outputIndex),fe=w.tokens.slice(k.tokensIndex);k.value=k.output="\\{",R=B="\\}",w.output=ee;for(const Pe of fe)w.output+=Pe.output||Pe.value}z({type:"brace",value:R,output:B}),je("braces"),ae.pop();continue}if(R==="|"){W.length>0&&W[W.length-1].conditions++,z({type:"text",value:R});continue}if(R===","){let k=R;const B=ae[ae.length-1];B&&he[he.length-1]==="braces"&&(B.comma=!0,k="|"),z({type:"comma",value:R,output:k});continue}if(R==="/"){if(N.type==="dot"&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",E.pop(),N=S;continue}z({type:"slash",value:R,output:Q});continue}if(R==="."){if(w.braces>0&&N.type==="dot"){N.value==="."&&(N.output=L);const k=ae[ae.length-1];N.type="dots",N.output+=R,N.value+=R,k.dots=!0;continue}if(w.braces+w.parens===0&&N.type!=="bos"&&N.type!=="slash"){z({type:"text",value:R,output:L});continue}z({type:"dot",value:R,output:L});continue}if(R==="?"){if(!(N&&N.value==="(")&&j.noextglob!==!0&&q()==="("&&q(2)!=="?"){me("qmark",R);continue}if(N&&N.type==="paren"){const B=q();let ee=R;(N.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(_e()))&&(ee=`\\${R}`),z({type:"text",value:R,output:ee});continue}if(j.dot!==!0&&(N.type==="slash"||N.type==="bos")){z({type:"qmark",value:R,output:Z});continue}z({type:"qmark",value:R,output:H});continue}if(R==="!"){if(j.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){me("negate",R);continue}if(j.nonegate!==!0&&w.index===0){ge();continue}}if(R==="+"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){me("plus",R);continue}if(N&&N.value==="("||j.regex===!1){z({type:"plus",value:R,output:M});continue}if(N&&(N.type==="bracket"||N.type==="paren"||N.type==="brace")||w.parens>0){z({type:"plus",value:R});continue}z({type:"plus",value:M});continue}if(R==="@"){if(j.noextglob!==!0&&q()==="("&&q(2)!=="?"){z({type:"at",extglob:!0,value:R,output:""});continue}z({type:"text",value:R});continue}if(R!=="*"){(R==="$"||R==="^")&&(R=`\\${R}`);const k=h.exec(_e());k&&(R+=k[0],w.index+=k[0].length),z({type:"text",value:R});continue}if(N&&(N.type==="globstar"||N.star===!0)){N.type="star",N.star=!0,N.value+=R,N.output=J,w.backtrack=!0,w.globstar=!0,we(R);continue}let V=_e();if(j.noextglob!==!0&&/^\([^?]/.test(V)){me("star",R);continue}if(N.type==="star"){if(j.noglobstar===!0){we(R);continue}const k=N.prev,B=k.prev,ee=k.type==="slash"||k.type==="bos",fe=B&&(B.type==="star"||B.type==="globstar");if(j.bash===!0&&(!ee||V[0]&&V[0]!=="/")){z({type:"star",value:R,output:""});continue}const Pe=w.braces>0&&(k.type==="comma"||k.type==="brace"),Yn=W.length&&(k.type==="pipe"||k.type==="paren");if(!ee&&k.type!=="paren"&&!Pe&&!Yn){z({type:"star",value:R,output:""});continue}for(;V.slice(0,3)==="/**";){const en=b[w.index+4];if(en&&en!=="/")break;V=V.slice(3),we("/**",3)}if(k.type==="bos"&&Ne()){N.type="globstar",N.value+=R,N.output=se(j),w.output=N.output,w.globstar=!0,we(R);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&!fe&&Ne()){w.output=w.output.slice(0,-(k.output+N.output).length),k.output=`(?:${k.output}`,N.type="globstar",N.output=se(j)+(j.strictSlashes?")":"|$)"),N.value+=R,w.globstar=!0,w.output+=k.output+N.output,we(R);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&V[0]==="/"){const en=V[1]!==void 0?"|$":"";w.output=w.output.slice(0,-(k.output+N.output).length),k.output=`(?:${k.output}`,N.type="globstar",N.output=`${se(j)}${Q}|${Q}${en})`,N.value+=R,w.output+=k.output+N.output,w.globstar=!0,we(R+K()),z({type:"slash",value:"/",output:""});continue}if(k.type==="bos"&&V[0]==="/"){N.type="globstar",N.value+=R,N.output=`(?:^|${Q}|${se(j)}${Q})`,w.output=N.output,w.globstar=!0,we(R+K()),z({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-N.output.length),N.type="globstar",N.output=se(j),N.value+=R,w.output+=N.output,w.globstar=!0,we(R);continue}const X={type:"star",value:R,output:J};if(j.bash===!0){X.output=".*?",(N.type==="bos"||N.type==="slash")&&(X.output=ie+X.output),z(X);continue}if(N&&(N.type==="bracket"||N.type==="paren")&&j.regex===!0){X.output=R,z(X);continue}(w.index===w.start||N.type==="slash"||N.type==="dot")&&(N.type==="dot"?(w.output+=Y,N.output+=Y):j.dot===!0?(w.output+=G,N.output+=G):(w.output+=ie,N.output+=ie),q()!=="*"&&(w.output+=D,N.output+=D)),z(X)}for(;w.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));w.output=l.escapeLast(w.output,"["),je("brackets")}for(;w.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));w.output=l.escapeLast(w.output,"("),je("parens")}for(;w.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));w.output=l.escapeLast(w.output,"{"),je("braces")}if(j.strictSlashes!==!0&&(N.type==="star"||N.type==="bracket")&&z({type:"maybe_slash",value:"",output:`${Q}?`}),w.backtrack===!0){w.output="";for(const V of w.tokens)w.output+=V.output!=null?V.output:V.value,V.suffix&&(w.output+=V.suffix)}return w};v.fastpaths=(b,C)=>{const j={...C},x=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,P=b.length;if(P>x)throw new SyntaxError(`Input length: ${P}, exceeds maximum allowed length: ${x}`);b=f[b]||b;const{DOT_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:I,DOTS_SLASH:A,NO_DOT:O,NO_DOTS:L,NO_DOTS_SLASH:M,STAR:Q,START_ANCHOR:D}=c.globChars(j.windows),U=j.dot?L:O,F=j.dot?M:O,Y=j.capture?"":"?:",G={negated:!1,prefix:""};let H=j.bash===!0?".*?":Q;j.capture&&(H=`(${H})`);const Z=ie=>ie.noglobstar===!0?H:`(${Y}(?:(?!${D}${ie.dot?A:S}).)*?)`,re=ie=>{switch(ie){case"*":return`${U}${I}${H}`;case".*":return`${S}${I}${H}`;case"*.*":return`${U}${H}${S}${I}${H}`;case"*/*":return`${U}${H}${E}${I}${F}${H}`;case"**":return U+Z(j);case"**/*":return`(?:${U}${Z(j)}${E})?${F}${I}${H}`;case"**/*.*":return`(?:${U}${Z(j)}${E})?${F}${H}${S}${I}${H}`;case"**/.*":return`(?:${U}${Z(j)}${E})?${S}${I}${H}`;default:{const $=/^(.*?)\.(\w+)$/.exec(ie);if(!$)return;const J=re($[1]);return J?J+S+$[2]:void 0}}},le=l.removePrefix(b,G);let se=re(le);return se&&j.strictSlashes!==!0&&(se+=`${E}?`),se},o.exports=v},510:(o,a,i)=>{const c=i(716),l=i(697),u=i(96),m=i(154),h=f=>f&&typeof f=="object"&&!Array.isArray(f),p=(f,_,y=!1)=>{if(Array.isArray(f)){const E=f.map(A=>p(A,_,y));return A=>{for(const O of E){const L=O(A);if(L)return L}return!1}}const v=h(f)&&f.tokens&&f.input;if(f===""||typeof f!="string"&&!v)throw new TypeError("Expected pattern to be a non-empty string");const b=_||{},C=b.windows,j=v?p.compileRe(f,_):p.makeRe(f,_,!1,!0),x=j.state;delete j.state;let P=()=>!1;if(b.ignore){const E={..._,ignore:null,onMatch:null,onResult:null};P=p(b.ignore,E,y)}const S=(E,I=!1)=>{const{isMatch:A,match:O,output:L}=p.test(E,j,_,{glob:f,posix:C}),M={glob:f,state:x,regex:j,posix:C,input:E,output:L,match:O,isMatch:A};return typeof b.onResult=="function"&&b.onResult(M),A===!1?(M.isMatch=!1,I?M:!1):P(E)?(typeof b.onIgnore=="function"&&b.onIgnore(M),M.isMatch=!1,I?M:!1):(typeof b.onMatch=="function"&&b.onMatch(M),I?M:!0)};return y&&(S.state=x),S};p.test=(f,_,y,{glob:v,posix:b}={})=>{if(typeof f!="string")throw new TypeError("Expected input to be a string");if(f==="")return{isMatch:!1,output:""};const C=y||{},j=C.format||(b?u.toPosixSlashes:null);let x=f===v,P=x&&j?j(f):f;return x===!1&&(P=j?j(f):f,x=P===v),(x===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?x=p.matchBase(f,_,y,b):x=_.exec(P)),{isMatch:!!x,match:x,output:P}},p.matchBase=(f,_,y)=>(_ instanceof RegExp?_:p.makeRe(_,y)).test(u.basename(f)),p.isMatch=(f,_,y)=>p(_,y)(f),p.parse=(f,_)=>Array.isArray(f)?f.map(y=>p.parse(y,_)):l(f,{..._,fastpaths:!1}),p.scan=(f,_)=>c(f,_),p.compileRe=(f,_,y=!1,v=!1)=>{if(y===!0)return f.output;const b=_||{},C=b.contains?"":"^",j=b.contains?"":"$";let x=`${C}(?:${f.output})${j}`;f&&f.negated===!0&&(x=`^(?!${x}).*$`);const P=p.toRegex(x,_);return v===!0&&(P.state=f),P},p.makeRe=(f,_={},y=!1,v=!1)=>{if(!f||typeof f!="string")throw new TypeError("Expected a non-empty string");let b={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(f[0]==="."||f[0]==="*")&&(b.output=l.fastpaths(f,_)),b.output||(b=l(f,_)),p.compileRe(b,_,y,v)},p.toRegex=(f,_)=>{try{const y=_||{};return new RegExp(f,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},p.constants=m,o.exports=p},716:(o,a,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:m,CHAR_COMMA:h,CHAR_DOT:p,CHAR_EXCLAMATION_MARK:f,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:v,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:x,CHAR_RIGHT_PARENTHESES:P,CHAR_RIGHT_SQUARE_BRACKET:S}=i(154),E=O=>O===_||O===m,I=O=>{O.isPrefix!==!0&&(O.depth=O.isGlobstar?1/0:1)},A=(O,L)=>{const M=L||{},Q=O.length-1,D=M.parts===!0||M.scanToEnd===!0,U=[],F=[],Y=[];let G=O,H=-1,Z=0,re=0,le=!1,se=!1,ie=!1,$=!1,J=!1,w=!1,W=!1,ae=!1,he=!1,N=!1,R=0,Ne,q,K={value:"",depth:0,isGlob:!1};const _e=()=>H>=Q,we=()=>G.charCodeAt(H+1),be=()=>(Ne=q,G.charCodeAt(++H));for(;H<Q;){q=be();let me;if(q===m){W=K.backslashes=!0,q=be(),q===y&&(w=!0);continue}if(w===!0||q===y){for(R++;_e()!==!0&&(q=be());){if(q===m){W=K.backslashes=!0,be();continue}if(q===y){R++;continue}if(w!==!0&&q===p&&(q=be())===p){if(le=K.isBrace=!0,ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(w!==!0&&q===h){if(le=K.isBrace=!0,ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===x&&(R--,R===0)){w=!1,le=K.isBrace=!0,N=!0;break}}if(D===!0)continue;break}if(q===_){if(U.push(H),F.push(K),K={value:"",depth:0,isGlob:!1},N===!0)continue;if(Ne===p&&H===Z+1){Z+=2;continue}re=H+1;continue}if(M.noext!==!0&&(q===C||q===u||q===l||q===j||q===f)===!0&&we()===v){if(ie=K.isGlob=!0,$=K.isExtglob=!0,N=!0,q===f&&H===Z&&(he=!0),D===!0){for(;_e()!==!0&&(q=be());){if(q===m){W=K.backslashes=!0,q=be();continue}if(q===P){ie=K.isGlob=!0,N=!0;break}}continue}break}if(q===l){if(Ne===l&&(J=K.isGlobstar=!0),ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===j){if(ie=K.isGlob=!0,N=!0,D===!0)continue;break}if(q===b){for(;_e()!==!0&&(me=be());){if(me===m){W=K.backslashes=!0,be();continue}if(me===S){se=K.isBracket=!0,ie=K.isGlob=!0,N=!0;break}}if(D===!0)continue;break}if(M.nonegate!==!0&&q===f&&H===Z){ae=K.negated=!0,Z++;continue}if(M.noparen!==!0&&q===v){if(ie=K.isGlob=!0,D===!0){for(;_e()!==!0&&(q=be());){if(q===v){W=K.backslashes=!0,q=be();continue}if(q===P){N=!0;break}}continue}break}if(ie===!0){if(N=!0,D===!0)continue;break}}M.noext===!0&&($=!1,ie=!1);let ge=G,Ae="",je="";Z>0&&(Ae=G.slice(0,Z),G=G.slice(Z),re-=Z),ge&&ie===!0&&re>0?(ge=G.slice(0,re),je=G.slice(re)):ie===!0?(ge="",je=G):ge=G,ge&&ge!==""&&ge!=="/"&&ge!==G&&E(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),M.unescape===!0&&(je&&(je=c.removeBackslashes(je)),ge&&W===!0&&(ge=c.removeBackslashes(ge)));const z={prefix:Ae,input:O,start:Z,base:ge,glob:je,isBrace:le,isBracket:se,isGlob:ie,isExtglob:$,isGlobstar:J,negated:ae,negatedExtglob:he};if(M.tokens===!0&&(z.maxDepth=0,E(q)||F.push(K),z.tokens=F),M.parts===!0||M.tokens===!0){let me;for(let ye=0;ye<U.length;ye++){const V=me?me+1:Z,X=U[ye],k=O.slice(V,X);M.tokens&&(ye===0&&Z!==0?(F[ye].isPrefix=!0,F[ye].value=Ae):F[ye].value=k,I(F[ye]),z.maxDepth+=F[ye].depth),(ye!==0||k!=="")&&Y.push(k),me=X}if(me&&me+1<O.length){const ye=O.slice(me+1);Y.push(ye),M.tokens&&(F[F.length-1].value=ye,I(F[F.length-1]),z.maxDepth+=F[F.length-1].depth)}z.slashes=U,z.parts=Y}return z};o.exports=A},96:(o,a,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:m}=i(154);a.isObject=h=>h!==null&&typeof h=="object"&&!Array.isArray(h),a.hasRegexChars=h=>u.test(h),a.isRegexChar=h=>h.length===1&&a.hasRegexChars(h),a.escapeRegex=h=>h.replace(m,"\\$1"),a.toPosixSlashes=h=>h.replace(c,"/"),a.removeBackslashes=h=>h.replace(l,p=>p==="\\"?"":p),a.escapeLast=(h,p,f)=>{const _=h.lastIndexOf(p,f);return _===-1?h:h[_-1]==="\\"?a.escapeLast(h,p,_-1):`${h.slice(0,_)}\\${h.slice(_)}`},a.removePrefix=(h,p={})=>{let f=h;return f.startsWith("./")&&(f=f.slice(2),p.prefix="./"),f},a.wrapOutput=(h,p={},f={})=>{const _=f.contains?"":"^",y=f.contains?"":"$";let v=`${_}(?:${h})${y}`;return p.negated===!0&&(v=`(?:^(?!${v}).*$)`),v},a.basename=(h,{windows:p}={})=>{const f=h.split(p?/[\\/]/:"/"),_=f[f.length-1];return _===""?f[f.length-2]:_}}},t={};function n(o){var a=t[o];if(a!==void 0)return a.exports;var i=t[o]={exports:{}},c=!0;try{e[o](i,i.exports,n),c=!1}finally{c&&delete t[o]}return i.exports}typeof n<"u"&&(n.ab=__dirname+"/");var s=n(170);kr.exports=s})()),kr.exports}var ta;function T_(){return ta||(ta=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return s}});const n=$u();function s(a,i){if(a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i){if(!a)return!0;const c=new URL(i,"http://n");return a.some(l=>s(l,c))}}(Lr)),Lr}var Mr={},na;function O_(){return na||(na=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}t(e,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return s}});const n=$u();function s(a,i){if(a.protocol!==void 0){const l=i.protocol.slice(0,-1);if(a.protocol!==l)return!1}if(a.port!==void 0&&a.port!==i.port)return!1;if(a.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
17
|
`+JSON.stringify(a));if(!(0,n.makeRe)(a.hostname).test(i.hostname)||a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,n.makeRe)((c=a.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function o(a,i,c){return a.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(Mr)),Mr}var ra;function zu(){return ra||(ra=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function n(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const h=[];if(i||h.push("src"),c||h.push("width"),h.length>0)throw new Error("Next Image Optimization requires "+h.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:i,width:c,quality:l}));if(i.startsWith("//"))throw new Error('Failed to parse src "'+i+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(i.startsWith("/")&&a.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:p}=T_();if(!p(a.localPatterns,i))throw new Error("Invalid src prop ("+i+") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns")}if(!i.startsWith("/")&&(a.domains||a.remotePatterns)){let p;try{p=new URL(i)}catch(f){throw console.error(f),new Error('Failed to parse src "'+i+'" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)')}if(process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasRemoteMatch:f}=O_();if(!f(a.domains,a.remotePatterns,p))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+p.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(l&&a.qualities&&!a.qualities.includes(l))throw new Error("Invalid quality prop ("+l+") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities")}const m=l||((u=a.qualities)==null?void 0:u.reduce((h,p)=>Math.abs(p-t)<Math.abs(h-t)?p:h))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+m+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}n.__next_img_default=!0;const s=n}(Or)),Or}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const n=Oe,s=Dn(),o=r,a=s._(g),i=n._(ls),c=n._(R_()),l=Bs,u=Wn,m=A_(),h=Vn,p=kc(),f=n._(zu()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(x,P,S,E,I,A,O){const L=x==null?void 0:x.src;if(!x||x["data-loaded-src"]===L)return;x["data-loaded-src"]=L,("decode"in x?x.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!x.parentElement||!x.isConnected)){if(P!=="empty"&&I(!0),S!=null&&S.current){const Q=new Event("load");Object.defineProperty(Q,"target",{writable:!1,value:x});let D=!1,U=!1;S.current({...Q,nativeEvent:Q,currentTarget:x,target:x,isDefaultPrevented:()=>D,isPropagationStopped:()=>U,persist:()=>{},preventDefault:()=>{D=!0,Q.preventDefault()},stopPropagation:()=>{U=!0,Q.stopPropagation()}})}if(E!=null&&E.current&&E.current(x),process.env.NODE_ENV!=="production"){const Q=new URL(L,"http://n").searchParams.get("url")||L;if(x.getAttribute("data-nimg")==="fill"){if(!A&&(!O||O==="100vw")&&x.getBoundingClientRect().width/window.innerWidth<.6&&(O==="100vw"?(0,h.warnOnce)('Image with src "'+Q+'" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes'):(0,h.warnOnce)('Image with src "'+Q+'" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes')),x.parentElement){const{position:F}=window.getComputedStyle(x.parentElement),Y=["absolute","fixed","relative"];Y.includes(F)||(0,h.warnOnce)('Image with src "'+Q+'" has "fill" and parent element with invalid "position". Provided "'+F+'" should be one of '+Y.map(String).join(",")+".")}x.height===0&&(0,h.warnOnce)('Image with src "'+Q+'" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.')}const D=x.height.toString()!==x.getAttribute("height"),U=x.width.toString()!==x.getAttribute("width");(D&&!U||!D&&U)&&(0,h.warnOnce)('Image with src "'+Q+`" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`)}}})}function v(x){return a.use?{fetchPriority:x}:{fetchpriority:x}}const b=(0,a.forwardRef)((x,P)=>{let{src:S,srcSet:E,sizes:I,height:A,width:O,decoding:L,className:M,style:Q,fetchPriority:D,placeholder:U,loading:F,unoptimized:Y,fill:G,onLoadRef:H,onLoadingCompleteRef:Z,setBlurComplete:re,setShowAltText:le,sizesInput:se,onLoad:ie,onError:$,...J}=x;return(0,o.jsx)("img",{...J,...v(D),loading:F,width:O,height:A,decoding:L,"data-nimg":G?"fill":"1",className:M,style:Q,sizes:I,srcSet:E,src:S,ref:(0,a.useCallback)(w=>{P&&(typeof P=="function"?P(w):typeof P=="object"&&(P.current=w)),w&&($&&(w.src=w.src),process.env.NODE_ENV!=="production"&&(S||console.error('Image is missing required "src" property:',w),w.getAttribute("alt")===null&&console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.')),w.complete&&y(w,U,H,Z,re,Y,se))},[S,U,H,Z,re,$,Y,se,P]),onLoad:w=>{const W=w.currentTarget;y(W,U,H,Z,re,Y,se)},onError:w=>{le(!0),U!=="empty"&&re(!0),$&&$(w)}})});function C(x){let{isAppRouter:P,imgAttributes:S}=x;const E={as:"image",imageSrcSet:S.srcSet,imageSizes:S.sizes,crossOrigin:S.crossOrigin,referrerPolicy:S.referrerPolicy,...v(S.fetchPriority)};return P&&i.default.preload?(i.default.preload(S.src,E),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:S.srcSet?void 0:S.src,...E},"__nimg-"+S.src+S.srcSet+S.sizes)})}const j=(0,a.forwardRef)((x,P)=>{const E=!(0,a.useContext)(p.RouterContext),I=(0,a.useContext)(m.ImageConfigContext),A=(0,a.useMemo)(()=>{var Z;const re=_||I||u.imageConfigDefault,le=[...re.deviceSizes,...re.imageSizes].sort(($,J)=>$-J),se=re.deviceSizes.sort(($,J)=>$-J),ie=(Z=re.qualities)==null?void 0:Z.sort(($,J)=>$-J);return{...re,allSizes:le,deviceSizes:se,qualities:ie}},[I]),{onLoad:O,onLoadingComplete:L}=x,M=(0,a.useRef)(O);(0,a.useEffect)(()=>{M.current=O},[O]);const Q=(0,a.useRef)(L);(0,a.useEffect)(()=>{Q.current=L},[L]);const[D,U]=(0,a.useState)(!1),[F,Y]=(0,a.useState)(!1),{props:G,meta:H}=(0,l.getImgProps)(x,{defaultLoader:f.default,imgConf:A,blurComplete:D,showAltText:F});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{...G,unoptimized:H.unoptimized,placeholder:H.placeholder,fill:H.fill,onLoadRef:M,onLoadingCompleteRef:Q,setBlurComplete:U,setShowAltText:Y,sizesInput:x.sizes,ref:P}),H.priority?(0,o.jsx)(C,{isAppRouter:E,imgAttributes:G}):null]})});(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)})(ts,ts.exports);var L_=ts.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}t(e,{default:function(){return c},getImageProps:function(){return i}});const n=Oe,s=Bs,o=L_,a=n._(zu());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[m,h]of Object.entries(u))h===void 0&&delete u[m];return{props:u}}const c=o.Image})(ku);var k_=ku;const Pn=T.getDefaultExportFromCjs(k_),M_=({item:e,CONSTANTS:t})=>{const n=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=n==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?r.jsxs(De,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:de["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Pn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]}):r.jsxs("div",{className:de["support-item"],children:[e.image&&r.jsx("img",{src:e.image,alt:"",loading:"lazy"}),n==="payment"?r.jsx(Pn,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):r.jsx(d.Icon,{size:"small",name:s})]})},D_=({content:e,CONSTANTS:t})=>r.jsx("div",{className:de["support-container"],children:e==null?void 0:e.map((n,s)=>r.jsxs("div",{"data-device":n.device,className:de["support-section"],children:[r.jsxs("div",{className:de["support-text"],children:[n.title&&r.jsx("h3",{children:n.title}),n.description&&r.jsx("p",{children:n.description})]}),Array.isArray(n.items)&&n.items.length&&r.jsx("div",{className:de["support-items"],"data-gap":n.gap,children:n.items.map((o,a)=>r.jsx(M_,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),$_=({name:e,nameIcon:t,maxWidth:n,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,alignItems:a}},children:r.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:de.footer__column,children:[r.jsxs("div",{className:t?de.footer__columnTitleIcon:de.footer__columnTitle,children:[r.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&r.jsx("div",{children:e})]}),r.jsx("div",{className:de.footer__columnContent,style:{maxWidth:`${n}px`},children:l})]})}),z_=({name:e,nameIcon:t,maxWidth:n,children:s,ICONS:o,...a})=>r.jsxs(d.Accordion.Wrapper,{className:de.accordionWrapper,title:"accordion-wrapper",...a,children:[r.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:de.accordionHeader,closeIndicator:r.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:r.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:t?de.accordionTextWrapper:"",children:[r.jsx(d.Icon,{name:`${t}`,size:"medium"}),r.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:de.footer__columnContent,style:{maxWidth:`${n}px`},children:s})})})]}),Dr=e=>{const{isMobile:t}=ne();return t?r.jsx(z_,{...e}):r.jsx($_,{...e})},gn=({type:e,children:t,className:n,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:h,columnAlignContent:p,columnAlignItems:f,textAlignContent:_,textAlignItems:y,...v})=>{let b;const{handleSelectContent:C}=oe(),{nextimage:j}=ce();switch(e){case"menu":b=r.jsx(De,{className:de.footer__itemLink,href:l??"#",prefetch:!1,children:r.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":b=r.jsxs("div",{className:d.helpers.classNameConcat(de.payment,de.footer__itemSmallText),...v,children:[u,r.jsxs("div",{className:d.helpers.classNameConcat(de.footer__iconContainer,de.footer__iconListSubHeader),children:[m,r.jsx("div",{className:de.footer__iconList,children:a==null?void 0:a.map((x,P)=>r.jsx(j,{alt:x,src:`/assets/${x}.svg`,width:c??20,height:c??20},P))})]})]});break;case"social-media":b=r.jsx("div",{className:de.footer__iconContainer,...v,children:r.jsx("div",{className:de.footer__iconList,children:i==null?void 0:i.map((x,P)=>r.jsx(De,{prefetch:!1,href:x.link??"#",target:"_blank",children:r.jsx(d.Icon,{size:"medium",name:x.icon,onClick:()=>C({content:`footer:redes-sociais:${x.icon}`})})},P))})});break;default:b=r.jsx("div",{className:n,...v,children:t})}return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:h,alignItems:h},columnWrapper:{alignContent:p,alignItems:f}},...v,children:r.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(de.footer__item,n),children:b})})},F_=({className:e,text:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(de.footer__legalInformation,e),children:r.jsx("span",{children:t})}),Fu=()=>{const{nextimage:e}=ce();return r.jsx("div",{className:de["footer--stamps"],children:r.jsx(e,{alt:"Empresa B",className:de["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Fu.displayName="Footer.Stamps";const Bu=({children:e,legalTextSlot:t,adornment:n,className:s,...o})=>{const{isMobile:a}=ne(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return r.jsxs("div",{className:de.footer__main,children:[(n==null?void 0:n.top)&&r.jsx("div",{className:de.footer__top,children:n==null?void 0:n.top}),c>0&&r.jsx("div",{...o,className:d.helpers.classNameConcat(de.footer__wrapper,s),children:i.map((l,u)=>r.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(n==null?void 0:n.bottom)&&r.jsx("div",{className:de.footer__bottom,children:n.bottom}),t&&r.jsx("div",{className:de.footer__legalText,children:t})]})};Bu.displayName="Footer.Wrapper";const Uu=({data:{links:{links:e}},payments:t,socialInfo:n,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return r.jsxs(Bu,{className:c,adornment:o,legalTextSlot:r.jsx(F_,{text:a}),children:[Array.isArray(e.column)&&e.column.map((m,h)=>r.jsx(Dr,{id:`${h}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((p,f)=>r.jsx(gn,{type:"menu",link:p.link,collumnName:m.name,collumnNameIcon:m.nameIcon,children:p.text},f))},h)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&r.jsx(Dr,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:r.jsx(gn,{type:"payment",paymentDisclaimer:t==null?void 0:t.text,paymentTitle:t==null?void 0:t.flagsTitle,iconSize:16,icons:t==null?void 0:t.acceptedFlags})}),r.jsxs(Dr,{id:"social-media-column",name:n==null?void 0:n.title,ICONS:i,children:[n!=null&&n.subTitle?r.jsx(gn,{children:n==null?void 0:n.subTitle}):null,r.jsx(gn,{type:"social-media",iconSize:24,iconLink:s}),l&&r.jsx(Fu,{})]})]})};Uu.displayName="Footer";const B_=Object.freeze(Object.defineProperty({__proto__:null,Footer:Uu,FooterSupport:D_},Symbol.toStringTag,{value:"Module"})),U_=()=>{const{colorName:e}=Le();return r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":T.styles["accessibility-info"],children:r.jsx("p",{children:e})})})},Gn=({className:e,titleId:t})=>{var o,a,i;const{productName:n,tag:s}=Le();return r.jsxs("div",{className:d.helpers.classNameConcat(T.styles.header,e),children:[s!=null&&s.commercial?r.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?r.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h1",{id:t,children:n})})})]})};Gn.displayName="PDP.PDPHeader";const Us=({layout:e="horizontal"})=>{const{price:t,listPrice:n,installments:s}=Le(),{count:o,value:a}=s,i=T.formatPriceToCurrency(n??0,!0),c=T.formatPriceToCurrency(t??0,!0),l=T.formatPriceToCurrency(a??0);return r.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:r.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:T.styles["price-wrapper"],children:[r.jsx(d.ProductInfo.ValuesWrapper,{children:t!==n?r.jsxs(r.Fragment,{children:[r.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),r.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):r.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?r.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},ns=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})=>{const o=Kt(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Le(),{isMobile:h}=ne(),{addToCart:p}=xe(),{sendDataLayerEvent:f}=oe(),_=!m&&(!o.sku||!o.available),y=()=>{if(_&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:a}),p({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:a,texture:u==null?void 0:u.imageUrl}),f({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return r.jsx(d.Button,{className:T.styles["add-to-cart"],size:h?(n==null?void 0:n.mobile)??"large":(n==null?void 0:n.desktop)??"x-large",onClick:y,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},H_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:n}=ne(),s=Kt(),{sizesContainerRef:o}=va(),{structureRef:a}=Ee();return s.sku&&s.available?r.jsx(ns,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):r.jsx(d.Button,{className:T.styles["add-to-cart"],size:n?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&a.current&&window.document.body.scrollTo({top:o.current.offsetTop-a.current.offsetHeight,behavior:"smooth"})},children:s.sku&&s.available?t.add_to_cart:t.select_size})},yn=({value:e,label:t,suppressHydrationWarning:n=!1},s)=>{const o={value:e,...n&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return r.jsx(d.Timer.Digit,{...a})},Nn=({dateEnd:e,dateInit:t,type:n="default",TIME_ZONE:s,...o})=>{const[a,i]=g.useState(ic(new Hr.TZDate(Date.now(),s),new Hr.TZDate(e,s))),[c,l]=g.useState(!1);if(g.useEffect(()=>{l(!0);const f=setInterval(()=>{i(_=>_<=0?(clearInterval(f),0):_-1e3)},1e3);return()=>clearInterval(f)},[]),!c||a<=0)return r.jsx(r.Fragment,{});const u=zt(a,"days"),m=zt(a,"hours"),h=zt(a,"minutes"),p=zt(a);return r.jsxs(d.Timer.Root,{...o,children:[u?r.jsxs(r.Fragment,{children:[yn({value:u,label:"dias"},n),r.jsx(d.Timer.Separator,{})]}):null,yn({value:m,label:"horas"},n),r.jsx(d.Timer.Separator,{}),yn({value:h,label:"min"},n),r.jsx(d.Timer.Separator,{}),yn({value:p,label:"segs",suppressHydrationWarning:!0},n)]})},Hs=({TIME_ZONE:e})=>{const{tag:t}=Le(),n=t==null?void 0:t.flagGoldenPdp,s=g.useMemo(()=>{var o;if((o=n==null?void 0:n.tagImage)!=null&&o.includes("player.vimeo")){const a=n.tagImage.split("?")[1],i=a==null?void 0:a.split("&"),c=i==null?void 0:i.filter(u=>u.includes("loc")||u.includes("signature")||u.includes("user_id")),l=c==null?void 0:c.join("&");return`${n.tagImage.split("?")[0]}?${l}`}return n==null?void 0:n.tagImage},[n==null?void 0:n.tagImage]);return n!=null&&n.enableTag?r.jsxs("div",{className:T.styles["golden-tag"],style:(n==null?void 0:n.backgroundSelect)==="color"?{backgroundColor:n==null?void 0:n.backgroundColor}:(n==null?void 0:n.backgroundSelect)==="image"?{backgroundImage:`url(${n==null?void 0:n.tagImage})`}:void 0,children:[(n==null?void 0:n.backgroundSelect)==="video"&&r.jsx("div",{className:T.styles["golden-tag-video"],children:r.jsx(Ie.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),r.jsxs("div",{className:T.styles["golden-tag-content"],children:[r.jsx("span",{className:T.styles["golden-tag-content-text"],style:{color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}),(n==null?void 0:n.countDownEndDate)&&r.jsx(Nn,{mode:n==null?void 0:n.timerMode,size:"x-small",type:"compact",dateEnd:new Date((n==null?void 0:n.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};Hs.displayName="PDP.GoldenTag";const q_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:n,Z_INDEX_WAR:s})=>{const{isMobile:o}=ne();return o?r.jsxs(d.Card,{className:T.styles["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[r.jsxs("div",{className:T.styles["bottom-navigation__header"],children:[r.jsx(Hs,{TIME_ZONE:n}),r.jsxs("div",{className:T.styles["bottom-navigation__header-content"],children:[r.jsx(Gn,{}),r.jsx(Us,{layout:"name-vertical"})]})]}),r.jsx(H_,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},V_=({children:e,setShowBottomNavigation:t})=>{const n=g.useRef(null),s=ds(n),o=g.useRef(s);return g.useEffect(()=>{var i;const{top:a}=((i=n.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),r.jsx("div",{ref:n,style:{width:"100%"},children:e})},W_=({ICONS:e})=>{const{isMobile:t}=ne(),{price:n,listPrice:s,productData:o,productId:a}=Le(),{sendDataLayerEvent:i}=oe(),c=Lt(),{toggleProduct:l}=jt();return r.jsx(d.Button,{adornment:{start:r.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:T.styles["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(a),i({functionKey:"productEvents",data:{event:c.includes(a)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:n,listPrice:s}}})}})},Hu=({showWishlist:e=!0,callBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(!0);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:T.styles.actions,children:[c?r.jsx(V_,{setShowBottomNavigation:u,children:r.jsx(ns,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s})}):r.jsx(ns,{onAddCallBack:t,addToCartBtnSize:n,BUY_BUTTON_LABELS:s}),e&&r.jsx(W_,{ICONS:o})]}),c&&l&&r.jsx(q_,{addToCartBtnSize:n,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},qu=({className:e,device:t,ICONS:n})=>{const{breadcrumbList:s,productName:o}=Le(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return r.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(T.styles.breadcrumb,[t==="mobile"?T.styles["breadcrumbs-mobile"]:T.styles["breadcrumbs-desktop"],e]),children:r.jsxs(d.BreadCrumb.List,{children:[Array.isArray(s)&&s.map((i,c)=>{const l=a(s.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return r.jsx(d.BreadCrumb.Item,{adornment:{end:r.jsx(d.Icon,{name:n.arrow_right})},role:"listitem",children:r.jsx(De,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),r.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(T.styles["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};qu.displayName="PDP.BreadCrumb";const Vu=({className:e})=>{var s;const{tag:t}=Le(),n=t==null?void 0:t.flagPdp;return n&&((s=n==null?void 0:n.value)!=null&&s.length)?r.jsx(d.Tag,{className:d.helpers.classNameConcat(T.styles.credits,e),variant:"tertiary",title:n==null?void 0:n.value,size:"small",adornment:{start:n!=null&&n.enableIcon&&(n!=null&&n.icon)?r.jsx(d.Icon,{name:n==null?void 0:n.icon,style:{color:n==null?void 0:n.iconColor}}):null},style:{background:n==null?void 0:n.tagColor,color:n==null?void 0:n.textColor},children:n==null?void 0:n.value}):r.jsx(r.Fragment,{})};Vu.displayName="PDPCredits";const G_=()=>{const{descriptionContent:e,productReference:t}=Le(),[n,s]=g.useState("description");return r.jsxs(d.Tabs.Root,{className:T.styles["tabs-root-modifier"],children:[r.jsx(d.Tabs.TabList,{className:T.styles["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>r.jsx(d.Tabs.Item,{label:o,value:a,activeTab:n,onTabChange:s,size:"large",className:`${T.styles["tabs-item-modifier"]} ${n===a?T.styles["tabs-item-active"]:""}`},a))}),r.jsxs("div",{className:T.styles["content-wrapper"],children:[n==="description"?r.jsx("div",{children:r.jsxs("span",{className:T.styles.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>n===o?r.jsx(d.Tabs.Panel,{className:`${T.styles["tabs-panel"]} ${n===o?T.styles["tabs-panel-enter"]:T.styles["tabs-panel-exit"]}`,children:r.jsx("div",{className:T.styles.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},K_=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:n,Z_INDEX_WAR:s})=>{const o=Kt(),{isMobile:a}=ne();return r.jsxs(r.Fragment,{children:[a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,r.jsx(uu,{skuId:o.available?o.sku:"",size:a?n.inputSize.mobile:n.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:n,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),a?r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},sa=({image:e,index:t,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=T.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=ce();return r.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{n(t)}},t)},X_=({video:e,productName:t,poster:n})=>{const{sendDataLayerEvent:s}=oe(),o=g.useRef(!1);return r.jsx(Ie.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,s({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:n})},Wu=({images:e,video:t,handleZoom:n,productName:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{var u,m;const{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return r.jsxs(d.Carousel.Root,{innerRef:h=>{a(h)},className:T.styles["gallery-carousel-modifier"],children:[r.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:r.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:h=>c==null?void 0:c.navigateTo(h)})}),r.jsxs(d.Carousel.Body,{children:[r.jsx(d.Carousel.Item,{style:l,children:r.jsx(sa,{image:e[0],index:0,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&r.jsx(d.Carousel.Item,{style:l,children:r.jsx(X_,{video:t,productName:s,...((u=e[1])==null?void 0:u.imageUrl)&&{poster:(m=e[1])==null?void 0:m.imageUrl}})},"PDP_gallery_video"),e.map((h,p)=>p===0?null:r.jsx(d.Carousel.Item,{style:l,children:r.jsx(sa,{image:h,index:p,handleZoom:n,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${p}`))]})]})};Wu.displayName="PDP.Carousel";const Y_="_thumbs_1fbzz_65",Q_="_selected_1fbzz_93",Z_="_carousel_1fbzz_162",J_="_bullets_1fbzz_199",Se={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1fbzz_1","button-close-container":"_button-close-container_1fbzz_10","button-close":"_button-close_1fbzz_10","main-image-container":"_main-image-container_1fbzz_22","image-desktop":"_image-desktop_1fbzz_52",thumbs:Y_,selected:Q_,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1fbzz_115","image-mobile":"_image-mobile_1fbzz_145","image-zoom--image":"_image-zoom--image_1fbzz_159",carousel:Z_,"carousel-controller":"_carousel-controller_1fbzz_167","arrow-left":"_arrow-left_1fbzz_177","arrow-right":"_arrow-right_1fbzz_178",bullets:J_,"zoom-popup":"_zoom-popup_1fbzz_210","image-zoom--mobile":"_image-zoom--mobile_1fbzz_250","image-zoom--image--img":"_image-zoom--image--img_1fbzz_280"},oa=({onClose:e,ICONS:t})=>r.jsx("div",{className:`${Se["button-close-container"]}`,children:r.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Se["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),eg=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Se["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),Gu=({images:e,setCurrent:t,setFirstImgLoaded:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=ce();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:m,itemsStyles:h}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),p=_=>{u==null||u.navigateTo(_)},f=()=>{n(!0)};return g.useEffect(()=>{t(m.currentPage)},[m.currentPage,t]),r.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Se.carousel,children:[r.jsxs(d.Carousel.Controller,{className:Se["carousel-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Se["arrow-left"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Se["arrow-right"],adornment:{start:r.jsx(d.Icon,{name:s.arrow_right})}})]}),r.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>r.jsx(d.Carousel.Item,{style:h,children:r.jsx(a,{...o.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:Se.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:f}})},y))}),r.jsx(d.Carousel.Bullets,{className:Se.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:p})]})};Gu.displayName="ImageZoom.Mobile.Carousel";const Ku=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:n})=>{Na();const{nextimage:s}=ce();return r.jsx("div",{className:Se["image-zoom--image"],ref:e,children:r.jsx(s,{...n.image_zoom.mobile,alt:t.imageText,className:Se["image-zoom--image--img"],quality:100,src:t.imageUrl})})};Ku.displayName="ImageZoom.ImageZoom";const Xu=({loaded:e=!1})=>r.jsx("div",{className:Se["zoom-popup"],"data-loaded":e,children:r.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.93 5.382a3.711 3.711 0 0 1 2.55-1.007c.949 0 1.864.36 2.549 1.007a3.534 3.534 0 0 1 1.113 2.472v11.357l10.118 3.332c.587.193 1.1.56 1.465 1.053.366.494.565 1.089.566 1.7v.004c0 .22-.025.44-.075.653v.005l-2.98 12.52a.625.625 0 0 1-1.215-.29l2.977-12.515v-.002c.029-.122.043-.247.044-.372a1.619 1.619 0 0 0-.321-.958 1.729 1.729 0 0 0-.851-.61L24.32 20.257a.625.625 0 0 1-.43-.594V7.88a2.285 2.285 0 0 0-.72-1.59 2.462 2.462 0 0 0-1.691-.665c-.635 0-1.241.24-1.69.666a2.285 2.285 0 0 0-.722 1.59v19.04a.625.625 0 0 1-1.115.388l-.056-.071-.161-.202a178.922 178.922 0 0 0-2.333-2.858l-.002-.002a2.581 2.581 0 0 0-.897-.69 2.677 2.677 0 0 0-1.122-.25H12.37c-.307 0-.61.078-.874.225a1.712 1.712 0 0 0-.635.61 1.625 1.625 0 0 0-.016 1.653l7.128 12.296a.625.625 0 0 1-1.082.627L9.762 26.35a2.876 2.876 0 0 1 .027-2.924 2.962 2.962 0 0 1 1.098-1.057 3.05 3.05 0 0 1 1.482-.384h1.016c.57.002 1.133.127 1.648.368.515.24.97.59 1.33 1.024.514.614 1.026 1.239 1.455 1.768V7.855a3.535 3.535 0 0 1 1.113-2.473ZM6.446 10.22a.625.625 0 0 1 0 .884l-5.324 5.324a.625.625 0 0 1-.884-.884l5.324-5.324a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.68 12.033c.345 0 .625.28.625.625v2.703h2.702a.625.625 0 1 1 0 1.25H.68a.625.625 0 0 1-.625-.625v-3.328c0-.345.28-.625.625-.625ZM16.429.237a.625.625 0 0 1 0 .884l-5.325 5.324a.625.625 0 0 1-.884-.883L15.545.237a.625.625 0 0 1 .884 0Z"}),r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.034.68c0-.346.28-.626.625-.626h3.328c.345 0 .625.28.625.625v3.328a.625.625 0 1 1-1.25 0V1.304h-2.703a.625.625 0 0 1-.625-.625Z"})]})});Xu.displayName="ImageZoom.ZoomPopup";const Yu=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:m}=Ia({defaultScale:1,maxScale:3});return r.jsxs("div",{...s,className:Se["image-mobile"],"data-disable-carrousel-pan":m>1,children:[r.jsx(Xu,{loaded:o}),r.jsx(Gu,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:n}),r.jsx("div",{className:Se["image-zoom--mobile"],ref:l,children:r.jsx(Ku,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:n})})]})};Yu.displayName="ImageZoom.ImageMobile";const tg=({children:e,Z_INDEX_WAR:t,...n})=>r.jsx("div",{...n,className:Se["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),ng="_modal_1u87b_1",et={modal:ng,"quick-shop__modal":"_quick-shop__modal_1u87b_4","shop-bag":"_shop-bag_1u87b_9","modal-product-body":"_modal-product-body_1u87b_25","pdp-main__info-modifier":"_pdp-main__info-modifier_1u87b_32","modal-header":"_modal-header_1u87b_38","modal-header__title":"_modal-header__title_1u87b_41"};function rg({headerTitle:e,isMobile:t,ICONS:n}){return r.jsx(d.Modal.Header,{navigation:"top",className:et["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[r.jsx("div",{className:et["modal-header__title"],children:r.jsx(d.Modal.Title,{navigation:"top",className:et["quick-shop__title"],title:e})}),r.jsx(d.Button,{className:et["modal-header__close-button"],"data-close":!0,iconNameStart:n.close,size:"small",variant:"tertiary"})]})})}const Qu=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Le(),m=g.useMemo(()=>c!=null&&c.length?Qc({items:c,getLabel:x=>x.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:h}=va(),{isMobile:p}=ne(),f=Kt(),_=ui(),{setValue:y}=ii(),{setValue:v}=gs(),b=g.useRef({}),[C,j]=g.useState(null);return r.jsxs("div",{ref:h,className:d.helpers.classNameConcat(T.styles.sizes,"PDP_sizes"),children:[r.jsx("span",{className:T.styles["sections-title"],children:e.product.size_title}),r.jsx("div",{children:m.map(x=>(!x.available&&!b.current[x.value]&&(b.current[x.value]={disable:!x.available,size:x.value,skuID:x.sku}),r.jsxs(d.ToggleSize.Wrapper,{size:p?"medium":"large",title:x.value,outOfStock:!x.available,onClick:()=>{x.available||(j({skuID:x.sku,size:x.value,disable:!0}),v(!0)),f.sku!==x.sku&&(y({...f,productId:l,name:x.name,size:x.value,sku:x.sku,sellerId:x.sellerId,sellerName:x.sellerName,available:x.available}),u({sku:x.sku,size:x.value}))},active:f.sku===x.sku,children:[r.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),r.jsx(d.ToggleSize.Text,{children:x==null?void 0:x.value})]},`sizes-${x.sku}-${x.value}`)))}),r.jsx(ws,{open:_,setVisible:v,sku:C,setSku:j,skus:Object.values(b.current),ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},Ft=({children:e,className:t,type:n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__info-subsection"],[T.styles[`subsection-${n}`],t]),children:e}),Zu=({children:e,className:t})=>{const{structureRef:n,tipbarRef:s}=Ee(),o=g.useMemo(()=>{var c,l;const a=((c=n.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[n,s]);return r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},sg=({children:e,link:t,TOGGLE_STYLE_MODIFIER:n})=>{const{isMobile:s}=ne(),{router:o}=ce(),a=()=>{t&&o.push(t)},i=g.useRef(null);return r.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...n,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},Ju=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:n})=>{const{thumbImage:s}=Le(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return r.jsx("div",{children:o.map((a,i)=>a.textureImage?r.jsxs(sg,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:n,children:[r.jsx(d.ToggleStyle.DisabledAdornment,{}),r.jsx(d.ToggleStyle.Texture,{children:r.jsx(Ie.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},ed=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:n}=Le(),[s,o]=g.useState([]),a=new Map;return g.useEffect(()=>{if(n){if(a.has(n)){o(a.get(n));return}fetch("/api/catalog/product/similars",{method:"POST",body:JSON.stringify({productId:n,filterTexture:e})}).then(i=>i.json()).then(({data:i})=>{Array.isArray(i)&&i.length===0||(a.set(n,i),o(i))}).catch(i=>{console.error(i)})}},[n]),r.jsxs("div",{className:T.styles.similars,children:[r.jsx("span",{className:T.styles["sections-title"],children:"Cor"}),r.jsx(Ju,{productId:n,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};ed.displayName="PDP.Info.Similars";const og=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:m,Z_INDEX_WAR:h})=>r.jsx(d.Modal.Body,{className:et["modal-product-body"],children:r.jsxs(Zu,{className:et["pdp-main__info-modifier"],children:[r.jsxs(Ft,{type:"product-info",children:[r.jsx(Gn,{}),r.jsx(Us,{})]}),r.jsx(Ft,{type:"similars",children:r.jsx(ed,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),r.jsx(Ft,{type:"sizes",children:r.jsx(Qu,{ICONS:n,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:h})}),r.jsx(Ft,{type:"actions",children:r.jsx(Hu,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:n,TIME_ZONE:u,Z_INDEX_WAR:h})})]})});function ag({callBackProductAdded:e,QUICKSHOP:t,ICONS:n,...s}){const[o,a]=g.useState(!1),i=()=>a(c=>!c);return r.jsxs("div",{className:et["quick-shop"],children:[r.jsx(d.Button,{onClick:i,size:"x-large",className:et["shop-bag"],iconNameStart:n.bag,iconSize:"medium"}),r.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${et.modal} ${et["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[r.jsx(rg,{headerTitle:t.title,ICONS:n}),r.jsx(og,{callBackProductAdded:e,ICONS:n,...s})]})]})}const ig=({image:e})=>r.jsx(Pn,{src:T.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:Se.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),cg=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:n,...s})=>{const[o,a]=g.useState(!1),{nextimage:i}=ce();return r.jsx("div",{...s,className:Se["main-image-container"],children:r.jsxs("div",{className:Se["image-desktop"],children:[!o&&r.jsx(ig,{image:e==null?void 0:e[t]}),r.jsx(i,{src:T.resizingImg(e==null?void 0:e[t].imageUrl,{...n.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:Se.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},lg=({images:e,onThumbnailClick:t,selectedImageIndex:n})=>{const{nextimage:s}=ce();return r.jsx("div",{className:Se.thumbs,children:e.map((o,a)=>r.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===n?Se.selected:"",children:r.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},td=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:n,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),m=h=>{u(h)};return c?r.jsxs(tg,{Z_INDEX_WAR:a,children:[r.jsx(oa,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(Yu,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):r.jsxs(eg,{Z_INDEX_WAR:a,children:[r.jsx(oa,{onClose:()=>n({show:!1,initialIndex:0}),ICONS:s}),r.jsx(cg,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),r.jsx(lg,{images:e,selectedImageIndex:l,onThumbnailClick:m}),r.jsx(ag,{callBackProductAdded:()=>{n({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};td.displayName="ImageZoom";const ug=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{video:s,productName:o}=Le(),[a,i]=g.useState({show:!1,initialIndex:0});g.useEffect(()=>(a.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[a]);const c=l=>{i({show:!0,initialIndex:l})};return r.jsxs(r.Fragment,{children:[r.jsx(Wu,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&r.jsx(td,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...n})]})},nd=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})=>{const{images:s}=Le(),o=g.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return r.jsx(ug,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...n})};nd.displayName="PDP.Gallery";const dg=({className:e,hasIcons:t=!0,ICONS:n,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=Le(),{setValue:i}=gs(),{sendDataLayerEvent:c}=oe();return r.jsx("div",{className:d.helpers.classNameConcat(T.styles.links,e),id:"pdp-container","data-product-id":a,children:r.jsxs("div",{className:T.styles["links-wrapper"],children:[!o&&r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),r.jsx(d.Button,{adornment:t?{start:r.jsx(d.Icon,{name:n.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var l,u;(u=window.SizebayParams)==null||u.openChart((l=window.SizebayParams)==null?void 0:l.id),c({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:s.links_and_stepper.size_table_title}),r.jsx(d.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var l,u;return(u=window.SizebayParams)==null?void 0:u.openVFR((l=window.SizebayParams)==null?void 0:l.id)},children:s.links_and_stepper.sizebay})]})})},mg=({children:e})=>r.jsx("div",{className:T.styles["pdp-main__info-main-content"],children:e}),pg=({head:e,className:t})=>r.jsx("thead",{className:t,children:r.jsx("tr",{children:e.map((n,s)=>r.jsx("th",{children:n},`head-title-${s}`))})}),fg=({rows:e,className:t})=>r.jsx("tbody",{className:t,children:e.map((n,s)=>r.jsx("tr",{children:n.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
|
|
18
|
-
`):o).map((o,a)=>r.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),hg="_tableContainer_1yxy2_1",_g={tableContainer:hg},gg=({children:e,className:t=""})=>r.jsx("table",{className:`${_g.tableContainer} ${t}`,children:e}),$r={Head:pg,Rows:fg,Root:gg},yg=({title:e,text:t})=>r.jsxs("p",{className:T.styles.measurementRowsText,children:[r.jsx("h1",{className:T.styles.measurementRowsTitle,children:e}),t]}),vg=({ICONS:e,SIZES:t,Z_INDEX_WAR:n})=>{const s=pi(),{setValue:o}=fi();return r.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:n.modal},setIsOpen:o,isOpen:s,className:T.styles.measurementModal,children:r.jsx(d.Modal.Body,{children:r.jsxs("div",{className:T.styles.measurementContainer,children:[r.jsx("h1",{className:T.styles.measurementTitle,children:t.title}),r.jsxs("div",{className:T.styles.measurementContent,children:[r.jsx("div",{className:T.styles.measurementImageContainer,children:r.jsx(Pn,{width:264,height:402,alt:"",className:T.styles.measurementImage,src:t.bannerImage})}),r.jsxs($r.Root,{className:T.styles.measurementTable,children:[r.jsx($r.Head,{className:T.styles.measurementHead,head:t.head}),r.jsx($r.Rows,{className:T.styles.measurementRows,rows:t.rows.map((a,i)=>[r.jsx(yg,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),r.jsx(d.Button,{onClick:()=>o(!1),className:T.styles.measurementClose,variant:"tertiary",children:r.jsx(d.Icon,{name:e.close})})]})})},"minicart")},xg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__gallery-wrapper"],t),...n,children:e}),bg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles.pdp,t),...n,children:e}),jg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main"],t),...n,children:e}),Cg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__info-secondary-content"],t),...n,children:e}),Sg={gallery:xg,pdp:bg,main:jg,secondary:Cg},Eg=({className:e,...t})=>r.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(T.styles.divider,e)}),Pg=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:U_,Actions:Hu,BreadCrumb:qu,Credits:Vu,DescriptionsTabs:G_,Divider:Eg,Freight:K_,Gallery:nd,GoldenTag:Hs,Header:Gn,Links:dg,MainContent:mg,MainInfo:Zu,Price:Us,ProductMeasurements:vg,SimilarsItems:Ju,Sizes:Qu,SubSectionWrapper:Ft,containers:Sg},Symbol.toStringTag,{value:"Module"})),Ng=(e,t)=>{const[n,s]=xu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[n,s]:[n<o?n:o,s>a?s:a]},Ig=()=>{var S;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a}=Me(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=oe(),{openFilters:m,setOpenFilters:h}=Es(),{state:p}=ze(),{breadcrumb:f,deleteAllFacets:_,isLoading:y=!1,facets:v,onToggleFacet:b,selectedFacets:C}=dc.contexts.searchFacets.hook(),j=g.useRef(""),x={isLast:!0,href:(S=p.term)!=null&&S.length?`/${p.term}`:"",name:p.term},P=T.filterNonRootFacets(C,p==null?void 0:p.base);return g.useEffect(()=>{const E=v.find(({key:I})=>I==="price");if(E){const[I,A]=Ng(E.values,i??"10000:0");c(`${I}:${A}`)}},[v,i,c]),g.useEffect(()=>{if(!P.length)return;const E=JSON.stringify(P);j.current!==E&&(j.current=E,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:P}}}))},[P]),r.jsxs(Cn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:f.length?f:[x],deleteAllFacets:_,filters:{facets:T.filterNonCategorySelected(v,p==null?void 0:p.base),selected:P},isMobile:l??!1,isLoading:y,isOpen:m,price:i,onToggleFacet:b,setIsOpen:h,target:document.body,children:[r.jsx(Cn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n}),r.jsx(Cn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},rd=()=>typeof document>"u"?null:r.jsx(Ig,{});rd.displayName="Filters";const qs=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=Me();if(typeof window>"u")return null;const n=document.getElementById(t);return n?ls.createPortal(r.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),n):null};qs.displayName="PDC.Grid.NavigationTotal";const wg=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{g.useEffect(()=>{var a;const s=new URLSearchParams(window.location.search).get("page");if(e){const[i,c]=((a=sessionStorage.getItem(t.key))==null?void 0:a.split("-"))??["0",null],l=sessionStorage.getItem(t.refer);i&&l==="true"&&(c===(s||"null")&&window.document.body.scrollTo({top:parseInt(i,10),behavior:"smooth"}),sessionStorage.setItem(t.refer,"false"))}const o=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${s}`)};return window.document.body.addEventListener("scroll",o,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",o)}},[e])},Rg=()=>{const{isMobile:e}=ne(),{isLoading:t,products:n,total:s}=Xt(),o=Me();return wg({productCount:n.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),r.jsxs(r.Fragment,{children:[r.jsx(Je.Products,{isMobile:e??!1,items:n,...o}),!n.length&&!t&&r.jsx(Je.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),r.jsx(qs,{total:s})]})},sd=({infinite:e=!1})=>r.jsx("div",{className:Ge["pdc--grid"],children:r.jsx("div",{className:Ge["pdc--grid--content"],children:e?r.jsx(Je.InfiniteScroller,{}):r.jsx(Rg,{})})});sd.displayName="Grid";const St=e=>({centro:"center",esquerda:"start",direita:"end"})[e],od=({children:e,contentState:t,entityKey:n})=>{const{url:s}=t.getEntity(n).getData();return s?r.jsx(De,{href:s,children:e}):e},Ag=(e,t,n)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:n.getEntity(o).getType()==="LINK"},t)},In=e=>{const t=new Ye.CompositeDecorator([{strategy:Ag,component:od}]),n=Ye.convertFromRaw(e);return Ye.EditorState.createWithContent(n,t)},Tg=e=>Ye.convertFromRaw(e),wn=Ye.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),aa="superior-direita",vn="dentro-inferior-centro",Og="inferior-direita",zr="dentro-inferior-esquerda",ad=e=>({position:e===vn||e===zr?"absolute":"default",shouldRender:[aa,vn,zr].includes(e)?"top":"bottom",alignItems:[vn].includes(e)?"center":[aa,Og].includes(e)?"flex-end":"flex-start",left:e===zr?"16px":e===vn?"45%":"unset"}),Lg=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:In,EXTENDED_BLOCK_RENDER_MAP:wn,GET_CONTENT_STATE:Tg,controllersPositionsAdapter:ad},Symbol.toStringTag,{value:"Module"})),kg=({expanded:e,content:t})=>r.jsxs("details",{open:e,children:[t.textStructureReduced?r.jsx("summary",{onClick:n=>n.preventDefault(),children:r.jsx(Ye.Editor,{editorKey:"draft-editor-1",blockRenderMap:wn,editorState:t!=null&&t.textStructureReduced?In(JSON.parse(t.textStructureReduced)):Ye.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{}),t.showTextStructureExpander&&t.textStructure?r.jsx(r.Fragment,{children:r.jsx(Ye.Editor,{editorKey:"draft-editor-1",blockRenderMap:wn,editorState:t.textStructure?In(JSON.parse(t.textStructure)):Ye.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{})]}),Mg="_textContentWrapper_1bigo_5",Dg="_textContentSection_1bigo_13",rs={"link-modifier":"_link-modifier_1bigo_1",textContentWrapper:Mg,textContentSection:Dg},id=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})=>{var a;const[s,o]=g.useState(!1);return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:St(e.textStructureAlignment),alignItems:St(e.textStructureAlignment)},columnWrapper:{alignContent:St(e.textStructureAlignment),alignItems:St(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?r.jsx(d.Button,{variant:"tertiary",adornment:{end:r.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(n==null?void 0:n.less)??"Ver Menos":(n==null?void 0:n.more)??"Ver Mais"}):r.jsx(r.Fragment,{})},children:r.jsxs(d.Utils.Column,{className:rs.textContentWrapper,style:{alignItems:St(e.textStructureAlignment)},children:[r.jsx(d.TextStructure.DivWrapper,{style:{textAlign:St(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?r.jsx(kg,{content:e,expanded:s}):r.jsx(r.Fragment,{})}),e.textStructureButtonLabel?r.jsx($e,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:rs["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:r.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):r.jsx(r.Fragment,{})]})})},$g=e=>({centro:{verticalAlignment:"center",horizontalAlignment:"center"},"centro-esquerda":{verticalAlignment:"center",horizontalAlignment:"start"},"centro-direita":{verticalAlignment:"center",horizontalAlignment:"end"},"superior-centro":{verticalAlignment:"start",horizontalAlignment:"center"},"superior-esquerda":{verticalAlignment:"start",horizontalAlignment:"start"},"superior-direita":{verticalAlignment:"start",horizontalAlignment:"end"},"inferior-centro":{verticalAlignment:"end",horizontalAlignment:"center"},"inferior-esquerda":{verticalAlignment:"end",horizontalAlignment:"start"},"inferior-direita":{verticalAlignment:"end",horizontalAlignment:"end"}})[e],ia=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ca={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},la=({data:e,videoUrl:t,priority:n,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:h,imageOpacity:p,altImage:f,backgroundColor:_,position:y,contentAlignment:v,showTimer:b,contentOrder:C,timerMode:j,timerEnd:x,timerInit:P,textStructure:S,textStructureReduced:E}=e.banner,I=(h==null?void 0:h.trim())||(m==null?void 0:m.trim())||null,{nextimage:A}=ce();return r.jsxs(d.Banner.Container,{...l,children:[r.jsxs(d.Banner.ImageWrapper,{className:ca["banner-image-wrapper-modifier"],style:p?{background:_}:void 0,children:[u&&r.jsx(Ie.Video,{videoRef:s,src:t,autoPlay:n,loop:!0,playsInline:!0,muted:!0}),I&&!(u!=null&&u.length)&&r.jsx(A,{src:I,width:"1920",height:"1080",alt:f??m??"",...n?{priority:n}:{},style:p?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&r.jsx("div",{style:{background:_}})]}),b||E||S?r.jsx(d.Banner.Slot,{...$g(y??"centro"),className:d.helpers.classNameConcat(ca["content-modifier"],c),style:{textAlign:ia(v)},children:r.jsxs(d.Utils.Column,{gap:"16px",alignItems:ia(v),children:[b&&C==="timer-first"&&r.jsx(Nn,{mode:j??"default",size:"small",dateEnd:x?new Date(x):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i}),r.jsx(id,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),b&&C!=="timer-first"&&r.jsx(Nn,{mode:j??"default",size:"small",dateEnd:x?new Date(x):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i})]})}):r.jsx(r.Fragment,{})]})},Zt=({data:e,className:t,priority:n,creative:s,...o})=>{const{handleSelectPromotionEvent:a,currentLocalRef:i}=oe(),{banner:{promotion_name:c},index:l,componentIndex:u}=e,m=typeof l=="number"?`:${l+1}`:"",h={creative_name:s,creative_slot:`${s}-${i.current}:${u+1}${m}`,promotion_id:e.banner.href,promotion_name:c},p=g.useRef(null),f=g.useMemo(()=>{var y;if((y=e.banner.video)!=null&&y.includes("player.vimeo")){const v=e.banner.video.split("?")[1],b=v==null?void 0:v.split("&"),C=b==null?void 0:b.filter(x=>x.includes("loc")||x.includes("signature")||x.includes("user_id")),j=C==null?void 0:C.join("&");return`${e.banner.video.split("?")[0]}?${j}`}return e.banner.video},[e]),_=()=>{var y;(y=p.current)!=null&&y.paused&&p.current.play()};return r.jsx(Bn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...h,index:l}}}},observerOptions:{delay:100,...f&&{threshold:.1}},...f&&{callBackWhenVisible:_},children:e.banner.href?r.jsx(De,{href:e.banner.href,onClick:()=>{a({updatePromotionRef:!0,promotion:h,index:l})},children:r.jsx(la,{data:e,videoUrl:f,priority:n,videoRef:p,className:t,...o})}):r.jsx(la,{data:e,videoUrl:f,priority:n,videoRef:p,className:t,...o})})},Vs=e=>r.jsx(Zt,{...e}),cd=({columns:e,count:t,gap:n,className:s})=>{var v;const{banners:o,pages:a,products:i}=ot(),{isMobile:c}=ne(),{banners:l}=Mn(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,TEXTCONTENT_EXPANDED:h,TIME_ZONE:p}=Me(),f=((v=a[a.length-1])==null?void 0:v.products.length)??t,_=i[(a.length-1)*t+f-1],y=l.filter((b,C)=>o[C]<_);return Array.isArray(y)?y.map((b,C)=>r.jsx(nt.Banner,{columns:b.columns,gap:n,isMobile:c??!1,position_grid:o[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,children:r.jsx(Zt,{data:{banner:b,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:h,TIME_ZONE:p,className:s})},`${b.position_grid}-${C}`)):null};cd.displayName="PDC.InfiniteScroller.Banners";const ld=e=>{var s;const{pages:t}=ot(),n=t[t.length-1];return(n==null?void 0:n.page)!==((s=n==null?void 0:n.pagination)==null?void 0:s.total)&&!(n!=null&&n.loading)?r.jsx(Fn,{...e}):null};ld.displayName="PDC.InfiniteScroller.Loading";const ud=({page:e,...t})=>{const{updateParamPage:n}=ot(),{element:s}=An({callback:()=>n(e),options:{threshold:0}});return r.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Ge["pdc--infinite--loader"],"data-page":e.page,ref:s})};ud.displayName="PDC.Page.Anchor";const dd=({first:e,gap:t,isMobile:n=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:m}=ot(),{getAvailableProductTag:h}=mt(),{BUY_BUTTON_LABELS:p,MAIN_IMAGE:f,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:v,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:x,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:E,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:A,Z_INDEX_WAR:O,ICONS:L}=Me(),M=h(s==null?void 0:s.cluster.highlights);return r.jsx(nt.Card,{className:s.id==="skeleton"?Ge["pdc--infinite--card--disabled"]:"",gap:t,isMobile:n??!1,item:s,order:i,tag:M,index:o,setSkuSelected:m,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:p,MAIN_IMAGE:f,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:v,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:x,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:E,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:A,Z_INDEX_WAR:O,ICONS:L},children:c&&u&&r.jsxs(r.Fragment,{children:[e&&r.jsx(jn.Anchor,{page:c}),!c.loading&&r.jsx(jn.Loader,{page:c}),a&&c.loading&&r.jsx(jn.NextPage,{page:c})]})})};dd.displayName="PDC.Page.Card";const md=({type:e="default",page:t,...n})=>{const{load:s,updatePage:o}=ot(),{element:a}=An({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&r.jsx("div",{...n,className:Ge[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};md.displayName="PDC.Page.Loader";const pd=({page:e,...t})=>{var o;const{addNewPage:n}=ot(),{element:s}=An({callback:()=>{n(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((o=e==null?void 0:e.pagination)==null?void 0:o.nextPage)===!0&&e.loading===!0?r.jsx("div",{...t,className:Ge["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};pd.displayName="PDC.Page.NextPage";const jn={Anchor:ud,Card:dd,Loader:md,NextPage:pd},fd=({count:e,gap:t,page:n})=>{const{isMobile:s}=ne(),{columns:o,products:a}=ot(),i=(n.page-1)*e,c=Li(n.products,o);return Array.isArray(n.products)?n.products.map((l,u)=>r.jsx(jn.Card,{first:u===0,last:u===n.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!1,order:a[i+u]+1,page:u===0||u===n.products.length-1?n:void 0,showVideo:!!c.indexOf(u)},a[i+u]+1)):null};fd.displayName="PDC.Page";const zg=({pages:e,load:t,PLP_GRID_SCROLL_BACK:n})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.current){const a=sessionStorage.getItem(n.refer),i=sessionStorage.getItem(n.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${o.page}`);c&&(s.current=!0,sessionStorage.setItem(n.refer,"false"),o.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&s.current){s.current=!1;const a=document.querySelector("body > main");a&&a.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},Fg=()=>{var l,u;const{count:e}=ze(),{columns:t,gap:n,load:s,pages:o,total:a}=ot(),i=Me(),{PLP_GRID_SCROLL_BACK:c}=Me();return zg({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),r.jsxs(r.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&r.jsx(Je.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),r.jsxs(nt.Root,{children:[Array.isArray(o)&&o.map((m,h)=>r.jsx(fd,{count:e,gap:n,page:m},h)),r.jsx(cd,{columns:t,count:e,gap:n})]}),r.jsx(qs,{total:a}),r.jsx(ld,{})]})},hd=()=>{const{banners:e}=Mn();return r.jsx(tc,{banners:e,children:r.jsx(Fg,{})})};hd.displayName="PDC.InfiniteScroller";const _d=()=>{const{setOpenFilters:e}=Es(),{selectedFacets:t,onToggleFacet:n,onSort:s}=Pi(),{state:o}=ze(),{Z_INDEX_WAR:a}=Me(),i=T.filterNonRootFacets(t,o==null?void 0:o.base);return r.jsx(dt.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:r.jsx(dt.Selected,{callback:n,selected:i})})};_d.displayName="Navigation";const ss=({currentPage:e,callback:t,type:n,...s})=>r.jsx(d.Button,{...s,iconNameStart:`arrow-${n}`,onClick:()=>{typeof t=="function"&&t(n==="left"?"prev":"")},size:"large",variant:"tertiary"});ss.displayName="Arrow";const os=({active:e,prev:t,ellipses:n,page:s,selectedPage:o})=>r.jsxs(r.Fragment,{children:[n&&t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&r.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),n&&!t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});os.displayName="PageEllipses";const gd=({children:e,endPage:t,page:n,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>r.jsxs(r.Fragment,{children:[r.jsx(os,{active:n>=a&&s>a,selectedPage:o,currentPage:n,prev:!1,ellipses:n>a&&s>a,page:1}),e,r.jsx(os,{active:s-n>1&&s!==t,selectedPage:o,currentPage:n,prev:!0,ellipses:t<s-1,page:s})]});gd.displayName="Pagination.Layout";const Bg=(e,t,n)=>{const s=new URLSearchParams(n);return s.set(e,t),s.toString()},Ug=(e,t)=>{const n=[];for(let s=e;s<=t;s++)n.push(s);return n},Hg=({currentPage:e,total:t,maxVisiblePages:n,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-n+1:e-Math.floor(n/2)),i=Math.min(o,a+n-1);return{startPage:a,endPage:i,totalPages:o}},yd=({currentPage:e,pages:t,searchParams:n,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=ce();return Array.isArray(t)?t.map(i=>r.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${Bg("page",i.toString(),n)}`),children:i},i)):null};yd.displayName="Pages";const Ws=({query:e,type:t="default",searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:m}=ce(),{state:{page:h=1}}=ze(),{pagination:{total:p}}=Xt(),{endPage:f,totalPages:_,startPage:y}=Hg({currentPage:h,total:p,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),v=C=>{const j=C.toString(),x=new URLSearchParams(n.toString());t==="default"&&x.set("page",j),t==="search"&&(x.set("query",e??""),x.set("count",a.toString()),x.set("page",j),s&&x.set("sort",s.replace("_",":")));const S=`${t==="search"?"/search":m}?${x.toString()}`;u.push(S)},b=C=>{v(C==="prev"?h-1:h+1)};return p?r.jsx("div",{...l,className:Ge["pdc--pagination"],children:r.jsx(d.Pagination.Wrapper,{adornment:{start:r.jsx(ss,{callback:b,currentPage:h,disabled:h<2,type:"left"}),end:r.jsx(ss,{callback:b,currentPage:h,disabled:h>=_,type:"right"})},children:r.jsx(gd,{endPage:f,page:h,selectedPage:v,total:p,ITEMS_PER_SECTION:o,children:r.jsx(yd,{currentPage:h,pages:Ug(y,f),searchParams:n,VARIANT_PAGINATION:c})})})}):r.jsx(r.Fragment,{})};Ws.displayName="Pagination";const vd=({gap:e,isMobile:t,className:n})=>{const{count:s,state:o}=ze(),{banners:a}=Mn(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=Me(),m=a.filter(h=>Mi(h.position_grid,o.page,s));return Array.isArray(m)?m.map((h,p)=>r.jsx(nt.Banner,{columns:h.columns,gap:e,isMobile:t,position_grid:h.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:r.jsx(Zt,{data:{banner:h,componentIndex:p},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:n})},h.position_grid)):null};vd.displayName="PDC.Grid.Banners";const Gs=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:n,ICONS:s,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:h,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:f,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:x}=mt(),{count:P,state:S}=ze(),[E,I]=g.useState(!1),[A,O]=g.useState(null),[L,M]=g.useState([]),Q=g.useCallback((Y,G)=>{const H=G?On([G]):null;M(Y),O(H!=null&&H.length?H[0]:null),I(!0)},[]),D=e?8:16,U=(S.page-1)*P,F=nt.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return r.jsxs(r.Fragment,{children:[r.jsxs(nt.Root,{children:[Array.isArray(t)&&t.map((Y,G)=>{var Z,re;const H=x(Y.node.cluster.highlights);return r.jsx(nt.Card,{gap:D,isMobile:e??!1,item:Y.node,order:U+(((Z=F[G])==null?void 0:Z.position)??0),tag:H,index:G,setSkuSelected:Q,showVideo:(re=F[G])==null?void 0:re.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:n,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:h,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:f,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s}},Y.node.sku)}),t.length>0&&r.jsx(vd,{gap:D,isMobile:e??!1})]}),r.jsx(kn,{open:E,sku:A,skus:L,setSku:O,setVisible:I,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:f,Z_INDEX_WAR:j})]})};Gs.displayName="PDC.Products";const Je={Empty:Ms,Filters:rd,Grid:sd,InfiniteScroller:hd,Spinner:Fn,Navigation:_d,Notification:kn,Pagination:Ws,Products:Gs},xd=({className:e,...t})=>{const{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,PLP_INFINITE_SCROLL:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l}=t;return r.jsx(Um,{...t,children:r.jsxs("div",{className:d.helpers.classNameConcat(Ge.pdc,e),children:[r.jsxs(Ei,{forceUpdate:!0,children:[r.jsx(Je.Navigation,{}),r.jsx(Je.Filters,{})]}),i===!0?r.jsx(Je.Grid,{infinite:!0}):r.jsxs(Ss,{forceUpdate:!0,query:n.get("query")??void 0,children:[r.jsx(Je.Grid,{}),r.jsx(Je.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};xd.displayName="Templates.PDC";const bd=g.createContext({}),qg=({children:e,...t})=>r.jsx(bd.Provider,{value:t,children:e}),Kn=()=>{const e=g.useContext(bd);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},Vg="_grid_e75z7_21",Wg="_navigation_e75z7_44",Gg="_spinner_e75z7_70",Kg="_sort_e75z7_76",ut={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:Vg,"grid-header":"_grid-header_e75z7_37",navigation:Wg,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:Gg,sort:Kg,"search-result":"_search-result_e75z7_91"},jd=({term:e})=>{const{router:t}=ce(),{SEARCH_RESULT:n,ICONS:s}=Kn(),o=()=>{t.push(n.EMPTY.ALL_TERMS)};return r.jsxs("div",{className:ut["rearch-result--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:n.EMPTY.NOT_FOUND})}),r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:n.EMPTY.NOT_FOUND})}),r.jsxs("p",{children:[n.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),r.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:r.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:n.EMPTY.ALL_TERMS_LABEL})]})};jd.displayName="RearchResult.Empty";const Xg=e=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),r.jsx(d.Spinner,{className:ut.spinner})]}),Yg=(e,t,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),r.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${n}"`]})]}),Cd=({isLoading:e,quantity:t,term:n})=>{const{SEARCH_RESULT:s}=Kn();return r.jsx(d.TextStructure.DivWrapper,{children:e?Xg(s):Yg(t,s,n)})};Cd.displayName="Search.Loading";const Qg=({term:e})=>{const[t,n]=g.useState(!1),{router:s}=ce(),{searchParams:o}=ze(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=Kn(),l=u=>{T.navigateToSearchPage(s,e,i,1,u??a)};return r.jsx("div",{className:ut.sort,children:r.jsx(qn,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:c})})},Zg=({query:e})=>{const{isLoading:t,products:n,pagination:s}=Xt();return r.jsxs("div",{className:ut["grid-header"],children:[r.jsxs("div",{className:ut.navigation,children:[!t&&(n!=null&&n.length)?r.jsx(Qg,{term:e}):null,r.jsx(d.Utils.Divider,{})]}),!t&&(n!=null&&n.length)?r.jsx("div",{className:ut["result-disclaimer"],children:r.jsx(Cd,{term:e,isLoading:t,quantity:s.count})}):null]})},Sd=({isMobile:e=!1,query:t})=>{const{isLoading:n,products:s,pagination:o}=Xt(),{searchParams:a}=ze(),i=Kn(),{sendDataLayerEvent:c}=oe(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!n&&s.length>0&&o.count>0,[n,s.length,o.count]);return g.useEffect(()=>{if(!n){if(l.current.query!==t){l.current.sended=!1,l.current.query=t;return}l.current.sended||(c({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t,search_found:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,n,c]),r.jsxs("div",{className:ut.grid,children:[u?r.jsx(Zg,{query:t}):r.jsx(r.Fragment,{}),!n&&(s!=null&&s.length)?r.jsx(Gs,{isMobile:e??!1,items:s,...i}):r.jsx(r.Fragment,{}),(s==null?void 0:s.length)===0&&!n?r.jsx(jd,{term:t}):null,u&&r.jsx(Ws,{searchParams:a,...i})]})};Sd.displayName="SearchResultContent";const Jg=({className:e})=>{const{state:t}=ze(),{isMobile:n}=ne();return r.jsx(Ss,{forceUpdate:!1,query:t.term??"",children:r.jsx("div",{className:d.helpers.classNameConcat(ut["search-result"],e),children:r.jsx(Sd,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},Ed=({className:e,searchParams:t,CONSTANTS:n})=>{const s=new URLSearchParams(t??""),o=String((s==null?void 0:s.get("query"))??""),a=Number((s==null?void 0:s.get("count"))??0),i=Number((s==null?void 0:s.get("page"))??0),c=String((s==null?void 0:s.get("sort"))??"");return r.jsx(qg,{...n,children:r.jsx(Cs,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:n.ITEMS_PER_PAGE,children:r.jsx(Jg,{className:e})})})};Ed.displayName="Search";const ey=({page:e,data:t})=>{const{pathname:n}=ce(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=oe();return g.useEffect(()=>{const l=$i("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const m=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),Ns("login_event","",{expires:m})}},[]),g.useEffect(()=>{if(s.current===n)return;s.current=n;let l={};switch(e){case"PDP":{const m=t,h={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:p,sellers:f})=>h[p]=f[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:p})=>p[0].sellerId).join(),skuStocks:h,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:h,id:p,name:f}=Sa(),_=f,y=p;l={page_category:"lista_produtos",...h&&{page_departament:h}},i.current={item_list_name:n==="/search"?"busca":_??void 0,item_list_id:n==="/search"?void 0:y??void 0},h&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:h}}});break}default:l={page_category:e},c.current={},i.current={};break}const u={region:e,...l};a.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[n]),null};var as={exports:{}},xn={exports:{}},ua;function ty(){return ua||(ua=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}n(t,{DOMAttributeNames:function(){return s},default:function(){return c},isEqualNode:function(){return a}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(l){let{type:u,props:m}=l;const h=document.createElement(u);for(const _ in m){if(!m.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||m[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?h[y]=!!m[_]:h.setAttribute(y,m[_])}const{children:p,dangerouslySetInnerHTML:f}=m;return f?h.innerHTML=f.__html||"":p&&(h.textContent=typeof p=="string"?p:Array.isArray(p)?p.join(""):""),h}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const h=u.cloneNode(!0);return h.setAttribute("nonce",""),h.nonce=m,m===l.nonce&&l.isEqualNode(h)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const m=document.querySelector("head");if(!m)return;const h=m.querySelectorAll('meta[name="next-head"]')||[],p=[];if(l==="meta"){const y=m.querySelector("meta[charset]");y&&p.push(y)}for(let y=0;y<h.length;y++){var f;const b=h[y].nextSibling;(b==null||(f=b.tagName)==null?void 0:f.toLowerCase())===l&&p.push(b)}const _=u.map(o).filter(y=>{for(let v=0,b=p.length;v<b;v++){const C=p[v];if(a(C,y))return p.splice(v,1),!1}return!0});p.forEach(y=>{var v;const b=y.previousSibling;if(b&&b.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(b)}(v=y.parentNode)==null||v.removeChild(y)}),_.forEach(y=>{var v;const b=document.createElement("meta");b.name="next-head",b.content="1",((v=y.tagName)==null?void 0:v.toLowerCase())==="meta"&&y.getAttribute("charset")||m.appendChild(b),m.appendChild(y)})}:i=(l,u)=>{const m=document.getElementsByTagName("head")[0],h=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!h){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const p=Number(h.content),f=[];for(let v=0,b=h.previousElementSibling;v<p;v++,b=(b==null?void 0:b.previousElementSibling)||null){var _;(b==null||(_=b.tagName)==null?void 0:_.toLowerCase())===l&&f.push(b)}const y=u.map(o).filter(v=>{for(let b=0,C=f.length;b<C;b++){const j=f[b];if(a(j,v))return f.splice(b,1),!1}return!0});f.forEach(v=>{var b;return(b=v.parentNode)==null?void 0:b.removeChild(v)}),y.forEach(v=>m.insertBefore(v,h)),h.content=(p-f.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};l.forEach(p=>{if(p.type==="link"&&p.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+p.props["data-href"]+'"]'))return;p.props.href=p.props["data-href"],p.props["data-href"]=void 0}const f=u[p.type]||[];f.push(p),u[p.type]=f});const m=u.title?u.title[0]:null;let h="";if(m){const{children:p}=m.props;h=typeof p=="string"?p:Array.isArray(p)?p.join(""):""}h!==document.title&&(document.title=h),["meta","base","link","style","script"].forEach(p=>{i(p,u[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)}(xn,xn.exports)),xn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(S,E){for(var I in E)Object.defineProperty(S,I,{enumerable:!0,get:E[I]})}n(t,{default:function(){return P},handleClientScriptLoad:function(){return v},initScriptLoader:function(){return j}});const s=Oe,o=Dn(),a=r,i=s._(ls),c=o._(g),l=Du(),u=ty(),m=Mc(),h=new Map,p=new Set,f=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=S=>{if(i.default.preinit){S.forEach(E=>{i.default.preinit(E,{as:"style"})});return}if(typeof window<"u"){let E=document.head;S.forEach(I=>{let A=document.createElement("link");A.type="text/css",A.rel="stylesheet",A.href=I,E.appendChild(A)})}},y=S=>{const{src:E,id:I,onLoad:A=()=>{},onReady:O=null,dangerouslySetInnerHTML:L,children:M="",strategy:Q="afterInteractive",onError:D,stylesheets:U}=S,F=I||E;if(F&&p.has(F))return;if(h.has(E)){p.add(F),h.get(E).then(A,D);return}const Y=()=>{O&&O(),p.add(F)},G=document.createElement("script"),H=new Promise((Z,re)=>{G.addEventListener("load",function(le){Z(),A&&A.call(this,le),Y()}),G.addEventListener("error",function(le){re(le)})}).catch(function(Z){D&&D(Z)});L?(G.innerHTML=L.__html||"",Y()):M?(G.textContent=typeof M=="string"?M:Array.isArray(M)?M.join(""):"",Y()):E&&(G.src=E,h.set(E,H));for(const[Z,re]of Object.entries(S)){if(re===void 0||f.includes(Z))continue;const le=u.DOMAttributeNames[Z]||Z.toLowerCase();G.setAttribute(le,re)}Q==="worker"&&G.setAttribute("type","text/partytown"),G.setAttribute("data-nscript",Q),U&&_(U),document.body.appendChild(G)};function v(S){const{strategy:E="afterInteractive"}=S;E==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))}):y(S)}function b(S){document.readyState==="complete"?(0,m.requestIdleCallback)(()=>y(S)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(E=>{const I=E.id||E.getAttribute("src");p.add(I)})}function j(S){S.forEach(v),C()}function x(S){const{id:E,src:I="",onLoad:A=()=>{},onReady:O=null,strategy:L="afterInteractive",onError:M,stylesheets:Q,...D}=S,{updateScripts:U,scripts:F,getIsSsr:Y,appDir:G,nonce:H}=(0,c.useContext)(l.HeadManagerContext),Z=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const le=E||I;Z.current||(O&&le&&p.has(le)&&O(),Z.current=!0)},[O,E,I]);const re=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{re.current||(L==="afterInteractive"?y(S):L==="lazyOnload"&&b(S),re.current=!0)},[S,L]),(L==="beforeInteractive"||L==="worker")&&(U?(F[L]=(F[L]||[]).concat([{id:E,src:I,onLoad:A,onReady:O,onError:M,...D}]),U(F)):Y&&Y()?p.add(E||I):Y&&!Y()&&y(S)),G){if(Q&&Q.forEach(le=>{i.default.preinit(le,{as:"style"})}),L==="beforeInteractive")return I?(i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin}),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([I,{...D,id:E}])+")"}})):(D.dangerouslySetInnerHTML&&(D.children=D.dangerouslySetInnerHTML.__html,delete D.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...D,id:E}])+")"}}));L==="afterInteractive"&&I&&i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin})}return null}Object.defineProperty(x,"__nextScript",{value:!0});const P=x;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(as,as.exports);var ny=as.exports,ry=ny;const Pd=T.getDefaultExportFromCjs(ry),sy=({children:e,ONE_TRUST:t})=>r.jsxs(r.Fragment,{children:[r.jsx(Pd,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),oy=Ol(()=>Promise.resolve(sy),{ssr:!1}),ay="_lgpd_2vba5_82",iy="_success_2vba5_248",cy="_error_2vba5_312",ve={"newsletter-root":"_newsletter-root_2vba5_1","has-border-top":"_has-border-top_2vba5_9","has-border-bottom":"_has-border-bottom_2vba5_12","newsletter-container":"_newsletter-container_2vba5_20","content-text":"_content-text_2vba5_35","form-wrapper":"_form-wrapper_2vba5_39","newsletter-container-banner":"_newsletter-container-banner_2vba5_64",lgpd:ay,"textfield-structure-modifier":"_textfield-structure-modifier_2vba5_190","input-wrapper-modifier":"_input-wrapper-modifier_2vba5_196","submit-btn":"_submit-btn_2vba5_200","loading-spinner":"_loading-spinner_2vba5_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_2vba5_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_2vba5_230","terms-and-conditions-checked":"_terms-and-conditions-checked_2vba5_244",success:iy,"text-structure-modifier":"_text-structure-modifier_2vba5_257","success-title":"_success-title_2vba5_297","close-button":"_close-button_2vba5_302",error:cy,"newsletter-wrapper":"_newsletter-wrapper_2vba5_332","banner-container":"_banner-container_2vba5_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_2vba5_358","newsletter-root-banner":"_newsletter-root-banner_2vba5_371","banner-background":"_banner-background_2vba5_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_2vba5_401"},Nd=({invalid_message:e,master_data_field:t,placeholder:n,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Rs();return r.jsx(d.TextField.Structure,{className:`${ve["textfield-structure-modifier"]} ${u}`,input:r.jsx(d.TextField.Input,{mode:"simple",label:n,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${ve["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(m=>({...m,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?r.jsx("div",{className:u==="horizontal"?ve["support-text-modifier"]:"",children:r.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Nd.displayName="Newsletter.Input";const Id=({formStatus:e,fields:t,CONSTANTS:n})=>r.jsxs(r.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>r.jsx(Nd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:n},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&r.jsx("div",{className:ve.error,children:r.jsx("p",{children:n.NEWSLETTER_CONFIGS.form.status.error})})]});Id.displayName="Newsletter.FormFields";const wd=({formStatus:e,CONSTANTS:t,...n})=>{const{isMobile:s}=ne();return r.jsxs(d.Button,{...n,className:ve["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[r.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&r.jsx(d.Spinner,{className:ve["loading-spinner"],size:"small"})]})};wd.displayName="Newsletter.SubmitButton";const Rd=({checkboxRef:e,formStatus:t,setFormStatus:n,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&n("idle")):e.current=!1};return r.jsxs(r.Fragment,{children:[r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:s.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:ve["terms-and-conditions-checkbox"]}),t==="unchecked"&&r.jsx("div",{className:ve["terms-and-conditions-unchecked"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Rd.displayName="Newsletter.Terms";const Ad=({title:e,description:t,CONSTANTS:n})=>r.jsx("div",{className:ve.success,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:ve["text-structure-modifier"],children:[r.jsxs("div",{className:ve["success-title"],children:[r.jsx(d.Icon,{name:n.ICONS.check_circle,size:"medium"}),r.jsx("h3",{children:e})]}),r.jsx("p",{children:t})]})})});Ad.displayName="Newsletter.Success";const Td=({formPayloadOptionals:e,masterDataEntity:t,banner:n,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:h,handleClickToSubmit:p,handleSubmit:f,setFormStatus:_}=Rs();return r.jsx(r.Fragment,{children:m==="success"?r.jsx(Ad,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):r.jsxs(r.Fragment,{children:[r.jsxs("form",{className:ve["form-wrapper"],onSubmit:y=>f(y,e,t),children:[r.jsx(Id,{formStatus:m,fields:u,CONSTANTS:c}),h&&r.jsx(Rd,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),r.jsx(wd,{formStatus:m,type:"submit",variant:"primary",onClick:p,CONSTANTS:c})]}),(n||i==="vertical")&&r.jsxs("div",{className:ve.lgpd,children:[s&&r.jsx("p",{children:s}),o&&r.jsx($e,{href:a,children:o})]})]})})};Td.displayName="Newsletter.Form";const ly=["horizontal","vertical"],Ks=({className:e,description:t,formPayloadOptionals:n,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:h,lgpdLink:p,title:f,variant:_,borderTop:y,borderBottom:v,CONSTANTS:b,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:ly,property:_,fallback:"horizontal"});return r.jsxs("div",{className:c?u?ve["banner-background"]:ve["newsletter-wrapper"]:"",children:[c&&r.jsx(d.Banner.Container,{className:ve["banner-container"],children:r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{src:c,alt:l,width:"1920",height:"500"})})}),r.jsx("div",{className:c?ve["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:r.jsx(uc,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:b,children:r.jsx("div",{...C,className:d.helpers.classNameConcat(ve["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&ve["has-border-top"],v&&ve["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:r.jsxs("div",{className:c||j==="vertical"?ve["newsletter-container-banner"]:ve["newsletter-container"],children:[r.jsxs("div",{className:ve["content-text"],children:[r.jsx("h2",{children:f}),r.jsx("p",{children:t}),!c&&j==="horizontal"&&r.jsxs("div",{className:ve.lgpd,children:[r.jsx("p",{children:m}),h&&r.jsx($e,{target:"_blank",href:p,children:h})]})]}),r.jsx(Td,{formPayloadOptionals:n,masterDataEntity:o,CONSTANTS:b,banner:c,lgpdLink:p,lgpdLinkLable:h,termsDescription:m,variant:j})]})})})})]})};Ks.displayName="Newsletter";const Od=({children:e,...t})=>r.jsx("div",{...t,children:e});Od.displayName="CallToAction";const uy="_wrapper_aejhu_1",dy="_body_aejhu_8",Rn={wrapper:uy,body:dy,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},my=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Rn.wrapper,t),children:e}),py=({data:e,ICONS:t})=>{const[n,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=ce();return r.jsx("div",{className:d.helpers.classNameConcat(Rn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var h;const l=n===i.id,u=i.buttonHref&&i.buttonHref!=="#",m=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var p;if((p=i.buttonHref)!=null&&p.startsWith("/")){a.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return r.jsx("div",{children:i.type==="button"?r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...m,style:{marginTop:16},children:i.buttonLabel}),r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):r.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(Rn["accordion-modifier"]),children:[r.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:l&&r.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?r.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):r.jsx(r.Fragment,{}),r.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?r.jsx($e,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(h=i.buttonIcon)!=null&&h.length?{end:r.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):r.jsx(r.Fragment,{})]})})})]})},i.id)}))})},fy=({className:e,data:t,ICONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!o&&!i&&t&&c(t)},[o,i]);const l=g.useCallback(()=>{a(u=>!u)},[]);return i?r.jsxs(my,{...s,className:e,children:[r.jsx("div",{className:Rn["wrapper-body"],hidden:!o,children:o&&r.jsx(py,{data:i.content,ICONS:n})}),r.jsx(Od,{children:r.jsx("div",{onClick:l,children:o?r.jsx(d.Button,{iconNameEnd:n.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):r.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??n.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):r.jsx(r.Fragment,{})},hy="_formContainer_zwlly_1",_y="_formFieldGroup_zwlly_6",gy="_formFieldGroupName_zwlly_10",yy="_formFieldWrapper_zwlly_20",vy="_formFieldInput_zwlly_30",xy="_success_zwlly_73",by="_button_zwlly_110",jy="_error_zwlly_114",rt={formContainer:hy,formFieldGroup:_y,formFieldGroupName:gy,formFieldWrapper:yy,formFieldInput:vy,success:xy,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:by,error:jy},Cy=({group:e,children:t,className:n})=>r.jsx(r.Fragment,{children:r.jsxs("div",{className:d.helpers.classNameConcat(rt.formFieldGroup,n),children:[r.jsx("h1",{className:rt.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Sy(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(n)).map(a=>a.toString(16).padStart(2,"0")).join("")}const Ey=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(n=>n.json()),Ld=g.createContext({});function kd({children:e,groups:t,masterDataEntity:n,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,m]=g.useState({}),[h,p]=g.useState([]),[f,_]=g.useState("idle"),[y,v]=g.useState(""),b=({target:{name:j,value:x}})=>{m({...u,[j]:x})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:n,payload:u}}).then(async({Message:x})=>{if(x){const S=x.match(/'(.*?[^\\])'/g)||[];var P="-";for(const E of S){const I=E.substring(1,E.length-1),O=t.flatMap(L=>L.fields).find(({name:L})=>L===I);v(I),O&&(P=O.name)}return _("error"),p([P])}if(u.email){const S=await Sy(u.email||""),E=new Date().toISOString();Ey([{user_id:S,timestamp:E,type:"IDENTIFY",traits:{id:S,created_at:E,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:E,type:"TRACK",user_id:S,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),m({}),l(!0),_("success"),p([])})};return r.jsx(Ld.Provider,{value:{formErrors:h,handleInputChange:b,submitForm:C,formData:u,status:f,fieldMessage:y,success:c,setSuccess:l},children:e})}function Xn(){return g.useContext(Ld)}const Py=({fields:e,className:t})=>{const{formData:n,handleInputChange:s,formErrors:o}=Xn();return r.jsx("div",{className:d.helpers.classNameConcat(rt.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>r.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:n[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:rt.formFieldInput,"data-inputsize":l},i))})},Ny=({FORM_CONFIGS:e,ICONS:t})=>{const{router:n}=ce();return r.jsxs("div",{className:rt.success,children:[r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:r.jsx(d.TextStructure.DivWrapper,{className:rt["text-structure-modifier"],children:r.jsx("p",{children:e.successMessage})})}),r.jsx(d.Button,{size:"large",onClick:()=>n.push("/"),className:rt.button,children:e.returnButton})]})},Iy=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:n}=Xn();return r.jsx("div",{className:rt.error,children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{className:rt["text-structure-modifier"],children:r.jsxs("p",{children:[e.errorMessage,n]})})})})},wy=({children:e,className:t,ICONS:n,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=Xn();return r.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(rt.formContainer,t),children:a==="success"?r.jsx(Ny,{ICONS:n,FORM_CONFIGS:s}):r.jsxs(r.Fragment,{children:[e,a==="error"&&r.jsx(Iy,{ICONS:n,FORM_CONFIGS:s})]})})},Ry=e=>{const{children:t,className:n}=e;return r.jsx(kd,{...e,children:r.jsx(wy,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:n,children:t})})},At={Root:Ry,FieldGroup:Cy,FieldWrapper:Py},Ay="_button_1e35m_39",pt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Ay,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Ty({content:e,sections:t,FORM_CONFIGS:n,ICONS:s,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=ne(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return r.jsx("div",{children:r.jsxs(d.Banner.Container,{className:pt["banner-container"],children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{className:pt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),r.jsxs(At.Root,{postFn:o,ICONS:s,FORM_CONFIGS:n,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:pt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>r.jsx(At.FieldGroup,{group:u,children:r.jsx(At.FieldWrapper,{fields:u.fields,className:pt["form-fied-wrapper"]})},u.groupLabel)),r.jsxs("div",{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),r.jsx("div",{className:pt["button-wrapper"],children:r.jsx("div",{className:pt["button-frame"],children:r.jsx(d.Button,{size:"large",type:"submit",className:pt.button,children:e.buttonLabel})})})]})]})]})})}const Oy="_content_1jj9i_36",Ly="_trends_1jj9i_47",ky="_modal_1jj9i_1",Ue={"modal-header":"_modal-header_1jj9i_1","modal-header__close-button":"_modal-header__close-button_1jj9i_7","search-modal__title":"_search-modal__title_1jj9i_10",content:Oy,trends:Ly,"trends-content":"_trends-content_1jj9i_57","trends-item":"_trends-item_1jj9i_62","modal-auto-complete":"_modal-auto-complete_1jj9i_76","modal-search-empty":"_modal-search-empty_1jj9i_88",modal:ky,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Md=g.createContext({}),My=({children:e,term:t})=>{const[n,s]=g.useState([]),[o,a]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();s((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),r.jsx(Md.Provider,{value:g.useMemo(()=>({suggestedTerms:n,loading:o,setLoading:a}),[n,o]),children:e})},Dy=({children:e,...t})=>r.jsx(My,{...t,children:e}),$y=()=>{const e=g.useContext(Md);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Fr=(e,t,n=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${n}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Dd=({placeholder:e,noResultsTitle:t,noResultsLabel:n,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,h]=g.useState(""),{suggestedTerms:p,loading:f,setLoading:_}=$y(),{router:y}=ce(),v=g.useRef(null),b=x=>{h(x.target.value),clearTimeout(v.current),x.target.value.length>2&&(a(x.target.value),v.current=setTimeout(()=>{a(x.target.value),_(!1)},2e3))},C=x=>{x.key==="Enter"&&(m==null?void 0:m.length)>2&&(o(),Fr(y,m,l,1,c))},j=x=>{o(),Fr(y,x,l,1,c)};return g.useEffect(()=>{if(clearTimeout(v.current),m.length<=2||p.length>0){_(!1);return}return _(!0),v.current=setTimeout(()=>{Fr(y,m,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(v.current)}},[m,p]),r.jsx(d.DropDown.AutoComplete,{className:Ue["modal-auto-complete"],onKeyDown:C,onInputChange:b,placeholder:e,stopClickPropagation:!1,adornment:{end:f?r.jsx(d.Spinner,{size:"small"}):r.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(m)},disabled:!(m.length>2)})},children:(p==null?void 0:p.length)>0&&r.jsx(r.Fragment,{children:(p==null?void 0:p.length)>0&&(m==null?void 0:m.length)>2?r.jsx(d.DropDown.AutoCompleteList,{className:Ue["modal-auto-complete__dropdown"],seeAll:r.jsx("span",{onClick:()=>j(m),children:s+m}),children:p.map((x,P)=>r.jsx(d.DropDown.ListItemWithLink,{children:r.jsx($e,{href:`/search?query=${x.term}&count=${l}&page=1`,size:"x-small",title:x.term,disableUnderline:!0,disablePadding:!1,onClick:S=>{S.preventDefault(),o()},children:x.term})},`key-${x.term}-${P}`))}):!f&&(m==null?void 0:m.length)>3&&(p==null?void 0:p.length)===0&&r.jsxs(d.DropDown.AutoCompleteList,{className:Ue["modal-search-empty"],children:[r.jsx(d.DropDown.NotResults,{description:n,title:t}),r.jsx(d.Button,{className:"all-terms",onClick:()=>{o(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:r.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Dd.displayName="SearchModal.AutoComplete";function zy({title:e,ICONS:t}){const{isMobile:n}=ne();return r.jsx(d.Modal.Header,{navigation:"top",className:Ue["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Modal.Title,{navigation:"top",className:Ue["search-modal__title"],title:e}),r.jsx(d.Button,{className:Ue["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const $d=g.createContext({searches:[],isLoading:!1,error:null});let Br=null;const Fy=({children:e})=>{const[t,n]=g.useState([]),[s,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(o(!0),Br){n(Br),o(!1);return}const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];Br=m,n(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),r.jsx($d.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},By=()=>{const e=g.useContext($d);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},Uy=({title:e,allTermsLabel:t,allTermsUrl:n,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=By(),{router:u}=ce(),m=Array.isArray(c)?c:[];return r.jsx(r.Fragment,{children:!l&&m.length>0?r.jsx(d.ComponentList.Structure,{className:Ue.trends,title:e,children:r.jsxs("div",{className:Ue["trends-content"],children:[r.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((h,p)=>r.jsx(d.ComponentList.ListItem,{className:Ue["trends-item"],children:r.jsx($e,{href:`/search?query=${h.term}&count=${i}&page=1`,size:"x-small",adornments:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:h.term,onClick:()=>o(),children:h.term})},`list-item-${p}`))}),r.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(n)},adornment:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function Hy({SectionZone:e}){var s;const[t,n]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const a=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!a.ok)return;const i=await a.json();n(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),r.jsx("div",{className:Ue.content,children:t!==null&&r.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[]})})}const zd=({className:e,trends:t,CONSTANTS:n,SectionZone:s})=>{const[o,a]=g.useState(""),{isMobile:i}=ne(),c=si(),{setValue:l}=Tn(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:h,ITEMS_DEFAULT_SORT:p}=n;return r.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${Ue.modal} ${Ue["search-modal__modal"]} ${e??""}`,children:[r.jsx(zy,{title:u.HEADER.TITLE,ICONS:m}),r.jsxs(d.Modal.Body,{className:Ue["modal-content-body"],children:[r.jsx(Dy,{term:o,children:r.jsx(Dd,{placeholder:u.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:u.EMPTY.NOT_FOUND,noResultsLabel:u.EMPTY.NOT_FOUND_P,noResultsTermUrl:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>l(!1),setTerm:a,ICONS:m,ITEMS_DEFAULT_SORT:p,ITEMS_PER_PAGE:h,SEARCH_MODAL:u})}),t?r.jsx(Fy,{children:r.jsx(Uy,{title:u.TRENDS.TITLE,allTermsUrl:u.TRENDS.ALL_TERMS_URL,allTermsLabel:u.TRENDS.ALL_TERMS_LABEL,qtyTrends:u.TRENDS.QTY_TERMS,handleClose:()=>l(!1),ICONS:m,ITEMS_PER_PAGE:h})}):null,r.jsx(Hy,{SectionZone:s})]})]})};zd.displayName="SearchModal";const Cn={teamComponents:{AddToCart:Ts,BackToTop:ef,HelpButton:fy,BuyPackage:ol,Filter:{...st,helpers:bu},...B_,FreightCalculation:uu,Header:lu,Link:$e,Media:Ie,PLPNavigation:dt,ProductCard:pe,ProductList:nt,ProductVariationList:Qe,Sort:qn,UserMenu:Un,Newsletter:Ks,Form:At},template:{minicart:ke,pdc:xd,pdc_composites:Je,pdp:Pg,searchResult:Ed,wishList:qc,LPCadastro:Ty,SearchModal:zd},utils:{EventCollector:ey,ExternalScripts:oy,LinkOrNotLink:Qt,ObserverWrapper:Bn,SnackBarComponent:Rt,DraftJsLinkWrapper:od}},qy=(e,t)=>{const n=e.map(o=>`'${o.source}'`).join(`,
|
|
18
|
+
`):o).map((o,a)=>r.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),hg="_tableContainer_1yxy2_1",_g={tableContainer:hg},gg=({children:e,className:t=""})=>r.jsx("table",{className:`${_g.tableContainer} ${t}`,children:e}),$r={Head:pg,Rows:fg,Root:gg},yg=({title:e,text:t})=>r.jsxs("p",{className:T.styles.measurementRowsText,children:[r.jsx("h1",{className:T.styles.measurementRowsTitle,children:e}),t]}),vg=({ICONS:e,SIZES:t,Z_INDEX_WAR:n})=>{const s=pi(),{setValue:o}=fi();return r.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:n.modal},setIsOpen:o,isOpen:s,className:T.styles.measurementModal,children:r.jsx(d.Modal.Body,{children:r.jsxs("div",{className:T.styles.measurementContainer,children:[r.jsx("h1",{className:T.styles.measurementTitle,children:t.title}),r.jsxs("div",{className:T.styles.measurementContent,children:[r.jsx("div",{className:T.styles.measurementImageContainer,children:r.jsx(Pn,{width:264,height:402,alt:"",className:T.styles.measurementImage,src:t.bannerImage})}),r.jsxs($r.Root,{className:T.styles.measurementTable,children:[r.jsx($r.Head,{className:T.styles.measurementHead,head:t.head}),r.jsx($r.Rows,{className:T.styles.measurementRows,rows:t.rows.map((a,i)=>[r.jsx(yg,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),r.jsx(d.Button,{onClick:()=>o(!1),className:T.styles.measurementClose,variant:"tertiary",children:r.jsx(d.Icon,{name:e.close})})]})})},"minicart")},xg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__gallery-wrapper"],t),...n,children:e}),bg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles.pdp,t),...n,children:e}),jg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main"],t),...n,children:e}),Cg=({children:e,className:t,...n})=>r.jsx("div",{className:d.helpers.classNameConcat(T.styles["pdp-main__info-secondary-content"],t),...n,children:e}),Sg={gallery:xg,pdp:bg,main:jg,secondary:Cg},Eg=({className:e,...t})=>r.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(T.styles.divider,e)}),Pg=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:U_,Actions:Hu,BreadCrumb:qu,Credits:Vu,DescriptionsTabs:G_,Divider:Eg,Freight:K_,Gallery:nd,GoldenTag:Hs,Header:Gn,Links:dg,MainContent:mg,MainInfo:Zu,Price:Us,ProductMeasurements:vg,SimilarsItems:Ju,Sizes:Qu,SubSectionWrapper:Ft,containers:Sg},Symbol.toStringTag,{value:"Module"})),Ng=(e,t)=>{const[n,s]=xu({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[n,s]:[n<o?n:o,s>a?s:a]},Ig=()=>{var S;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a}=Me(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=oe(),{openFilters:m,setOpenFilters:h}=Es(),{state:p}=ze(),{breadcrumb:f,deleteAllFacets:_,isLoading:y=!1,facets:v,onToggleFacet:b,selectedFacets:C}=dc.contexts.searchFacets.hook(),j=g.useRef(""),x={isLast:!0,href:(S=p.term)!=null&&S.length?`/${p.term}`:"",name:p.term},P=T.filterNonRootFacets(C,p==null?void 0:p.base);return g.useEffect(()=>{const E=v.find(({key:I})=>I==="price");if(E){const[I,A]=Ng(E.values,i??"10000:0");c(`${I}:${A}`)}},[v,i,c]),g.useEffect(()=>{if(!P.length)return;const E=JSON.stringify(P);j.current!==E&&(j.current=E,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:P}}}))},[P]),r.jsxs(Cn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:f.length?f:[x],deleteAllFacets:_,filters:{facets:T.filterNonCategorySelected(v,p==null?void 0:p.base),selected:P},isMobile:l??!1,isLoading:y,isOpen:m,price:i,onToggleFacet:b,setIsOpen:h,target:document.body,children:[r.jsx(Cn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n}),r.jsx(Cn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:n,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},rd=()=>typeof document>"u"?null:r.jsx(Ig,{});rd.displayName="Filters";const qs=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=Me();if(typeof window>"u")return null;const n=document.getElementById(t);return n?ls.createPortal(r.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),n):null};qs.displayName="PDC.Grid.NavigationTotal";const wg=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{g.useEffect(()=>{var a;const s=new URLSearchParams(window.location.search).get("page");if(e){const[i,c]=((a=sessionStorage.getItem(t.key))==null?void 0:a.split("-"))??["0",null],l=sessionStorage.getItem(t.refer);i&&l==="true"&&(c===(s||"null")&&window.document.body.scrollTo({top:parseInt(i,10),behavior:"smooth"}),sessionStorage.setItem(t.refer,"false"))}const o=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${s}`)};return window.document.body.addEventListener("scroll",o,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",o)}},[e])},Rg=()=>{const{isMobile:e}=ne(),{isLoading:t,products:n,total:s}=Xt(),o=Me();return wg({productCount:n.length,PLP_GRID_SCROLL_BACK:o.PLP_GRID_SCROLL_BACK}),r.jsxs(r.Fragment,{children:[r.jsx(Je.Products,{isMobile:e??!1,items:n,...o}),!n.length&&!t&&r.jsx(Je.Empty,{ICONS:o.ICONS,PLP_NOT_RESULT:o.PLP_NOT_RESULT}),r.jsx(qs,{total:s})]})},sd=({infinite:e=!1})=>r.jsx("div",{className:Ge["pdc--grid"],children:r.jsx("div",{className:Ge["pdc--grid--content"],children:e?r.jsx(Je.InfiniteScroller,{}):r.jsx(Rg,{})})});sd.displayName="Grid";const St=e=>({centro:"center",esquerda:"start",direita:"end"})[e],od=({children:e,contentState:t,entityKey:n})=>{const{url:s}=t.getEntity(n).getData();return s?r.jsx(De,{href:s,children:e}):e},Ag=(e,t,n)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:n.getEntity(o).getType()==="LINK"},t)},In=e=>{const t=new Ye.CompositeDecorator([{strategy:Ag,component:od}]),n=Ye.convertFromRaw(e);return Ye.EditorState.createWithContent(n,t)},Tg=e=>Ye.convertFromRaw(e),wn=Ye.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),aa="superior-direita",vn="dentro-inferior-centro",Og="inferior-direita",zr="dentro-inferior-esquerda",ad=e=>({position:e===vn||e===zr?"absolute":"default",shouldRender:[aa,vn,zr].includes(e)?"top":"bottom",alignItems:[vn].includes(e)?"center":[aa,Og].includes(e)?"flex-end":"flex-start",left:e===zr?"16px":e===vn?"45%":"unset"}),Lg=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:In,EXTENDED_BLOCK_RENDER_MAP:wn,GET_CONTENT_STATE:Tg,controllersPositionsAdapter:ad},Symbol.toStringTag,{value:"Module"})),kg=({expanded:e,content:t})=>r.jsxs("details",{open:e,children:[t.textStructureReduced?r.jsx("summary",{onClick:n=>n.preventDefault(),children:r.jsx(Ye.Editor,{editorKey:"draft-editor-1",blockRenderMap:wn,editorState:t!=null&&t.textStructureReduced?In(JSON.parse(t.textStructureReduced)):Ye.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{}),t.showTextStructureExpander&&t.textStructure?r.jsx(r.Fragment,{children:r.jsx(Ye.Editor,{editorKey:"draft-editor-1",blockRenderMap:wn,editorState:t.textStructure?In(JSON.parse(t.textStructure)):Ye.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):r.jsx(r.Fragment,{})]}),Mg="_textContentWrapper_1bigo_5",Dg="_textContentSection_1bigo_13",rs={"link-modifier":"_link-modifier_1bigo_1",textContentWrapper:Mg,textContentSection:Dg},id=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})=>{var a;const[s,o]=g.useState(!1);return r.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:St(e.textStructureAlignment),alignItems:St(e.textStructureAlignment)},columnWrapper:{alignContent:St(e.textStructureAlignment),alignItems:St(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?r.jsx(d.Button,{variant:"tertiary",adornment:{end:r.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(n==null?void 0:n.less)??"Ver Menos":(n==null?void 0:n.more)??"Ver Mais"}):r.jsx(r.Fragment,{})},children:r.jsxs(d.Utils.Column,{className:rs.textContentWrapper,style:{alignItems:St(e.textStructureAlignment)},children:[r.jsx(d.TextStructure.DivWrapper,{style:{textAlign:St(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?r.jsx(kg,{content:e,expanded:s}):r.jsx(r.Fragment,{})}),e.textStructureButtonLabel?r.jsx($e,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:rs["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:r.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):r.jsx(r.Fragment,{})]})})},$g=e=>({centro:{verticalAlignment:"center",horizontalAlignment:"center"},"centro-esquerda":{verticalAlignment:"center",horizontalAlignment:"start"},"centro-direita":{verticalAlignment:"center",horizontalAlignment:"end"},"superior-centro":{verticalAlignment:"start",horizontalAlignment:"center"},"superior-esquerda":{verticalAlignment:"start",horizontalAlignment:"start"},"superior-direita":{verticalAlignment:"start",horizontalAlignment:"end"},"inferior-centro":{verticalAlignment:"end",horizontalAlignment:"center"},"inferior-esquerda":{verticalAlignment:"end",horizontalAlignment:"start"},"inferior-direita":{verticalAlignment:"end",horizontalAlignment:"end"}})[e],ia=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ca={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},la=({data:e,videoUrl:t,priority:n,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:h,imageOpacity:p,altImage:f,backgroundColor:_,position:y,contentAlignment:v,showTimer:b,contentOrder:C,timerMode:j,timerEnd:x,timerInit:P,textStructure:S,textStructureReduced:E}=e.banner,I=(h==null?void 0:h.trim())||(m==null?void 0:m.trim())||null,{nextimage:A}=ce();return r.jsxs(d.Banner.Container,{...l,children:[r.jsxs(d.Banner.ImageWrapper,{className:ca["banner-image-wrapper-modifier"],style:p?{background:_}:void 0,children:[u&&r.jsx(Ie.Video,{videoRef:s,src:t,autoPlay:n,loop:!0,playsInline:!0,muted:!0}),I&&!(u!=null&&u.length)&&r.jsx(A,{src:I,width:"1920",height:"1080",alt:f??m??"",...n?{priority:n}:{},style:p?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&r.jsx("div",{style:{background:_}})]}),b||E||S?r.jsx(d.Banner.Slot,{...$g(y??"centro"),className:d.helpers.classNameConcat(ca["content-modifier"],c),style:{textAlign:ia(v)},children:r.jsxs(d.Utils.Column,{gap:"16px",alignItems:ia(v),children:[b&&C==="timer-first"&&r.jsx(Nn,{mode:j??"default",size:"small",dateEnd:x?new Date(x):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i}),r.jsx(id,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),b&&C!=="timer-first"&&r.jsx(Nn,{mode:j??"default",size:"small",dateEnd:x?new Date(x):new Date,dateInit:P?new Date(P):new Date,TIME_ZONE:i})]})}):r.jsx(r.Fragment,{})]})},Zt=({data:e,className:t,priority:n,creative:s,...o})=>{const{handleSelectPromotionEvent:a,currentLocalRef:i}=oe(),{banner:{promotion_name:c},index:l,componentIndex:u}=e,m=typeof l=="number"?`:${l+1}`:"",h={creative_name:s,creative_slot:`${s}-${i.current}:${u+1}${m}`,promotion_id:e.banner.href,promotion_name:c},p=g.useRef(null),f=g.useMemo(()=>{var y;if((y=e.banner.video)!=null&&y.includes("player.vimeo")){const v=e.banner.video.split("?")[1],b=v==null?void 0:v.split("&"),C=b==null?void 0:b.filter(x=>x.includes("loc")||x.includes("signature")||x.includes("user_id")),j=C==null?void 0:C.join("&");return`${e.banner.video.split("?")[0]}?${j}`}return e.banner.video},[e]),_=()=>{var y;(y=p.current)!=null&&y.paused&&p.current.play()};return r.jsx(Bn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...h,index:l}}}},observerOptions:{delay:100,...f&&{threshold:.1}},...f&&{callBackWhenVisible:_},children:e.banner.href?r.jsx(De,{href:e.banner.href,onClick:()=>{a({updatePromotionRef:!0,promotion:h,index:l})},children:r.jsx(la,{data:e,videoUrl:f,priority:n,videoRef:p,className:t,...o})}):r.jsx(la,{data:e,videoUrl:f,priority:n,videoRef:p,className:t,...o})})},Vs=e=>r.jsx(Zt,{...e}),cd=({columns:e,count:t,gap:n,className:s})=>{var v;const{banners:o,pages:a,products:i}=ot(),{isMobile:c}=ne(),{banners:l}=Mn(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,TEXTCONTENT_EXPANDED:h,TIME_ZONE:p}=Me(),f=((v=a[a.length-1])==null?void 0:v.products.length)??t,_=i[(a.length-1)*t+f-1],y=l.filter((b,C)=>o[C]<_);return Array.isArray(y)?y.map((b,C)=>r.jsx(nt.Banner,{columns:b.columns,gap:n,isMobile:c??!1,position_grid:o[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,children:r.jsx(Zt,{data:{banner:b,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:h,TIME_ZONE:p,className:s})},`${b.position_grid}-${C}`)):null};cd.displayName="PDC.InfiniteScroller.Banners";const ld=e=>{var s;const{pages:t}=ot(),n=t[t.length-1];return(n==null?void 0:n.page)!==((s=n==null?void 0:n.pagination)==null?void 0:s.total)&&!(n!=null&&n.loading)?r.jsx(Fn,{...e}):null};ld.displayName="PDC.InfiniteScroller.Loading";const ud=({page:e,...t})=>{const{updateParamPage:n}=ot(),{element:s}=An({callback:()=>n(e),options:{threshold:0}});return r.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Ge["pdc--infinite--loader"],"data-page":e.page,ref:s})};ud.displayName="PDC.Page.Anchor";const dd=({first:e,gap:t,isMobile:n=!1,item:s,index:o,last:a=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:m}=ot(),{getAvailableProductTag:h}=mt(),{BUY_BUTTON_LABELS:p,MAIN_IMAGE:f,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:v,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:x,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:E,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:A,Z_INDEX_WAR:O,ICONS:L}=Me(),M=h(s==null?void 0:s.cluster.highlights);return r.jsx(nt.Card,{className:s.id==="skeleton"?Ge["pdc--infinite--card--disabled"]:"",gap:t,isMobile:n??!1,item:s,order:i,tag:M,index:o,setSkuSelected:m,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:p,MAIN_IMAGE:f,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:v,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:b,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:x,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:P,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:E,StoreConfig_MainSellerId:I,TEXTURE_IMAGE:A,Z_INDEX_WAR:O,ICONS:L},children:c&&u&&r.jsxs(r.Fragment,{children:[e&&r.jsx(jn.Anchor,{page:c}),!c.loading&&r.jsx(jn.Loader,{page:c}),a&&c.loading&&r.jsx(jn.NextPage,{page:c})]})})};dd.displayName="PDC.Page.Card";const md=({type:e="default",page:t,...n})=>{const{load:s,updatePage:o}=ot(),{element:a}=An({callback:()=>o(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&r.jsx("div",{...n,className:Ge[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:a})};md.displayName="PDC.Page.Loader";const pd=({page:e,...t})=>{var o;const{addNewPage:n}=ot(),{element:s}=An({callback:()=>{n(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((o=e==null?void 0:e.pagination)==null?void 0:o.nextPage)===!0&&e.loading===!0?r.jsx("div",{...t,className:Ge["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};pd.displayName="PDC.Page.NextPage";const jn={Anchor:ud,Card:dd,Loader:md,NextPage:pd},fd=({count:e,gap:t,page:n})=>{const{isMobile:s}=ne(),{columns:o,products:a}=ot(),i=(n.page-1)*e,c=Li(n.products,o);return Array.isArray(n.products)?n.products.map((l,u)=>r.jsx(jn.Card,{first:u===0,last:u===n.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!1,order:a[i+u]+1,page:u===0||u===n.products.length-1?n:void 0,showVideo:!!c.indexOf(u)},a[i+u]+1)):null};fd.displayName="PDC.Page";const zg=({pages:e,load:t,PLP_GRID_SCROLL_BACK:n})=>{const s=g.useRef(!1);g.useEffect(()=>{const o=e[e.length-1];if(t&&o&&!s.current){const a=sessionStorage.getItem(n.refer),i=sessionStorage.getItem(n.order),c=document.querySelector(a==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${o.page}`);c&&(s.current=!0,sessionStorage.setItem(n.refer,"false"),o.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&s.current){s.current=!1;const a=document.querySelector("body > main");a&&a.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},Fg=()=>{var l,u;const{count:e}=ze(),{columns:t,gap:n,load:s,pages:o,total:a}=ot(),i=Me(),{PLP_GRID_SCROLL_BACK:c}=Me();return zg({pages:o,load:s,PLP_GRID_SCROLL_BACK:c}),r.jsxs(r.Fragment,{children:[s===!0&&((u=(l=o[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&r.jsx(Je.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),r.jsxs(nt.Root,{children:[Array.isArray(o)&&o.map((m,h)=>r.jsx(fd,{count:e,gap:n,page:m},h)),r.jsx(cd,{columns:t,count:e,gap:n})]}),r.jsx(qs,{total:a}),r.jsx(ld,{})]})},hd=()=>{const{banners:e}=Mn();return r.jsx(tc,{banners:e,children:r.jsx(Fg,{})})};hd.displayName="PDC.InfiniteScroller";const _d=()=>{const{setOpenFilters:e}=Es(),{selectedFacets:t,onToggleFacet:n,onSort:s}=Pi(),{state:o}=ze(),{Z_INDEX_WAR:a}=Me(),i=T.filterNonRootFacets(t,o==null?void 0:o.base);return r.jsx(dt.Root,{onSort:s,setOpenFilters:e,style:{zIndex:a.plp_navigation},children:r.jsx(dt.Selected,{callback:n,selected:i})})};_d.displayName="Navigation";const ss=({currentPage:e,callback:t,type:n,...s})=>r.jsx(d.Button,{...s,iconNameStart:`arrow-${n}`,onClick:()=>{typeof t=="function"&&t(n==="left"?"prev":"")},size:"large",variant:"tertiary"});ss.displayName="Arrow";const os=({active:e,prev:t,ellipses:n,page:s,selectedPage:o})=>r.jsxs(r.Fragment,{children:[n&&t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&r.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),n&&!t&&r.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});os.displayName="PageEllipses";const gd=({children:e,endPage:t,page:n,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>r.jsxs(r.Fragment,{children:[r.jsx(os,{active:n>=a&&s>a,selectedPage:o,currentPage:n,prev:!1,ellipses:n>a&&s>a,page:1}),e,r.jsx(os,{active:s-n>1&&s!==t,selectedPage:o,currentPage:n,prev:!0,ellipses:t<s-1,page:s})]});gd.displayName="Pagination.Layout";const Bg=(e,t,n)=>{const s=new URLSearchParams(n);return s.set(e,t),s.toString()},Ug=(e,t)=>{const n=[];for(let s=e;s<=t;s++)n.push(s);return n},Hg=({currentPage:e,total:t,maxVisiblePages:n,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-n+1:e-Math.floor(n/2)),i=Math.min(o,a+n-1);return{startPage:a,endPage:i,totalPages:o}},yd=({currentPage:e,pages:t,searchParams:n,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=ce();return Array.isArray(t)?t.map(i=>r.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${Bg("page",i.toString(),n)}`),children:i},i)):null};yd.displayName="Pages";const Ws=({query:e,type:t="default",searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:m}=ce(),{state:{page:h=1}}=ze(),{pagination:{total:p}}=Xt(),{endPage:f,totalPages:_,startPage:y}=Hg({currentPage:h,total:p,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),v=C=>{const j=C.toString(),x=new URLSearchParams(n.toString());t==="default"&&x.set("page",j),t==="search"&&(x.set("query",e??""),x.set("count",a.toString()),x.set("page",j),s&&x.set("sort",s.replace("_",":")));const S=`${t==="search"?"/search":m}?${x.toString()}`;u.push(S)},b=C=>{v(C==="prev"?h-1:h+1)};return p?r.jsx("div",{...l,className:Ge["pdc--pagination"],children:r.jsx(d.Pagination.Wrapper,{adornment:{start:r.jsx(ss,{callback:b,currentPage:h,disabled:h<2,type:"left"}),end:r.jsx(ss,{callback:b,currentPage:h,disabled:h>=_,type:"right"})},children:r.jsx(gd,{endPage:f,page:h,selectedPage:v,total:p,ITEMS_PER_SECTION:o,children:r.jsx(yd,{currentPage:h,pages:Ug(y,f),searchParams:n,VARIANT_PAGINATION:c})})})}):r.jsx(r.Fragment,{})};Ws.displayName="Pagination";const vd=({gap:e,isMobile:t,className:n})=>{const{count:s,state:o}=ze(),{banners:a}=Mn(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=Me(),m=a.filter(h=>Mi(h.position_grid,o.page,s));return Array.isArray(m)?m.map((h,p)=>r.jsx(nt.Banner,{columns:h.columns,gap:e,isMobile:t,position_grid:h.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:r.jsx(Zt,{data:{banner:h,componentIndex:p},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:n})},h.position_grid)):null};vd.displayName="PDC.Grid.Banners";const Gs=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:n,ICONS:s,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:h,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:f,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:x}=mt(),{count:P,state:S}=ze(),[E,I]=g.useState(!1),[A,O]=g.useState(null),[L,M]=g.useState([]),Q=g.useCallback((Y,G)=>{const H=G?On([G]):null;M(Y),O(H!=null&&H.length?H[0]:null),I(!0)},[]),D=e?8:16,U=(S.page-1)*P,F=nt.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return r.jsxs(r.Fragment,{children:[r.jsxs(nt.Root,{children:[Array.isArray(t)&&t.map((Y,G)=>{var Z,re;const H=x(Y.node.cluster.highlights);return r.jsx(nt.Card,{gap:D,isMobile:e??!1,item:Y.node,order:U+(((Z=F[G])==null?void 0:Z.position)??0),tag:H,index:G,setSkuSelected:Q,showVideo:(re=F[G])==null?void 0:re.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:n,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:h,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:f,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s}},Y.node.sku)}),t.length>0&&r.jsx(vd,{gap:D,isMobile:e??!1})]}),r.jsx(kn,{open:E,sku:A,skus:L,setSku:O,setVisible:I,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:f,Z_INDEX_WAR:j})]})};Gs.displayName="PDC.Products";const Je={Empty:Ms,Filters:rd,Grid:sd,InfiniteScroller:hd,Spinner:Fn,Navigation:_d,Notification:kn,Pagination:Ws,Products:Gs},xd=({className:e,...t})=>{const{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,PLP_INFINITE_SCROLL:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l}=t;return r.jsx(Um,{...t,children:r.jsxs("div",{className:d.helpers.classNameConcat(Ge.pdc,e),children:[r.jsxs(Ei,{forceUpdate:!0,children:[r.jsx(Je.Navigation,{}),r.jsx(Je.Filters,{})]}),i===!0?r.jsx(Je.Grid,{infinite:!0}):r.jsxs(Ss,{forceUpdate:!0,query:n.get("query")??void 0,children:[r.jsx(Je.Grid,{}),r.jsx(Je.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:a,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};xd.displayName="Templates.PDC";const bd=g.createContext({}),qg=({children:e,...t})=>r.jsx(bd.Provider,{value:t,children:e}),Kn=()=>{const e=g.useContext(bd);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},Vg="_grid_e75z7_21",Wg="_navigation_e75z7_44",Gg="_spinner_e75z7_70",Kg="_sort_e75z7_76",ut={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:Vg,"grid-header":"_grid-header_e75z7_37",navigation:Wg,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:Gg,sort:Kg,"search-result":"_search-result_e75z7_91"},jd=({term:e})=>{const{router:t}=ce(),{SEARCH_RESULT:n,ICONS:s}=Kn(),o=()=>{t.push(n.EMPTY.ALL_TERMS)};return r.jsxs("div",{className:ut["rearch-result--empty"],children:[r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:n.EMPTY.NOT_FOUND})}),r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:n.EMPTY.NOT_FOUND})}),r.jsxs("p",{children:[n.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),r.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:r.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:n.EMPTY.ALL_TERMS_LABEL})]})};jd.displayName="RearchResult.Empty";const Xg=e=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),r.jsx(d.Spinner,{className:ut.spinner})]}),Yg=(e,t,n)=>r.jsxs(r.Fragment,{children:[r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),r.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${n}"`]})]}),Cd=({isLoading:e,quantity:t,term:n})=>{const{SEARCH_RESULT:s}=Kn();return r.jsx(d.TextStructure.DivWrapper,{children:e?Xg(s):Yg(t,s,n)})};Cd.displayName="Search.Loading";const Qg=({term:e})=>{const[t,n]=g.useState(!1),{router:s}=ce(),{searchParams:o}=ze(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=Kn(),l=u=>{T.navigateToSearchPage(s,e,i,1,u??a)};return r.jsx("div",{className:ut.sort,children:r.jsx(qn,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:n,searchParams:o,ICONS:c})})},Zg=({query:e})=>{const{isLoading:t,products:n,pagination:s}=Xt();return r.jsxs("div",{className:ut["grid-header"],children:[r.jsxs("div",{className:ut.navigation,children:[!t&&(n!=null&&n.length)?r.jsx(Qg,{term:e}):null,r.jsx(d.Utils.Divider,{})]}),!t&&(n!=null&&n.length)?r.jsx("div",{className:ut["result-disclaimer"],children:r.jsx(Cd,{term:e,isLoading:t,quantity:s.count})}):null]})},Sd=({isMobile:e=!1,query:t})=>{const{isLoading:n,products:s,pagination:o}=Xt(),{searchParams:a}=ze(),i=Kn(),{sendDataLayerEvent:c}=oe(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!n&&s.length>0&&o.count>0,[n,s.length,o.count]);return g.useEffect(()=>{if(!n){if(l.current.query!==t){l.current.sended=!1,l.current.query=t;return}l.current.sended||(c({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t,search_found:(s==null?void 0:s.length)>0}}}),l.current.sended=!0)}},[t,s,n,c]),r.jsxs("div",{className:ut.grid,children:[u?r.jsx(Zg,{query:t}):r.jsx(r.Fragment,{}),!n&&(s!=null&&s.length)?r.jsx(Gs,{isMobile:e??!1,items:s,...i}):r.jsx(r.Fragment,{}),(s==null?void 0:s.length)===0&&!n?r.jsx(jd,{term:t}):null,u&&r.jsx(Ws,{searchParams:a,...i})]})};Sd.displayName="SearchResultContent";const Jg=({className:e})=>{const{state:t}=ze(),{isMobile:n}=ne();return r.jsx(Ss,{forceUpdate:!1,query:t.term??"",children:r.jsx("div",{className:d.helpers.classNameConcat(ut["search-result"],e),children:r.jsx(Sd,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},Ed=({className:e,searchParams:t,CONSTANTS:n})=>{const s=new URLSearchParams(t??""),o=String((s==null?void 0:s.get("query"))??""),a=Number((s==null?void 0:s.get("count"))??0),i=Number((s==null?void 0:s.get("page"))??0),c=String((s==null?void 0:s.get("sort"))??"");return r.jsx(qg,{...n,children:r.jsx(Cs,{sort:c,state:{sort:c,base:"",facets:[],term:o,page:i,count:a},count:a,searchParams:s,ITEMS_PER_PAGE:n.ITEMS_PER_PAGE,children:r.jsx(Jg,{className:e})})})};Ed.displayName="Search";const ey=({page:e,data:t})=>{const{pathname:n}=ce(),s=g.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=oe();return g.useEffect(()=>{const l=$i("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const m=new Date(0);o({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),Ns("login_event","",{expires:m})}},[]),g.useEffect(()=>{if(s.current===n)return;s.current=n;let l={};switch(e){case"PDP":{const m=t,h={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:p,sellers:f})=>h[p]=f[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:p})=>p[0].sellerId).join(),skuStocks:h,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:h,id:p,name:f}=Sa(),_=f,y=p;l={page_category:"lista_produtos",...h&&{page_departament:h}},i.current={item_list_name:n==="/search"?"busca":_??void 0,item_list_id:n==="/search"?void 0:y??void 0},h&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:h}}});break}default:l={page_category:e},c.current={},i.current={};break}const u={region:e,...l};a.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[n]),null};var as={exports:{}},xn={exports:{}},ua;function ty(){return ua||(ua=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}n(t,{DOMAttributeNames:function(){return s},default:function(){return c},isEqualNode:function(){return a}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(l){let{type:u,props:m}=l;const h=document.createElement(u);for(const _ in m){if(!m.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||m[_]===void 0)continue;const y=s[_]||_.toLowerCase();u==="script"&&(y==="async"||y==="defer"||y==="noModule")?h[y]=!!m[_]:h.setAttribute(y,m[_])}const{children:p,dangerouslySetInnerHTML:f}=m;return f?h.innerHTML=f.__html||"":p&&(h.textContent=typeof p=="string"?p:Array.isArray(p)?p.join(""):""),h}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const h=u.cloneNode(!0);return h.setAttribute("nonce",""),h.nonce=m,m===l.nonce&&l.isEqualNode(h)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const m=document.querySelector("head");if(!m)return;const h=m.querySelectorAll('meta[name="next-head"]')||[],p=[];if(l==="meta"){const y=m.querySelector("meta[charset]");y&&p.push(y)}for(let y=0;y<h.length;y++){var f;const b=h[y].nextSibling;(b==null||(f=b.tagName)==null?void 0:f.toLowerCase())===l&&p.push(b)}const _=u.map(o).filter(y=>{for(let v=0,b=p.length;v<b;v++){const C=p[v];if(a(C,y))return p.splice(v,1),!1}return!0});p.forEach(y=>{var v;const b=y.previousSibling;if(b&&b.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(b)}(v=y.parentNode)==null||v.removeChild(y)}),_.forEach(y=>{var v;const b=document.createElement("meta");b.name="next-head",b.content="1",((v=y.tagName)==null?void 0:v.toLowerCase())==="meta"&&y.getAttribute("charset")||m.appendChild(b),m.appendChild(y)})}:i=(l,u)=>{const m=document.getElementsByTagName("head")[0],h=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!h){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const p=Number(h.content),f=[];for(let v=0,b=h.previousElementSibling;v<p;v++,b=(b==null?void 0:b.previousElementSibling)||null){var _;(b==null||(_=b.tagName)==null?void 0:_.toLowerCase())===l&&f.push(b)}const y=u.map(o).filter(v=>{for(let b=0,C=f.length;b<C;b++){const j=f[b];if(a(j,v))return f.splice(b,1),!1}return!0});f.forEach(v=>{var b;return(b=v.parentNode)==null?void 0:b.removeChild(v)}),y.forEach(v=>m.insertBefore(v,h)),h.content=(p-f.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};l.forEach(p=>{if(p.type==="link"&&p.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+p.props["data-href"]+'"]'))return;p.props.href=p.props["data-href"],p.props["data-href"]=void 0}const f=u[p.type]||[];f.push(p),u[p.type]=f});const m=u.title?u.title[0]:null;let h="";if(m){const{children:p}=m.props;h=typeof p=="string"?p:Array.isArray(p)?p.join(""):""}h!==document.title&&(document.title=h),["meta","base","link","style","script"].forEach(p=>{i(p,u[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)}(xn,xn.exports)),xn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function n(S,E){for(var I in E)Object.defineProperty(S,I,{enumerable:!0,get:E[I]})}n(t,{default:function(){return P},handleClientScriptLoad:function(){return v},initScriptLoader:function(){return j}});const s=Oe,o=Dn(),a=r,i=s._(ls),c=o._(g),l=Du(),u=ty(),m=Mc(),h=new Map,p=new Set,f=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=S=>{if(i.default.preinit){S.forEach(E=>{i.default.preinit(E,{as:"style"})});return}if(typeof window<"u"){let E=document.head;S.forEach(I=>{let A=document.createElement("link");A.type="text/css",A.rel="stylesheet",A.href=I,E.appendChild(A)})}},y=S=>{const{src:E,id:I,onLoad:A=()=>{},onReady:O=null,dangerouslySetInnerHTML:L,children:M="",strategy:Q="afterInteractive",onError:D,stylesheets:U}=S,F=I||E;if(F&&p.has(F))return;if(h.has(E)){p.add(F),h.get(E).then(A,D);return}const Y=()=>{O&&O(),p.add(F)},G=document.createElement("script"),H=new Promise((Z,re)=>{G.addEventListener("load",function(le){Z(),A&&A.call(this,le),Y()}),G.addEventListener("error",function(le){re(le)})}).catch(function(Z){D&&D(Z)});L?(G.innerHTML=L.__html||"",Y()):M?(G.textContent=typeof M=="string"?M:Array.isArray(M)?M.join(""):"",Y()):E&&(G.src=E,h.set(E,H));for(const[Z,re]of Object.entries(S)){if(re===void 0||f.includes(Z))continue;const le=u.DOMAttributeNames[Z]||Z.toLowerCase();G.setAttribute(le,re)}Q==="worker"&&G.setAttribute("type","text/partytown"),G.setAttribute("data-nscript",Q),U&&_(U),document.body.appendChild(G)};function v(S){const{strategy:E="afterInteractive"}=S;E==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))}):y(S)}function b(S){document.readyState==="complete"?(0,m.requestIdleCallback)(()=>y(S)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(E=>{const I=E.id||E.getAttribute("src");p.add(I)})}function j(S){S.forEach(v),C()}function x(S){const{id:E,src:I="",onLoad:A=()=>{},onReady:O=null,strategy:L="afterInteractive",onError:M,stylesheets:Q,...D}=S,{updateScripts:U,scripts:F,getIsSsr:Y,appDir:G,nonce:H}=(0,c.useContext)(l.HeadManagerContext),Z=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const le=E||I;Z.current||(O&&le&&p.has(le)&&O(),Z.current=!0)},[O,E,I]);const re=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{re.current||(L==="afterInteractive"?y(S):L==="lazyOnload"&&b(S),re.current=!0)},[S,L]),(L==="beforeInteractive"||L==="worker")&&(U?(F[L]=(F[L]||[]).concat([{id:E,src:I,onLoad:A,onReady:O,onError:M,...D}]),U(F)):Y&&Y()?p.add(E||I):Y&&!Y()&&y(S)),G){if(Q&&Q.forEach(le=>{i.default.preinit(le,{as:"style"})}),L==="beforeInteractive")return I?(i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin}),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([I,{...D,id:E}])+")"}})):(D.dangerouslySetInnerHTML&&(D.children=D.dangerouslySetInnerHTML.__html,delete D.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...D,id:E}])+")"}}));L==="afterInteractive"&&I&&i.default.preload(I,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin})}return null}Object.defineProperty(x,"__nextScript",{value:!0});const P=x;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(as,as.exports);var ny=as.exports,ry=ny;const Pd=T.getDefaultExportFromCjs(ry),sy=({children:e,ONE_TRUST:t})=>r.jsxs(r.Fragment,{children:[r.jsx(Pd,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),oy=Ol(()=>Promise.resolve(sy),{ssr:!1}),ay="_lgpd_2vba5_82",iy="_success_2vba5_248",cy="_error_2vba5_312",ve={"newsletter-root":"_newsletter-root_2vba5_1","has-border-top":"_has-border-top_2vba5_9","has-border-bottom":"_has-border-bottom_2vba5_12","newsletter-container":"_newsletter-container_2vba5_20","content-text":"_content-text_2vba5_35","form-wrapper":"_form-wrapper_2vba5_39","newsletter-container-banner":"_newsletter-container-banner_2vba5_64",lgpd:ay,"textfield-structure-modifier":"_textfield-structure-modifier_2vba5_190","input-wrapper-modifier":"_input-wrapper-modifier_2vba5_196","submit-btn":"_submit-btn_2vba5_200","loading-spinner":"_loading-spinner_2vba5_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_2vba5_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_2vba5_230","terms-and-conditions-checked":"_terms-and-conditions-checked_2vba5_244",success:iy,"text-structure-modifier":"_text-structure-modifier_2vba5_257","success-title":"_success-title_2vba5_297","close-button":"_close-button_2vba5_302",error:cy,"newsletter-wrapper":"_newsletter-wrapper_2vba5_332","banner-container":"_banner-container_2vba5_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_2vba5_358","newsletter-root-banner":"_newsletter-root-banner_2vba5_371","banner-background":"_banner-background_2vba5_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_2vba5_401"},Nd=({invalid_message:e,master_data_field:t,placeholder:n,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Rs();return r.jsx(d.TextField.Structure,{className:`${ve["textfield-structure-modifier"]} ${u}`,input:r.jsx(d.TextField.Input,{mode:"simple",label:n,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${ve["input-wrapper-modifier"]} ${u}`,feedback:i[t]==="required"?"error":i[t],onChange:()=>{i[t]!=="none"&&(c(m=>({...m,[t]:"none"})),l("idle"))},required:s}),supportText:i[t]==="error"||i[t]==="required"?r.jsx("div",{className:u==="horizontal"?ve["support-text-modifier"]:"",children:r.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Nd.displayName="Newsletter.Input";const Id=({formStatus:e,fields:t,CONSTANTS:n})=>r.jsxs(r.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>r.jsx(Nd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:n},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&r.jsx("div",{className:ve.error,children:r.jsx("p",{children:n.NEWSLETTER_CONFIGS.form.status.error})})]});Id.displayName="Newsletter.FormFields";const wd=({formStatus:e,CONSTANTS:t,...n})=>{const{isMobile:s}=ne();return r.jsxs(d.Button,{...n,className:ve["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[r.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&r.jsx(d.Spinner,{className:ve["loading-spinner"],size:"small"})]})};wd.displayName="Newsletter.SubmitButton";const Rd=({checkboxRef:e,formStatus:t,setFormStatus:n,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&n("idle")):e.current=!1};return r.jsxs(r.Fragment,{children:[r.jsx(d.Checkbox,{adornment:r.jsx(d.Icon,{name:s.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:s.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:ve["terms-and-conditions-checkbox"]}),t==="unchecked"&&r.jsx("div",{className:ve["terms-and-conditions-unchecked"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Rd.displayName="Newsletter.Terms";const Ad=({title:e,description:t,CONSTANTS:n})=>r.jsx("div",{className:ve.success,children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{className:ve["text-structure-modifier"],children:[r.jsxs("div",{className:ve["success-title"],children:[r.jsx(d.Icon,{name:n.ICONS.check_circle,size:"medium"}),r.jsx("h3",{children:e})]}),r.jsx("p",{children:t})]})})});Ad.displayName="Newsletter.Success";const Td=({formPayloadOptionals:e,masterDataEntity:t,banner:n,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:h,handleClickToSubmit:p,handleSubmit:f,setFormStatus:_}=Rs();return r.jsx(r.Fragment,{children:m==="success"?r.jsx(Ad,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):r.jsxs(r.Fragment,{children:[r.jsxs("form",{className:ve["form-wrapper"],onSubmit:y=>f(y,e,t),children:[r.jsx(Id,{formStatus:m,fields:u,CONSTANTS:c}),h&&r.jsx(Rd,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),r.jsx(wd,{formStatus:m,type:"submit",variant:"primary",onClick:p,CONSTANTS:c})]}),(n||i==="vertical")&&r.jsxs("div",{className:ve.lgpd,children:[s&&r.jsx("p",{children:s}),o&&r.jsx($e,{href:a,children:o})]})]})})};Td.displayName="Newsletter.Form";const ly=["horizontal","vertical"],Ks=({className:e,description:t,formPayloadOptionals:n,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:h,lgpdLink:p,title:f,variant:_,borderTop:y,borderBottom:v,CONSTANTS:b,...C})=>{if(!a||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:ly,property:_,fallback:"horizontal"});return r.jsxs("div",{className:c?u?ve["banner-background"]:ve["newsletter-wrapper"]:"",children:[c&&r.jsx(d.Banner.Container,{className:ve["banner-container"],children:r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{src:c,alt:l,width:"1920",height:"500"})})}),r.jsx("div",{className:c?ve["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:r.jsx(uc,{fields:s,masterDataEmailField:a,masterDataNameField:i,variant:j,CONSTANTS:b,children:r.jsx("div",{...C,className:d.helpers.classNameConcat(ve["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&ve["has-border-top"],v&&ve["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:r.jsxs("div",{className:c||j==="vertical"?ve["newsletter-container-banner"]:ve["newsletter-container"],children:[r.jsxs("div",{className:ve["content-text"],children:[r.jsx("h2",{children:f}),r.jsx("p",{children:t}),!c&&j==="horizontal"&&r.jsxs("div",{className:ve.lgpd,children:[r.jsx("p",{children:m}),h&&r.jsx($e,{target:"_blank",href:p,children:h})]})]}),r.jsx(Td,{formPayloadOptionals:n,masterDataEntity:o,CONSTANTS:b,banner:c,lgpdLink:p,lgpdLinkLable:h,termsDescription:m,variant:j})]})})})})]})};Ks.displayName="Newsletter";const Od=({children:e,...t})=>r.jsx("div",{...t,children:e});Od.displayName="CallToAction";const uy="_wrapper_aejhu_1",dy="_body_aejhu_8",Rn={wrapper:uy,body:dy,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},my=({children:e,className:t,...n})=>r.jsx("div",{...n,className:d.helpers.classNameConcat(Rn.wrapper,t),children:e}),py=({data:e,ICONS:t})=>{const[n,s]=g.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=ce();return r.jsx("div",{className:d.helpers.classNameConcat(Rn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var h;const l=n===i.id,u=i.buttonHref&&i.buttonHref!=="#",m=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var p;if((p=i.buttonHref)!=null&&p.startsWith("/")){a.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return r.jsx("div",{children:i.type==="button"?r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{variant:"tertiary",mode:i.buttonMode??"default",size:i.buttonSize??"medium",iconNameStart:t[i.buttonIcon]??i.buttonIcon,...m,style:{marginTop:16},children:i.buttonLabel}),r.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):r.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(Rn["accordion-modifier"]),children:[r.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?r.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:r.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),r.jsx(d.Accordion.Body,{title:"accordion-body",children:r.jsx(d.TextStructure.Root,{children:l&&r.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?r.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):r.jsx(r.Fragment,{}),r.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?r.jsx($e,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(h=i.buttonIcon)!=null&&h.length?{end:r.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):r.jsx(r.Fragment,{})]})})})]})},i.id)}))})},fy=({className:e,data:t,ICONS:n,...s})=>{const[o,a]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!o&&!i&&t&&c(t)},[o,i]);const l=g.useCallback(()=>{a(u=>!u)},[]);return i?r.jsxs(my,{...s,className:e,children:[r.jsx("div",{className:Rn["wrapper-body"],hidden:!o,children:o&&r.jsx(py,{data:i.content,ICONS:n})}),r.jsx(Od,{children:r.jsx("div",{onClick:l,children:o?r.jsx(d.Button,{iconNameEnd:n.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):r.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??n.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):r.jsx(r.Fragment,{})},hy="_formContainer_zwlly_1",_y="_formFieldGroup_zwlly_6",gy="_formFieldGroupName_zwlly_10",yy="_formFieldWrapper_zwlly_20",vy="_formFieldInput_zwlly_30",xy="_success_zwlly_73",by="_button_zwlly_110",jy="_error_zwlly_114",rt={formContainer:hy,formFieldGroup:_y,formFieldGroupName:gy,formFieldWrapper:yy,formFieldInput:vy,success:xy,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:by,error:jy},Cy=({group:e,children:t,className:n})=>r.jsx(r.Fragment,{children:r.jsxs("div",{className:d.helpers.classNameConcat(rt.formFieldGroup,n),children:[r.jsx("h1",{className:rt.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Sy(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(n)).map(a=>a.toString(16).padStart(2,"0")).join("")}const Ey=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(n=>n.json()),Ld=g.createContext({});function kd({children:e,groups:t,masterDataEntity:n,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,m]=g.useState({}),[h,p]=g.useState([]),[f,_]=g.useState("idle"),[y,v]=g.useState(""),b=({target:{name:j,value:x}})=>{m({...u,[j]:x})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:n,payload:u}}).then(async({Message:x})=>{if(x){const S=x.match(/'(.*?[^\\])'/g)||[];var P="-";for(const E of S){const I=E.substring(1,E.length-1),O=t.flatMap(L=>L.fields).find(({name:L})=>L===I);v(I),O&&(P=O.name)}return _("error"),p([P])}if(u.email){const S=await Sy(u.email||""),E=new Date().toISOString();Ey([{user_id:S,timestamp:E,type:"IDENTIFY",traits:{id:S,created_at:E,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:E,type:"TRACK",user_id:S,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:a,...u}}}])}return window.localStorage.setItem(i,"true"),m({}),l(!0),_("success"),p([])})};return r.jsx(Ld.Provider,{value:{formErrors:h,handleInputChange:b,submitForm:C,formData:u,status:f,fieldMessage:y,success:c,setSuccess:l},children:e})}function Xn(){return g.useContext(Ld)}const Py=({fields:e,className:t})=>{const{formData:n,handleInputChange:s,formErrors:o}=Xn();return r.jsx("div",{className:d.helpers.classNameConcat(rt.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>r.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:n[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:rt.formFieldInput,"data-inputsize":l},i))})},Ny=({FORM_CONFIGS:e,ICONS:t})=>{const{router:n}=ce();return r.jsxs("div",{className:rt.success,children:[r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:r.jsx(d.TextStructure.DivWrapper,{className:rt["text-structure-modifier"],children:r.jsx("p",{children:e.successMessage})})}),r.jsx(d.Button,{size:"large",onClick:()=>n.push("/"),className:rt.button,children:e.returnButton})]})},Iy=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:n}=Xn();return r.jsx("div",{className:rt.error,children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:r.jsx(d.TextStructure.DivWrapper,{className:rt["text-structure-modifier"],children:r.jsxs("p",{children:[e.errorMessage,n]})})})})},wy=({children:e,className:t,ICONS:n,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=Xn();return r.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(rt.formContainer,t),children:a==="success"?r.jsx(Ny,{ICONS:n,FORM_CONFIGS:s}):r.jsxs(r.Fragment,{children:[e,a==="error"&&r.jsx(Iy,{ICONS:n,FORM_CONFIGS:s})]})})},Ry=e=>{const{children:t,className:n}=e;return r.jsx(kd,{...e,children:r.jsx(wy,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:n,children:t})})},At={Root:Ry,FieldGroup:Cy,FieldWrapper:Py},Ay="_button_1e35m_39",pt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Ay,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Ty({content:e,sections:t,FORM_CONFIGS:n,ICONS:s,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=ne(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return r.jsx("div",{children:r.jsxs(d.Banner.Container,{className:pt["banner-container"],children:[r.jsx(d.Banner.ImageWrapper,{children:r.jsx(Ie.Image,{className:pt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),r.jsxs(At.Root,{postFn:o,ICONS:s,FORM_CONFIGS:n,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:pt["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>r.jsx(At.FieldGroup,{group:u,children:r.jsx(At.FieldWrapper,{fields:u.fields,className:pt["form-fied-wrapper"]})},u.groupLabel)),r.jsxs("div",{children:[r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),r.jsx("div",{className:pt["button-wrapper"],children:r.jsx("div",{className:pt["button-frame"],children:r.jsx(d.Button,{size:"large",type:"submit",className:pt.button,children:e.buttonLabel})})})]})]})]})})}const Oy="_content_1jj9i_36",Ly="_trends_1jj9i_47",ky="_modal_1jj9i_1",Ue={"modal-header":"_modal-header_1jj9i_1","modal-header__close-button":"_modal-header__close-button_1jj9i_7","search-modal__title":"_search-modal__title_1jj9i_10",content:Oy,trends:Ly,"trends-content":"_trends-content_1jj9i_57","trends-item":"_trends-item_1jj9i_62","modal-auto-complete":"_modal-auto-complete_1jj9i_76","modal-search-empty":"_modal-search-empty_1jj9i_88",modal:ky,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Md=g.createContext({}),My=({children:e,term:t})=>{const[n,s]=g.useState([]),[o,a]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{a(!0);try{const c=await fetch("/api/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:l}=await c.json();s((l==null?void 0:l.searches)||[])}catch(c){console.error("Erro ao buscar sugestões:",c)}})()},[t]),r.jsx(Md.Provider,{value:g.useMemo(()=>({suggestedTerms:n,loading:o,setLoading:a}),[n,o]),children:e})},Dy=({children:e,...t})=>r.jsx(My,{...t,children:e}),$y=()=>{const e=g.useContext(Md);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Fr=(e,t,n=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${n}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Dd=({placeholder:e,noResultsTitle:t,noResultsLabel:n,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,h]=g.useState(""),{suggestedTerms:p,loading:f,setLoading:_}=$y(),{router:y}=ce(),v=g.useRef(null),b=x=>{h(x.target.value),clearTimeout(v.current),x.target.value.length>2&&(a(x.target.value),v.current=setTimeout(()=>{a(x.target.value),_(!1)},2e3))},C=x=>{x.key==="Enter"&&(m==null?void 0:m.length)>2&&(o(),Fr(y,m,l,1,c))},j=x=>{o(),Fr(y,x,l,1,c)};return g.useEffect(()=>{if(clearTimeout(v.current),m.length<=2||p.length>0){_(!1);return}return _(!0),v.current=setTimeout(()=>{Fr(y,m,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(v.current)}},[m,p]),r.jsx(d.DropDown.AutoComplete,{className:Ue["modal-auto-complete"],onKeyDown:C,onInputChange:b,placeholder:e,stopClickPropagation:!1,adornment:{end:f?r.jsx(d.Spinner,{size:"small"}):r.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(m)},disabled:!(m.length>2)})},children:(p==null?void 0:p.length)>0&&r.jsx(r.Fragment,{children:(p==null?void 0:p.length)>0&&(m==null?void 0:m.length)>2?r.jsx(d.DropDown.AutoCompleteList,{className:Ue["modal-auto-complete__dropdown"],seeAll:r.jsx("span",{onClick:()=>j(m),children:s+m}),children:p.map((x,P)=>r.jsx(d.DropDown.ListItemWithLink,{children:r.jsx($e,{href:`/search?query=${x.term}&count=${l}&page=1`,size:"x-small",title:x.term,disableUnderline:!0,disablePadding:!1,onClick:S=>{S.preventDefault(),o()},children:x.term})},`key-${x.term}-${P}`))}):!f&&(m==null?void 0:m.length)>3&&(p==null?void 0:p.length)===0&&r.jsxs(d.DropDown.AutoCompleteList,{className:Ue["modal-search-empty"],children:[r.jsx(d.DropDown.NotResults,{description:n,title:t}),r.jsx(d.Button,{className:"all-terms",onClick:()=>{o(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:r.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Dd.displayName="SearchModal.AutoComplete";function zy({title:e,ICONS:t}){const{isMobile:n}=ne();return r.jsx(d.Modal.Header,{navigation:"top",className:Ue["modal-header"],children:r.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!n,children:[r.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),r.jsx(d.Modal.Title,{navigation:"top",className:Ue["search-modal__title"],title:e}),r.jsx(d.Button,{className:Ue["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const $d=g.createContext({searches:[],isLoading:!1,error:null});let Br=null;const Fy=({children:e})=>{const[t,n]=g.useState([]),[s,o]=g.useState(!0),[a,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(o(!0),Br){n(Br),o(!1);return}const l=await fetch("/api/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];Br=m,n(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),r.jsx($d.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},By=()=>{const e=g.useContext($d);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},Uy=({title:e,allTermsLabel:t,allTermsUrl:n,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=By(),{router:u}=ce(),m=Array.isArray(c)?c:[];return r.jsx(r.Fragment,{children:!l&&m.length>0?r.jsx(d.ComponentList.Structure,{className:Ue.trends,title:e,children:r.jsxs("div",{className:Ue["trends-content"],children:[r.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((h,p)=>r.jsx(d.ComponentList.ListItem,{className:Ue["trends-item"],children:r.jsx($e,{href:`/search?query=${h.term}&count=${i}&page=1`,size:"x-small",adornments:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:h.term,onClick:()=>o(),children:h.term})},`list-item-${p}`))}),r.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(n)},adornment:{end:r.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function Hy({SectionZone:e}){var s;const[t,n]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const a=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!a.ok)return;const i=await a.json();n(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),r.jsx("div",{className:Ue.content,children:t!==null&&r.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const zd=({className:e,trends:t,CONSTANTS:n,SectionZone:s})=>{const[o,a]=g.useState(""),{isMobile:i}=ne(),c=si(),{setValue:l}=Tn(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:h,ITEMS_DEFAULT_SORT:p}=n;return r.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${Ue.modal} ${Ue["search-modal__modal"]} ${e??""}`,children:[r.jsx(zy,{title:u.HEADER.TITLE,ICONS:m}),r.jsxs(d.Modal.Body,{className:Ue["modal-content-body"],children:[r.jsx(Dy,{term:o,children:r.jsx(Dd,{placeholder:u.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:u.EMPTY.NOT_FOUND,noResultsLabel:u.EMPTY.NOT_FOUND_P,noResultsTermUrl:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:u.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>l(!1),setTerm:a,ICONS:m,ITEMS_DEFAULT_SORT:p,ITEMS_PER_PAGE:h,SEARCH_MODAL:u})}),t?r.jsx(Fy,{children:r.jsx(Uy,{title:u.TRENDS.TITLE,allTermsUrl:u.TRENDS.ALL_TERMS_URL,allTermsLabel:u.TRENDS.ALL_TERMS_LABEL,qtyTrends:u.TRENDS.QTY_TERMS,handleClose:()=>l(!1),ICONS:m,ITEMS_PER_PAGE:h})}):null,r.jsx(Hy,{SectionZone:s})]})]})};zd.displayName="SearchModal";const Cn={teamComponents:{AddToCart:Ts,BackToTop:ef,HelpButton:fy,BuyPackage:ol,Filter:{...st,helpers:bu},...B_,FreightCalculation:uu,Header:lu,Link:$e,Media:Ie,PLPNavigation:dt,ProductCard:pe,ProductList:nt,ProductVariationList:Qe,Sort:qn,UserMenu:Un,Newsletter:Ks,Form:At},template:{minicart:ke,pdc:xd,pdc_composites:Je,pdp:Pg,searchResult:Ed,wishList:qc,LPCadastro:Ty,SearchModal:zd},utils:{EventCollector:ey,ExternalScripts:oy,LinkOrNotLink:Qt,ObserverWrapper:Bn,SnackBarComponent:Rt,DraftJsLinkWrapper:od}},qy=(e,t)=>{const n=e.map(o=>`'${o.source}'`).join(`,
|
|
19
19
|
`);return`
|
|
20
20
|
import type { NextRequest } from 'next/server'
|
|
21
21
|
import { NextResponse } from 'next/server'
|
|
@@ -55,4 +55,4 @@ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-comp
|
|
|
55
55
|
${n}
|
|
56
56
|
]
|
|
57
57
|
}
|
|
58
|
-
`},Vy=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:qy},Symbol.toStringTag,{value:"Module"})),Wy={helpers:Vy},is={"custom-carousel":"_custom-carousel_t5fgp_1","carrousel-arrows-display-controller":"_carrousel-arrows-display-controller_t5fgp_10","carousel-controllers-modifier":"_carousel-controllers-modifier_t5fgp_19"};function Gy(e,t){const{mediatorRef:n}=ne();g.useEffect(()=>n.current.subscribe(e,t),[e,t])}const da=({prevOnClick:e,nextOnClick:t,onBulletClick:n,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,h]=g.useState("default");return Gy("herobanner:change_controllers_variant",p=>{l&&h(p.includes("white")?"inverse":"default")}),r.jsxs(d.Carousel.Controller,{className:is["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[r.jsxs(d.Carousel.Arrows,{className:is["carrousel-arrows-display-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:r.jsx(d.Icon,{name:u.arrow_left})},mode:m}),r.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:r.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),r.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:n,mode:m})]})},Ky=({children:e,data:t,banner:n,...s})=>{const{mediatorRef:o}=ne();return t.data.first?r.jsx(Bn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",n.headerVariant)},...s,children:e}):r.jsx(r.Fragment,{children:e})},Fd=e=>{const{initialize:t,pagination:n,controller:s,itemsStyles:o}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=g.useRef(void 0),i=g.useMemo(()=>ad(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&n.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,n.totalPages]),l=g.useCallback(m=>{clearInterval(a.current),c(),m()},[c]),u=g.useMemo(()=>{var m;return{nextOnClick:()=>l(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>l(()=>s==null?void 0:s.prevPage()),onBulletClick:h=>l(()=>s==null?void 0:s.navigateTo(h)),currentPage:n.currentPage,totalPages:n.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[n.currentPage,n.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),r.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(is["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[i.shouldRender==="top"&&n.totalPages>1?r.jsx(da,{ICONS:e.ICONS,...u,isFirst:e.data.first}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((m,h)=>r.jsx(d.Carousel.Item,{style:o,children:r.jsx(Ky,{data:e,banner:m,children:r.jsx(Zt,{ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:m,index:h,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&h===0&&{priority:!0}})})},`hero-banner-item-${h}`))}),i.shouldRender==="bottom"&&n.totalPages>1?r.jsx(da,{ICONS:e.ICONS,...u}):r.jsx(r.Fragment,{})]})},Xy={Banner:Vs},Et={"row-controller-modifier":"_row-controller-modifier_co4wb_1","carousel-title-modifier":"_carousel-title-modifier_co4wb_18","carousel-modifier":"_carousel-modifier_co4wb_22","card-modifier":"_card-modifier_co4wb_26"},Bd=({data:e,CONSTANTS:t})=>{var u;const{isMobile:n}=ne(),s=e.config.size??"medium",o=e.config.disableCarouselMobile??!1,{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({itemsPerPage:n?e==null?void 0:e.config.slidesPerViewMobile:(u=e==null?void 0:e.config)==null?void 0:u.slidesPerView,gap:n?e.config.gapMobile:e.config.gap,direction:n&&o?"column":"row"});return r.jsx(d.Utils.Column,{style:{width:s==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:r.jsxs(d.Carousel.Root,{innerRef:m=>{a(m)},className:d.helpers.classNameConcat(Et["carousel-modifier"],"common-section"),children:[s==="medium"?r.jsxs(d.TextStructure.Root,{children:[t.ACTIVE_BENNEFITS_BAR_TITLE&&r.jsx(d.TextStructure.DivWrapper,{className:Et["carousel-title-modifier"],children:r.jsx("h2",{className:"typography-style-body-lg",children:t.BENNEFITS_BAR_TITLE})}),n&&i.totalPages>1&&r.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Et["row-controller-modifier"],t.ACTIVE_BENNEFITS_BAR_TITLE?Et["title-on"]:void 0),children:r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.ICONS.arrow_right})}})]})})]}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e.bennefit.map((m,h)=>r.jsx(d.Carousel.Item,{className:Et["card-modifier"],style:l,children:r.jsx(d.Card,{stroke:!0,padding:"small",children:r.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[s==="medium"?"top":"start"]:r.jsx(d.Icon,{name:m.icon,size:s==="medium"?"medium":"small"})},children:r.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[r.jsx("h3",{className:"typography-style-body-md",children:m.title}),m.subtitle&&m.subtitle.length?r.jsx("p",{className:"typography-style-body-xs",children:m.subtitle}):r.jsx(r.Fragment,{})]})})})},`bennefit=${h}`))}),!n&&i.totalPages>1?r.jsxs(d.Carousel.Controller,{className:Et["row-controller-modifier"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.ICONS.arrow_right})}})]}),r.jsx(d.Carousel.Bullets,{page:i.currentPage,total:i.totalPages,onBulletClick:m=>c==null?void 0:c.navigateTo(m)})]}):r.jsx(r.Fragment,{})]})})},Ud=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n,className:s})=>r.jsx("div",{className:d.helpers.classNameConcat(rs.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:r.jsx(id,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})}),ma={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Hd=({data:e,id:t,ICONS:n,className:s})=>{var i;const[o,a]=g.useState([]);return r.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):r.jsx(r.Fragment,{}),(i=e.accordions)==null?void 0:i.map((c,l)=>r.jsxs(d.Accordion.Wrapper,{className:ma["accordion-modifier"],children:[r.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${l}`,openIndicator:r.jsx(d.Icon,{name:n.arrow_down}),closeIndicator:r.jsx(d.Icon,{name:n.arrow_up}),startOpen:o.includes(l),onClick:()=>a(u=>u.includes(l)?u.filter(m=>m!==l):[...u,l]),children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h3",{className:"typography-style-body-md-strong",children:c.title}),c.subtitle&&c.subtitle.length?r.jsx("h2",{children:c.subtitle}):r.jsx(r.Fragment,{})]})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:ma["accordion-body-modifier"],children:r.jsx(Ye.Editor,{editorKey:`${t}-editor-${l}`,blockRenderMap:wn,editorState:c.text?In(JSON.parse(c.text)):Ye.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${l}-${o.includes(l)}`))]})},qd=g.createContext({}),Yy=({data:e,children:t,...n})=>{var _,y,v,b,C,j,x,P,S,E,I,A,O;const[s,o]=g.useState(!0),{initialize:a,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(y=(_=e==null?void 0:e.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.slideTranstionTimer,showCarouselArrows:(b=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:b.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(P=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:P.backgroundColor,textColorVariant:(E=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:E.textColorVariant,content:((A=(I=e==null?void 0:e.content)==null?void 0:I.content)==null?void 0:A.items)??[]},u=(O=l.content)==null?void 0:O.filter(L=>!L.countDownEndDate||new Date(L.countDownEndDate)>new Date),m=u.length>1,h={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},p=()=>{o(!1)},f=d.helpers.ValidateProp({fieldTypes:wt.Mode,property:l.textColorVariant,fallback:"default"});return r.jsx(qd.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:m,backgroundStyle:h,handleCloseTipbar:p,mode:f,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...n},children:t})},at=()=>g.useContext(qd),Qy=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:n}}=at();return r.jsx(Nn,{dateEnd:new Date(e),TIME_ZONE:n,...t})},Zy="_tipbar_bt3p0_1",Jy="_tipbar__carousel_bt3p0_15",Jt={tipbar:Zy,tipbar__carousel:Jy,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},ev=({coupon:e,feedbackTitle:t,feedbackDescription:n,...s})=>{const{CONSTANTS:o}=at(),{addCouponSeller:a,cartStore:i}=xe(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,m]=g.useState(!1),[h,p]=g.useState(!1),f=async()=>{if(!i.items.length){p(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{h&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[h]),r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...s,onClick:f,disabled:c.status,className:Jt["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||n)&&r.jsx(Rt,{title:t,subtitle:n,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&r.jsx(Rt,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),h&&r.jsx(Rt,{title:o.TIPBAR_CONFIGS.coupon_cart_empty_title,subtitle:o.TIPBAR_CONFIGS.coupon_cart_empty_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-cart-empty-${e}`)]})},tv=({title:e,description:t,style:n,mode:s,className:o})=>r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&r.jsx("h3",{className:"typography-style-body-sm",style:n,children:e}),t&&r.jsx("p",{className:"typography-style-caption",style:n,children:t})]})}),nv=({coupon:e,...t})=>{const{CONSTANTS:n}=at();return r.jsx(d.Copy,{...t,iconCopy:n.ICONS.copy,iconSuccess:n.ICONS.check,children:e})},rv=({staticZone:e,type:t,className:n,description:s,title:o})=>{const{mode:a}=at();if(t==="countdown")return r.jsx(Qy,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:wt.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:wt.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?r.jsx(ev,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:wt.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?r.jsx(nv,{coupon:e.coupon,mode:i}):null}return r.jsx(tv,{title:o,description:s,mode:a,className:n})},pa=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:n}=at();return r.jsx(d.Button,{title:"fechar tipbar",className:Jt["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:r.jsx(d.Icon,{name:n.ICONS.close})}})},sv=({children:e,mode:t="default",showCarouselArrows:n=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=at(),i=g.useRef(null),c=(u,m)=>{var h,p;u.stopPropagation(),u.preventDefault(),m==="prev"?(h=o.controller)==null||h.prevPage():(p=o.controller)==null||p.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),r.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:Jt.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),r.jsx(d.Carousel.Body,{children:e}),n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},ov=({children:e,className:t})=>{const{hasCarousel:n,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=at(),u=n&&i;return r.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(Jt.tipbar,t),children:n?r.jsxs(r.Fragment,{children:[r.jsx(sv,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&r.jsx(pa,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):r.jsxs(r.Fragment,{children:[e,o&&r.jsx(pa,{handleCloseTipbar:l,mode:s})]})})},av=({children:e,highlightFirstSection:t,...n})=>{const{hasCarousel:s,carouselProps:o}=at(),a=r.jsx("div",{...n,className:Jt["tipbar-item"],children:e});return s?r.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},Vd=({className:e})=>{const{isOpen:t,slices:n}=at();return n.length&&t?r.jsx(ov,{children:n.map((s,o)=>{var a;return r.jsx(r.Fragment,{children:r.jsx(Qt,{href:s.link,children:r.jsx(av,{highlightFirstSection:s.highlightFirstSection,"data-justifyhighlightedsection":s.horizontalAlignHighlightedSection?s.horizontalAlignHighlightedSection:"center",children:s&&((a=s==null?void 0:s.items)!=null&&a.length)?s.items.map((i,c)=>r.jsx(rv,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};Vd.displayName="TipBar.Root";const cs=({className:e,...t})=>r.jsx(Yy,{...t,children:r.jsx(Vd,{className:e})});cs.displayName="TipBar";const iv=({CONSTANTS:e,data:t})=>{const{pathname:n}=ce(),{tipbarRef:s}=Ee(),o=c=>{const l=t==null?void 0:t.find(u=>{var m,h,p,f,_;return((h=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:h.deviceType)===c&&((_=(f=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:f.paths)==null?void 0:_.includes(n))});return l||(t==null?void 0:t.find(u=>{var m,h,p,f,_,y;return((h=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:h.deviceType)===c&&(!((f=(p=u.staticConfig)==null?void 0:p.staticConfig)!=null&&f.paths)||((y=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.paths.length)===0)}))},a=o("desktop"),i=o("mobile");return r.jsxs("div",{ref:s,className:T.responsive["responsive-flex"],children:[i&&r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx(cs,{data:i,CONSTANTS:e})}),a&&r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx(cs,{data:a,CONSTANTS:e})})]})},fa={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Wd=e=>{const{nextimage:t}=ce();return r.jsx(r.Fragment,{children:e.data.banners.map((n,s)=>r.jsx("div",{className:fa["card-image-wrapper"],children:r.jsx("div",{className:fa["card-image-container"],children:r.jsx(t,{src:n.image,alt:n.altImage?n.altImage:"Banner Coleção",width:500,height:600})})},s))})},cv=({SectionZone:e,name:t,storeId:n,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||T.fetchContentType("search",{name:t,storeId:n,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),r.jsx(e,{data:o??[]})},Gd=({data:{componentIndex:e,...t},CONSTANTS:n})=>r.jsx(Ks,{...t,CONSTANTS:n}),Kd=async e=>{const{type:t}=e,n=t==="collectionSearch"?"/api/search/product":"/api/search/crosseling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(a=>a.json()).then(a=>t==="collectionSearch"?a.data.products:a.products)).filter(a=>!!a.node.availability.status)},lv="_shelf__container_bi04n_10",Xd={shelf__container:lv},uv=({collectionSearch:e,title:t,CONSTANTS:n})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=_a.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=oe();return g.useEffect(()=>{if(!e)return;function u(){var m,h;Kd({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:((h=e==null?void 0:e.params)==null?void 0:h.sort)??n.ITEMS_DEFAULT_SORT}}).then(p=>{o(p)})}u()},[e]),g.useEffect(()=>{!c||s.length===0||l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:t??"Você também pode gostar"}}})},[c,s]),s.length===0?null:r.jsx("div",{ref:i,className:Xd.shelf__container,children:r.jsx(qt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(s)&&s.map(({node:u},m)=>{const{availability:{status:h}}=u;return h?r.jsx(qt.Card,{item:u,isMobile:a,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},u.id):null})})})},dv=({recommendationSearch:e,title:t,CONSTANTS:n})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=_a.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=oe(),u=g.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return g.useEffect(()=>{if(!e)return;function m(){var h;Kd({type:"recommendationSearch",facets:u,params:{count:((h=e==null?void 0:e.params)==null?void 0:h.count)??12,sort:n.ITEMS_DEFAULT_SORT}}).then(p=>o(p))}m()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const m=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:m},outsideEcommerceData:{item_list_name:m}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?r.jsx(ol,{products:s,innerRef:i,inView:c,CONSTANTS:n}):r.jsx("div",{ref:i,className:Xd.shelf__container,children:r.jsx(qt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(s)&&s.map(({node:m},h)=>{const{availability:{status:p}}=m;return p?r.jsx(qt.Card,{item:m,isMobile:a,size:"medium",index:h,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},Yd=({data:e,CONSTANTS:t})=>{const{productId:n}=ac();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((s,o)=>r.jsx(dv,{title:s.title,recommendationSearch:{type:s.product_group_option,productId:n,params:{count:s.number_of_items,sort:"score:desc"}},CONSTANTS:t},`shelf=${o}`))},Qd=({data:e,CONSTANTS:t})=>{var s;const n=(s=e==null?void 0:e.productLists)==null?void 0:s.filter(o=>!!o.collectionId||!!o.search_base_name);return!n||n.length===0?null:e.productLists.map((o,a)=>{const i=o.collectionId?{term:"",facets:[{key:"productclusterids",value:`${o.collectionId}`}]}:{term:o.search_base_name,facets:[]};return r.jsx(uv,{title:o.title,collectionSearch:{params:{count:o.number_of_items,sort:o.sort},...i},CONSTANTS:t},`shelf=${a}`)})},mv="_embedLiveContainer_1ss0l_2",pv="_embedLivePlayer_1ss0l_7",ha={embedLiveContainer:mv,embedLivePlayer:pv},Zd=({data:e})=>r.jsx("div",{className:ha.embedLiveContainer,children:r.jsx("div",{className:ha.embedLivePlayer,children:e.banner.videosrc?r.jsx(Ie.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):r.jsxs("div",{children:[r.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),r.jsx(Pd,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})}),fv="_popup_5taxs_9",hv="_popup__overlay_5taxs_19",_v="_popup__modal_5taxs_27",Be={popup:fv,popup__overlay:hv,popup__modal:_v,"popup__modal--form":"_popup__modal--form_5taxs_49","popup__modal--header":"_popup__modal--header_5taxs_66","popup__modal--status":"_popup__modal--status_5taxs_69","popup__modal--checkbox":"_popup__modal--checkbox_5taxs_78","popup__modal--success":"_popup__modal--success_5taxs_90","popup__modal--close":"_popup__modal--close_5taxs_101"},gv=e=>r.jsx("div",{className:Be["popup__modal--success"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{className:Be["text-structure-modifier"],children:[r.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),r.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),yv=e=>{const{title:t,description:n,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=Xn(),[l,u]=g.useState(!1);return r.jsx("form",{onSubmit:i,className:Be.formContainer,children:r.jsxs("div",{className:Be["popup__modal--form"],children:[r.jsxs(d.TextStructure.DivWrapper,{className:Be["popup__modal--header"],children:[r.jsx("strong",{className:"typography-style-body-md-strong",children:t}),r.jsx("p",{className:"typography-style-body-xs",children:n})]}),c?r.jsx(gv,{...e}):r.jsxs(r.Fragment,{children:[s.map(m=>r.jsx(At.FieldGroup,{group:m,children:r.jsx(At.FieldWrapper,{fields:m.fields})},m.groupLabel)),r.jsx(d.Checkbox,{className:Be["popup__modal--checkbox"],adornment:r.jsx(d.Icon,{name:o.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),r.jsxs("div",{children:[!l&&r.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:r.jsxs("p",{className:"typography-style-body-caption",children:[r.jsx(d.Icon,{size:"small",name:o.alert_circle}),Ym]})}),r.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:Zm}),a.length?r.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:r.jsx("p",{className:d.helpers.classNameConcat(Be.formSubmitWarning,"typography-style-body-xs"),children:Qm})}):null]})]})]})})},Jd=({data:e,CONSTANTS:t})=>{const[n,s]=g.useState(!1),o=typeof window<"u"?window.sessionStorage.getItem(t.POPUP_TRACK_STORAGE)||window.localStorage.getItem(t.POPUP_SUBMITTED_STORAGE):null,a=()=>{s(!1),window.sessionStorage.setItem(t.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!o&&s(!0),2e3)},[]),e.active&&n?r.jsxs("div",{className:Be.popup,children:[r.jsx("div",{onClick:a,className:Be.popup__overlay}),r.jsxs("div",{className:Be.popup__modal,children:[r.jsx(d.Button,{onClick:a,variant:"tertiary",className:Be["popup__modal--close"],children:r.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:t.ICONS.close,size:"medium"})}),r.jsx("div",{children:r.jsx(Ie.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),r.jsx(kd,{...e,children:r.jsx(yv,{...e,ICONS:t.ICONS})})]})]}):null};class vv extends g.Component{constructor(){super(...arguments);tn(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(n,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(n==null?void 0:n.message)??n),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:n}=this.state,{children:s,fallback:o}=this.props;return n&&process.env.NODE_ENV==="production"?null:n&&o!==void 0?o:s}}const xv={"Image Grid":Wd,"Embed Live":Zd,"Banner Carousel":Fd,Banner:Vs,"Bennefits Bar":Bd,newsletter:Gd,TextContent:Ud,TextAccordion:Hd,"Product Carousel":Qd,"PDP Product Carousel":Yd,"Popup Modal":Jd},bv=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:n})=>e==null?void 0:e.map((s,o)=>{const a=xv[s.name],i={...(n==null?void 0:n[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?r.jsx(vv,{name:s.name,children:r.jsx(a,{data:s.data,...i})},`section-zone-component-${o}`):null}),jv={Banner:Xy,BannerSection:Zt,BennefitsBarSection:Bd,SingleBannerSection:Vs,TextContentSection:Ud,BannerCarousel:Fd,TextAccordionSection:Hd,TipbarScreening:iv,ImageGrid:Wd,SearchPageScreening:T.SearchPageScreening,SearchContent:cv,NewsletterSection:Gd,PDPProductCarousel:Yd,ProductCarousel:Qd,EmbedLive:Zd,PopupModalSection:Jd,SectionZone:bv},Cv={Components:jv,helpers:Lg};exports.cms=Cv;exports.contexts=dc;exports.data=As;exports.layout=Cn;exports.scripts=Wy;
|
|
58
|
+
`},Vy=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:qy},Symbol.toStringTag,{value:"Module"})),Wy={helpers:Vy},is={"custom-carousel":"_custom-carousel_t5fgp_1","carrousel-arrows-display-controller":"_carrousel-arrows-display-controller_t5fgp_10","carousel-controllers-modifier":"_carousel-controllers-modifier_t5fgp_19"};function Gy(e,t){const{mediatorRef:n}=ne();g.useEffect(()=>n.current.subscribe(e,t),[e,t])}const da=({prevOnClick:e,nextOnClick:t,onBulletClick:n,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,h]=g.useState("default");return Gy("herobanner:change_controllers_variant",p=>{l&&h(p.includes("white")?"inverse":"default")}),r.jsxs(d.Carousel.Controller,{className:is["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[r.jsxs(d.Carousel.Arrows,{className:is["carrousel-arrows-display-controller"],children:[r.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:r.jsx(d.Icon,{name:u.arrow_left})},mode:m}),r.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:r.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),r.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:n,mode:m})]})},Ky=({children:e,data:t,banner:n,...s})=>{const{mediatorRef:o}=ne();return t.data.first?r.jsx(Bn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",n.headerVariant)},...s,children:e}):r.jsx(r.Fragment,{children:e})},Fd=e=>{const{initialize:t,pagination:n,controller:s,itemsStyles:o}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=g.useRef(void 0),i=g.useMemo(()=>ad(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&n.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,n.totalPages]),l=g.useCallback(m=>{clearInterval(a.current),c(),m()},[c]),u=g.useMemo(()=>{var m;return{nextOnClick:()=>l(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>l(()=>s==null?void 0:s.prevPage()),onBulletClick:h=>l(()=>s==null?void 0:s.navigateTo(h)),currentPage:n.currentPage,totalPages:n.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[n.currentPage,n.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),r.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(is["custom-carousel"],e.data.config.fullWidth?"":"common-section"),"data-infinity-border":!0,style:{...e.data.config.marginTop!=="0px"&&{marginTop:`-${e.data.config.marginTop}`},...e.data.config.marginBottom!=="0px"&&{marginBottom:`-${e.data.config.marginBottom}`}},children:[i.shouldRender==="top"&&n.totalPages>1?r.jsx(da,{ICONS:e.ICONS,...u,isFirst:e.data.first}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((m,h)=>r.jsx(d.Carousel.Item,{style:o,children:r.jsx(Ky,{data:e,banner:m,children:r.jsx(Zt,{ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:m,index:h,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&h===0&&{priority:!0}})})},`hero-banner-item-${h}`))}),i.shouldRender==="bottom"&&n.totalPages>1?r.jsx(da,{ICONS:e.ICONS,...u}):r.jsx(r.Fragment,{})]})},Xy={Banner:Vs},Et={"row-controller-modifier":"_row-controller-modifier_co4wb_1","carousel-title-modifier":"_carousel-title-modifier_co4wb_18","carousel-modifier":"_carousel-modifier_co4wb_22","card-modifier":"_card-modifier_co4wb_26"},Bd=({data:e,CONSTANTS:t})=>{var u;const{isMobile:n}=ne(),s=e.config.size??"medium",o=e.config.disableCarouselMobile??!1,{initialize:a,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({itemsPerPage:n?e==null?void 0:e.config.slidesPerViewMobile:(u=e==null?void 0:e.config)==null?void 0:u.slidesPerView,gap:n?e.config.gapMobile:e.config.gap,direction:n&&o?"column":"row"});return r.jsx(d.Utils.Column,{style:{width:s==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:r.jsxs(d.Carousel.Root,{innerRef:m=>{a(m)},className:d.helpers.classNameConcat(Et["carousel-modifier"],"common-section"),children:[s==="medium"?r.jsxs(d.TextStructure.Root,{children:[t.ACTIVE_BENNEFITS_BAR_TITLE&&r.jsx(d.TextStructure.DivWrapper,{className:Et["carousel-title-modifier"],children:r.jsx("h2",{className:"typography-style-body-lg",children:t.BENNEFITS_BAR_TITLE})}),n&&i.totalPages>1&&r.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Et["row-controller-modifier"],t.ACTIVE_BENNEFITS_BAR_TITLE?Et["title-on"]:void 0),children:r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.ICONS.arrow_right})}})]})})]}):r.jsx(r.Fragment,{}),r.jsx(d.Carousel.Body,{children:e.bennefit.map((m,h)=>r.jsx(d.Carousel.Item,{className:Et["card-modifier"],style:l,children:r.jsx(d.Card,{stroke:!0,padding:"small",children:r.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[s==="medium"?"top":"start"]:r.jsx(d.Icon,{name:m.icon,size:s==="medium"?"medium":"small"})},children:r.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[r.jsx("h3",{className:"typography-style-body-md",children:m.title}),m.subtitle&&m.subtitle.length?r.jsx("p",{className:"typography-style-body-xs",children:m.subtitle}):r.jsx(r.Fragment,{})]})})})},`bennefit=${h}`))}),!n&&i.totalPages>1?r.jsxs(d.Carousel.Controller,{className:Et["row-controller-modifier"],children:[r.jsxs(d.Carousel.Arrows,{children:[r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:r.jsx(d.Icon,{name:t.ICONS.arrow_left})}}),r.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:r.jsx(d.Icon,{name:t.ICONS.arrow_right})}})]}),r.jsx(d.Carousel.Bullets,{page:i.currentPage,total:i.totalPages,onBulletClick:m=>c==null?void 0:c.navigateTo(m)})]}):r.jsx(r.Fragment,{})]})})},Ud=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:n,className:s})=>r.jsx("div",{className:d.helpers.classNameConcat(rs.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:r.jsx(id,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:n})}),ma={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Hd=({data:e,id:t,ICONS:n,className:s})=>{var i;const[o,a]=g.useState([]);return r.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{children:r.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):r.jsx(r.Fragment,{}),(i=e.accordions)==null?void 0:i.map((c,l)=>r.jsxs(d.Accordion.Wrapper,{className:ma["accordion-modifier"],children:[r.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${l}`,openIndicator:r.jsx(d.Icon,{name:n.arrow_down}),closeIndicator:r.jsx(d.Icon,{name:n.arrow_up}),startOpen:o.includes(l),onClick:()=>a(u=>u.includes(l)?u.filter(m=>m!==l):[...u,l]),children:r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{children:[r.jsx("h3",{className:"typography-style-body-md-strong",children:c.title}),c.subtitle&&c.subtitle.length?r.jsx("h2",{children:c.subtitle}):r.jsx(r.Fragment,{})]})})}),r.jsx(d.Accordion.Body,{children:r.jsx(d.TextStructure.Root,{children:r.jsx(d.TextStructure.DivWrapper,{className:ma["accordion-body-modifier"],children:r.jsx(Ye.Editor,{editorKey:`${t}-editor-${l}`,blockRenderMap:wn,editorState:c.text?In(JSON.parse(c.text)):Ye.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${l}-${o.includes(l)}`))]})},qd=g.createContext({}),Yy=({data:e,children:t,...n})=>{var _,y,v,b,C,j,x,P,S,E,I,A,O;const[s,o]=g.useState(!0),{initialize:a,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(y=(_=e==null?void 0:e.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.slideTranstionTimer,showCarouselArrows:(b=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:b.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(P=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:P.backgroundColor,textColorVariant:(E=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:E.textColorVariant,content:((A=(I=e==null?void 0:e.content)==null?void 0:I.content)==null?void 0:A.items)??[]},u=(O=l.content)==null?void 0:O.filter(L=>!L.countDownEndDate||new Date(L.countDownEndDate)>new Date),m=u.length>1,h={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},p=()=>{o(!1)},f=d.helpers.ValidateProp({fieldTypes:wt.Mode,property:l.textColorVariant,fallback:"default"});return r.jsx(qd.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:m,backgroundStyle:h,handleCloseTipbar:p,mode:f,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...n},children:t})},at=()=>g.useContext(qd),Qy=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:n}}=at();return r.jsx(Nn,{dateEnd:new Date(e),TIME_ZONE:n,...t})},Zy="_tipbar_bt3p0_1",Jy="_tipbar__carousel_bt3p0_15",Jt={tipbar:Zy,tipbar__carousel:Jy,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},ev=({coupon:e,feedbackTitle:t,feedbackDescription:n,...s})=>{const{CONSTANTS:o}=at(),{addCouponSeller:a,cartStore:i}=xe(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,m]=g.useState(!1),[h,p]=g.useState(!1),f=async()=>{if(!i.items.length){p(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{h&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[h]),r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{...s,onClick:f,disabled:c.status,className:Jt["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||n)&&r.jsx(Rt,{title:t,subtitle:n,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&r.jsx(Rt,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),h&&r.jsx(Rt,{title:o.TIPBAR_CONFIGS.coupon_cart_empty_title,subtitle:o.TIPBAR_CONFIGS.coupon_cart_empty_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-cart-empty-${e}`)]})},tv=({title:e,description:t,style:n,mode:s,className:o})=>r.jsx(d.TextStructure.Root,{children:r.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&r.jsx("h3",{className:"typography-style-body-sm",style:n,children:e}),t&&r.jsx("p",{className:"typography-style-caption",style:n,children:t})]})}),nv=({coupon:e,...t})=>{const{CONSTANTS:n}=at();return r.jsx(d.Copy,{...t,iconCopy:n.ICONS.copy,iconSuccess:n.ICONS.check,children:e})},rv=({staticZone:e,type:t,className:n,description:s,title:o})=>{const{mode:a}=at();if(t==="countdown")return r.jsx(Qy,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:wt.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:wt.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?r.jsx(ev,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:wt.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?r.jsx(nv,{coupon:e.coupon,mode:i}):null}return r.jsx(tv,{title:o,description:s,mode:a,className:n})},pa=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:n}=at();return r.jsx(d.Button,{title:"fechar tipbar",className:Jt["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:r.jsx(d.Icon,{name:n.ICONS.close})}})},sv=({children:e,mode:t="default",showCarouselArrows:n=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=at(),i=g.useRef(null),c=(u,m)=>{var h,p;u.stopPropagation(),u.preventDefault(),m==="prev"?(h=o.controller)==null||h.prevPage():(p=o.controller)==null||p.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);i.current=u}},[s,o]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),r.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:Jt.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),r.jsx(d.Carousel.Body,{children:e}),n&&r.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:r.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},ov=({children:e,className:t})=>{const{hasCarousel:n,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=at(),u=n&&i;return r.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(Jt.tipbar,t),children:n?r.jsxs(r.Fragment,{children:[r.jsx(sv,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&r.jsx(pa,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):r.jsxs(r.Fragment,{children:[e,o&&r.jsx(pa,{handleCloseTipbar:l,mode:s})]})})},av=({children:e,highlightFirstSection:t,...n})=>{const{hasCarousel:s,carouselProps:o}=at(),a=r.jsx("div",{...n,className:Jt["tipbar-item"],children:e});return s?r.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},Vd=({className:e})=>{const{isOpen:t,slices:n}=at();return n.length&&t?r.jsx(ov,{children:n.map((s,o)=>{var a;return r.jsx(r.Fragment,{children:r.jsx(Qt,{href:s.link,children:r.jsx(av,{highlightFirstSection:s.highlightFirstSection,"data-justifyhighlightedsection":s.horizontalAlignHighlightedSection?s.horizontalAlignHighlightedSection:"center",children:s&&((a=s==null?void 0:s.items)!=null&&a.length)?s.items.map((i,c)=>r.jsx(rv,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};Vd.displayName="TipBar.Root";const cs=({className:e,...t})=>r.jsx(Yy,{...t,children:r.jsx(Vd,{className:e})});cs.displayName="TipBar";const iv=({CONSTANTS:e,data:t})=>{const{pathname:n}=ce(),{tipbarRef:s}=Ee(),o=c=>{const l=t==null?void 0:t.find(u=>{var m,h,p,f,_;return((h=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:h.deviceType)===c&&((_=(f=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:f.paths)==null?void 0:_.includes(n))});return l||(t==null?void 0:t.find(u=>{var m,h,p,f,_,y;return((h=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:h.deviceType)===c&&(!((f=(p=u.staticConfig)==null?void 0:p.staticConfig)!=null&&f.paths)||((y=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.paths.length)===0)}))},a=o("desktop"),i=o("mobile");return r.jsxs("div",{ref:s,className:T.responsive["responsive-flex"],children:[i&&r.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:r.jsx(cs,{data:i,CONSTANTS:e})}),a&&r.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:r.jsx(cs,{data:a,CONSTANTS:e})})]})},fa={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Wd=e=>{const{nextimage:t}=ce();return r.jsx(r.Fragment,{children:e.data.banners.map((n,s)=>r.jsx("div",{className:fa["card-image-wrapper"],children:r.jsx("div",{className:fa["card-image-container"],children:r.jsx(t,{src:n.image,alt:n.altImage?n.altImage:"Banner Coleção",width:500,height:600})})},s))})},cv=({SectionZone:e,name:t,storeId:n,previewId:s})=>{const[o,a]=g.useState();return g.useEffect(()=>{o||T.fetchContentType("search",{name:t,storeId:n,previewId:s}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&a(i.data[0])})},[]),r.jsx(e,{data:o??[]})},Gd=({data:{componentIndex:e,...t},CONSTANTS:n})=>r.jsx(Ks,{...t,CONSTANTS:n}),Kd=async e=>{const{type:t}=e,n=t==="collectionSearch"?"/api/search/product":"/api/search/crosseling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(a=>a.json()).then(a=>t==="collectionSearch"?a.data.products:a.products)).filter(a=>!!a.node.availability.status)},lv="_shelf__container_bi04n_10",Xd={shelf__container:lv},uv=({collectionSearch:e,title:t,CONSTANTS:n,searchModal:s})=>{const[o,a]=g.useState([]),{isMobile:i}=ne(),{ref:c,inView:l}=_a.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=oe();return g.useEffect(()=>{if(!e)return;function m(){var h,p;Kd({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((h=e==null?void 0:e.params)==null?void 0:h.count)??12,sort:((p=e==null?void 0:e.params)==null?void 0:p.sort)??n.ITEMS_DEFAULT_SORT}}).then(f=>{a(f)})}m()},[e]),g.useEffect(()=>{!l||o.length===0||u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[l,o]),o.length===0?null:r.jsx("div",{ref:c,className:Xd.shelf__container,children:r.jsx(qt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(o)&&o.map(({node:m},h)=>{const{availability:{status:p}}=m;return p?r.jsx(qt.Card,{item:m,isMobile:i,size:"medium",index:h,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},dv=({recommendationSearch:e,title:t,CONSTANTS:n})=>{const[s,o]=g.useState([]),{isMobile:a}=ne(),{ref:i,inView:c}=_a.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=oe(),u=g.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return g.useEffect(()=>{if(!e)return;function m(){var h;Kd({type:"recommendationSearch",facets:u,params:{count:((h=e==null?void 0:e.params)==null?void 0:h.count)??12,sort:n.ITEMS_DEFAULT_SORT}}).then(p=>o(p))}m()},[u,e]),g.useEffect(()=>{if(!c||s.length===0||(e==null?void 0:e.type)==="suggestions")return;const m=t??"Você também pode gostar";l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:s},customData:{item_list_name:m},outsideEcommerceData:{item_list_name:m}}})},[c,s]),(s==null?void 0:s.length)===0?null:(e==null?void 0:e.type)==="suggestions"?r.jsx(ol,{products:s,innerRef:i,inView:c,CONSTANTS:n}):r.jsx("div",{ref:i,className:Xd.shelf__container,children:r.jsx(qt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:n.ICONS,children:Array.isArray(s)&&s.map(({node:m},h)=>{const{availability:{status:p}}=m;return p?r.jsx(qt.Card,{item:m,isMobile:a,size:"medium",index:h,shelfTitle:t??"Você também pode gostar",CONSTANTS:n},m.id):null})})})},Yd=({data:e,CONSTANTS:t})=>{const{productId:n}=ac();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((s,o)=>r.jsx(dv,{title:s.title,recommendationSearch:{type:s.product_group_option,productId:n,params:{count:s.number_of_items,sort:"score:desc"}},CONSTANTS:t},`shelf=${o}`))},Qd=({data:e,CONSTANTS:t,searchModal:n})=>{var o;const s=(o=e==null?void 0:e.productLists)==null?void 0:o.filter(a=>!!a.collectionId||!!a.search_base_name);return!s||s.length===0?null:s.map((a,i)=>{const c=a.collectionId?{term:"",facets:[{key:"productclusterids",value:`${a.collectionId}`}]}:{term:a.search_base_name,facets:[]};return r.jsx(uv,{title:a.title,collectionSearch:{params:{count:a.number_of_items,sort:a.sort},...c},searchModal:n,CONSTANTS:t},`shelf=${i}`)})},mv="_embedLiveContainer_1ss0l_2",pv="_embedLivePlayer_1ss0l_7",ha={embedLiveContainer:mv,embedLivePlayer:pv},Zd=({data:e})=>r.jsx("div",{className:ha.embedLiveContainer,children:r.jsx("div",{className:ha.embedLivePlayer,children:e.banner.videosrc?r.jsx(Ie.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):r.jsxs("div",{children:[r.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),r.jsx(Pd,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})}),fv="_popup_5taxs_9",hv="_popup__overlay_5taxs_19",_v="_popup__modal_5taxs_27",Be={popup:fv,popup__overlay:hv,popup__modal:_v,"popup__modal--form":"_popup__modal--form_5taxs_49","popup__modal--header":"_popup__modal--header_5taxs_66","popup__modal--status":"_popup__modal--status_5taxs_69","popup__modal--checkbox":"_popup__modal--checkbox_5taxs_78","popup__modal--success":"_popup__modal--success_5taxs_90","popup__modal--close":"_popup__modal--close_5taxs_101"},gv=e=>r.jsx("div",{className:Be["popup__modal--success"],children:r.jsx(d.TextStructure.Root,{adornment:{start:r.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:r.jsxs(d.TextStructure.DivWrapper,{className:Be["text-structure-modifier"],children:[r.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),r.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),yv=e=>{const{title:t,description:n,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=Xn(),[l,u]=g.useState(!1);return r.jsx("form",{onSubmit:i,className:Be.formContainer,children:r.jsxs("div",{className:Be["popup__modal--form"],children:[r.jsxs(d.TextStructure.DivWrapper,{className:Be["popup__modal--header"],children:[r.jsx("strong",{className:"typography-style-body-md-strong",children:t}),r.jsx("p",{className:"typography-style-body-xs",children:n})]}),c?r.jsx(gv,{...e}):r.jsxs(r.Fragment,{children:[s.map(m=>r.jsx(At.FieldGroup,{group:m,children:r.jsx(At.FieldWrapper,{fields:m.fields})},m.groupLabel)),r.jsx(d.Checkbox,{className:Be["popup__modal--checkbox"],adornment:r.jsx(d.Icon,{name:o.check,size:"small"}),name:"terms-and-conditions",label:"Li e aceito os termos de política de privacidade abaixo.",sizeVariant:"small",checked:l,onChange:()=>u(!l)}),r.jsxs("div",{children:[!l&&r.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:r.jsxs("p",{className:"typography-style-body-caption",children:[r.jsx(d.Icon,{size:"small",name:o.alert_circle}),Ym]})}),r.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:Zm}),a.length?r.jsx(d.TextStructure.DivWrapper,{className:Be["popup__modal--status"],children:r.jsx("p",{className:d.helpers.classNameConcat(Be.formSubmitWarning,"typography-style-body-xs"),children:Qm})}):null]})]})]})})},Jd=({data:e,CONSTANTS:t})=>{const[n,s]=g.useState(!1),o=typeof window<"u"?window.sessionStorage.getItem(t.POPUP_TRACK_STORAGE)||window.localStorage.getItem(t.POPUP_SUBMITTED_STORAGE):null,a=()=>{s(!1),window.sessionStorage.setItem(t.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!o&&s(!0),2e3)},[]),e.active&&n?r.jsxs("div",{className:Be.popup,children:[r.jsx("div",{onClick:a,className:Be.popup__overlay}),r.jsxs("div",{className:Be.popup__modal,children:[r.jsx(d.Button,{onClick:a,variant:"tertiary",className:Be["popup__modal--close"],children:r.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:t.ICONS.close,size:"medium"})}),r.jsx("div",{children:r.jsx(Ie.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),r.jsx(kd,{...e,children:r.jsx(yv,{...e,ICONS:t.ICONS})})]})]}):null};class vv extends g.Component{constructor(){super(...arguments);tn(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(n,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(n==null?void 0:n.message)??n),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:n}=this.state,{children:s,fallback:o}=this.props;return n&&process.env.NODE_ENV==="production"?null:n&&o!==void 0?o:s}}const xv={"Image Grid":Wd,"Embed Live":Zd,"Banner Carousel":Fd,Banner:Vs,"Bennefits Bar":Bd,newsletter:Gd,TextContent:Ud,TextAccordion:Hd,"Product Carousel":Qd,"PDP Product Carousel":Yd,"Popup Modal":Jd},bv=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:n})=>e==null?void 0:e.map((s,o)=>{const a=xv[s.name],i={...(n==null?void 0:n[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?r.jsx(vv,{name:s.name,children:r.jsx(a,{data:s.data,...i})},`section-zone-component-${o}`):null}),jv={Banner:Xy,BannerSection:Zt,BennefitsBarSection:Bd,SingleBannerSection:Vs,TextContentSection:Ud,BannerCarousel:Fd,TextAccordionSection:Hd,TipbarScreening:iv,ImageGrid:Wd,SearchPageScreening:T.SearchPageScreening,SearchContent:cv,NewsletterSection:Gd,PDPProductCarousel:Yd,ProductCarousel:Qd,EmbedLive:Zd,PopupModalSection:Jd,SectionZone:bv},Cv={Components:jv,helpers:Lg};exports.cms=Cv;exports.contexts=dc;exports.data=As;exports.layout=Cn;exports.scripts=Wy;
|