@soma-vertical-web/multi-lib 1.0.33 → 1.0.35
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/constants.d.ts +1 -0
- package/contexts/contexts/newsletter/Context.d.ts +1 -1
- package/contexts/contexts/plp/FilterContext.d.ts +1 -1
- package/contexts/contexts/plp/PLPContext.d.ts +1 -1
- package/contexts/contexts/plp/PLPInfiniteContext.d.ts +6 -0
- package/contexts/contexts/plp/PLPInfiniteContext.tsx.d.ts +1 -1
- package/contexts/contexts/search/Search.d.ts +1 -1
- package/contexts/hooks/useScrollRestorationInfinite.d.ts +1 -1
- package/contexts/index.d.ts +4 -16
- package/contexts/store/plp.d.ts +2 -2
- package/data/api/DitoIngest/authorization/index.d.ts +1 -0
- package/data/api/DitoIngest/ditoIngestService.d.ts +3 -0
- package/data/helpers/plp/index.d.ts +4 -13
- package/data/helpers/search/facets.d.ts +1 -0
- package/data/helpers/search/index.d.ts +4 -0
- package/data/helpers/search/product/index.d.ts +13 -1
- package/data/helpers/search/search.d.ts +1 -0
- package/data/index.d.ts +2 -0
- package/index-AgO_aUeQ.mjs +2371 -0
- package/index-Cqk3VcE0.js +4 -0
- package/index-D0PGMDh5.js +4 -0
- package/index-DctCSt6v.mjs +2695 -0
- package/index.js +17 -17
- package/index.mjs +11380 -9243
- package/index2.js +2 -2
- package/index2.mjs +736 -653
- package/layout/index.d.ts +4 -4
- package/layout/team-component/Newsletter/index.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Banners/Banners.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Filters/Filters.d.ts +2 -6
- package/layout/template/PDC/Composite/InfiniteScroller/InfiniteScroller.d.ts +3 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Card.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/Loader.d.ts +1 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Composite/NextPage.d.ts +4 -1
- package/layout/template/PDC/Composite/InfiniteScroller/Page/Page.d.ts +2 -2
- package/layout/template/PDC/Composite/InfiniteScroller/Page/index.d.ts +10 -3
- package/layout/template/PDC/Composite/Pagination/Pagination.d.ts +1 -1
- package/layout/template/PDC/PDC.d.ts +1 -1
- package/layout/template/PDC/index.d.ts +2 -2
- package/layout/template/PDP/Composite/Info/MainContent/Similars/index.d.ts +1 -1
- package/layout/template/SearchResult/Composite/Products.d.ts +1 -1
- package/package.json +1 -1
- package/server.d.ts +6 -0
- package/style.css +1 -1
- package/types/cms/Sections/Newsletter/index.d.ts +4 -0
- package/types/contexts/contexts/plp.d.ts +62 -20
- package/types/contexts/contexts/search.d.ts +29 -28
- package/types/contexts/hooks/index.d.ts +0 -2
- package/types/data/api/dito-ingest/index.d.ts +12 -1
- package/types/layout/team-components/Newsletter/index.d.ts +6 -0
- package/types/layout/team-components/PLPNavigation/index.d.ts +0 -2
- package/types/layout/templates/PDP/index.d.ts +0 -1
- package/types/layout/templates/PLP/index.d.ts +14 -4
package/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";var pm=Object.defineProperty;var fm=(e,t,r)=>t in e?pm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gt=(e,t,r)=>fm(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),T=require("./index-CXSKhXO3.js"),Qe=require("idb-keyval"),Pt=require("zustand"),Xr=require("js-cookie"),d=require("@soma-vertical-web/core-components"),kt=require("axios"),Yr=require("@date-fns/tz"),hm=require("jose"),Ot=require("@soma-vertical-web/foundations"),ws=require("react-dom"),Je=require("draft-js"),ka=require("react-intersection-observer"),Ns=g.createContext({}),_m=({data:e,children:t})=>n.jsx(Ns.Provider,{value:{tags:e==null?void 0:e.config},children:t}),_t=()=>{const{tags:e}=g.useContext(Ns),t=g.useCallback(r=>{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(p=>{var f;return(f=r??[])==null?void 0:f.find(h=>h.id===p.key)}),a=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(p=>{var f;return(f=r??[])==null?void 0:f.find(h=>h.id===p.key)}),o=e==null?void 0:e.flagPdp,i=(r==null?void 0:r.find(p=>{var f;return p.id===((f=e==null?void 0:e.flagGoldenPdp)==null?void 0:f.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:s,institucional:a,flagPdp:o,flagGoldenPdp:i}},[e]);return{tags:e,getAvailableProductTag:t}},Oa=({gridScrollBack:e})=>{g.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},La=g.createContext({}),gm=({children:e,gridScrollBack:t})=>{const r=g.useRef(null);return Oa({gridScrollBack:t}),n.jsx(La.Provider,{value:{sizesContainerRef:r},children:e})},Ma=()=>{const e=g.useContext(La);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},dt=({event:e,data:t})=>{const r=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&r.push({ecommerce:null}),r.push({...e&&{event:`custom_${e}`},...t})},Se={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:r,commonData:s,customData:a,promotionInfo:o,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,p={...r==="view_item"?{currency:Se.configs.currency,value:m,grade_disponivel:l??(u?Da(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:m,currency:Se.configs.currency}:{}},f=mn({data:s,customData:{...a,...i,...o},configs:Se.configs});dt({event:r,data:{...c,ecommerce:{...i,...p,items:[f]}}}),typeof t=="function"&&t(f,p)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:s,outsideEcommerceData:a,customData:o}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>mn({data:{...c},customData:{...r,index:l,...o!=null&&o.item_list_name?{item_list_name:o==null?void 0:o.item_list_name}:s},configs:Se.configs}));dt({event:"view_item_list",data:{...a,ecommerce:{...o!=null&&o.item_list_name?{item_list_name:o==null?void 0:o.item_list_name}:s,items:i}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:s,supportData:{selectedSkus:a,price:o},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=r.map(p=>{var y,x,v,C,j,b,w,S,P;const f=a==null?void 0:a.find(N=>(p.productId??p.id)===N.productId);let h={...i,...c};if(f){const N=za(),R=Ba(N,f);R&&(h={...h,...R}),t==="add_to_cart"&&(i||c)&&Qr({persistedData:N,type:"add",sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&Qr({persistedData:N,type:"remove",sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku)})}u+=p.price??((v=(x=(y=f==null?void 0:f.offers)==null?void 0:y.offers)==null?void 0:x[0])==null?void 0:v.price)??0;const _=(f==null?void 0:f.size)??T.getColorAndSizeFromSkuName((f==null?void 0:f.skuName)??(f==null?void 0:f.name)??((C=p.itemOffered)==null?void 0:C.skuName),Se.configs.NAME_SPLIT_SYMBOL).size;return mn({data:p,customData:{...s,...h??{...i,...c},item_sku:(f==null?void 0:f.id)??(f==null?void 0:f.sku)??((j=p.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??p.quantity??1,item_variant2:_,seller_id:(f==null?void 0:f.sellerId)??(f==null?void 0:f.seller)??((P=(S=(w=(b=f==null?void 0:f.offers)==null?void 0:b.offers)==null?void 0:w[0])==null?void 0:S.seller)==null?void 0:P.identifier)??p.seller},configs:Se.configs})});dt({event:t,data:{...l,ecommerce:{value:o??u,currency:Se.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:r,outsideEcommerceData:s}=e,a={},o={};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 p;const u=((p=Se.configs.PLP_FILTERS.find(f=>f.key===c))==null?void 0:p.eventLabel)??c,m=(a==null?void 0:a[u])||[];u==="price_range"&&l.replace(":","-"),a[u]=[...m,l]}),Object.keys(a).forEach(c=>o[c]=a[c].join(", "))),dt({event:"filter",data:{...s,...o,...r}})},viewCartEvent:e=>{var m,p,f,h,_,y,x,v,C,j;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:s}=t;if(!s)return;const a=window.localStorage.getItem("persistedCartEventsData"),o=a?JSON.parse(a):{},i=s.items.map(b=>{const{promotionInfo:w,itemList:S}=o[b.id]??{};return mn({data:{...b,price:b.price/100,listPrice:b.listPrice/100},customData:{...w,...S,item_sku:b.id??b.itemOffered.sku,quantity:b.quantity??1},configs:Se.configs})}),c=(((m=s.totalizers.find(b=>b.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((p=s.totalizers.find(b=>b.name==="Total dos Descontos"))==null?void 0:p.value)??0)/100,u=((f=s.marketingData)==null?void 0:f.utmiCampaign)===Se.configs.VENDOR_CODE?(h=s.marketingData)==null?void 0:h.utmCampaign:(y=String((_=s.openTextField)==null?void 0:_.value))==null?void 0:y.split(" - ")[0];dt({event:"view_cart",data:{...r,ecommerce:{currency:Se.configs.currency,value:c+l,total_discount:Math.abs(l),cep_preenchido:!!((v=(x=s.shippingData)==null?void 0:x.address)!=null&&v.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:r}=e;dt({event:t,data:{...r}})}},Da=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),ym=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Se.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},mn=({data:e,customData:t,configs:r})=>({...xm(e,r==null?void 0:r.MAIN_IMAGE),...vm(e),...bm(e),...jm(e),...t}),Fa=()=>{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("_"))??[]:[]},za=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Ba=(e,t)=>e==null?void 0:e[t],Qr=({persistedData:e,type:t,sku:r,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:s}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},xm=(e,t="1")=>{var o,i,c,l,u,m,p,f,h,_,y;const r=e.productReference??e.gtin??e.productRefId,s=e.image??((i=(o=e.items)==null?void 0:o[0])==null?void 0:i.images)??((c=e.itemOffered)==null?void 0:c.image),a=s==null?void 0:s.find(x=>x.alternateName===t||x.imageLabel===t||x.keywords===t);return{item_id:e.productId??((l=e.isVariantOf)==null?void 0:l.productGroupID)??((u=e.isVariationOf)==null?void 0:u.productGroupID)??((p=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:p.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??T.splitNameAndSizeFromFullName((f=e.itemOffered)==null?void 0:f.name,Se.configs.NAME_SPLIT_SYMBOL).name,item_brand:((h=e.brand)==null?void 0:h.brandName)??((_=e.brand)==null?void 0:_.name)??e.brand??((y=e.itemOffered)==null?void 0:y.brand.name),item_url:`${Se.configs.storeUrl}${e.linkText}/p`,item_image:(a==null?void 0:a.url)??(a==null?void 0:a.imageUrl)}},fo=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,vm=e=>{var u,m;const{categories:t,categoriesIds:r}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),a=r??((m=e.itemOffered)==null?void 0:m.categoriesIds),o=fo(s),i=fo(a),c=o.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Se.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]}}},bm=e=>{var a,o,i,c,l,u;const t=((a=e.itemOffered)==null?void 0:a.skuName)??((c=(i=(o=e.isVariantOf)==null?void 0:o.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:r,size:s}=T.getColorAndSizeFromSkuName(t,Se.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:s}}},jm=e=>{var l,u;const{price:t,listPrice:r,installments:s}=e,a=t??((l=e.offers)==null?void 0:l.lowPrice)??0,o=r??((u=e.offers)==null?void 0:u.highPrice)??0,i=o?o-a:0,c=i%1===0?i:Number(i.toFixed(2));return{...t&&{price:a??o},...o&&{list_price:o,discount:c},...s&&{installments:s==null?void 0:s.count,installment_value:s==null?void 0:s.value},item_currency:Se.configs.currency}},Ua=()=>{const[e,t]=Fa(),[r,s]=e.split("-"),a=r.includes("shop")||r.includes("sale")?r:"";return{page_category:a&&s?s:"",page_departament:a,id:t,name:e}},Cm=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Se,findDataInPersistedData:Ba,getAvailablesSizes:Da,getCategories:ym,getPageCategoryAndDepartmentFromSlug:Ua,getPersistedData:za,getProductListInfoFromHead:Fa,pushDatalayer:dt,updatePersistedData:Qr},Symbol.toStringTag,{value:"Module"})),qa=g.createContext({}),Sm=({children:e,evtFunctionsConfigs:t})=>{const r=g.useRef({}),s=g.useRef(null),a=g.useRef(null),o=g.useRef({}),i=g.useRef({trigger:!1,index:0}),c=({functionKey:m,data:p,callBack:f,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Se.configs=t;try{typeof Se[m]=="function"&&setTimeout(()=>{var _;p.promotionInfo=r.current,(_=a.current)!=null&&_.item_list_name&&(p.itemList=a.current),Se[m](p,f)},h)}catch(_){dt({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:p,index:f})=>{m&&(r.current={...p}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...p,...f!==void 0&&{index:f}}}}})};return n.jsx(qa.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:r,currentLocalRef:s,itemListRef:a,cartProductsFullDataRef:o,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},ae=()=>g.useContext(qa),Ha=g.createContext({}),Pm=({children:e,productData:t,isKit:r,PDP_INFO:s,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:o})=>{var D,q;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=ae(),{productId:l,productName:u,items:m,items:[{images:p,Videos:f}],description:h,["Composição"]:_="",productReference:y,categories:[x]}=t,{getAvailableProductTag:v}=_t(),C=v(Object.entries(t.clusterHighlights).map(U=>({id:U[0],name:U[1]}))),j=x.slice(1,-1).split("/"),{installments:b,price:w,listPrice:S,sizes:P,allSizesAvailable:N}=T.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:a}),R=T.getThumbImage({images:p,TEXTURE_IMAGE:o}),k=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],O=((q=T.getColorAndSizeFromSkuName((D=t.items)==null?void 0:D[0].name,a))==null?void 0:q.color)??t["Cores Filtráveis"][0]??"",M=()=>({commonData:{...t,sizes:P,price:w,listPrice:S,installments:b},customData:{installments:b==null?void 0:b.count,installment_value:Number(b==null?void 0:b.value).toFixed(2)}}),X=({sku:U,size:Q})=>{const{commonData:G,customData:H}=M();i({functionKey:"productEvents",data:{event:"view_item",commonData:G,customData:{...H,...U&&{item_sku:U},...Q&&{item_variant2:Q}}}})};return g.useEffect(()=>{if(c.current.trigger){const{commonData:U,customData:Q}=M();i({functionKey:"productEvents",data:{event:"select_item",commonData:U,customData:{...Q,index:c.current.index}}}),c.current.trigger=!1}X({})},[]),n.jsx(Ha.Provider,{value:{productData:t,productId:l,productName:u,productReference:y,tag:C,items:m,sizes:P,allSizesAvailable:N,installments:b,price:w,listPrice:S,thumbImage:R,images:p,video:f[0],descriptionContent:k,breadcrumbList:j,isKit:r,colorName:O,handleViewItemEvent:X},children:e})},Le=()=>{const e=g.useContext(Ha);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},wm=()=>{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(a){return console.warn("Copy failed",a),t(null),!1}}]},$a=()=>{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)}},[])},Nm=typeof window>"u",Em=(e,t)=>{const[r,s]=g.useState(()=>{if(Nm)return null;const o=localStorage.getItem(e);return o===null?t:JSON.parse(o||"{}")});return g.useEffect(()=>{const o=i=>{i.storageArea===localStorage&&i.key===e&&s(JSON.parse(i.newValue))};return window.addEventListener("storage",o),()=>{window.removeEventListener("storage",o)}},[e,t]),[r,o=>{s(i=>{const c=typeof o=="function"?o(i):o;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function Es(e,t,r){const[s,a]=g.useState(!1),{threshold:o}=r||{};return g.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(r!=null&&r.delay){i&&clearTimeout(i),i=setTimeout(()=>{a(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},r.delay);return}a(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},{threshold:o||1});return c.observe(e.current),()=>{c.disconnect()}},[e]),s}const Hn=({callback:e,onEnterViewportOnce:t,options:r})=>{const s=g.useRef(null);return g.useEffect(()=>{const a=s.current;if(!a)return;const o=new IntersectionObserver(([i])=>{i.isIntersecting&&typeof e=="function"&&(e(),t&&(o.unobserve(a),o.disconnect()))},r);return o.observe(a),()=>{t&&o.unobserve(a),o.disconnect()}},[e,t,r]),{element:s}},Va=({defaultScale:e=1,maxScale:t=3})=>{const r=g.useRef(null),s=g.useRef(null),[a,o]=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||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=r.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),y=_.width,x=_.height,v=Math.min(0,(h.width-y)/2),C=Math.max(0,(y-h.width)/2),j=Math.min(0,(h.height-x)/2),b=Math.max(0,(x-h.height)/2);return{minX:v,maxX:C,minY:j,maxY:b}},m=(h,_,y)=>{if(s.current){const x=s.current.children[0];x&&requestAnimationFrame(()=>{x.style.transform=`translate(calc(-50% + ${h}px), calc(-50% + ${_}px)) scale(${y})`})}},p=g.useCallback(h=>{const{minX:_,maxX:y,minY:x,maxY:v}=u(),{x:C,y:j}=l.current,b=Math.max(_,Math.min(y,C)),w=Math.max(x,Math.min(v,j));if(h.touches.length>1){const S=h.touches[0],P=h.touches[1],N=S.pageX-P.pageX,R=S.pageY-P.pageY;i.current=Math.sqrt(N*N+R*R),c.current={x:(S.pageX+P.pageX)/2,y:(S.pageY+P.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-b,y:h.touches[0].pageY-w})},[a,l]),f=g.useCallback(h=>{if(!s.current||!r.current)return;const{minX:_,maxX:y,minY:x,maxY:v}=u();if(h.touches.length>1){h.preventDefault();const C=h.touches[0],j=h.touches[1],b=C.pageX-j.pageX,w=C.pageY-j.pageY,S=Math.sqrt(b*b+w*w);if(!i.current){i.current=S;return}const P=S/i.current,N=Math.max(1,Math.min(t,a*P));if(a===N)return;o(N);const R=(C.pageX+j.pageX)/2,k=(C.pageY+j.pageY)/2;let O=R-c.current.x,M=k-c.current.y;O=Math.max(_,Math.min(y,O)),M=Math.max(x,Math.min(v,M)),l.current={x:O,y:M},i.current=S,m(O,M,N)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let b=C-c.current.x,w=j-c.current.y;b=Math.max(_,Math.min(y,b)),w=Math.max(x,Math.min(v,w)),l.current={x:b,y:w},m(b,w,a)}},[t,a]);return g.useEffect(()=>(document.addEventListener("touchstart",p),document.addEventListener("touchmove",f,{passive:!1}),()=>{document.removeEventListener("touchstart",p),document.removeEventListener("touchmove",f)}),[f,p]),{containerRef:r,imgRef:s,scale:a}},Im=()=>{const e=async(h,_)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,y={},x)=>{if(x)if(_){const v=_.includes(" - ")?_.split(" - ")[0]:_,C=await T.proxyCartAPI("/_v/proxy/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:v}});return C instanceof Object&&y.name in C&&C[y.status]===!0?T.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:v,sellerName:C[y.name]}}).then(b=>({...b,openTextField:{...(b==null?void 0:b.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:v}})}else return T.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},r=async(h,_)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:_}}),s=async(h,_,y)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/items",{body:{orderFormId:h,orderItems:T.addItemOrder(_,y)}}),a=async(h,_,y,x=!1)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/offerings",{body:{id:_,itemIndex:y,orderFormId:h,remove:x}}),o=async h=>T.proxyCartAPI("/_v/proxy/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async h=>T.proxyCartAPI("/_v/proxy/checkout/order-form",{body:{orderFormId:h??""}}),c=async(h,_)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/profile",{body:{orderFormId:h,email:_}}),l=async(h,_,y)=>{const x=T.removeQuantity(_,y);return T.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderItems:x.updateItems,orderFormId:h}})},u=async(h,_,y,x,v,C,j)=>{var S,P;const b=j?{startDateUtc:(S=C==null?void 0:C.deliveryWindow)==null?void 0:S.startDate,endDateUtc:(P=C==null?void 0:C.deliveryWindow)==null?void 0:P.endDate}:null,w={logisticsInfo:Array.from({length:x},(N,R)=>({itemIndex:R,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:b})),selectedAddresses:v,clearAddressIfPostalCodeNotFound:!0};return T.proxyCartAPI("/_v/proxy/checkout/order-form/shipping",{body:{...w,orderFormId:h,country:y,postalCode:_}})},m=async(h,_,y)=>T.proxyCartAPI("/_v/proxy/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:y}}),p=async(h,_,y,x)=>{const v=T.updateQuantity(_,y,x);return T.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:v}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:r,giftItem:a,emptyCart:o,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(h,_,y,x,v)=>p(h,_,y,x).then(C=>C&&Array.isArray(C.items)?T.updateItemSellerExternal(C.items,y)?p(h,_,y,v):C:!1)}},Mn="soma::cart",Vt="soma::options",bt=Pt.create((e,t)=>{const r=Im(),s=async(a,o,i)=>{e({loading:!0});const c=await T.updateOrderFormPromise(a);if(typeof c!="boolean"){e({...c});const l=await T.mergeOptionsPromise(Qe.get(Vt),i);return Qe.set(Vt,l),T.getValue(c,o).finally(()=>e({loading:!1,options:l}))}return T.promiseDefault};if(typeof window<"u"){const a=async o=>{if(o){const i=await Qe.get(Vt).then(u=>T.findOptions(u,o.items));Qe.set(Mn,o),Qe.set(Vt,i),e({...o,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return Qe.get(Mn).then(o=>r.getOrderForm(o?o.id:"").then(a)),{...T.initialState,addCoupon:async o=>s(()=>r.addCoupon(t().id,o),"marketingData"),addItem:(o,i)=>{s(()=>r.addItem(t().id,t().items,o),"items",i)},addSellerCode:async(o,i)=>s(()=>r.addSellerCode(t().id,o,i,t().isOpen),"openTextField"),addMarketingData:async o=>s(()=>r.addMarketingData(t().id,o),"marketingData"),emptyCart:()=>{s(()=>r.emptyCart(t().id))},removeItem:async o=>{const i=await s(()=>r.removeItem(t().id,t().items,o),"items");return T.getRemoveId(o,i)},shipping:async(o,i="BR")=>s(()=>r.shipping(t().id,o??"",i,t().items.length,T.createNewAddress(o??"",null,i)),"shippingData"),shippingUpdate:async o=>s(()=>{var i;return r.shippingUpdate(t().id,o,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(o,i,c)=>s(()=>r.giftItem(t().id,o,i,c),"items"),updateItemQuantity:async(o,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return r.updateItemQuantity(l,u,o,i,((m=u.find(p=>p.id===o))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async o=>s(()=>r.insertProfileEmail(t().id,o),"clientProfileData"),setIsOpen:o=>e({isOpen:o})}}return T.initialState}),Rm=()=>bt(e=>e),Wa=Pt.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(s=>T.addNotification(s,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(s=>s.id!==t)}))}})),Is=()=>Wa(e=>e.notifications),Rs=()=>Wa(e=>e.actions),Tm=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Vt,KEY_INDEXED_STORE:Mn,useCartStore:bt,useGetCartStoreState:Rm,useGetNotificationActions:Rs,useGetNotificationsStore:Is},Symbol.toStringTag,{value:"Module"})),Am=6e3,Ga=g.createContext({}),Ka=({children:e,...t})=>{const{items:r}=bt(),[s,a]=g.useState([]),o=g.useRef(null),i=g.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,s]);return g.useEffect(()=>{s.length&&(clearTimeout(o.current??0),o.current=setTimeout(()=>{a([])},Am))},[s]),n.jsx(Ga.Provider,{value:g.useMemo(()=>({...t,setRecentlyAdded:a,recentlyAddedProducts:i}),[t,a,i]),children:e})},tn=()=>{const e=g.useContext(Ga);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Xa{constructor(){gt(this,"events",{});gt(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(s=>s!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=r,s(r)})}}const Ya=g.createContext({}),km=({children:e,headerConfigs:t,pathname:r,storeId:s,...a})=>{T.configureFetchProxy(s);const[o,i]=g.useState(!0),[c,l]=g.useState(!1),u=r==="/",m=g.useRef(new Xa),p=_=>_?{headerVariant:t.home_default_variant,bannerVariant:t.home_default_variant,position:t.home_default_position}:{headerVariant:t.default_variant,bannerVariant:t.default_variant,position:t.default_position},f=p(u),h=g.useRef(f);return g.useEffect(()=>{var x;const _=((x=new URLSearchParams(window.location.search))==null?void 0:x.toString())??"";(_.includes("utm_")||_.includes("gclid"))&&(Xr.get("lastMedias")||Xr.set("lastMedias",`${_}`,{expires:1/24}));const y=()=>{const v=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,C=window.innerWidth<1024||!!v.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);c||l(!0),o!==C&&(i(C),l(!0))};return c||y(),window.addEventListener("resize",y,{passive:!0}),()=>window.removeEventListener("resize",y)},[o,c]),g.useEffect(()=>{const _=p(u);m.current.publish("header:change_variant",_.headerVariant),m.current.publish("header:change_position",_.position),h.current=_},[u]),n.jsx(Ya.Provider,{value:{isMobile:o,mediatorRef:m,currentHeaderConfigsRef:h,deviceValidated:c,...a},children:n.jsx(Ka,{children:e})})},ne=()=>g.useContext(Ya),Qa=g.createContext({}),Om=({children:e,...t})=>n.jsx(Qa.Provider,{value:{...t},children:e}),ce=()=>g.useContext(Qa),wt=(e,t)=>Pt.create(r=>{const s=()=>r({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:a=>r({value:a}),reset:s}}}),Qt={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},nn=new Set,Lm=()=>{nn.forEach(e=>{e()})},Za=Pt.create((e,t)=>{const r=()=>e({value:Qt.category});return nn.add(r),{value:Qt.category,actions:{reset:r,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),Ja=()=>Za(e=>e.value),rn=()=>Za(e=>e.actions),ei=wt(Qt.menuMobileIsOpen,nn),ti=()=>ei(e=>e.value),ni=()=>ei(e=>e.actions),ri=wt(Qt.searchModalIsOpen,nn),si=()=>ri(e=>e.value),$n=()=>ri(e=>e.actions),oi=wt(Qt.userMenuIsOpen,nn),Ts=()=>oi(e=>e.value),As=()=>oi(e=>e.actions),Mm=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Lm,useActionsHeaderCategory:rn,useActionsMenuMobileIsOpen:ni,useActionsSearchModalIsOpen:$n,useActionsUserMenuIsOpen:As,useGetHeaderCategoryStore:Ja,useGetMenuMobileIsOpen:ti,useGetSearchModalIsOpen:si,useGetUserMenuIsOpen:Ts},Symbol.toStringTag,{value:"Module"})),Dt={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Ft=new Set,Dm=()=>{Ft.forEach(e=>{e()})},ai=Pt.create(e=>{const t=()=>e({value:Dt.selectedSkuInfo});return Ft.add(t),{value:Dt.selectedSkuInfo,actions:{setValue:r=>e(s=>({value:{...s,...r}})),reset:t}}}),sn=()=>ai(e=>e.value),ii=()=>ai(e=>e.actions),ci=wt(Dt.openLetMeKnow,Ft),Fm=()=>ci(e=>e.value),zm=()=>ci(e=>e.actions),li=wt(Dt.showNotify,Ft),ui=()=>li(e=>e.value),ks=()=>li(e=>e.actions),di=wt(Dt.showBottomNavigation,Ft),Bm=()=>di(e=>e.value),Um=()=>di(e=>e.actions),mi=wt(Dt.openMeasurements,Ft),pi=()=>mi(e=>e.value),fi=()=>mi(e=>e.actions),qm=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Dm,useActionsPDPOpenLetMeKnow:zm,useActionsPDPOpenMeasurements:fi,useActionsPDPSelectedSkuInfo:ii,useActionsPDPShowBottomNavigation:Um,useActionsPDPShowNotify:ks,useGetPDPOpenLetMeKnow:Fm,useGetPDPOpenMeasurements:pi,useGetPDPSelectedSkuInfo:sn,useGetPDPShowBottomNavigation:Bm,useGetPDPShowNotify:ui},Symbol.toStringTag,{value:"Module"})),ho={feedback:{active:!1,action:"add"},list:[]},Os=Pt.create((e,t)=>({value:ho,actions:{reset:()=>e({value:ho}),setValue:s=>e(()=>({value:s})),toggleProduct:s=>e(a=>a.value.list.includes(s)?{value:{feedback:{active:!0,action:"remove"},list:a.value.list.filter(o=>o!==s)}}:{value:{feedback:{active:!0,action:"add"},list:[...a.value.list,s]}}),updateList:s=>e(a=>({value:{...a.value,list:s}})),resetFeedback:()=>e(s=>({value:{...s.value,feedback:{active:!1,action:""}}}))}})),zt=()=>Os(e=>e.value.list),Ls=()=>Os(e=>e.value.feedback),Nt=()=>Os(e=>e.actions),Hm=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:Nt,useGetWishlistFeedbackStore:Ls,useGetWishlistStore:zt},Symbol.toStringTag,{value:"Module"})),hi=g.createContext({}),$m=({children:e,headerData:t,...r})=>{var m,p;const s=g.useRef(null),a=g.useRef(null),o=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",f=>{var v,C,j;if(f&&u.current&&(u.current.bannerVariant=f),!s.current)return;const _=document.body.scrollTop>0,y=s.current.getAttribute("data-interactiveVariant"),x=_?y:f??((v=u.current)==null?void 0:v.bannerVariant)??"default";x!==((C=u.current)==null?void 0:C.headerVariant)&&(s.current.setAttribute("data-bottomdivider",String(_)),s.current.setAttribute("data-variant",String(x)),(j=l.current)==null||j.publish("herobanner:change_controllers_variant",x),u.current&&(u.current.headerVariant=x))}),(p=l.current)==null||p.subscribe("header:change_position",f=>{s.current&&(s.current.style.position=f)}),g.useEffect(()=>{const f=new AbortController,h=d.helpers.throttle(()=>{var y;return(y=l.current)==null?void 0:y.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",h,{passive:!0,signal:f.signal});const _=y=>{var v;(v=y.target.closest("a"))==null||v.blur()};return s.current&&(s.current.addEventListener("click",_,{signal:f.signal}),s.current.addEventListener("touchend",_,{signal:f.signal})),()=>{f.abort()}},[]),n.jsx(hi.Provider,{value:{headerData:t,structureRef:a,rootRef:s,tipbarRef:o,userMenuMobileRef:i,userMenuDesktopRef:c,...r},children:e})},Ne=()=>g.useContext(hi),_i=g.createContext({}),gi=({children:e,...t})=>n.jsx(_i.Provider,{value:g.useMemo(()=>t,[t]),children:e}),Ms=()=>{const e=g.useContext(_i);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},Vm=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Wm=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),a=e.getBoundingClientRect(),o=e!=null&&e.parentElement?Vm(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(a.width+o),top:s.top+s.height+r}},yi=g.createContext({}),xi=({children:e,delay:t=600,gap:r=20,...s})=>{const[a,o]=g.useState(!1),i=g.useRef(null),[c,l]=g.useState(!1),[u,m]=g.useState({left:0,top:0}),p=g.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{o(!1),l(!1)},t))},[l,o,t]);return g.useEffect(()=>{if(typeof window>"u")return;const f=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(f&&h){const{left:_,top:y}=Wm(h,f,r??0);m({left:_,top:y}),l(!1)}},[r,a]),n.jsx(yi.Provider,{value:g.useMemo(()=>({...s,...u,handleClose:p,isLeaving:c,isOpen:a,setIsOpen:o,setIsLeaving:l}),[s,u,p,c,a,o,l]),children:e})},Et=()=>{const e=g.useContext(yi);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},vi=g.createContext({}),Gm=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:s,...a})=>{var se,de,oe,le;const o=bt(),{setRecentlyAdded:i}=tn(),c=g.useRef(""),l=Is(),{addNotification:u,removeNotification:m}=Rs(),[p,f]=g.useState(null),{addCoupon:h,addItem:_,addSellerCode:y,addMarketingData:x,emptyCart:v,isOpen:C,removeItem:j,shipping:b,shippingUpdate:w,toggleServiceToProduct:S,updateItemQuantity:P}=o;g.useEffect(()=>{(async()=>{var E,W,ie,he;if(!o.id||!((W=(E=s==null?void 0:s.promotion)==null?void 0:E.promotionCart)!=null&&W.idPromotion)||((he=(ie=s==null?void 0:s.promotion)==null?void 0:ie.promotionCart)==null?void 0:he.selectPromotion)==="Desativar")return;const ee=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:o.id,promotionId:s.promotion.promotionCart.idPromotion,web:(s==null?void 0:s.promotion.promotionCart.versionAPI)==="Original"})}).then(I=>I.json());f(ee)})()},[o.id,o.items.length,s==null?void 0:s.versionId,(de=(se=s==null?void 0:s.promotion)==null?void 0:se.promotionCart)==null?void 0:de.idPromotion,(le=(oe=s==null?void 0:s.promotion)==null?void 0:oe.promotionCart)==null?void 0:le.versionAPI]),g.useEffect(()=>{const F=Xr.get("lastMedias");if(o.id&&F&&c.current!==F){c.current=F;const ee=new URLSearchParams(F),E=T.mountMarketingData(ee);x(E)}},[o,x]);const N=g.useCallback(async(F,ee)=>(ee==="coupon"?h(F):y(F,t??{})).then(W=>{if(typeof W!="boolean"&&W instanceof Object){if(ee==="seller"&&"value"in W){const{statusOk:ie,value:he}=W,I=String(he??"").split(" - ");return T.getCode((I==null?void 0:I[0])??"",F,!!ie)}return T.getCode(String(W.coupon),F,!0)}return T.getCode("","")}).catch(()=>Promise.resolve({code:400})),[h,y]),R=g.useCallback((F,ee,E)=>{const{id:W}=F;P(W,ee,E)},[P]),k=g.useCallback((F,ee,E=!1)=>{if(!F)return;const{id:W}=F,ie=T.findItemIndex(o.items,W);if(ie!==-1&&!E){const he=Number(o.items[ie].quantity),I=o.items[ie]?he+1:1;R(F,I,ee)}else _({id:W,quantity:(F==null?void 0:F.quantity)??1,seller:F.seller});C||i(he=>[...he,F])},[_,R,o.items,C,i]),O=g.useCallback((F,ee)=>{if(!F||!Array.isArray(F))return;i(W=>[...W,...F]);const E=F.map(W=>{const{id:ie,quantity:he,seller:I}=W,A=T.findItemIndex(o.items,ie),Te=T.getQuantity(he??1,A);return{id:ie,quantity:Te,seller:I}});_(E,ee)},[_,o.items,i]),M=g.useCallback(async(F,ee,E)=>F?j(F).then(()=>(u(ee??`${r}`,E),T.getCode(F,F))):Promise.resolve(T.getCode("","Product id required")),[u,j]),X=g.useCallback(()=>{o.items.length>0&&v()},[v,o.items]),D=g.useCallback((F,ee="BRA")=>b(F,ee),[b]),q=g.useCallback(F=>{F&&w(F)},[w]),U=g.useCallback(async(F,ee,E=!1)=>{const W=o.items.findIndex(he=>he.uniqueId===F);return o.items[W]&&W>=0?S(ee,W,E):!1},[o.items,S]),Q=g.useCallback(async(F,ee)=>P(F,ee).then(E=>{if(Array.isArray(E)){const W=E.find(ie=>ie.id===F);if(W&&(W==null?void 0:W.quantity)<ee)return String(W.quantity)}return!1}),[P]),G=g.useCallback(async()=>{await x({...o.marketingData,coupon:""})},[x,o.marketingData]),H=g.useCallback(async()=>{await x({...o.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[x,o.marketingData]),J=g.useCallback(async()=>{await b("","BRA")},[b]);return n.jsx(vi.Provider,{value:g.useMemo(()=>({...a,data:s,addCouponSeller:N,addToCart:k,addItemsToCart:O,cartStore:o,notifications:l,clearCart:X,addNotification:u,isOpen:o.isOpen,removeNotification:m,removeToCart:M,setIsOpen:o.setIsOpen,shipping:D,shippingUpdateOption:q,toggleGiftItemCart:U,updateItemQuantity:Q,removeCoupon:G,removeSellerCode:H,removeCEP:J,promotionRules:p,setPromotionRules:f}),[a,s,N,k,O,l,X,u,o,m,M,D,q,U,Q,G,H,J,p,f]),children:e})},ve=()=>{const e=g.useContext(vi);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},bi=g.createContext({}),Ds=({children:e,fetch:t})=>{const r=g.useRef(!0),[s,a]=g.useState(null),[o,i]=g.useState(!1);return g.useEffect(()=>{(async()=>{r.current=!0;try{const l=await t();if(!l.ok)throw new Error("Failed to fetch data");const u=await l.json();a(u.data),r.current=!1}catch{r.current=!0,i(!0)}})()},[t]),n.jsx(bi.Provider,{value:g.useMemo(()=>({data:s,isLoading:r.current??!1,isError:o}),[s,o,r]),children:e})},Fs=()=>{const e=g.useContext(bi);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},ji=g.createContext({}),zs=({children:e,sort:t,state:r,count:s,collectionId:a,brand:o,searchParams:i,ITEMS_PER_PAGE:c})=>{const l=g.useMemo(()=>{var u;return a?[{key:"productclusterids",value:a.toString()}]:o?[{key:"brand",value:o}]:(u=r.base)!=null&&u.length?r.base.slice(1).split("/").map((m,p)=>({key:`category-${p+1}`,value:m})):[]},[r.base,a]);return n.jsx(ji.Provider,{value:g.useMemo(()=>({state:{...r,facets:[...l,...r.facets??[]]},sort:t,count:s??c,searchParams:i}),[l,s,t,r,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({}),Km=({children:e,...t})=>n.jsx(Ci.Provider,{value:t,children:e}),De=()=>{const e=g.useContext(Ci);if(e===void 0)throw new Error("usePLPConstants must be used within a PLPConstantsProvider");return e},Si=g.createContext({}),Xm=({children:e,selectedFacets:t})=>{const{data:r,...s}=Fs(),{router:a}=ce(),{searchParams:o,PLP_SORT_DEFAULT:i}=De(),c=g.useCallback((f,h)=>{if(h){if(f.key.toLocaleLowerCase()==="price"){const _=h.getAll("facets");h.delete("facets"),_.forEach(y=>{const[x]=y.split("/");x!==f.key&&h.append("facets",y)})}h.set("page","1"),h.append("facets",`${f.key}/${f.value}`),a.push(`?${h.toString()}`)}},[a]),l=g.useCallback(()=>{const f=new URLSearchParams;f.set("sort",i),f.set("page","1"),a.push(`?${f.toString()}`)},[a]),u=g.useCallback((f,h)=>{if(!h||!h.has&&!h.has("facets"))return;const _=h.getAll("facets");h.delete("facets"),h.set("page","1"),_.forEach(y=>{const[x,v]=y.split("/");(x!==f.key||v!==f.value)&&h.append("facets",y)}),a.push(`?${h.toString()}`)},[a]),m=g.useCallback(f=>{const h=o?new URLSearchParams(o):new URLSearchParams;for(const[,_]of h.entries()){const[y,x]=_.split("/");if(y===f.key&&x===f.value)return u(f,h)}return c(f,h)},[c,u,o]),p=g.useCallback(f=>{const h=o?new URLSearchParams(o):new URLSearchParams;h.set("sort",f.replace("_",":")),a.push(`?${h.toString()}`)},[a,o]);return n.jsx(Si.Provider,{value:g.useMemo(()=>({...s,breadcrumb:r&&"breadcrumb"in r?r==null?void 0:r.breadcrumb:[],deleteAllFacets:l,facets:r&&"facets"in r?r==null?void 0:r.facets:[],selectedFacets:t,onToggleFacet:m,onSort:p,searchParams:o}),[r,l,p,m,s,t,o]),children:e})},Pi=({children:e,forceUpdate:t})=>{const{state:r}=ze();return n.jsx(Ds,{fetch:()=>T.fetchProxy("/_v/proxy/search/facets",{method:"POST",body:JSON.stringify({...r,forceUpdate:t})}),children:n.jsx(Xm,{selectedFacets:(r==null?void 0:r.facets)??[],children:e})})},wi=()=>{const e=g.useContext(Si);if(e===void 0)throw new Error("useFacetsContext must be used within a FacetsProvider");return e},qt={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"}},Ym={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Qm="Imagem do produto",_o=1,Zm="Sair",Jm=e=>e.exit,go=({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"}],ep=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},tp=e=>"Seja bem vindo!",np="Marque a caixa para aceitar os termos de política de privacidade.",rp="Algumas informações estão incorretas ou não foram preenchidas",sp="Enviar",Ni=g.createContext({}),op=({children:e})=>{const{data:t,...r}=Fs(),[s,a]=g.useState(0),{sendDataLayerEvent:o}=ae();return g.useEffect(()=>{if(t&&"pagination"in t&&t.products.length>0){o({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:t.products}}});const i=t.pagination.count;i&&Number.isInteger(i)&&a(i)}},[t,o,a]),n.jsx(Ni.Provider,{value:g.useMemo(()=>({...r,products:t&&"products"in t?t==null?void 0:t.products:[],pagination:t&&"pagination"in t?t==null?void 0:t.pagination:Ym,total:s}),[t,r,s]),children:e})},Bs=({children:e,query:t,forceUpdate:r})=>{const{count:s,state:a}=ze(),o={...a,count:s};return n.jsx(Ds,{fetch:()=>T.fetchProxy("/_v/proxy/search/product",{method:"POST",body:JSON.stringify({...o,query:t,forceUpdate:r,facets:a.facets??[]})}),children:n.jsx(op,{children:e})})},on=()=>{const e=g.useContext(Ni);if(e===void 0)throw new Error("useProductsContext must be used within a ProductsProvider");return e},Ei=g.createContext({}),ap=({children:e,slug:t,searchParams:r,collectionId:s,brand:a,itemsPerPage:o=24,PLP_SORT_DEFAULT:i})=>{const{pathname:c}=ce(),l=g.useRef(""),[u,m]=g.useState(!1),p=g.useMemo(()=>{const h=new URL(c,"http://localhost"),_=(r==null?void 0:r.getAll("facets"))??[],y=(r==null?void 0:r.get("page"))??"1",x=(r==null?void 0:r.get("sort"))??(s?"":i);return h.searchParams.set("page",String(y)),h.searchParams.set("sort",String(x)),r!=null&&r.get("query")?(h.searchParams.set("query",r.get("query")),h):(h.searchParams.set("base",Array.isArray(t)?t.join("/"):t),h.searchParams.set("facets",_.join(",")),h)},[s,c,r,t]),f=g.useMemo(()=>{if(Array.isArray(r==null?void 0:r.getAll("facets")))return T.parseSearchState(p,r.getAll("facets")??[""]);const h=(r==null?void 0:r.getAll("facets"))??[];return T.parseSearchState(p,h)},[p,r]);return g.useEffect(()=>{l.current!==c&&(l.current=c,window.document.body.scrollTo(0,0))},[c]),n.jsx(Ei.Provider,{value:g.useMemo(()=>({openFilters:u,setOpenFilters:m}),[u,m]),children:n.jsx(zs,{ITEMS_PER_PAGE:o,searchParams:r??new URLSearchParams,state:g.useMemo(()=>({...f}),[f]),collectionId:s,brand:a,children:e})})},Us=()=>{const e=g.useContext(Ei);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},Dn=(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((a,o)=>Dn(a,t[o]));if(Array.isArray(t))return!1;const r=Object.keys(e),s=Object.keys(t);return r.length!==s.length?!1:r.every(a=>Object.prototype.hasOwnProperty.call(t,a)&&Dn(e[a],t[a]))},Ii=(e,t,r="page")=>Object.keys(t).some(s=>s===r?!1:!Dn(t[s],e[s])),Zr=async e=>{const t=await T.fetchProxy("/_v/proxy/search/product",{method:"POST",body:JSON.stringify(e)});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const r=await t.json();return r==null?void 0:r.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}}}),Ti=(e,t,r,s=24)=>{const a=new Set,o=[];if(!Array.isArray(e)||e.length===0)return{taken:a,placedBanners:o};const i=t*s*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%r;if(m+c.columns>r){l+=r-m;continue}if(!Array.from({length:c.columns}).some((h,_)=>a.has(l+_))){for(let h=0;h<c.columns;h++)a.add(l+h);o.push(l),u=!0;break}l++}u||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${c.position_grid}, cols=${c.columns}`)}return{taken:a,placedBanners:o}},Jr=(e,t,r,s=24)=>{const{placedBanners:a,taken:o}=Ti(e??[],t,r),i=[];let c=0;try{for(;i.length<t*s;)o.has(c)||i.push(c),c++;return{banners:a,products:i}}catch(l){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,l)}return{banners:[],products:i}},An=(e,t,r=24)=>Array.from({length:e},(s,a)=>{const o=a+1;return{loading:e===o,page:o,pagination:t!=null&&t.products.length&&e===o?t==null?void 0:t.pagination:qs(),products:t!=null&&t.products.length&&e===o?t==null?void 0:t.products:Array.from({length:r},()=>Ri())}}),Ai=(e,t)=>[...e,{loading:!1,page:t,pagination:qs(),products:[]}],qs=()=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:1,total:1}),ip=(e,t,r,s,a)=>{const o=e[e.length-1],i=(o==null?void 0:o.products.length)??a,c=(e.length-1)*a+i-1,l=r[c];return t.filter((u,m)=>{const p=s[m];return p<=l||a>i&&p>l})},ki=(e,t)=>{const r=new Map;for(const a of e){const o=Math.floor(a/t);r.has(o)||r.set(o,[]),r.get(o).push(a)}const s=[];for(const[,a]of r){const o=a[Math.floor(Math.random()*a.length)];s.push(o)}return s},Oi=(e,t)=>{if(!e)return[];const r=e.map((s,a)=>s.video&&s.video!==""?a:null).filter(s=>s);return ki(r,t)},Li=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],cp=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Li,createPage:Ai,createPages:An,createPagination:qs,createProduct:Ri,deepEqual:Dn,fetchPage:Zr,getBanners:Ti,getPositions:Jr,getProductsWithVideo:Oi,getRandomVideoPerRow:ki,getVisibleBanners:ip,hasStateChangedExceptPage:Ii},Symbol.toStringTag,{value:"Module"})),lp=50,up=Pt.create((e,t)=>{const r=i=>Math.min(i,lp),s=async(i,c)=>{const l=r(i.page);try{const u=await Zr({...i,page:l});a(l,m=>c?c(m,u):{...m,...u})}catch(u){console.error(`[PDC - SCROLL INFINITE FAILED TO FETCH PAGE ${l}]: ${u}`),a(l,m=>({...m,loading:!1}))}},a=(i,c)=>{e({load:!0,pages:t().pages.map(l=>l.page===i?c(l):l)})},o=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 p,f,h;const m=r(Number(i==null?void 0:i.page));e({...c,pages:An(m,void 0,u)});try{const _=await Zr({...i,page:m});if(_){if(!_.products.length&&((p=_==null?void 0:_.pagination)==null?void 0:p.total)<m){o({...i,page:(f=_==null?void 0:_.pagination)==null?void 0:f.total},l),e({pages:An((h=_==null?void 0:_.pagination)==null?void 0:h.total)});return}typeof l=="function"&&l(_),e({load:!0,pages:An(m,_),total:Number(_.pagination.count)})}}catch(_){console.error(`[PDC - SCROLL INFINITE TO CREATE PAGES]: page ${m} ${_}`)}},addPage:(i,c,l,u)=>{const{pages:m}=t(),p=r(i==null?void 0:i.page);m.some(f=>f.page===p)||(e({...c,pages:Ai(m,p)}),o(i,l))},updateProducts:(i,c)=>{const l=t().pages.find(u=>u.page===r(i==null?void 0:i.page));l!=null&&l.loading||o(i,c)}}}),dp=(e,t,r,s=0)=>{if(!e.length)return[];let a=0;const o=[];for(let i=0;i<e.length;i+=r){const c=e.slice(i,i+r),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,p=s+m,f=t.find(_=>_.position_grid===p+1),h=p+a+1;f&&(a+=f.columns),o.push({position:h,canPlayVideo:u===l})}}return o},Mi=(e,t,r)=>{const s=(t-1)*r,a=t*r;return e>=s&&e<=a},Vn=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:T.disableSKU(r),size:T.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},mp=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:dp,getSkusNotify:Vn,isPositionInCurrentPage:Mi},Symbol.toStringTag,{value:"Module"})),Di=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),n.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Di.displayName="Notify.Controls";const Ze={"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 Fi(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const s of r){const[a,o]=s.trim().split("=");if(a===e)return o}}function Hs(e,t,r={}){const a={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let o=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const i in a)a[i]!==void 0&&(o+=`; ${i}`,i==="expires"?o+=`=${a[i].toUTCString()}`:typeof a[i]=="boolean"?o+=`; ${a[i]?"true":"false"}`:o+=`=${a[i]}`);window.document.cookie=o}const zi=g.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),pp=({children:e,AUTH_TOKEN_COOKIE:t})=>{var m;const{shipping:r,cartStore:s}=ve(),[a,o]=g.useState({amount:null,boxes:null,toExpire:null,loading:!0}),i=g.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(p=>p.json()).then(p=>{const{userCredits:f,userId:h,sub:_,...y}=p,{wishlist:x,...v}=y;o({amount:f==null?void 0:f.amount,boxes:f==null?void 0:f.boxes,toExpire:f==null?void 0:f.toExpire,user:{...v,userId:h,sub:_??""},loading:!1,wishlist:(typeof x=="string"?x.split(",").filter(Boolean):x)??[]})})}catch(p){console.error("user info and my credits request",p),o({...a,loading:!1})}},[o]),c=g.useCallback(()=>{Hs(t),i()},[i]),l=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]),u=g.useCallback(async()=>{var p,f,h;if((p=a.user)!=null&&p.postalCode&&(s!=null&&s.id)&&!(s!=null&&s.loading)&&!((h=(f=s==null?void 0:s.shippingData)==null?void 0:f.address)!=null&&h.postalCode))try{await r(a.user.postalCode)}catch(_){console.error("Error auto-filling CEP:",_)}},[(m=a.user)==null?void 0:m.postalCode]);return g.useEffect(()=>{i()},[i]),g.useEffect(()=>{u()},[u]),n.jsx(zi.Provider,{value:g.useMemo(()=>({...a,getCurrentCredits:l,logout:c}),[a,l,c]),children:e})},Bt=()=>{const e=g.useContext(zi);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},Bi=({color:e,delay:t=3e3,sku:r,setStatus:s,setIsLoading:a,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:i})=>{const c=g.useRef(null),[l,u]=g.useState(null),{sendDataLayerEvent:m}=ae(),{user:p}=Bt(),f=p!=null&&p.firstName?`${p==null?void 0:p.firstName} ${p==null?void 0:p.lastName}`:"";return n.jsx("div",{className:Ze["notify--form"],children:n.jsxs("form",{action:"POST",onSubmit:async h=>{var x;h.preventDefault();const _=h.currentTarget,y=((x=_.querySelector("input"))==null?void 0:x.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:f,email:y,sku:r==null?void 0:r.skuID})}).then(v=>s(v.ok)).finally(()=>{a(!1),_.reset(),m({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.skuID,color:e}}}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{var v;(v=document.body)==null||v.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),u(!0),s(null)},t)})},children:[n.jsx(d.TextField.Structure,{input:n.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:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?n.jsx(d.TextField.SupportText,{text:o.messages.invalid_email,feedback:"error"}):n.jsx(n.Fragment,{})}),n.jsx(d.Button,{disabled:!(l===!1||!r)||!r,type:"submit",size:"large",children:i.button})]})})};Bi.displayName="Notify.Form";const Ui=({isLoading:e=!1})=>n.jsx("div",{className:Ze["notify--loading"],"data-loading":e,children:n.jsx(d.Spinner,{})});Ui.displayName="Notify.Loading";const $s={"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"},qi=({children:e,...t})=>n.jsx("div",{...t,className:$s["product-variation-list--list"],children:e});qi.displayName="ProductVariationList.List";const Hi=({fill:e="#1352C7",src:t="",type:r="size",text:s,...a})=>{const{nextimage:o}=ce();return r==="size"?n.jsxs(d.ToggleSize.Wrapper,{...a,size:"large",variation:"ghost",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),n.jsx(d.ToggleSize.Text,{children:s})]}):n.jsxs(d.ToggleStyle.Wrapper,{...a,size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?n.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):n.jsx(d.ToggleStyle.Texture,{title:"texture",children:n.jsx(o,{alt:s??"image",height:40,src:t,width:40})})]})};Hi.displayName="ProductVariationList.Option";const $i=({children:e,...t})=>n.jsx("div",{className:$s["product-variation-list"],...t,children:e});$i.displayName="ProductVariationList.Root";const Vi=({children:e,title:t,...r})=>n.jsxs("div",{...r,className:$s["product-variation-list--title"],children:[t?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.SectionWrapper,{children:n.jsx("p",{children:t})})}):n.jsx(n.Fragment,{}),e]});Vi.displayName="ProductVariationList.Title";const et={List:qi,Option:Hi,Title:Vi,Root:$i},fp=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(s=>e[s]===t[s])},Wi=({children:e,label:t="",skus:r,sku:s,setSku:a})=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Ze["notify--selector--header"],children:e}),n.jsxs(et.Root,{className:Ze["notify--selector"],children:[n.jsx(et.Title,{title:t}),n.jsx(et.List,{children:Array.isArray(r)&&r.map((o,i)=>{const c=fp(s,o);return n.jsx(et.Option,{active:c,onClick:()=>a(c?null:o),text:String(o.size),type:"size"},i)})})]})]});Wi.displayName="Notify.Selector";const yo=({type:e,icon:t,title:r,subtitle:s})=>n.jsx("div",{className:Ze[`notify--status--${e}`],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{children:r}),n.jsx("h3",{children:s})]})})}),Gi=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>n.jsxs("div",{className:Ze["notify--status"],"data-status":e,children:[n.jsx(yo,{...r.success,icon:t.check_circle,type:"success"}),n.jsx(yo,{...r.error,icon:t.alert_circle,type:"error"})]});Gi.displayName="Notify.Status";const Vs=({color:e,open:t,setVisible:r,skus:s,sku:a,setSku:o,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[p,f]=g.useState(!1),[h,_]=g.useState(null),{isMobile:y}=ne();return n.jsxs(d.Modal.Root,{isMobile:y??!1,isOpen:t,setIsOpen:r,variant:y?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:Ze["modal-modifier"],children:[n.jsx(d.Modal.Header,{navigation:"top",className:Ze["notify--header-modifier"],children:n.jsx(Di,{isMobile:y??!1,ICONS:i,NOTIFY_INFO:l})}),n.jsxs(d.Modal.Body,{className:Ze["notify--modal--body"],children:[n.jsxs("div",{className:Ze["notify--container"],children:[n.jsxs(Wi,{label:l.selector_label,sku:a,skus:s,setSku:o,children:[n.jsx("p",{children:l.subtitle}),n.jsx("span",{children:l.description})]}),n.jsx(Bi,{delay:4e3,sku:a,setStatus:_,setIsLoading:f,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),n.jsx(Ui,{isLoading:p}),n.jsx("div",{className:Ze["notify--selector--header"],children:n.jsx("span",{children:l.legal})})]}),n.jsx(Gi,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};Vs.displayName="Notify";const Wn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:o,...i})=>{const c=Vn(e??[]);return n.jsx(Vs,{skus:c,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:o,...i})};Wn.displayName="PDC.Notification";const Ki=g.createContext({}),Xi=({banners:e,children:t})=>{const{searchParams:r,ITEMS_PER_PAGE:s,ICONS:a,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l}=De(),{router:u}=ce(),{sendDataLayerEvent:m}=ae(),{isMobile:p}=ne(),{state:f}=ze(),{addPage:h,createPages:_,updateProducts:y,...x}=up(),v=p?8:16,C=p?2:4,j=g.useRef(!1),b=g.useRef(f),[w,S]=g.useState(!1),[P,N]=g.useState(null),[R,k]=g.useState([]),O=g.useCallback(U=>{U&&"pagination"in U&&m({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:U.products}}})},[m]),M=g.useCallback(U=>{if(U.pagination.nextPage===!0){const Q=U.page+1,G=Jr(e,Q,C,s);h({...f,page:Q},G,O,s)}},[h,e,O,C,s,f]),X=g.useCallback(U=>{U.loading===!1&&y({...f,page:U.page},O)},[O,y,f]),D=g.useCallback(U=>{const Q=new URLSearchParams(r);U.page!==Number(Q.get("page")??1)&&(Q.set("page",String(U.page)),u.replace(`?${Q.toString()}`,{scroll:!1}))},[u,r]),q=g.useCallback((U,Q)=>{const G=Q?Vn([Q]):null;k(U),N(G!=null&&G.length?G[0]:null),S(!0)},[]);return g.useEffect(()=>{const U=!j.current,Q=Ii(b.current,f),G=Jr(e,f.page,C);U?_(f,G,O,s):Q&&(_(f,G,O,s),b.current=f),j.current=!0},[e,_,O,C,s,f]),n.jsxs(Ki.Provider,{value:g.useMemo(()=>({...x,addPage:h,addNewPage:M,createPages:_,gap:v,columns:C,handleNotify:q,updatePage:X,updateProducts:y,updateParamPage:D}),[h,M,_,q,v,C,x,X,y,D]),children:[t,n.jsx(Wn,{open:w,sku:P,skus:R,setSku:N,setVisible:S,ICONS:a,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:l})]})},lt=()=>{const e=g.useContext(Ki);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},Yi=g.createContext({gridBanners:void 0,banners:[]}),hp=({children:e,data:t,device:r,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:a})=>{const{isMobile:o}=ne(),i=(t==null?void 0:t.sections.filter(p=>p.name!=="List Product Banners"))??[],c=i.slice(0,_o),l=i.slice(_o,i.length),u=t==null?void 0:t.sections.find(p=>p.name==="List Product Banners"),m=g.useMemo(()=>{var p,f;return((f=(p=u==null?void 0:u.data)==null?void 0:p.banners)==null?void 0:f.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return o&&r==="mobile"||!o&&r==="desktop"?n.jsxs(Yi.Provider,{value:{gridBanners:u,banners:m},children:[n.jsx(s,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:a,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,n.jsx(s,{data:l??[]})]})]}):n.jsx(n.Fragment,{})},Gn=()=>{const e=g.useContext(Yi);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},Qi=g.createContext({}),Zi=({children:e,filters:t,PLP_FILTERS:r,...s})=>{var o;const a=(o=t.facets)==null?void 0:o.filter(i=>r.find(c=>c.key===i.key));return n.jsx(Qi.Provider,{value:g.useMemo(()=>({...s,filters:{...t,facets:a}}),[t,a,s]),children:e})},Ut=()=>{const e=g.useContext(Qi);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},Ji=g.createContext({product:void 0}),_p=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:s,SectionZone:a})=>n.jsxs(Ji.Provider,{value:{productId:r},children:[e,n.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:n.jsx(a,{data:(t==null?void 0:t.sections)??[]})})]}),ec=()=>{const e=g.useContext(Ji);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},es=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function gp(e,t=1e3){let r=!1;return(...s)=>{r||(e(...s),r=!0,setTimeout(()=>{r=!1},t))}}function yp(e,t=1e3){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>{e(...s)},t)}}const tc=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Wt=(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),xp=e=>{const t=hm.decodeJwt(e??"");return{email:t.sub,userId:t.userId}},vp=["name","email","phone","date","cpf","cep"],xo={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}$/},nc=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!xo[e])return!0;const s=t.trim();return xo[e].test(s)},bp=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):Qm},jp=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:vp,debounce:yp,getAltTextFromUrl:bp,getAuthenticatedUser:xp,getCookie:Fi,getDaysHoursMinutesSeconds:Wt,getMilliSeconds:tc,removeAccentsAndReplaceSpaces:es,setCookie:Hs,throttle:gp,validateInput:nc},Symbol.toStringTag,{value:"Module"})),Cp=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((s,a)=>(t[a.master_data_field]="none",{...s,[a.master_data_field]:a}),{}))??{},mountedInputsStatus:t}},Sp=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:s,checkboxRef:a,setFormStatus:o})=>{let i=!1,c=!1;const l={...r};return s&&!a.current&&(o("unchecked"),i=!0),e.forEach((u,m)=>{var h;if(m==="terms-and-conditions")return;const p=(h=t[m])==null?void 0:h.required;if(p&&!u){l[m]="required",i=!0;return}nc({type:t[m].type,input:u,required:p})||(l[m]="error",c=!0),typeof u=="string"&&e.set(m,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}},rc=g.createContext({}),sc=({children:e,masterDataEmailField:t,fields:r,variant:s,CONSTANTS:{MASTER_DATA_ENTITY:a,NEWSLETTER_CONFIGS:o}})=>{const{sendDataLayerEvent:i}=ae(),c=o.hasTermsAndConditions,{mountedFields:l,mountedInputsStatus:u}=g.useMemo(()=>Cp({fields:r}),[r]),m=g.useRef(!1),[p,f]=g.useState("idle"),[h,_]=g.useState(u),y=async({searchFields:S,entity:P})=>{const N=await kt.post("/api/master-data/search",{body:{masterDataEntity:P,searchFields:S,headers:{"REST-Range":"resources=0-49"}}});return console.info(N),N.data},x=async({documentId:S,fieldsToBeUpdated:P,entity:N})=>(await kt.post("/api/master-data/update",{dataEntityName:N,documentId:S,fieldsToBeUpdated:P})).status,v=g.useCallback(async({payload:S,response:P},N,R)=>{var D;const{email:k,...O}=S,[M]=await y({searchFields:{[N]:k},entity:R??a.newsletter}),X=Array.isArray(M)?(D=M[0])==null?void 0:D.id:void 0;return M&&await x({documentId:X,fieldsToBeUpdated:O,entity:R??a.newsletter})!==204?{...P,status:"error"}:{...P,status:"success"}},[]),C=g.useCallback(async({formData:S},P,N)=>{const R={status:"idle",inputsStatus:{}},k={};S.forEach((O,M)=>{k[M]=O});try{const M=(await kt.post("/api/master-data",{body:{payload:k,masterDataEntity:P??a.newsletter}})).data;return(M==null?void 0:M.Message)==="duplicated entry"?v({payload:k,response:R},N,P):M!=null&&M.Id?{...R,status:"success"}:{...R,status:"error"}}catch(O){return console.error("error",O),{...R,status:"error"}}},[v]),j=g.useCallback(async(S,P,N)=>{S.preventDefault();const R=new FormData(S.target);if(R.append("acceptedTerms",m.current?"true":"false"),m.current){const O=new Yr.TZDate(new Date,"America/Sao_Paulo").toISOString();R.append("termsAcceptedAt",O)}P&&Object.keys(P).forEach(O=>{R.append(O,P[O])});const k=await C({formData:R},N??"",t);k&&(f(k==null?void 0:k.status),_(k.inputsStatus),k.status==="success"&&i({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,C,f,_,i]),b=g.useCallback(S=>{const P=new FormData(S.currentTarget.parentElement),{hasEmptyFields:N,hasErrors:R,inputStatusToUpdate:k}=Sp({formData:P,mountedFields:l,inputsStatus:h,hasTermsAndConditions:c,checkboxRef:m,setFormStatus:f});if(_(k),N||R){S.preventDefault();return}f("loading")},[l,h,c,m]),w=g.useCallback(()=>{f("idle"),_(u)},[u]);return n.jsx(rc.Provider,{value:g.useMemo(()=>({formStatus:p,handleSubmit:j,setFormStatus:f,inputsStatus:h,setInputsStatus:_,hasTermsAndConditions:c,handleClickToSubmit:b,checkboxRef:m,masterDataEmailField:t,fields:r,variant:s,resetNewsletter:w}),[p,j,f,h,_,b,c,m,t,r,s,w]),children:e})},Ws=()=>{const e=g.useContext(rc);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},oc=g.createContext({}),ac=({children:e,data:t})=>{const[r,s]=g.useState(),[a,o]=g.useState(),i=g.useCallback(u=>{const m=t.filter(p=>p.cidade===u);s(m)},[t]),c=g.useCallback(u=>{o(u)},[]),l=g.useCallback(()=>{o("")},[]);return n.jsx(oc.Provider,{value:g.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:r,selectedStore:a}),[l,t,i,c,r,a]),children:e})},Kn=()=>{const e=g.useContext(oc);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},Zt={contexts:{addToCart:{hook:Et,provider:xi},cart:{hook:ve,provider:Gm},cms:{FlagsAndTags:{context:Ns,hook:_t,provider:_m}},newsletter:{hook:Ws,provider:sc},events:{hook:ae,provider:Sm},global:{hook:ne,provider:km,mediator:Xa},header:{hook:Ne,provider:$m},menuMobile:{hook:Ms,provider:gi},next:{hook:ce,provider:Om},pdp:{provider:gm},PDPContent:{provider:_p,hook:ec},plp:{provider:ap,hook:Us},plpFilter:{hook:Ut,provider:Zi},PLPContent:{provider:hp,hook:Gn},plpInfinite:{provider:Xi,hook:lt},pdpdata:{provider:Pm},searchFacets:{hook:wi,provider:Pi},searchProducts:{hook:on,provider:Bs},searchRoot:{hook:Fs,provider:Ds},searchSearch:{hook:ze,provider:zs},session:{hook:Bt,provider:pp},ui:{hook:tn,provider:Ka},lpStore:{hook:Kn,provider:ac}},hooks:{useBackPDC:Oa,useClipboard:wm,useDisableZoom:$a,useLocalStorage:Em,useOnScreen:Es,useSentinel:Hn,useTouchZoomPan:Va},stores:{cart:Tm,header:Mm,pdp:qm,wishlist:Hm}},Pp={cart:T.cart,events:Cm,plp:cp,product:T.productHelpers,utils:jp},Gs={helpers:Pp},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"},ic=({brand:e,className:t,name:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--name"],t),children:[n.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:n.jsx("p",{className:"typography-style-body-md",children:r})})})]});ic.displayName="AddToCart.Card.Name";const cc=({className:e,listPrice:t,price:r,quantity:s,productId:a,...o})=>{const i=T.formatPriceToCurrency(r/100),c=T.formatPriceToCurrency(t/100);return n.jsx("div",{...o,className:d.helpers.classNameConcat(He["add-to-cart--card--price-quantity"],e),children:n.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.ValuesWrapper,{children:r!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};cc.displayName="AddToCart.Card.PriceQuantity";const wp="_skeleton_12b79_1",Np={skeleton:wp},lc=({style:e})=>n.jsx("div",{style:e,className:Np.skeleton}),Ep="_image_1y08u_1",Ip={image:Ep},Rp=({alt:e,className:t,objectFit:r,...s})=>{const{nextimage:a}=ce();return n.jsx(a,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(Ip.image,t),"data-object-fit":r??"cover"})},Tp=({videoRef:e,...t})=>n.jsx("video",{...t,ref:e,children:n.jsx("track",{kind:"captions"})}),we={Image:Rp,Video:Tp},uc=({className:e,productGroupID:t,size:r,texture:s,...a})=>{const{CONSTANTS:{TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i}}=Et(),[c,l]=g.useState(s??"");return g.useEffect(()=>{c||T.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const p=m.images.find(f=>o.includes(f.imageLabel));p!=null&&p.imageUrl?l(p.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),n.jsxs("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card--style-size"],e),children:[n.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:n.jsx(d.ToggleStyle.Texture,{children:c?n.jsx(we.Image,{alt:"",src:c??"",width:164,height:164,style:i}):n.jsx(lc,{})})}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&n.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:r})]})]})};uc.displayName="AddToCart.Card.StyleSize";const{helpers:Ap}=Gs,dc=({className:e,item:t,texture:r,...s})=>{const{itemOffered:{name:a,brand:o,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:p}}=Et(),{size:f}=Ap.product.getColorAndSizeFromSkuName(i??a,p);return n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--card--content"],e),children:[n.jsx(ic,{brand:o.name,name:a}),n.jsx(cc,{price:u,listPrice:m,quantity:l,productId:t.id}),n.jsx(uc,{size:f,texture:r,productGroupID:c})]})};dc.displayName="AddToCart.Card.Content";const mc=({image:e,thumbnail:t=!1})=>n.jsx(we.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});mc.displayName="AddToCart.Card";const pc=({className:e,item:t,texture:r,thumbnail:s,...a})=>{const{itemOffered:{image:[o]}}=t,i=T.updatedResizedImg(o.url,{width:200,height:300});return n.jsxs("div",{...a,className:d.helpers.classNameConcat(He["add-to-cart--card"],e),children:[n.jsx(mc,{image:{alternateName:o.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&n.jsx(dc,{item:t,texture:r})]})};pc.displayName="AddToCart.Card";const fc=({className:e,children:t,title:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(He["add-to-cart--content"],e),children:[n.jsx("div",{className:He["add-to-cart--content--title"],children:r&&n.jsx("h2",{children:r})}),t,n.jsx(vt.Footer,{})]});fc.displayName="AddToCart.Layout.Content";const hc=({className:e,...t})=>{var h,_;const{isMobile:r,handleClose:s,CONSTANTS:{ADD_TO_CART:a}}=Et(),{cartStore:{totalizers:o},setIsOpen:i}=ve(),c=(h=o.find(y=>y.id==="Discounts"))==null?void 0:h.value,l=((_=o.find(y=>y.id==="Items"))==null?void 0:_.value)??0,u=o.find(y=>y.id==="Shipping"),p=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,f=T.formatPriceToCurrency(p??0);return n.jsxs("div",{...t,className:d.helpers.classNameConcat(He["add-to-cart--footer"],e),children:[n.jsxs("div",{className:He["add-to-cart--footer--total"],children:[n.jsx("span",{children:"Subtotal:"}),n.jsx("span",{children:f})]}),n.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:a.footer.bag}),r?n.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:a.footer.keep_buying}):n.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:a.footer.keep_buying})]})};hc.displayName="AddToCart.Layout.Footer";const _c=({children:e,className:t,thumbnail:r=!1,...s})=>{const{cartStore:{options:a}}=ve(),{recentlyAddedProducts:o}=tn(),i=o.length>3?4:o.length;return n.jsxs("div",{...s,className:He["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(o)&&o.filter((c,l)=>l<i).map(c=>{var u;const l=(u=a==null?void 0:a.find(m=>m.id===c.itemOffered.isVariationOf.productGroupID))==null?void 0:u.texture;return n.jsx(vt.Card,{item:c,thumbnail:r,texture:l},c.itemOffered.sku)}),e]})};_c.displayName="AddToCart.Layout.Items";const gc=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:s}=Et(),{isMobile:a}=ne();return n.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:He["add-to-cart__modal"],isMobile:a??!1,isOpen:r,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[n.jsx(d.Modal.Header,{navigation:"top",children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),n.jsx(d.Modal.Body,{children:e})]})};gc.displayName="AddToCart.Modal";const kp=({children:e})=>{const{count:t,handleClose:r,setIsOpen:s}=Et(),a=g.useRef(t);return g.useEffect(()=>{t>a.current&&s(!0),t<a.current&&a.current>=1&&r(),a.current=t},[t,r,s]),n.jsx(n.Fragment,{children:e})},yc=({children:e,component:t,CONSTANTS:r,...s})=>{const{recentlyAddedProducts:a}=tn(),{isMobile:o}=ne(),i=a.length>3?4:a.length;return n.jsx(xi,{...s,count:i,isMobile:o,CONSTANTS:r,children:n.jsx(kp,{children:o?n.jsxs(n.Fragment,{children:[n.jsx(vt.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):n.jsx(vt.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};yc.displayName="AddToCart.Root";const xc=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:a,left:o,isLeaving:i,target:c,isOpen:l,top:u}=Et();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:a,children:t}),id:"add-to-cart--tooltip",className:He["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:i,isOpen:l,left:o,size:"medium",position:"top",top:u,children:n.jsx("div",{className:He["add-to-cart--tooltip"],ref:c,children:e})})};xc.displayName="AddToCart.Tooltip";const vt={Card:pc,Content:fc,Footer:hc,Items:_c,Modal:gc,Root:yc,Tooltip:xc},Ks=({title:e,...t})=>{const{recentlyAddedProducts:r}=tn(),{isMobile:s}=ne(),a=r.length>3?4:r.length,o=r.length>(a??1),i=r.length>1;return n.jsx(vt.Root,{isMobile:s,count:r.length,component:n.jsx(vt.Content,{title:e,children:n.jsx(vt.Items,{thumbnail:i,children:o&&n.jsx(d.Badge.Count,{count:r.length-a,size:"medium",variant:"secondary"})})}),...t})};Ks.displayName="AddToCart";const vo={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},Op=({children:e,className:t,classNameButton:r,adornment:s,iconPosition:a,scrollToOptions:o,style:i,...c})=>{const l={top:(o==null?void 0:o.top)??0,left:(o==null?void 0:o.left)??0,behavior:(o==null?void 0:o.behavior)??"smooth"},m=a&&s?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[a]}:{},p=()=>{window&&window.document.body.scrollTo({...l})};return n.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(vo["card-modifier"],t),style:{...i,padding:0},children:n.jsxs("button",{className:d.helpers.classNameConcat(vo["backtotop-btn"],r),onClick:p,style:{...m},"data-orientation":a,children:[s,e]})})},Lp="_container_1sy8s_16",pt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:Lp,"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"},Mp=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const s=Object.values(e.products).length;return n.jsxs("div",{className:pt["add-itens-to-cart-container"],children:[n.jsxs("div",{className:pt["add-itens-to-cart-container-values"],children:[n.jsx("div",{className:pt["add-itens-to-cart-qty-products"],children:n.jsx("span",{children:s===0?r.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),n.jsx("div",{className:pt["add-itens-to-cart-total"],children:n.jsx("span",{children:T.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),n.jsx(d.Button,{onClick:t,className:pt["add-button"],size:"large",disabled:s===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},Dp=e=>e.reduce((t,r)=>{var a;const s=t.find(o=>o.node.id===r.node.id);if(!s)return[...t,r];if((a=s==null?void 0:s.node.isVariantOf)!=null&&a.hasVariant){const o=s.node.isVariantOf.hasVariant,i=r.node.isVariantOf.hasVariant;o&&i&&(s.node.isVariantOf.hasVariant=[...o,...i])}return t},[]),Fp=({selectedProduct:e,productId:t,prevState:r,mainSellerId:s})=>{const{products:a,totalPrice:o}=r;try{if(!e){const{[t]:u,...m}=a;return{...r,totalPrice:o-u.price,products:m}}const i=T.getValidOffer(e.offers.offers,s);if(!i)return r;const c=i.seller.identifier,l=i.price;if(a[t]){const{price:u}=a[t];return a[t]={...a[t],price:l,id:e.sku,seller:c},{totalPrice:o+l-u,products:{...a}}}return{totalPrice:o+l,products:{...a,[t]:{id:e.sku,price:l,seller:c,productId:t}}}}catch(i){return console.error("Error handling SKU selection:",i),r}},vc=g.createContext({}),zp=({children:e,item:t,index:r,shelfTitle:s,...a})=>{const[o,i]=g.useState(null),c=g.useRef(null),l=g.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=ae(),p=y=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:y}})},f=()=>{p("add_to_wishlist")},h=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:o,selectedSkus:[o]},customData:{index:r}}})},_=()=>{s&&(m.current={item_list_name:s}),p("select_item")};return n.jsx(vc.Provider,{value:g.useMemo(()=>({...a,index:r,item:t,element:c,selectedSku:o,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:f,sendSelectItemEvent:_,sendAddToCartEvent:h}),[a,t,c,o]),children:e})},Ke=()=>{const e=g.useContext(vc);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"},bc=({callback:e,children:t,className:r,data:s,isKit:a,...o})=>{const{item:{availability:{status:i},image:c}}=Ke();return i?n.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--actions"],r),children:[n.jsxs(fe.Wrapper,{type:"actions--group",children:[n.jsx(fe.Price,{}),n.jsx("div",{className:Re["product-card--actions--selectors"],children:!a&&n.jsx(fe.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};bc.displayName="ProductCard.Actions";const jc=({className:e,isKit:t,...r})=>{const{addToCart:s}=ve(),{isMobile:a=!1,selectedSku:o,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=Ke(),m=()=>{var h;if(!o)return;const f=T.getValidOffer(o.offers.offers,u.StoreConfig_MainSellerId);f&&s({id:o==null?void 0:o.sku,quantity:1,seller:f.seller.identifier},{id:c.id,texture:(h=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:h.url}),l()},p=o?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return n.jsx(d.Button,{...r,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!o&&!i,size:a?"medium":"large",variant:i?"secondary":"primary",onClick:i?r.onClick:m,children:i?"Avise-me quando chegar":p})};jc.displayName="ProductCard.Actions.BuyButton";const Bp={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Lt=({size:e,adornment:t,title:r,subtitle:s,supportChildren:a,className:o,Z_INDEX_WAR:i,...c})=>n.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(Bp["snackbar-modifier"],o),width:360,style:{zIndex:i.snackbar},children:[n.jsx(d.SnackBar.Content,{adornment:t,title:r,subtitle:s}),a&&n.jsx(d.SnackBar.Support,{children:a})]});Lt.displayName="SnackBar";const Xt={"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 ts={exports:{}},ke={};ke._=ke._interop_require_default=Up;function Up(e){return e&&e.__esModule?e:{default:e}}var pn={exports:{}},lr={},bo;function Cc(){return bo||(bo=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 o},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return a}});function r(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 a(i){const c=new URLSearchParams;return Object.entries(i).forEach(l=>{let[u,m]=l;Array.isArray(m)?m.forEach(p=>c.append(u,s(p))):c.set(u,s(m))}),c}function o(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(p=>i.delete(p)),m.forEach((p,f)=>i.append(f,p))}),i}}(lr)),lr}var ur={},jt={};function Sc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Sc=function(s){return s?r:t})(e)}jt._=jt._interop_require_wildcard=qp;function qp(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Sc(t);if(r&&r.has(e))return r.get(e);var s={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(s,o,i):s[o]=e[o]}return s.default=e,r&&r.set(e,s),s}var jo;function Pc(){return jo||(jo=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 o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});const s=jt._(Cc()),a=/https?|ftp|gopher|file/;function o(l){let{auth:u,hostname:m}=l,p=l.protocol||"",f=l.pathname||"",h=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 x=l.search||_&&"?"+_||"";return p&&!p.endsWith(":")&&(p+=":"),l.slashes||(!p||a.test(p))&&y!==!1?(y="//"+(y||""),f&&f[0]!=="/"&&(f="/"+f)):y||(y=""),h&&h[0]!=="#"&&(h="#"+h),x&&x[0]!=="?"&&(x="?"+x),f=f.replace(/[?#]/g,encodeURIComponent),x=x.replace("#","%23"),""+p+y+f+x+h}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)}),o(l)}}(ur)),ur}var dr={},Co;function Hp(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,s){const a={};return Object.keys(r).forEach(o=>{s.includes(o)||(a[o]=r[o])}),a}}(dr)),dr}var mr={},So;function Xn(){return So||(So=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,w){for(var S in w)Object.defineProperty(b,S,{enumerable:!0,get:w[S]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return v},NormalizeError:function(){return y},PageNotFoundError:function(){return x},SP:function(){return f},ST:function(){return h},WEB_VITALS:function(){return r},execOnce:function(){return s},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return o},isResSent:function(){return u},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function s(b){let w=!1,S;return function(){for(var P=arguments.length,N=new Array(P),R=0;R<P;R++)N[R]=arguments[R];return w||(w=!0,S=b(...N)),S}}const a=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=b=>a.test(b);function i(){const{protocol:b,hostname:w,port:S}=window.location;return b+"//"+w+(S?":"+S:"")}function c(){const{href:b}=window.location,w=i();return b.substring(w.length)}function l(b){return typeof b=="string"?b:b.displayName||b.name||"Unknown"}function u(b){return b.finished||b.headersSent}function m(b){const w=b.split("?");return w[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(w[1]?"?"+w.slice(1).join("?"):"")}async function p(b,w){if(process.env.NODE_ENV!=="production"){var S;if((S=b.prototype)!=null&&S.getInitialProps){const R='"'+l(b)+'.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(R)}}const P=w.res||w.ctx&&w.ctx.res;if(!b.getInitialProps)return w.ctx&&w.Component?{pageProps:await p(w.Component,w.ctx)}:{};const N=await b.getInitialProps(w);if(P&&u(P))return N;if(!N){const R='"'+l(b)+'.getInitialProps()" should resolve to an object. But found "'+N+'" instead.';throw new Error(R)}return process.env.NODE_ENV!=="production"&&Object.keys(N).length===0&&!w.ctx&&console.warn(""+l(b)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),N}const f=typeof performance<"u",h=f&&["mark","measure","getEntriesByName"].every(b=>typeof performance[b]=="function");class _ extends Error{}class y extends Error{}class x extends Error{constructor(w){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+w}}class v extends Error{constructor(w,S){super(),this.message="Failed to load static file for page: "+w+" "+S}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(b){return JSON.stringify({message:b.message,stack:b.stack})}}(mr)),mr}var fn={exports:{}},Po;function Yn(){return Po||(Po=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return a}});const r=T.removeTrailingSlash,s=T.parsePath,a=o=>{if(!o.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return o;const{pathname:i,query:c,hash:l}=(0,s.parsePath)(o);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(i)?""+(0,r.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,r.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)}(fn,fn.exports)),fn.exports}var pr={},hn={exports:{}},wo;function $p(){return wo||(wo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return a}});const r=T.pathHasPrefix,s=process.env.__NEXT_ROUTER_BASEPATH||"";function a(o){return(0,r.pathHasPrefix)(o,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)}(hn,hn.exports)),hn.exports}var No;function wc(){return No||(No=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=Xn(),r=$p();function s(a){if(!(0,t.isAbsoluteUrl)(a))return!0;try{const o=(0,t.getLocationOrigin)(),i=new URL(a,o);return i.origin===o&&(0,r.hasBasePath)(i.pathname)}catch{return!1}}}(pr)),pr}var fr={},hr={},Eo;function Vp(){return Eo||(Eo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class t{insert(a){this._insert(a.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(a){a===void 0&&(a="/");const o=[...this.children.keys()].sort();this.slugName!==null&&o.splice(o.indexOf("[]"),1),this.restSlugName!==null&&o.splice(o.indexOf("[...]"),1),this.optionalRestSlugName!==null&&o.splice(o.indexOf("[[...]]"),1);const i=o.map(c=>this.children.get(c)._smoosh(""+a+c+"/")).reduce((c,l)=>[...c,...l],[]);if(this.slugName!==null&&i.push(...this.children.get("[]")._smoosh(a+"["+this.slugName+"]/")),!this.placeholder){const c=a==="/"?"/":a.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(a+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&i.push(...this.children.get("[[...]]")._smoosh(a+"[[..."+this.optionalRestSlugName+"]]/")),i}_insert(a,o,i){if(a.length===0){this.placeholder=!1;return}if(i)throw new Error("Catch-all must be the last part of the URL.");let c=a[0];if(c.startsWith("[")&&c.endsWith("]")){let m=function(p,f){if(p!==null&&p!==f)throw new Error("You cannot use different slug names for the same dynamic path ('"+p+"' !== '"+f+"').");o.forEach(h=>{if(h===f)throw new Error('You cannot have the same slug name "'+f+'" repeat within a single dynamic path');if(h.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+h+'" and "'+f+'" differ only by non-word symbols within a single dynamic path')}),o.push(f)},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 "'+a[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 "'+a[0]+'").');m(this.restSlugName,l),this.restSlugName=l,c="[...]"}else{if(u)throw new Error('Optional route parameters are not yet supported ("'+a[0]+'").');m(this.slugName,l),this.slugName=l,c="[]"}}this.children.has(c)||this.children.set(c,new t),this.children.get(c)._insert(a.slice(1),o,i)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(s){const a=new t;return s.forEach(o=>a.insert(o)),a.smoosh()}}(hr)),hr}var _r={},gr={},yr={},xr={},Io;function Wp(){return Io||(Io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.startsWith("/")?r:"/"+r}}(xr)),xr}var vr={},Ro;function Nc(){return Ro||(Ro=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}t(e,{DEFAULT_SEGMENT_KEY:function(){return a},PAGE_SEGMENT_KEY:function(){return s},isGroupSegment:function(){return r}});function r(o){return o[0]==="("&&o.endsWith(")")}const s="__PAGE__",a="__DEFAULT__"}(vr)),vr}var To;function Gp(){return To||(To=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 a},normalizeRscURL:function(){return o}});const r=Wp(),s=Nc();function a(i){return(0,r.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 o(i){return i.replace(/\.rsc($|\?)/,"$1")}}(yr)),yr}var Ao;function Ec(){return Ao||(Ao=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 o},isInterceptionRouteAppPath:function(){return a}});const r=Gp(),s=["(..)(..)","(.)","(..)","(...)"];function a(i){return i.split("/").find(c=>s.find(l=>c.startsWith(l)))!==void 0}function o(i){let c,l,u;for(const m of i.split("/"))if(l=s.find(p=>m.startsWith(p)),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,r.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}}}(gr)),gr}var ko;function Kp(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Ec(),r=/\/\[[^/]+?\](?=\/|$)/;function s(a){return(0,t.isInterceptionRouteAppPath)(a)&&(a=(0,t.extractInterceptionRouteInformation)(a).interceptedRoute),r.test(a)}}(_r)),_r}var Oo;function Xp(){return Oo||(Oo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,o){for(var i in o)Object.defineProperty(a,i,{enumerable:!0,get:o[i]})}t(e,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const r=Vp(),s=Kp()}(fr)),fr}var br={},jr={},Lo;function Yp(){return Lo||(Lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=Xn();function r(s){let{re:a,groups:o}=s;return i=>{const c=a.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(o).forEach(m=>{const p=o[m],f=c[p.pos];f!==void 0&&(u[m]=~f.indexOf("/")?f.split("/").map(h=>l(h)):p.repeat?[l(f)]:l(f))}),u}}}(jr)),jr}var Cr={},Sr={},Mo;function Qp(){return Mo||(Mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function s(a){return t.test(a)?a.replace(r,"\\$&"):a}}(Sr)),Sr}var Do;function Zp(){return Do||(Do=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,y){for(var x in y)Object.defineProperty(_,x,{enumerable:!0,get:y[x]})}t(e,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return i}});const r=T.constants,s=Ec(),a=Qp(),o=T.removeTrailingSlash;function i(_){const y=_.startsWith("[")&&_.endsWith("]");y&&(_=_.slice(1,-1));const x=_.startsWith("...");return x&&(_=_.slice(3)),{key:_,repeat:x,optional:y}}function c(_){const y=(0,o.removeTrailingSlash)(_).slice(1).split("/"),x={};let v=1;return{parameterizedRoute:y.map(C=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(w=>C.startsWith(w)),b=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&b){const{key:w,optional:S,repeat:P}=i(b[1]);return x[w]={pos:v++,repeat:P,optional:S},"/"+(0,a.escapeStringRegexp)(j)+"([^/]+?)"}else if(b){const{key:w,repeat:S,optional:P}=i(b[1]);return x[w]={pos:v++,repeat:S,optional:P},S?P?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,a.escapeStringRegexp)(C)}).join(""),groups:x}}function l(_){const{parameterizedRoute:y,groups:x}=c(_);return{re:new RegExp("^"+y+"(?:/)?$"),groups:x}}function u(){let _=0;return()=>{let y="",x=++_;for(;x>0;)y+=String.fromCharCode(97+(x-1)%26),x=Math.floor((x-1)/26);return y}}function m(_){let{interceptionMarker:y,getSafeRouteKey:x,segment:v,routeKeys:C,keyPrefix:j}=_;const{key:b,optional:w,repeat:S}=i(v);let P=b.replace(/\W/g,"");j&&(P=""+j+P);let N=!1;(P.length===0||P.length>30)&&(N=!0),isNaN(parseInt(P.slice(0,1)))||(N=!0),N&&(P=x()),j?C[P]=""+j+b:C[P]=b;const R=y?(0,a.escapeStringRegexp)(y):"";return S?w?"(?:/"+R+"(?<"+P+">.+?))?":"/"+R+"(?<"+P+">.+?)":"/"+R+"(?<"+P+">[^/]+?)"}function p(_,y){const x=(0,o.removeTrailingSlash)(_).slice(1).split("/"),v=u(),C={};return{namedParameterizedRoute:x.map(j=>{const b=s.INTERCEPTION_ROUTE_MARKERS.some(S=>j.startsWith(S)),w=j.match(/\[((?:\[.*\])|.+)\]/);if(b&&w){const[S]=j.split(w[0]);return m({getSafeRouteKey:v,interceptionMarker:S,segment:w[1],routeKeys:C,keyPrefix:y?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return w?m({getSafeRouteKey:v,segment:w[1],routeKeys:C,keyPrefix:y?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,a.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function f(_,y){const x=p(_,y);return{...l(_),namedRegex:"^"+x.namedParameterizedRoute+"(?:/)?$",routeKeys:x.routeKeys}}function h(_,y){const{parameterizedRoute:x}=c(_),{catchAll:v=!0}=y;if(x==="/")return{namedRegex:"^/"+(v?".*":"")+"$"};const{namedParameterizedRoute:C}=p(_,!1);let j=v?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(Cr)),Cr}var Fo;function Jp(){return Fo||(Fo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=Yp(),r=Zp();function s(a,o,i){let c="";const l=(0,r.getRouteRegex)(a),u=l.groups,m=(o!==a?(0,t.getRouteMatcher)(l)(o):"")||i;c=a;const p=Object.keys(u);return p.every(f=>{let h=m[f]||"";const{repeat:_,optional:y}=u[f];let x="["+(_?"...":"")+f+"]";return y&&(x=(h?"":"/")+"["+x+"]"),_&&!Array.isArray(h)&&(h=[h]),(y||f in m)&&(c=c.replace(x,_?h.map(v=>encodeURIComponent(v)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:p,result:c}}}(br)),br}var zo;function ef(){return zo||(zo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const r=Cc(),s=Pc(),a=Hp(),o=Xn(),i=Yn(),c=wc(),l=Xp(),u=Jp();function m(p,f,h){let _,y=typeof f=="string"?f:(0,s.formatWithValidation)(f);const x=y.match(/^[a-zA-Z]{1,}:\/\//),v=x?y.slice(x[0].length):y;if((v.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+y+"' passed to next/router in page: '"+p.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,o.normalizeRepeatedSlashes)(v);y=(x?x[0]:"")+j}if(!(0,c.isLocalURL)(y))return h?[y]:y;try{_=new URL(y.startsWith("#")?p.asPath:p.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(y,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let b="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const S=(0,r.searchParamsToUrlQuery)(j.searchParams),{result:P,params:N}=(0,u.interpolateAs)(j.pathname,j.pathname,S);P&&(b=(0,s.formatWithValidation)({pathname:P,hash:j.hash,query:(0,a.omit)(S,N)}))}const w=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return h?[w,b||w]:w}catch{return h?[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)}(pn,pn.exports)),pn.exports}var _n={exports:{}},Bo;function tf(){return Bo||(Bo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const r=Yn(),s=function(a){for(var o=arguments.length,i=new Array(o>1?o-1:0),c=1;c<o;c++)i[c-1]=arguments[c];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(T.addLocale.addLocale(a,...i)):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)}(_n,_n.exports)),_n.exports}var Pr={},Uo;function Ic(){return Uo||(Uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=ke._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}(Pr)),Pr}var wr={},qo;function Rc(){return qo||(qo=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,m){for(var p in m)Object.defineProperty(u,p,{enumerable:!0,get:m[p]})}t(e,{AppRouterContext:function(){return a},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return o},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=ke._(g),a=s.default.createContext(null),o=s.default.createContext(null),i=s.default.createContext(null),c=s.default.createContext(null);process.env.NODE_ENV!=="production"&&(a.displayName="AppRouterContext",o.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",c.displayName="TemplateContext");const l=s.default.createContext(new Set)}(wr)),wr}var gn={exports:{}},yn={exports:{}},Ho;function Tc(){return Ho||(Ho=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}r(t,{cancelIdleCallback:function(){return a},requestIdleCallback:function(){return s}});const s=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(o){let i=Date.now();return self.setTimeout(function(){o({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-i))}})},1)},a=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(o){return clearTimeout(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)}(yn,yn.exports)),yn.exports}var $o;function nf(){return $o||($o=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=g,s=Tc(),a=typeof IntersectionObserver=="function",o=new Map,i=[];function c(m){const p={root:m.root||null,margin:m.rootMargin||""},f=i.find(x=>x.root===p.root&&x.margin===p.margin);let h;if(f&&(h=o.get(f),h))return h;const _=new Map,y=new IntersectionObserver(x=>{x.forEach(v=>{const C=_.get(v.target),j=v.isIntersecting||v.intersectionRatio>0;C&&j&&C(j)})},m);return h={id:p,observer:y,elements:_},i.push(p),o.set(p,h),h}function l(m,p,f){const{id:h,observer:_,elements:y}=c(f);return y.set(m,p),_.observe(m),function(){if(y.delete(m),_.unobserve(m),y.size===0){_.disconnect(),o.delete(h);const v=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);v>-1&&i.splice(v,1)}}}function u(m){let{rootRef:p,rootMargin:f,disabled:h}=m;const _=h||!a,[y,x]=(0,r.useState)(!1),v=(0,r.useRef)(null),C=(0,r.useCallback)(b=>{v.current=b},[]);(0,r.useEffect)(()=>{if(a){if(_||y)return;const b=v.current;if(b&&b.tagName)return l(b,S=>S&&x(S),{root:p==null?void 0:p.current,rootMargin:f})}else if(!y){const b=(0,s.requestIdleCallback)(()=>x(!0));return()=>(0,s.cancelIdleCallback)(b)}},[_,f,p,y,v.current]);const j=(0,r.useCallback)(()=>{x(!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)}(gn,gn.exports)),gn.exports}var xn={exports:{}},vn={exports:{}},Vo;function rf(){return Vo||(Vo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(s,a)=>process.env.__NEXT_I18N_SUPPORT?T.normalizeLocalePath.normalizeLocalePath(s,a):{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)}(vn,vn.exports)),vn.exports}var bn={exports:{}},Wo;function sf(){return Wo||(Wo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];if(process.env.__NEXT_I18N_SUPPORT)return T.detectDomainLocale.detectDomainLocale(...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)}(bn,bn.exports)),bn.exports}var Go;function of(){return Go||(Go=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return a}});const r=Yn(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function a(o,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=rf().normalizeLocalePath,m=sf().detectDomainLocale,p=i||u(o,c).detectedLocale,f=m(l,void 0,p);if(f){const h="http"+(f.http?"":"s")+"://",_=p===f.defaultLocale?"":"/"+p;return""+h+f.domain+(0,r.normalizePathTrailingSlash)(""+s+_+o)}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)}(xn,xn.exports)),xn.exports}var jn={exports:{}},Ko;function af(){return Ko||(Ko=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return o}});const r=T.addPathPrefix,s=Yn(),a=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,r.addPathPrefix)(i,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)}(jn,jn.exports)),jn.exports}var Cn={exports:{}},Xo;function cf(){return Xo||(Xo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,_){for(var y in _)Object.defineProperty(h,y,{enumerable:!0,get:_[y]})}r(t,{ACTION_FAST_REFRESH:function(){return l},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return s},ACTION_RESTORE:function(){return o},ACTION_SERVER_ACTION:function(){return u},ACTION_SERVER_PATCH:function(){return i},PrefetchCacheEntryStatus:function(){return p},PrefetchKind:function(){return m},isThenable:function(){return f}});const s="refresh",a="navigate",o="restore",i="server-patch",c="prefetch",l="fast-refresh",u="server-action";var m;(function(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(m||(m={}));var p;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(p||(p={}));function f(h){return h&&(typeof h=="object"||typeof h=="function")&&typeof h.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)}(Cn,Cn.exports)),Cn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});const r=ke,s=n,a=r._(g),o=ef(),i=wc(),c=Pc(),l=Xn(),u=tf(),m=Ic(),p=Rc(),f=nf(),h=of(),_=af(),y=cf(),x=new Set;function v(P,N,R,k,O,M){if(typeof window>"u"||!M&&!(0,i.isLocalURL)(N))return;if(!k.bypassPrefetchedCheck){const D=typeof k.locale<"u"?k.locale:"locale"in P?P.locale:void 0,q=N+"%"+R+"%"+D;if(x.has(q))return;x.add(q)}(async()=>M?P.prefetch(N,O):P.prefetch(N,R,k))().catch(D=>{if(process.env.NODE_ENV!=="production")throw D})}function C(P){const R=P.currentTarget.getAttribute("target");return R&&R!=="_self"||P.metaKey||P.ctrlKey||P.shiftKey||P.altKey||P.nativeEvent&&P.nativeEvent.which===2}function j(P,N,R,k,O,M,X,D,q){const{nodeName:U}=P.currentTarget;if(U.toUpperCase()==="A"&&(C(P)||!q&&!(0,i.isLocalURL)(R)))return;P.preventDefault();const G=()=>{const H=X??!0;"beforePopState"in N?N[O?"replace":"push"](R,k,{shallow:M,locale:D,scroll:H}):N[O?"replace":"push"](k||R,{scroll:H})};q?a.default.startTransition(G):G()}function b(P){return typeof P=="string"?P:(0,c.formatUrl)(P)}const S=a.default.forwardRef(function(N,R){let k;const{href:O,as:M,children:X,prefetch:D=null,passHref:q,replace:U,shallow:Q,scroll:G,locale:H,onClick:J,onMouseEnter:se,onTouchStart:de,legacyBehavior:oe=!1,...le}=N;k=X,oe&&(typeof k=="string"||typeof k=="number")&&(k=(0,s.jsx)("a",{children:k}));const F=a.default.useContext(m.RouterContext),ee=a.default.useContext(p.AppRouterContext),E=F??ee,W=!F,ie=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
|
-
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(
|
|
3
|
-
Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+O+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else Y=
|
|
4
|
-
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const be=oe?Y&&typeof Y=="object"&&Y.ref:R,[Ie,je,ge]=(0,f.useIntersection)({rootMargin:"200px"}),Ae=a.default.useCallback(z=>{(V.current!==A||Te.current!==I)&&(ge(),V.current=A,Te.current=I),Ie(z),be&&(typeof be=="function"?be(z):typeof be=="object"&&(be.current=z))},[A,be,I,ge,Ie]);a.default.useEffect(()=>{process.env.NODE_ENV==="production"&&E&&(!je||!ie||v(E,I,A,{locale:H},{kind:he},W))},[A,I,je,H,ie,F==null?void 0:F.locale,E,W,he]);const Ce={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.');!oe&&typeof J=="function"&&J(z),oe&&Y.props&&typeof Y.props.onClick=="function"&&Y.props.onClick(z),E&&(z.defaultPrevented||j(z,E,I,A,U,Q,G,H,W))},onMouseEnter(z){!oe&&typeof se=="function"&&se(z),oe&&Y.props&&typeof Y.props.onMouseEnter=="function"&&Y.props.onMouseEnter(z),E&&((!ie||process.env.NODE_ENV==="development")&&W||v(E,I,A,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(pe){!oe&&typeof de=="function"&&de(pe),oe&&Y.props&&typeof Y.props.onTouchStart=="function"&&Y.props.onTouchStart(pe),E&&(!ie&&W||v(E,I,A,{locale:H,priority:!0,bypassPrefetchedCheck:!0},{kind:he},W))}};if((0,l.isAbsoluteUrl)(A))Ce.href=A;else if(!oe||q||Y.type==="a"&&!("href"in Y.props)){const z=typeof H<"u"?H:F==null?void 0:F.locale,pe=(F==null?void 0:F.isLocaleDomain)&&(0,h.getDomainLocale)(A,z,F==null?void 0:F.locales,F==null?void 0:F.domainLocales);Ce.href=pe||(0,_.addBasePath)((0,u.addLocale)(A,z,F==null?void 0:F.defaultLocale))}return oe?a.default.cloneElement(Y,Ce):(0,s.jsx)("a",{...le,...Ce,children:k})});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(ts,ts.exports);var lf=ts.exports,uf=lf;const Fe=T.getDefaultExportFromCjs(uf),df="_link_w24h0_1",mf="_wrapper_w24h0_98",pf="_text_w24h0_106",Nr={link:df,wrapper:mf,text:pf},Oe=({children:e,adornments:t,className:r,disableUnderline:s,href:a,mode:o,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const p=d.helpers.ValidateProp({fieldTypes:Ot.SizesSmallExtended,property:i,fallback:"medium"}),f=d.helpers.ValidateProp({fieldTypes:Ot.Mode,property:o,fallback:"default"});return n.jsx(Fe,{...m,className:d.helpers.classNameConcat(Nr.link,r),href:a&&a.length>0?a:"#","data-size":p,"data-variant":f,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:n.jsxs("div",{className:Nr.wrapper,onClick:l,children:[t==null?void 0:t.start,n.jsx("p",{className:Nr.text,"data-size":p,children:e}),t==null?void 0:t.end]})})},ff=({ICONS:e})=>{const{resetFeedback:t}=Nt();return n.jsxs("div",{className:Xt["wishlist--snack--actions"],children:[n.jsx(Oe,{href:"/favoritos",children:"Ver Favoritos"}),n.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:n.jsx(d.Icon,{name:e.close})}})]})},Xs=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=Ls(),{resetFeedback:a}=Nt(),o=g.useRef(null);return g.useEffect(()=>{o.current&&clearTimeout(o.current),s&&(o.current=setTimeout(()=>{a()},5e3))},[s,a]),(s==null?void 0:s.active)&&n.jsx(Lt,{Z_INDEX_WAR:r,className:Xt["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:n.jsx(ff,{ICONS:t}),size:"medium"})};Xs.displayName="WishList.Feedback";const Ys={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Ac=({className:e,children:t,columns:r=1,isMobile:s=!1,gap:a=8,position_grid:o,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=g.useMemo(()=>r%i===0?"initial":s||r<2?c:c.split("/").reverse().join("/"),[r,i,s]);return n.jsx("div",{...l,className:d.helpers.classNameConcat(Ys["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${r/i*100}%`,order:o,padding:a/2},children:t})};Ac.displayName="ProductList.Banner";class hf{constructor(){gt(this,"cache",new Map);gt(this,"pendingRequests",new Map);gt(this,"rafId",null)}request(t,r,s){const a=this.getCacheKey(t,s==null?void 0:s.filterTexture);if(this.cache.has(a)){r(this.cache.get(a));return}const o=this.pendingRequests.get(a);o?o.callbacks.push(r):this.pendingRequests.set(a,{productId:t,callbacks:[r],filterTexture:s.filterTexture}),this.rafId===null&&(this.rafId=requestAnimationFrame(()=>this.executeGroup()))}getCacheKey(t,r){return r!=null&&r.length?`${t}|${r.sort().join(",")}`:t}async executeGroup(){this.rafId=null;const t=this.pendingRequests;if(t.size===0)return;const r=[],s=[];if(t.forEach((o,i)=>{this.cache.has(i)?s.push([i,o]):r.push(o)}),s.forEach(([o,i])=>{const c=this.cache.get(o);c&&i.callbacks.forEach(l=>l(c)),t.delete(o)}),r.length===0)return;const a=new Map;r.forEach(o=>{var l;const i=((l=o.filterTexture)==null?void 0:l.sort().join(","))||"no-filter",c=a.get(i)||[];c.push(o),a.set(i,c)}),await Promise.all(Array.from(a.values()).map(o=>this.executeGroupRequest(o)))}async executeGroupRequest(t){const r=t.map(a=>a.productId),s=t[0].filterTexture;try{const a=await T.fetchProxy("/_v/proxy/catalog/product/similars",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:r})});if(!a.ok)throw new Error("Erro ao buscar similares.");const o=await a.json();t.forEach(i=>{const c=o[i.productId]||[],l=s&&c.length?T.formattedSimilars(c,s):c,u=this.getCacheKey(i.productId,s);this.cache.set(u,l),i.callbacks.forEach(m=>m(l)),this.pendingRequests.delete(u)})}catch(a){console.error("Erro ao buscar similares:",a),t.forEach(o=>{const i=this.getCacheKey(o.productId,s);o.callbacks.forEach(c=>c([])),this.pendingRequests.delete(i)})}}clearCache(){this.cache.clear()}}const Yo=new hf;function Qs(e,t){const[r,s]=g.useState([]),a=g.useRef(!1);g.useEffect(()=>{a.current=!1},[e]);const o=g.useCallback(()=>{!e||a.current||(a.current=!0,Yo.request(e,s,t))},[e,t]),i=g.useCallback(()=>Yo.clearCache(),[]);return{items:r,loadSimilars:o,clearCache:i}}const kc=({isKit:e,parent:t,productId:r,setNotify:s,CONSTANTS:a})=>{const{router:o}=ce(),{items:i,loadSimilars:c}=Qs(r,{filterTexture:a.TEXTURE_IMAGE}),l=g.useRef(!1),u=g.useRef(null),m=h=>o.push(h??""),p=g.useCallback(h=>{!r||!h||c()},[r,c]),f=g.useCallback((h,_)=>{if(!h.isIntersecting){a.PLP_INFINITE_SCROLL&&u.current&&(clearTimeout(u.current),u.current=null);return}if(h.intersectionRatio>=_.threshold&&!l.current){if(a.PLP_INFINITE_SCROLL){u.current=setTimeout(()=>{p(!0)},a.PLP_PRODUCT_SIMILAR_DELAY);return}p(!0)}},[p]);return g.useEffect(()=>{if(e||!t.current)return;const h={root:null,threshold:.1},_=new IntersectionObserver(([y])=>{f(y,h)},h);return _.observe(t.current),()=>{u.current&&clearTimeout(u.current),_.disconnect()}},[f,t,e]),n.jsx(fe.Actions,{data:i,callback:m,isKit:e,children:!e&&n.jsx(fe.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:a.PLP_SIZE_ORDER})})};kc.displayName="ProductList.Card.Actions";const Oc=({className:e,children:t,gap:r=32,item:s,isMobile:a,order:o,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:p,...f})=>{const h=g.useRef(null),{availability:{status:_}}=s,y=g.useCallback((v,C)=>{var j;typeof u=="function"&&u((j=v.isVariantOf)==null?void 0:j.hasVariant,C)},[u]),x=s.name.substring(0,4).toLowerCase()==="kit ";return n.jsxs("div",{...f,className:d.helpers.classNameConcat(Ys["product-list--card"],e),"data-mobile":a,"data-order":o,ref:h,style:{...c&&{maxWidth:a?"50%":"25%"},order:o,padding:r/2},children:[n.jsxs(fe.Root,{item:s,isMobile:a,index:l,size:a?"small":"medium",order:o,outStock:!_,CONSTANTS:p,children:[n.jsx(fe.Header,{product:s,tag:i==null?void 0:i.commercial}),n.jsx(fe.Media,{showVideo:m,hasPriority:!0}),n.jsxs(fe.Wrapper,{type:"body",children:[n.jsx(fe.Title,{tag:i==null?void 0:i.institucional}),n.jsx(kc,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:y,isKit:x,CONSTANTS:p}),!x&&n.jsx(fe.OutStock,{callback:y})]}),n.jsx(fe.Wrapper,{type:"footer",children:_&&n.jsx(fe.BuyButton,{isKit:x})})]}),t]})};Oc.displayName="ProductList.Card";const Lc=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Ys["product-list"],t),children:e});Lc.displayName="ProductList.Grid";const st={Banner:Ac,Card:Oc,Root:Lc,helpers:mp},_f="_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:_f},Zs=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),{isMobile:a}=ne(),o=()=>{s.push(r==null?void 0:r.link)};return n.jsxs("div",{className:d.helpers.classNameConcat(Ge["pdc--empty"],e),children:[n.jsxs(d.TextStructure.DivWrapper,{className:Ge["pdc--empty-wrapper"],children:[n.jsx("span",{className:a?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),n.jsx("p",{className:a?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>o(),variant:"tertiary",children:n.jsx("b",{children:r.text})})]})};Zs.displayName="PDC.Empty";const Qn=e=>n.jsx("div",{...e,className:Ge["pdc--infinite--next-page"],children:n.jsx(d.Spinner,{className:Ge["pdc--infinite--next-page--spinner"]})});Qn.displayName="PDC.Spinner";function Mc({CONSTANTS:e}){const{sendDataLayerEvent:t}=ae(),{isMobile:r}=ne(),{getAvailableProductTag:s}=_t(),[a,o]=g.useState([]),[i,c]=g.useState(!0),l=zt(),u=l.join(","),m=r?16:32;return g.useEffect(()=>{const p=async()=>{l.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:l})}).then(f=>f.json()).then(f=>{o(f),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:f}}})}).catch(f=>console.error(f)):o([]),c(!1)};if(l.length){p();return}if(l.length===0&&a.length===0){c(!1);return}o([]),c(!1)},[u]),n.jsx("section",{className:Xt["wishlist-grid"],children:n.jsxs("div",{className:Xt["wishlist-grid--container"],children:[i&&n.jsx(Qn,{}),!l.length&&!(a!=null&&a.length)&&!i&&n.jsx(Zs,{className:Xt["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),n.jsx(st.Root,{children:Array.isArray(a)&&a.map((p,f)=>{const h=p.node.cluster.highlights||[],_=s(h);return n.jsx(st.Card,{gap:m,isMobile:r??!1,item:p.node,tag:_,index:f,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}},p.node.sku)})})]})})}Mc.displayName="Wishlist.Grid";const gf=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],Dc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=Bt(),a=zt(),o=Ls(),{updateList:i}=Nt();return g.useEffect(()=>{var l,u;o.active&&Qe.set("fs::wishlist",a);const c=async()=>{var m;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:a,docId:(m=s==null?void 0:s.user)==null?void 0:m.id})}).catch(p=>{console.error("Error updating wishlist:",p)})};o.active&&((l=s.user)!=null&&l.id)&&a.length!==((u=s.wishlist)==null?void 0:u.length)&&c()},[o,s,a]),g.useEffect(()=>{var u;const c=async()=>{const m=await Qe.get("fs::wishlist");m&&(m==null?void 0:m.length)!==a.length&&i(m)},l=async()=>{var h;const m=await Qe.get("fs::wishlist")??[],p=s.wishlist?typeof s.wishlist[0]=="object"?gf(s.wishlist):s.wishlist:[],f=[...new Set([...m,...p])];i(f),Qe.set("fs::wishlist",f),p.length!==f.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:f,docId:(h=s.user)==null?void 0:h.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=s.user)!=null&&u.id){l();return}c()},[s,i]),n.jsx(Xs,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};Dc.displayName="Wishlist.Init";const Fc=({product:e,priceInfo:t,size:r="medium",style:s,ICONS:a})=>{const{sendDataLayerEvent:o,currentLocalRef:i}=ae(),c=zt(),{toggleProduct:l}=Nt(),{isVariantOf:{productGroupID:u}}=e;return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{size:r,name:c.includes(u)?a.favorite_true:a.favorite_false})},onClick:()=>{l(u),o({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"})};Fc.displayName="WishList.Toggle";const zc={Feedback:Xs,Toggle:Fc,Grid:Mc,Init:Dc},Bc=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:s}=Ke(),{tags:a}=_t(),o=e.offers.offers[0],i=T.getDiscountPercent(o.listPrice,o.price),c=a==null?void 0:a.flagDiscount;return n.jsxs(fe.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&n.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?n.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?n.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&n.jsx(zc.Toggle,{product:e,priceInfo:{price:o.price,listPrice:o.listPrice},variant:"card",ICONS:s.ICONS})]})};Bc.displayName="ProductCard.Actions.Header";const Uc=({className:e,children:t,hasPriority:r=!1,showVideo:s=!1,...a})=>{const{element:o,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:p,CONSTANTS:f}=Ke(),h=T.getFirstImages({images:c,label:{first:f.MAIN_IMAGE,second:f.SECOND_IMAGE}});return n.jsxs("div",{...a,className:d.helpers.classNameConcat(Re["product-card--image"],e),ref:o,style:{aspectRatio:f.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[n.jsx(Fe,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),f.PLP_INFINITE_SCROLL&&sessionStorage.setItem(f.PLP_GRID_SCROLL_BACK.order,String(p))},children:n.jsx("div",{className:Re["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:y},x)=>g.createElement(we.Image,{...f.PRODUCT_IMAGE_DIMENSIONS.product_card,style:f.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:y??"product image",key:x,...r&&{priority:x===0&&i<4},objectFit:"cover",src:_}))})}),f.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&n.jsx(fe.Video,{url:u,poster:h[0].url}),t]})};Uc.displayName="ProductCard.Media.Media";const qc=({className:e,callback:t,children:r,...s})=>{const{isMobile:a,item:o,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=Ke(),{availability:{status:c}}=o;return c?null:n.jsxs("div",{...s,className:d.helpers.classNameConcat(Re["product-card--outstock"],e),children:[n.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),n.jsx(d.Button,{className:d.helpers.classNameConcat(e,"buy-button"),size:a?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(o)},children:i.notify})]})};qc.displayName="ProductCard.OutStock";const Hc=({children:e,className:t="",index:r,isMobile:s=!1,item:a,size:o,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>n.jsx(zp,{item:a,isMobile:s,outStock:c,order:i,size:o,index:r,shelfTitle:l,CONSTANTS:u,children:n.jsx("div",{...m,className:d.helpers.classNameConcat(Re["product-card--wrapper"],t),"data-size":o,children:e})});Hc.displayName="ProductCard.Root";const $c=({disabled:e,label:t,size:r,value:s,onClick:a,...o})=>n.jsxs(d.ToggleSize.Wrapper,{...o,disabled:!1,outOfStock:e,size:r,onClick:a,children:[n.jsx(d.ToggleSize.DisabledAdornment,{}),n.jsx(d.ToggleSize.Text,{children:t})]});$c.displayName="ProductCard.SizeSelector.Item";const Vc=({active:e=!1,callback:t,selectedSku:r=null,item:s,setNotify:a})=>{const{item:o,isMobile:i,setSelectedSku:c,eventDataRef:l}=Ke();s.productId=o.id;const u=T.disableSKU(s),m=T.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const p=g.useCallback(h=>{const _=r===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,r]),f=g.useCallback(()=>{if(u&&typeof a=="function"){a(o,s);return}p(s)},[s,a,p,u,o]);return n.jsx($c,{active:e,disabled:u,label:m,onClick:()=>f(),size:i?"x-small":"small",value:s})};Vc.displayName="ProductCard.SizeSelector.SkuItem";const Wc=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((s,a)=>{const o=t(s).toUpperCase(),i=t(a).toUpperCase(),c=r.indexOf(o)-r.indexOf(i);return c!==0?c:o.localeCompare(i,"pt-BR")}):[],Gc=({callback:e,className:t="",children:r,setNotify:s,PLP_SIZE_ORDER:a,...o})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=Ke(),u=g.useMemo(()=>Array.isArray(c)?Wc({items:c,getLabel:m=>T.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:a}):[],[c]);return n.jsxs("div",{...o,className:d.helpers.classNameConcat(Re["product-card--selectors--size"],t),"data-mobile":i,children:[n.jsx("div",{className:Re["product-card--selectors--size--skus"],children:u.map((m,p)=>n.jsx(Vc,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${p}--${m.sku}`))}),n.jsx("div",{className:Re["product-card--selectors--size--button"],children:r})]})};Gc.displayName="ProductCard.SizeSelector";const ns=({alt:e="",callback:t,more:r,total:s=4,src:a,url:o,...i})=>n.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(o)},children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsxs(d.ToggleStyle.Texture,{children:[a&&n.jsx(we.Image,{alt:e??a,src:a,height:34,width:34}),r&&n.jsx(d.TextStructure.DivWrapper,{className:Re["product-card--selectors--style--more"],children:n.jsxs("p",{children:["+ ",s]})})]})]}),yf=({children:e,callback:t,data:r,total:s=4,size:a,...o})=>{const{index:i}=Ke(),{triggerSelectItemEventRef:c}=ae();return n.jsxs("div",{...o,children:[e,Array.isArray(r)&&r.slice(0,s).map((l,u)=>n.jsx(ns,{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:a},u)),Array.isArray(r)&&(r==null?void 0:r.length)>s&&n.jsx(ns,{size:a,total:r.length-s,more:!0})]})},Kc=({callback:e,className:t,data:r,images:s=[],findTexture:a,...o})=>{const{CONSTANTS:i}=Ke(),c=a||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return n.jsx(yf,{...o,callback:e,className:d.helpers.classNameConcat(Re["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&n.jsx(ns,{active:!0,size:"x-small",src:l.url})})};Kc.displayName="ProductCard.StyleSelector";const Xc=({className:e,hasDecimal:t,...r})=>{const{isMobile:s,item:{offers:{lowPrice:a,highPrice:o},installments:{count:i,value:c}},eventDataRef:l}=Ke();l.current.priceInfo={price:a,listPrice:o};const u=T.formatPriceToCurrency(o,t),m=T.formatPriceToCurrency(a,t),p=T.formatPriceToCurrency(c??0),f=s?"horizontal":"stacked";return n.jsx("div",{...r,className:d.helpers.classNameConcat(Re["product-card--price"],e),"data-mobile":s,children:n.jsx(d.ProductInfo.Root,{size:"small",layout:f,children:n.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:f,children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?n.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${p}`,size:"small"}):null]})})})};Xc.displayName="ProductCard.Price";const Yc=({tag:e,className:t})=>{const{item:{name:r}}=Ke();return n.jsxs("div",{className:d.helpers.classNameConcat(Re["product-card--title"],t),children:[n.jsx("div",{className:Re["product-card--title--tag"],children:e?n.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?n.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):n.jsx("div",{})}),n.jsx("div",{className:Re["product-card--title--content"],children:r&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h3",{children:r})})})})]})};Yc.displayName="ProductCard.Title";const Qc=({className:e,url:t,poster:r,...s})=>{const{element:a}=Ke();return g.useEffect(()=>{if(!(a!=null&&a.current))return;const o=a.current,i=o.querySelector("video");if(i){const c=new IntersectionObserver(m=>{m.forEach(p=>{T.setVideoPlay(p.isIntersecting,i,t)})},{root:null,rootMargin:"0px",threshold:.5}),l=()=>{i.setAttribute("data-loaded","true")},u=()=>{o&&(c.observe(o),i.addEventListener("loadeddata",l))};return document.readyState==="complete"?u():window.addEventListener("load",u),()=>{c.disconnect(),window.removeEventListener("load",u)}}return()=>null},[t,a]),n.jsx("div",{...s,className:d.helpers.classNameConcat(Re["product-card--video"],e),children:t&&n.jsx(we.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};Qc.displayName="ProductCard.Media.Video";const Zc=({children:e,className:t,type:r,...s})=>n.jsx("div",{...s,className:d.helpers.classNameConcat(Re[`product-card--${r}`],t),children:e});Zc.displayName="ProductCard.Wrapper";const fe={Actions:bc,BuyButton:jc,Header:Bc,Media:Uc,Root:Hc,OutStock:qc,Price:Xc,SizeSelector:Gc,StyleSelector:Kc,Title:Yc,Video:Qc,Wrapper:Zc},xf="_carousel_1egdv_1",vf="_shelf__container_1egdv_14",bf="_shelf_without_carousel_1egdv_34",jf="_card_container_1egdv_57",At={carousel:xf,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:vf,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:bf,card_container:jf},Qo=({title:e})=>n.jsx("div",{className:At.shelf__container,children:e&&n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",T.responsive["responsive-mobile-flex"]),children:e}),n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",T.responsive["responsive-desktop-flex"]),children:e})]})})}),Cf=({children:e,ICONS:t,itemsPerPage:r,title:s})=>{const{isMobile:a}=ne(),o=r[a?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:o,gap:10,loop:!0,direction:"row"}),m=g.Children.toArray(e).length;return a||m>=4?n.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:At.carousel,children:[n.jsxs("div",{className:At["custom-controllers"],children:[s&&n.jsx(Qo,{title:s}),o<m&&n.jsxs(d.Carousel.Controller,{className:At["controllers-arrows-bullets"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_right})}})]}),!a&&o>2&&n.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})]})]}),n.jsx(d.Carousel.Body,{children:g.Children.map(e,(f,h)=>n.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:f},`${s}_${h}`))})]}):n.jsxs(n.Fragment,{children:[s&&n.jsx(Qo,{title:s}),n.jsx("div",{className:At.shelf_without_carousel,children:e})]})},Jc=({className:e,item:t,isMobile:r,size:s,shelfTitle:a,...o})=>{const i=g.useRef(null),{getAvailableProductTag:c}=_t(),{availability:{status:l}}=t,u=p=>{const f=p.filter(h=>!o.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return r?f.splice(0,2):f},m=c(t.cluster.highlights);return n.jsx("div",{ref:i,className:At.card_container,children:n.jsxs(fe.Root,{...o,item:{...t,image:u(t.image)},isMobile:r,size:r?"small":"medium",outStock:!l,shelfTitle:a,children:[n.jsx(fe.Header,{product:t,tag:m==null?void 0:m.commercial}),n.jsx(fe.Media,{}),n.jsxs(fe.Wrapper,{type:"body",children:[n.jsx(fe.Title,{tag:m==null?void 0:m.institucional}),n.jsx(fe.Actions,{})]}),n.jsx(fe.Wrapper,{type:"footer"})]})})};Jc.displayName="ProductList.Card";const Jt={Shelf:Cf,Card:Jc},el=({CONSTANTS:e,inView:t,products:r,innerRef:s})=>{const a=g.useMemo(()=>Dp(r),[r]),{isMobile:o}=ne(),{addItemsToCart:i}=ve(),{sendDataLayerEvent:c}=ae(),{getAvailableProductTag:l}=_t(),[u,m]=g.useState({totalPrice:0,products:{}}),p=()=>{const h=Object.values(u.products);i(h),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:h.map(_=>{const y=a.find(x=>x.node.id===_.productId);return y==null?void 0:y.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},f=({selectedProduct:h,productId:_})=>{const y=Fp({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(y)};return g.useEffect(()=>{if(!t||a.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:a},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),n.jsxs("div",{className:pt.container,ref:s,children:[n.jsx("div",{className:pt["carousel-container"],style:{width:a.length<=3?"max-content":"75%"},children:n.jsx(Jt.Shelf,{title:e.BUY_PACKAGE.header.title,itemsPerPage:{desktop:3,mobile:a.length>=3?2.2:a.length},ICONS:e.ICONS,children:Array.isArray(a)&&a.map(({node:h},_)=>{var v,C,j;const y=l(h.cluster.highlights),{availability:{status:x}}=h;return x?n.jsxs(fe.Root,{item:{...h,image:Gs.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:o,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[n.jsx(fe.Header,{product:h,tag:y.commercial}),n.jsx(fe.Media,{}),n.jsxs(fe.Wrapper,{type:"body",children:[n.jsx(fe.Title,{tag:{value:(v=y.institucional)==null?void 0:v.value,enableIcon:(C=y.institucional)==null?void 0:C.enableIcon,icon:(j=y.institucional)==null?void 0:j.icon}}),n.jsx(fe.Actions,{children:n.jsx(fe.SizeSelector,{callback:b=>f({selectedProduct:b,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),n.jsx("div",{className:pt["add-cart-container"],children:n.jsx(Mp,{handleAddAllToCart:p,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Js={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},eo=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=ve(),{handleSelectContent:s}=ae(),{CONSTANTS:a}=Ne(),o=r.reduce((i,c)=>i+(c.quantity??0),0);return n.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:n.jsxs(d.Badge.AutoPositioner,{children:[n.jsx(d.Badge.Count,{count:o,size:"medium",variant:"primary",style:{backgroundColor:"black",display:o>0?"flex":"none"}}),n.jsx(d.Icon,{name:a.header.ICONS.bag,size:"medium"})]})})};eo.displayName="Header.Bag";const an=({children:e,href:t,...r})=>t&&t!=="#"?n.jsx(Fe,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,tl=()=>{const{headerData:e}=Ne(),{handleSelectContent:t}=ae(),{reset:r,updateValue:s}=rn(),a=o=>{o?s(o):r()};return n.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((o,i)=>n.jsx(an,{href:o.link,onMouseEnter:()=>a(o.submenuId),onFocus:()=>a(o.submenuId),children:n.jsx(d.Header.CategoryItem,{className:Js["btn-header"],value:o.submenuId??null,adornment:{start:n.jsx(d.Icon,{name:o.iconStart}),end:n.jsx(d.Icon,{name:o.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${o.label}`})},children:o.label})},`category-${o.label}-${i}`))})};tl.displayName="Header.Categories";function Sf(){const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Ne(),{setValue:r}=$n();return n.jsx(d.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:n.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const Pf={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},wf={"observer-wrapper":"_observer-wrapper_r43gk_1"},Zn=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:s,stopOnIntersection:a=!0,className:o,...i})=>{const c=g.useRef(null),l=Es(c,a,r),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),n.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(wf["observer-wrapper"],o),children:e})},nl=({thumbnails:e,category:t,isMobile:r=!0,callBack:s})=>{const{handleSelectPromotionEvent:a}=ae(),o=50/e.length;return n.jsx("div",{className:Pf["menu-subcategories-container"],children:e.map((i,c)=>{const l=r?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 n.jsx(Zn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:n.jsxs(Fe,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),a({updatePromotionRef:!0,promotion:u})},children:[n.jsx(we.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${o}vw`}),i.label&&n.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};nl.displayName="Menu.Thumbnail";const rs={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},rl=({children:e,dividerOnRight:t=!0,subMenu:r,...s})=>{var l;const{router:a}=ce(),{reset:o}=rn(),{handleSelectContent:i}=ae(),{CONSTANTS:c}=Ne();return n.jsxs("div",{...s,className:rs["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((u,m)=>{var h,_,y,x;const p=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.link)?{expandAfterRowsQty:u.rowsToShowDesk}:{},f=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:n.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return n.jsxs(d.ComponentList.Structure,{children:[n.jsx(an,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(o(),i({content:`menu:${u.label??""}:${r.label??""}`}))},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{children:u.label})})})}),n.jsx(d.ComponentList.List,{columns:1,...p,className:rs["submenu-categories"],children:(y=u.items)==null?void 0:y.map((v,C)=>n.jsx(d.ComponentList.ListItem,{id:`list-item-${v.label}-${C}`,children:n.jsx(Oe,{href:v.link??"#",size:"x-small",title:v.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{o(),i({content:`menu:${u.label??""}:${v.label??""}:${r.label??""}`})},children:v.label})},`list-item-${v.label}-${C}`))}),((x=u.see_all)==null?void 0:x.link)&&n.jsx(d.ComponentList.Support,{...f,size:"small",onClick:()=>{var v;(v=u.see_all)!=null&&v.link&&(o(),i({content:`menu:${u.label??""}:${r.label}`}),a.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&n.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};rl.displayName="Menu.Categories";const sl=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:s}=Ne();return n.jsxs(n.Fragment,{children:[n.jsx("div",{...r,className:rs["menu-desktop"],style:{...r.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&n.jsx(d.Utils.Divider,{size:"small"})]})};sl.displayName="Menu.MenuRoot";const Er={Root:sl,Categories:rl,Thumbnail:nl},ol=()=>{const{headerData:e,CONSTANTS:t}=Ne(),r=Ja(),{reset:s}=rn();return n.jsx(d.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((a,o)=>{const{thumbnails:i,label:c,id:l}=a,u=l===r,m=i==null?void 0:i.some(p=>!!p.srcDesk);return n.jsxs(Er.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[n.jsx(Er.Categories,{dividerOnRight:!!m,subMenu:a}),Array.isArray(i)&&n.jsx(Er.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${o}`)})})};ol.displayName="Header.SubMenu";const al=()=>{const{handleSelectContent:e}=ae(),{CONSTANTS:t}=Ne();return n.jsx(Fe,{href:"/favoritos",children:n.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:n.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};al.displayName="Header.WishList";const Nf="_root_im5yf_125",$e={"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:Nf},il=({className:e,children:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat($e["user-menu--content"],e),children:t});il.displayName="UserMenu.Content";var cl=(e=>(e.Account="account",e))(cl||{});const ll=({className:e,cashBack:t,credits:r,link:s,total:a,...o})=>{const i=t?T.formatPriceToCurrency(t):void 0,c=r?T.formatPriceToCurrency(r):void 0,l=a?T.formatPriceToCurrency(a):void 0;return n.jsx(d.Credits.Account,{...o,className:d.helpers.classNameConcat($e["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:cl.Account})};ll.displayName="UserMenu.Credits";const ul=({className:e,children:t,description:r,text:s,...a})=>{const{isMobile:o}=ne();return n.jsx("div",{...a,className:d.helpers.classNameConcat($e["user-menu--login"],e),"data-mobile":o,children:n.jsxs("div",{className:$e["user-menu--login--content"],children:[n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[n.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),n.jsx("p",{children:r})]})}),t]})})};ul.displayName="UserMenu.Login";const dl=({className:e,isLogged:t,onLogoutClick:r,ICONS:s,storeConfig:a,isMobile:o})=>{const i=o?go:go({ICONS:s,storeConfig:a}).filter(c=>c.deviceShown==="both"||c.deviceShown===(o?"mobile":"desktop"));return n.jsxs("ul",{className:d.helpers.classNameConcat($e["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>n.jsx("li",{children:n.jsx(Oe,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:n.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?n.jsx("li",{children:n.jsx(Oe,{href:`${a.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${a.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:n.jsx(d.Icon,{name:Jm(s)})},children:Zm})}):n.jsx(n.Fragment,{})]})};dl.displayName="UserMenu.Menu";const ml=e=>{const t=g.useRef(null),r=g.useCallback(o=>{t.current&&!t.current.contains(o.target)&&e()},[e]),s=g.useCallback(o=>{t.current&&!t.current.contains(o.target)&&e()},[e]),a=g.useCallback(o=>{o.key==="Escape"&&e()},[e]);return g.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",a),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",a),document.removeEventListener("touchstart",s)}),[r,a,s]),{ref:t}},Ef=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},If=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:s,left:a,top:o,width:i}=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e!=null&&e.parentElement?Ef(e==null?void 0:e.parentElement):0;return{left:a+i/2-(c.width+l*2),top:o+s+r}},pl=g.createContext({}),Rf=({children:e,delay:t=600,gap:r=20,isOpen:s,setIsOpen:a,target:o,...i})=>{const c=g.useRef(null),[l,u]=g.useState(!1),[m,p]=g.useState({left:0,top:0}),{ref:f}=ml(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{a(!1),u(!1)},t))});return g.useEffect(()=>{if(o&&(f!=null&&f.current)){const{left:h,top:_}=If(f.current,o,r??0);p({left:h,top:_}),u(!1)}},[r,s,o,f]),n.jsx(pl.Provider,{value:g.useMemo(()=>({...i,...m,contentRef:f,isLeaving:l,isOpen:s,setIsOpen:a,setIsLeaving:u,target:o}),[i,m,f,l,s,a,u,o]),children:e})},fl=()=>{const e=g.useContext(pl);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},hl=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:s,setIsOpen:a}=fl();return n.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:a,variant:"sideBottom",className:$e["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[n.jsx(d.Modal.Header,{navigation:"top",className:$e["modal-header-modifier"],children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:$e["modal-controls-modifier"]})}),n.jsx(d.Modal.Body,{children:e})]})};hl.displayName="UserMenu.Modal";const _l=({children:e,component:t,Z_INDEX_WAR:r,isMobile:s,...a})=>n.jsx(Rf,{...a,className:$e.root,children:s?n.jsxs(n.Fragment,{children:[n.jsx(mt.Modal,{Z_INDEX_WAR:r,children:t}),e]}):n.jsx(mt.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});_l.displayName="UserMenu.Root";const gl=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:a,left:o,isLeaving:i,isOpen:c,top:l}=fl();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:a,children:t}),className:d.helpers.classNameConcat($e["user-menu--tooltip"],$e["tooltip-modifier"]),isLeaving:i,isOpen:c,left:o,size:"medium",position:"top",top:l,style:{zIndex:r.user_menu},children:n.jsx("div",{className:$e["user-menu--tooltip"],children:e})})};gl.displayName="UserMenu.Tooltip";const mt={Credits:ll,Content:il,Login:ul,Menu:dl,Modal:hl,Root:_l,Tooltip:gl},Jn=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:s,mobileUserMenuTarget:a,storeConfig:o})=>{var h,_,y;const{isMobile:i}=ne(),{CONSTANTS:c}=Ne(),l=Bt(),u=()=>{window.location.href=`${o.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((h=l.user)!=null&&h.userId),{cashback:p,credits:f}=g.useMemo(()=>{var x,v;return{credits:((x=l==null?void 0:l.getCurrentCredits())==null?void 0:x.credits)??0,cashback:((v=l==null?void 0:l.getCurrentCredits())==null?void 0:v.cashback)??0}},[l]);return n.jsx(mt.Root,{component:n.jsxs(mt.Content,{children:[n.jsx(mt.Login,{description:tp(m),text:ep(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&&n.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),f+p&&m?n.jsx(mt.Credits,{credits:f,cashBack:p,link:`${o.secureSubdomain}/account#/meus-creditos`,total:f+p}):n.jsx(n.Fragment,{}),n.jsx(d.Utils.Divider,{}),n.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:o,isLogged:m,className:T.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),n.jsx(mt.Menu,{ICONS:c.header.ICONS,storeConfig:o,isMobile:!0,isLogged:m,className:T.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:r,target:i?a:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};Jn.displayName="UserMenu";const yl=({storeConfig:e})=>{const{CONSTANTS:t}=Ne(),{handleSelectContent:r}=ae(),{reset:s}=rn(),{setValue:a}=As(),o=Ts(),i=g.useRef(null);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(Fe,{href:"/",onMouseEnter:s,children:n.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),n.jsx(tl,{}),n.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[n.jsx(Sf,{}),n.jsx(Jn,{isOpen:o,setIsOpen:a,desktopUserMenuTarget:i.current,storeConfig:e,children:n.jsx(d.Header.SupportItem,{onClick:()=>{a(!0),r({content:"header:user_menu"})},className:Js["btn-login"],innerRef:i,children:n.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),n.jsx(al,{}),n.jsx(eo,{id:"cart-button"})]})]}),n.jsx(ol,{})]})};yl.displayName="Header.HeaderDesktopWrapper";const Be={"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"},xl=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:s,submenuId:a,label:o,...i})=>n.jsx("button",{...i,className:Be["menu--banners--item"],children:r?n.jsxs(d.Banner.Container,{children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(we.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),n.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Be["menu--banners--item--text"],children:n.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):n.jsx("h2",{...i,children:e})});xl.displayName="Menu.Mobile.Category";const vl=({label:e,...t})=>{const{CONSTANTS:r}=Ne();return n.jsx(d.Button,{...t,adornment:{end:n.jsx(d.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};vl.displayName="Menu.Mobile.Body.Category";const bl=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>n.jsx("div",{...s,className:Be["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((a,o)=>n.jsx(Oe,{disableUnderline:!0,disablePadding:!1,href:a.link??"#",onClick:()=>r(a.label,t),size:"medium",title:a.label??"",children:a.label},o)))});bl.displayName="Menu.Mobile.List";const jl=({current:e,onHandleOut:t})=>{var r;return e?n.jsx("div",{className:Be["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((s,a)=>n.jsxs("div",{className:Be["menu--sub-category--item"],children:[n.jsx(Yt.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),n.jsx(Yt.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},a)))}):n.jsx(n.Fragment,{})};jl.displayName="Menu.Mobile.Body.SubCategory";const Cl=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>{var c;const{router:a}=ce(),{handleSelectContent:o}=ae(),{CONSTANTS:i}=Ne();return n.jsxs("div",{...s,className:Be["menu--categories--title"],children:[n.jsx(an,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{o({content:`menu:${e.label??""}:${t}`})},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.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)&&n.jsx(d.ComponentList.Support,{adornment:{end:n.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;r(e.label,t),(l=e==null?void 0:e.see_all)!=null&&l.link&&a.push(e.see_all.link)},children:e.see_all.label})]})};Cl.displayName="Menu.Mobile";const Yt={Banner:xl,Category:vl,List:bl,SubCategory:jl,Title:Cl},Sl=g.createContext({}),Tf=({children:e})=>{const[t,r]=g.useState(null),s=g.useCallback(()=>{r(null)},[]),a=o=>{o!==t&&r(o)};return n.jsx(Sl.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:s,handleChangeSubMenuOpened:a},children:e})},Pl=()=>g.useContext(Sl),wl=e=>{const{router:t}=ce(),{headerData:r}=Ne(),{handleSelectContent:s}=ae(),{currentCategory:a,setCurrentCategory:o}=Pl(),i=g.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(o(null),h==null||h.click())}},l=(h,_)=>{s({content:`menu:${h}`}),t.push(_),c()},u=(h,_)=>{s({content:`menu:${h}:${_}`}),c()},m=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],p=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],f=h=>{h.submenuId?o(h.submenuId):l(h.label,h.link)};return n.jsxs("div",{...e,className:Be["menu--body"],style:{transform:`translate3d(calc(-100% * ${a?1:0}), 0px, 0px)`},children:[n.jsx("button",{className:Be["menu--dummy-close"],ref:i,"data-close":!0}),n.jsxs("div",{className:Be["menu--step"],"data-active":"true",children:[n.jsx("div",{className:Be["menu--banners"],children:n.jsx("div",{className:Be["menu--banners--list"],children:m.map((h,_)=>g.createElement(Yt.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),n.jsx("div",{className:Be["menu--categories"],children:m.map((h,_)=>n.jsx(Yt.Category,{label:h.label,onClick:()=>f(h)},_))})]}),n.jsx("div",{className:Be["menu--step"],"data-active":!!a,children:n.jsx(Yt.SubCategory,{current:p.find(h=>h.id===a),onHandleOut:u})})]})};wl.displayName="Menu.Mobile.Body";const Af={"menu--header":"_menu--header_1ozdf_1"},Nl=()=>{var a;const{headerData:e}=Ne(),{currentCategory:t,setCurrentCategory:r}=Pl(),s=(a=e==null?void 0:e.categories)==null?void 0:a.find(o=>o.submenuId===t);return n.jsxs("div",{className:Af["menu--header"],children:[n.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),s&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:n.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),n.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>r(null)})]})};Nl.displayName="Menu.Mobile.Header";var ss={exports:{}};function kf(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 Ir={},Rr={},Zo;function Of(){return Zo||(Zo=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=ke._(g).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Rr)),Rr}var Jo;function Lf(){return Jo||(Jo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const r=ke._(g),s=Of();function a(_){return _&&_.default?_.default:_}const o=[],i=[];let c=!1;function l(_){let y=_(),x={loading:!0,loaded:null,error:null};return x.promise=y.then(v=>(x.loading=!1,x.loaded=v,v)).catch(v=>{throw x.loading=!1,x.error=v,v}),x}function u(_,y){let x=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},y),v=null;function C(){if(!v){const w=new m(_,x);v={getCurrentValue:w.getCurrentValue.bind(w),subscribe:w.subscribe.bind(w),retry:w.retry.bind(w),promise:w.promise.bind(w)}}return v.promise()}if(typeof window>"u"&&o.push(C),!c&&typeof window<"u"){const w=x.webpack&&typeof kf.resolveWeak=="function"?x.webpack():x.modules;w&&i.push(S=>{for(const P of w)if(S.includes(P))return C()})}function j(){C();const w=r.default.useContext(s.LoadableContext);w&&Array.isArray(x.modules)&&x.modules.forEach(S=>{w(S)})}function b(w,S){j();const P=r.default.useSyncExternalStore(v.subscribe,v.getCurrentValue,v.getCurrentValue);return r.default.useImperativeHandle(S,()=>({retry:v.retry}),[]),r.default.useMemo(()=>P.loading||P.error?r.default.createElement(x.loading,{isLoading:P.loading,pastDelay:P.pastDelay,timedOut:P.timedOut,error:P.error,retry:v.retry}):P.loaded?r.default.createElement(a(P.loaded),w):null,[w,P])}return b.preload=()=>C(),b.displayName="LoadableComponent",r.default.forwardRef(b)}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:x}=this;y.loading&&(typeof x.delay=="number"&&(x.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},x.delay)),typeof x.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},x.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(v=>{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(x=>x())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(y){return this._callbacks.add(y),()=>{this._callbacks.delete(y)}}constructor(y,x){this._loadFn=y,this._opts=x,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function p(_){return u(l,_)}function f(_,y){let x=[];for(;_.length;){let v=_.pop();x.push(v(y))}return Promise.all(x).then(()=>{if(_.length)return f(_,y)})}p.preloadAll=()=>new Promise((_,y)=>{f(o).then(_,y)}),p.preloadReady=_=>(_===void 0&&(_=[]),new Promise(y=>{const x=()=>(c=!0,y());f(i,_).then(x,x)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=p.preloadReady);const h=p}(Ir)),Ir}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(m,p){for(var f in p)Object.defineProperty(m,f,{enumerable:!0,get:p[f]})}r(t,{default:function(){return u},noSSR:function(){return l}});const s=ke,a=n,o=s._(Lf()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,p){if(delete p.webpack,delete p.modules,!i)return m(p);const f=p.loading;return()=>(0,a.jsx)(f,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,p){let f=o.default,h={loading:x=>{let{error:v,isLoading:C,pastDelay:j}=x;if(!j)return null;if(process.env.NODE_ENV!=="production"){if(C)return null;if(v)return(0,a.jsxs)("p",{children:[v.message,(0,a.jsx)("br",{}),v.stack]})}return null}};m instanceof Promise?h.loader=()=>m:typeof m=="function"?h.loader=m:typeof m=="object"&&(h={...h,...m}),h={...h,...p};const _=h.loader,y=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return h.loadableGenerated&&(h={...h,...h.loadableGenerated},delete h.loadableGenerated),typeof h.ssr=="boolean"&&!h.ssr?(delete h.webpack,delete h.modules,l(f,h)):f({...h,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)})(ss,ss.exports);var Mf=ss.exports,Df=Mf;const El=T.getDefaultExportFromCjs(Df),Fn={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Il=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=Ms(),{CONSTANTS:s}=Ne();return n.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(Fn["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[n.jsx(Nl,{}),n.jsx(d.Modal.Body,{className:Fn["menu--root"],children:e})]})};Il.displayName="Menu.MenuRoot";const Ff=El(()=>Promise.resolve(Il),{ssr:!1}),Rl=({children:e,last:t=!1,...r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:Fn.divider})]});Rl.displayName="Menu.NavigationBarItem";const Tl=()=>{const{setUserMenuIsOpen:e}=Ms(),{handleSelectContent:t}=ae(),{CONSTANTS:r}=Ne(),{router:s}=ce(),a=[{iconNameStart:r.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:r.header.MENU_INFO.login.button_text},{iconNameStart:r.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:r.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:r.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return n.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:Fn["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(a)&&a.map((o,i)=>g.createElement(Rl,{...o,key:i},o.text))})};Tl.displayName="Menu.NavigationBar";const Tr={Body:wl,NavigationBar:Tl,Root:Ff},Al=({storeConfig:e})=>{const t=g.useRef(null),{CONSTANTS:r}=Ne(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:a}=r.header,{handleSelectContent:o}=ae(),{setValue:i}=$n(),{setValue:c}=ni(),{setValue:l}=As(),u=Ts(),m=ti(),{isMobile:p}=ne();return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(Fe,{href:"/",children:n.jsx(d.Icon,{name:a.logo,size:"x-large",onClick:()=>{o({content:"header:logo"})}})})}),n.jsxs(d.Header.Support,{children:[n.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),o({content:"header:search"})},children:n.jsx(d.Icon,{name:a.search,size:"medium"})}),n.jsx(eo,{}),n.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[n.jsx("span",{ref:t}),n.jsx(d.Icon,{name:a.menu,size:"medium"})]})]})]}),p&&n.jsx(gi,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:n.jsx(Jn,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:n.jsxs(Tr.Root,{children:[n.jsx(Tr.Body,{}),s?n.jsx(Tr.NavigationBar,{}):n.jsx(n.Fragment,{})]})})})]})};Al.displayName="Header.HeaderMobileWrapper";const zf=g.createContext({}),Bf=({children:e})=>{const{sendDataLayerEvent:t}=ae(),{cartStore:r,isOpen:s}=ve();g.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[s]),g.useEffect(()=>{var o,i,c;if(r.id&&!((i=(o=r.marketingData)==null?void 0:o.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=r;T.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:l,marketingData:{...r==null?void 0:r.marketingData,marketingTags:T.marketingTagsBuilder(((c=r.marketingData)==null?void 0:c.marketingTags)??[])}}}).catch(u=>{console.error(u)})}},[r]);const a=({cartItem:o,oldQuantity:i,newQuantity:c})=>{t({functionKey:"skuEvents",data:{event:i>c?"remove_from_cart":"add_to_cart",commonData:{products:[{...o,price:o.price/100,listPrice:o.listPrice/100}]},customData:{quantity:c},supportData:{selectedSkus:[o]}}})};return n.jsx(zf.Provider,{value:{handleUpdateItemQuantityEvent:a},children:e})},Uf="var(--color-background-brand-primary-lighter)",qf="_fadeInOut_1l5ow_1",Hf="_fadeOut_1l5ow_1",re={brandPrimaryLighter:Uf,"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:qf,fadeOut:Hf,"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"},kl=({item:{id:e,message:t,callback:r},removeNotification:s,ICONS:a})=>{const o=g.useRef(null),i=()=>{var l;(l=o.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return n.jsx("div",{className:re["mc--notify--item"],ref:o,onAnimationEnd:()=>c(e),children:n.jsxs(d.SnackBar.Structure,{size:"medium",children:[n.jsx(d.SnackBar.Content,{title:t}),n.jsxs(d.SnackBar.Support,{children:[typeof r=="function"&&n.jsx(d.Button,{onClick:()=>{r(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),n.jsx(d.Button,{iconNameStart:a.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};kl.displayName="MiniCart.Notify.Item";const Ol=({ICONS:e})=>{const t=Is(),{removeNotification:r}=Rs(),s=t.length?[...t].sort((a,o)=>o.id-a.id):[];return s.length?n.jsx("div",{className:re["mc--notify"],children:n.jsx("div",{className:re["mc--notify--content"],children:Array.isArray(s)&&s.map(a=>n.jsx(kl,{item:a,removeNotification:r,ICONS:e},a.id))})}):null};Ol.displayName="MiniCart.Notifications";const $f=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:s,...a})=>{const o=zt(),{toggleProduct:i}=Nt(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=r;return n.jsx(d.Button,{...a,adornment:{end:n.jsx(d.Icon,{name:`favorite-${o.includes(c)?"true":"false"}`,size:"small"})},onClick:()=>{i(c),o.includes(c)||t({texture:"mini-cart-wishlist",title:`${s.messages.add_wishlist}`},l,()=>i(c)),e(o.includes(c)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:s.messages.add_wishlist_button})},Ll=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:s,...a})=>{const{addToCart:o,removeToCart:i}=ve(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:p,quantity:f}=t,h=(_,y,x)=>{i(l,_.title,()=>{typeof x=="function"&&x(),o({id:l,quantity:y,seller:m},{id:l,texture:_.texture},!0)})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:re["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&n.jsx($f,{...a,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:r,MINICART_CONFIG:s}),n.jsx(d.Button,{...a,adornment:{end:n.jsx(d.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},f),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&n.jsx(Tt.Gift,{uniqueId:u,bundleItems:c,offerings:p,ICONS:r,MINICART_CONFIG:s})]})};Ll.displayName="MiniCart.Card.Actions";const Ml=({bundleItems:e,offerings:t,uniqueId:r,ICONS:s,MINICART_CONFIG:a})=>{const[o,i]=g.useState(!1),{toggleGiftItemCart:c}=ve(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[p]=t;if(p){i(!0);const f=e.some(h=>h.id===p.id);c(r,String(p.id),f).then(()=>i(!1))}}},u=t[0],m=e.find(p=>p.id===u.id);return u&&"id"in u?n.jsx("div",{className:re["mc--card--actions--gift"],children:n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:o,label:a.messages.giftPackage,onChange:l})}):null};Ml.displayName="MiniCart.Card.Gift";const Dl=({itemOffered:e})=>{const t=T.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return n.jsx(Fe,{href:`${e==null?void 0:e.slug}`,className:re["mc--card--product-link"],children:n.jsx(we.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Dl.displayName="MiniCart.Card.Media";const Fl=({name:e,skuName:t,tagName:r,className:s})=>n.jsxs(n.Fragment,{children:[r&&n.jsx(d.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),n.jsx("p",{className:d.helpers.classNameConcat(re["mc--card--name"],s),children:T.getProductNameWithoutSku(e??"",t??"")})]});Fl.displayName="MiniCart.Card.Name";const zl=({total:e,totalList:t})=>n.jsx(d.ProductInfo.Root,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:re["mc--card--price"],children:n.jsx(d.ProductInfo.Wrapper,{className:re["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:T.formatPriceToCurrency(t),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:T.formatPriceToCurrency(e),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:T.formatPriceToCurrency(e),size:"small"})})})})});zl.displayName="MiniCart.ProductPrice";const Bl=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{var u;const[s,a]=g.useState(""),o=g.useRef(null),{cartStore:{options:i}}=ve(),c=e.itemOffered.isVariationOf.productGroupID,l=g.useCallback(()=>{var p;const m=(p=i==null?void 0:i.find(f=>f.id===c))==null?void 0:p.texture;if(m){a(m);return}T.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[c]})}).then(f=>f.json()).then(f=>{const h=f.data[0].items.find(_=>_.itemId===e.id);if(h){const _=h.images.find(y=>t.includes(y.imageLabel));if(_!=null&&_.imageUrl){a(_.imageUrl);return}a(h.images[0].imageUrl)}}).catch(f=>{console.error(f)})},[i,c,e.id]);return g.useEffect(()=>{if(!o.current)return;const m=new IntersectionObserver(p=>{p[0].isIntersecting&&l()});return m.observe(o.current),()=>{m.disconnect()}},[l]),n.jsx("div",{ref:o,children:n.jsx(d.ToggleStyle.Wrapper,{size:"small",style:r,children:n.jsx(d.ToggleStyle.Texture,{children:s?n.jsx(we.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:r}):n.jsx(lc,{})})})})};Bl.displayName="MiniCart.Card.Style";const Ul=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a})=>{const{size:o}=T.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return n.jsxs(d.Utils.Row,{alignItems:"center",children:[n.jsx(Bl,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:a}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),o&&n.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:re["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${re.brandPrimaryLighter}`},children:n.jsx(d.ToggleSize.Text,{children:o})})]})};Ul.displayName="MiniCart.Card.Sku";const Tt={Actions:Ll,Gift:Ml,Media:Dl,Name:Fl,Price:zl,Sku:Ul},Vf=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}},ql=({available:e=!0,index:t,product:r,ICONS:s,MINICART_CONFIG:a,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var p,f;const{sendDataLayerEvent:l}=ae(),u=Vf(r),m=(h,_)=>{const y={commonData:{...r,...u},customData:{index:t},event:h};if(_==="skuEvents"){const x={...r,...u};y.supportData={selectedSkus:[x]},y.commonData.products=[x]}l({functionKey:_,data:y})};return n.jsxs("div",{className:d.helpers.classNameConcat(re["mc--card"],e?"":re["mc--card--unavailable"]),children:[n.jsx(Tt.Media,{itemOffered:r.itemOffered}),n.jsxs("div",{className:re["mc--card--content-info"],children:[n.jsx(Tt.Name,{name:((p=r.itemOffered)==null?void 0:p.name)??"",skuName:(f=r.itemOffered)==null?void 0:f.skuName}),n.jsxs("div",{className:re["mc--card--details"],children:[n.jsx("div",{className:re["mc--card--actions"],children:e?n.jsx(Tt.Price,{total:u.price,totalList:u.listPrice}):n.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),n.jsxs("div",{className:re["mc--card--actions--secondary"],children:[e&&n.jsx(Tt.Sku,{product:r,MINICART_CONFIG:a,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),n.jsx(Tt.Actions,{handleSendEvent:m,product:r,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:a})]})]})]})]})};ql.displayName="MiniCart.Card";const Hl=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var o;const{toExpire:s}=Bt(),a=((o=s==null?void 0:s.cashback)==null?void 0:o.reduce((i,c)=>i+c.remaining_value,0))??0;return a>0?n.jsxs("div",{className:d.helpers.classNameConcat(re["mc--cashback"],re[`mc--cashback--${e}`]),children:[n.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),n.jsxs("p",{children:[n.jsx("span",{children:T.formatPriceToCurrency(a)})," ",r.title]})]}):null};Hl.displayName="MiniCart.Cashback";const $l=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:s,removeCoupon:a,removeSellerCode:o,cartStore:{marketingData:i,openTextField:c}}=ve(),[l,u]=g.useState(!1),[m,p]=g.useState(!1),f=g.useCallback(()=>{let x="";return e==="coupon"?x=(i==null?void 0:i.coupon)??"":x=String((c==null?void 0:c.value)??""),x.toUpperCase()??""},[i,c,e]),[h,_]=g.useState(!!f()),y=async x=>{p(!0),!!f()&&(e==="coupon"?await a():await o(),_(!1),u(!1)),await s(x,e).then(C=>{if(!C.statusOk&&x||C.code!==200){x?(u(!0),_(!1)):u(!1);return}_(!0),u(!1)}).catch(()=>u(!0)).finally(()=>p(!1))};return n.jsx(Me.Field,{hasError:l,hasSuccess:h,isLoading:m,onHandler:y,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:f(),MINICART_CONFIG:r,ICONS:t})};$l.displayName="MiniCart.CouponSeller";const Vl=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:s}=ce(),a=()=>{s.push(r.link)};return n.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:re["mc--body--empty--feedback"],children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("p",{className:`typography-style-body-xs ${re["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),n.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>a(),"data-close":!0,adornment:{end:n.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Vl.displayName="MiniCart.Feedback";const Wf=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},Wl=({feedback:e,hasError:t,onHandler:r,hasSuccess:s,type:a,title:o,value:i,ICONS:c})=>{const[l,u]=g.useState(i);g.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?n.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?n.jsx(d.Icon,{name:c.check_circle}):null,p=()=>{if(a==="seller"){const y=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(y)}},f=()=>{if(a==="seller"){const y=String(i).includes(" - ")?i:l;u(y)}},h=y=>{const x=y.currentTarget.value;if(x===""&&typeof r=="function"||s&&String(i).length>0&&x!==String(i)||t&&x!==String(i)){u(""),r("");return}if(a==="cep"){const C=Wf(x);u(C)}else u(x)},_=y=>{if(y.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const x=y.currentTarget.value;r(x)}};return n.jsx(d.TextField.Input,{adornment:{end:m()},mode:"over-label",label:o,feedback:e,value:l,type:"text",onFocus:p,onBlur:f,onChange:h,onKeyDown:_})};Wl.displayName="MiniCart.Field.Input";const Gl=({title:e,ICONS:t,MINICART_CONFIG:r,...s})=>{const a=g.useRef(null),{hasSuccess:o,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,p=()=>i?"error":String(m).length&&o?"success":"none",f=g.useCallback(()=>{if(a.current){const y=a.current.querySelector("input");y&&typeof l=="function"&&(m!==""||i?(l(""),y.value=""):l((y==null?void 0:y.value)??""))}},[l,m,i]),h=p();return n.jsx("div",{ref:a,children:n.jsx(d.TextField.Structure,{className:re["mc--field"],input:n.jsx(Wl,{...s,feedback:h,title:e,ICONS:t}),right:n.jsx(d.Button,{"data-has-success":!o,size:"medium",title:String(m).length&&o||i?"Remover":"Aplicar",onClick:()=>f(),disabled:c,children:String(m).length&&o||i?n.jsx(d.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?n.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};Gl.displayName="MiniCart.Field";const ea=e=>{const t=e*100;return Math.round(t)},Gf=e=>(e/100).toFixed(2).replace(".",","),Kf=(e,t)=>{const{valueType:r,remainingValueToActivate:s}=e;if(r==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(r==="price"){const a=s===100?"Falta":"Faltam",o=Gf(s);return`${a} R$ ${o} ${t}`}return t},Kl=({ICONS:e})=>{var v;const{promotionRules:t,data:r,cartStore:s,cartStore:{items:a,marketingData:o},addCouponSeller:i,setIsOpen:c}=ve(),{sendDataLayerEvent:l}=ae(),u=(v=r==null?void 0:r.promotion)==null?void 0:v.promotionCart,m=g.useRef(!1),{router:p}=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&&(o==null?void 0:o.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,o==null?void 0:o.coupon,i]),!t||!u||u.selectPromotion==="Desativar"||a.length===0)return null;const f=u.title,h=u.subtitle,_=u.titleSuccess,y=u.subtitleSuccess,x=u.linkLabel;return n.jsxs("div",{className:re["mc--body--promotion"],children:[t.remainingValueToActivate>0&&n.jsx(d.Closeness,{className:re["mc--body--promotion--closeness"],title:Kf(t,f),subtitle:h,percentage:ea(t.completeness),iconLink:e.arrow_right,linkLabel:x,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),p.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&n.jsx(d.Closeness,{className:`${re["mc--body--promotion--closeness"]} ${re["mc--body--promotion--closeness--success"]}`,title:_,subtitle:y,percentage:ea(t.completeness)})]})};Kl.displayName="MiniCart.Modal.Body.Promotion";const Xl=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:s,marketingData:a},addCouponSeller:o}=ve(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(a==null?void 0:a.coupon)===(i==null?void 0:i.valueCupom),[l,u]=g.useState(!1),[m,p]=g.useState(!1);if(g.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),g.useEffect(()=>{m&&setTimeout(()=>{p(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const f=async()=>{if(!r.items.length){p(!0);return}(await o(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return n.jsxs("div",{className:re["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[n.jsx("div",{className:re["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),n.jsx("div",{className:re["mc--body--coupon-tag--button"],children:n.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:f,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};Xl.displayName="MiniCart.Modal.Body.CouponTag";const Yl=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:a,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=ve();return n.jsxs(d.Modal.Body,{className:re["mc--body"],children:[e,n.jsx(Kl,{ICONS:t}),n.jsx(Xl,{TIPBAR_CONFIGS:i}),n.jsx("div",{className:re["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((m,p)=>{const f=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===m.ean})!==void 0;return n.jsx(Me.Card,{available:!m.availability.includes("outStock")||!f,index:p,product:m,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${p}`)}):n.jsx(Me.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:a})})]})};Yl.displayName="MiniCart.Body";const Ql=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:s}=ve();if(s.items.length===0)return null;const a=()=>{var i;const o=new URLSearchParams({orderFormId:s.id,...((i=s.marketingData)==null?void 0:i.utmCampaign)&&{utm_campaign:s.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${o.toString()}#/cart`};return n.jsxs(d.Modal.Footer,{className:re["mc--footer"],children:[e,n.jsx("div",{className:re["mc--footer--actions"],children:n.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:re["mc--footer--actions-button"],onClick:a,children:r.messages.checkout_button})})]})};Ql.displayName="MiniCart.Modal.Footer";const Zl=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:s})=>{const[a,o]=g.useState(!1),i=g.useRef(null),c=()=>o(l=>!l);return n.jsxs(n.Fragment,{children:[a&&n.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:n.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:re["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),n.jsxs(d.Accordion.Wrapper,{className:re["mc--discount"],children:[n.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(re["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:n.jsxs(d.TextStructure.Root,{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),n.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:n.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),n.jsx(d.Accordion.Body,{className:re["mc--discount--body"],children:e})]})]})};Zl.displayName="MiniCart.Discount";const Jl=({discount:e,shipping:t,total:r})=>{var l,u;const{data:s}=ve(),a=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,o=r-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:(a==null?void 0:a.value)??"",title:"Total",value:`1x de ${T.formatPriceToCurrency(o/100)}`}];return n.jsx("div",{className:re["mc--footer--total"],children:Array.isArray(c)&&c.map((m,p)=>n.jsxs("div",{className:re["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[n.jsx("p",{children:m.title}),n.jsxs("div",{className:re["mc--footer--total--info--content"],children:[m.message&&(a==null?void 0:a.active)==="Ativar"&&n.jsx(d.Tag,{variant:"primary",title:m.message,style:{backgroundColor:a==null?void 0:a.tagColor,color:a==null?void 0:a.textColor},children:m.message}),n.jsx(d.ProductInfo.Price,{className:re["mc--footer--total--info"],label:m.title,value:m.value})]})]},p))})};Jl.displayName="MiniCart.Modal.Footer.Resume.Items";const eu=()=>{var a,o,i;const{totalizers:e}=bt(),t=((a=e.find(c=>c.id==="Items"))==null?void 0:a.value)??0,r=(o=e.find(c=>c.id==="Discounts"))==null?void 0:o.value,s=(i=e.find(c=>c.id==="Shipping"))==null?void 0:i.value;return n.jsx(Jl,{discount:r??0,total:t,shipping:s})};eu.displayName="MiniCart.Modal.Footer.Totals";const tu=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=ne(),{cartStore:{items:s}}=ve(),a=s.reduce((o,i)=>o+(i.quantity??0),0);return n.jsx(d.Modal.Header,{navigation:"top",className:re["mc--header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),n.jsx("span",{className:re["mc--header--subtitle"],children:a!==1?`[${a}] Produtos`:`[${a}] Produto`}),n.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};tu.displayName="MiniCart.Modal.Header";const nu=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:s,removeCEP:a}=ve(),{sendDataLayerEvent:o}=ae(),[i,c]=g.useState(!1),[l,u]=g.useState(!1),m=g.useCallback(()=>{var C;const v=((C=r==null?void 0:r.address)==null?void 0:C.postalCode)??"";return v.length===8&&!v.includes("-")?`${v.slice(0,5)}-${v.slice(5)}`:v},[r]),[p,f]=g.useState(!!m()),h=()=>{f(!1),c(!1)},_=v=>{var C;if(typeof v=="object"&&(v!=null&&v.logisticsInfo))return(C=v.logisticsInfo)==null?void 0:C.reduce((j,b)=>{var R;const w=(R=b==null?void 0:b.slas)==null?void 0:R.find(k=>(k==null?void 0:k.id)===(b==null?void 0:b.selectedSla));if(!w)return j;const S=parseInt(String((w==null?void 0:w.shippingEstimate)??"").replace("bd","")),P=Number((((w==null?void 0:w.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=b==null?void 0:b.selectedSla,j.delivery_time=S.toString(),j.shipping=P,j.flag_retirada=(b==null?void 0:b.selectedDeliveryChannel)==="delivery"?"false":"true",j;const N=parseInt(j.delivery_time??"0");return S>N&&(j.delivery_time=S.toString()),j.shipping=(j.shipping??0)+P,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},y=async v=>{const C=v.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await kt.get(`https://viacep.com.br/ws/${C}/json/`)).data.erro}catch{return!1}},x=async v=>{if(u(!0),!!m()||!(v!=null&&v.trim())){await a(),h(),u(!1);return}if(!await y(v)){c(!0),f(!1),u(!1);return}try{const w=await s(v);if(c(!1),w){f(!0);const S=_(w);S&&o({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:S}})}}catch{c(!0)}finally{u(!1)}};return n.jsx(Me.Field,{hasSuccess:p,hasError:i,isLoading:l,onHandler:x,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};nu.displayName="MiniCart.Shipping";const ru=()=>{var r,s;const{data:e}=ve(),t=(s=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?n.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?n.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};ru.displayName="MiniCart.TagMessage";const Me={Body:Yl,Card:ql,Cashback:Hl,CouponSeller:$l,Discount:Zl,Field:Gl,Feedback:Vl,Shipping:nu,Footer:Ql,Header:tu,TagMessage:ru,Totals:eu},Xf=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:o,TOGGLE_STYLE_MODIFIER:i,Z_INDEX_WAR:c,storeConfig:l,minicartStyleModifiers:u})=>{const{isOpen:m,setIsOpen:p}=ve(),{isMobile:f}=ne();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(re["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:p,style:{zIndex:c.modal},variant:f?"sideBottom":"sideRight",children:[n.jsx(Me.Header,{ICONS:e,MINICART_CONFIG:t}),n.jsx(Me.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:o,children:n.jsx(Me.TagMessage,{})}),n.jsxs(Me.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[n.jsxs(Me.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[n.jsx(Me.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),n.jsx(Me.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),n.jsx(Me.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),n.jsx(Me.Totals,{})]}),n.jsx(Ol,{ICONS:e})]})},su=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:s,className:a})=>{const{structureRef:o,rootRef:i,CONSTANTS:c}=Ne(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return n.jsx(d.Header.Structure,{innerRef:o,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(Js["header-animation"],a),children:n.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[r??n.jsxs(Tf,{children:[n.jsx("div",{className:T.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:n.jsx(Al,{storeConfig:s})}),n.jsx("div",{className:T.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:n.jsx(yl,{storeConfig:s})})]}),n.jsx(Bf,{children:n.jsx(Xf,{...m,minicartStyleModifiers:t})}),n.jsx(Ks,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};su.displayName="Header";const Yf="_shippingFreight_6z8rf_6",Qf="_shippingFreight__postalCodeGrid_6z8rf_10",Zf="_shippingFreight__grid_6z8rf_14",Jf="_shippingFreight__grid__title_6z8rf_18",eh="_shippingFreight__grid__remember_6z8rf_29",th="_postalCodeContainer_6z8rf_44",nh="_deliveryStatusBar__tag_6z8rf_49",rh="_deliveryStatusBarError__tag_6z8rf_66",sh="_deliveryInfo_6z8rf_74",oh="_deliveryInfo__content_6z8rf_78",ah="_deliveryInfo__text_6z8rf_84",ih="_deliveryInfo__title_6z8rf_89",ch="_deliveryInfo__subtitle_6z8rf_99",lh="_deliveryInfo__tooltipIcon_6z8rf_109",uh="_deliveryInfo__tooltip_6z8rf_109",dh="_freightGrid_6z8rf_148",mh="_freightContainer_6z8rf_155",ph="_freightOption__content_6z8rf_160",fh="_freightOption__value_6z8rf_166",hh="_freightOption__title_6z8rf_177",_h="_freightOption__title_item_6z8rf_181",gh="_freightOption__paragraph_6z8rf_192",ue={shippingFreight:Yf,shippingFreight__postalCodeGrid:Qf,shippingFreight__grid:Zf,shippingFreight__grid__title:Jf,shippingFreight__grid__remember:eh,postalCodeContainer:th,deliveryStatusBar__tag:nh,deliveryStatusBarError__tag:rh,deliveryInfo:sh,deliveryInfo__content:oh,deliveryInfo__text:ah,deliveryInfo__title:ih,deliveryInfo__subtitle:ch,deliveryInfo__tooltipIcon:lh,deliveryInfo__tooltip:uh,freightGrid:dh,freightContainer:mh,freightOption__content:ph,freightOption__value:fh,freightOption__title:hh,freightOption__title_item:_h,freightOption__paragraph:gh,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},yh=({icon:e,title:t,subtitle:r,packageCount:s,packageUnit:a="",labelDescription:o,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=g.useState(!1),m=g.useRef(null),p=()=>u(f=>!f);return n.jsxs("div",{className:ue.deliveryInfo,ref:m,children:[n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsx("div",{children:n.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}),n.jsxs("div",{className:ue.deliveryInfo__content,children:[n.jsx("div",{className:ue.deliveryInfo__icon,children:n.jsx(d.Icon,{name:e,size:"medium"})}),n.jsxs("div",{className:ue.deliveryInfo__text,children:[n.jsxs("span",{className:ue.deliveryInfo__title,children:[t," ",s," ",a]}),r&&n.jsx("span",{className:ue.deliveryInfo__subtitle,children:r})]}),o&&n.jsxs("div",{className:ue.deliveryInfo__tooltipIcon,onMouseEnter:p,onMouseLeave:p,"aria-label":"Mostrar descrição",children:[n.jsx("span",{children:n.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&n.jsx("div",{className:ue.deliveryInfo__tooltip,children:o})]})]})]})},xh=({value:e,title:t,paragraph:r})=>n.jsx("div",{className:ue.freightOption,children:n.jsxs("div",{className:ue.freightOption__content,children:[n.jsx("span",{className:ue.freightOption__value,children:e}),n.jsx("span",{className:ue.freightOption__title,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:ue.footer__item,children:[n.jsx("span",{className:ue.freightOption__title_item,children:t}),r&&n.jsx("span",{className:ue.freightOption__paragraph,children:r})]})})})]})}),vh=({children:e})=>n.jsx("div",{className:ue.freightContainer,children:e}),bh=({children:e})=>n.jsx("div",{className:ue.freightGrid,children:e}),jh=({children:e})=>n.jsx("div",{className:ue.postalCodeContainer,children:e}),ta=({message:e,seller:t="",size:r="small",setError:s})=>n.jsx("div",{className:s?ue.deliveryStatusBarError:ue.deliveryStatusBar,children:n.jsxs(d.Tag,{title:e,className:s?ue.deliveryStatusBarError__tag:ue.deliveryStatusBar__tag,size:r,children:[e," ",!s&&t]})}),Ch=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Sh=e=>{var r,s,a;const t=[];return(a=(s=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:s.slas)==null||a.forEach(o=>{t.push({id:o.id,name:o.name,price:o.price,shippingEstimate:o.shippingEstimate})}),t},Ph=({component:e,parent:t,top:r,left:s,target:a,contentRef:o,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=ne();return n.jsx(n.Fragment,{children:u?n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:o,children:[e,n.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}):n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:o,children:[e,n.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})})},wh=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:s,quantity:a,setError:o,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var O,M,X,D;const m=bt(),p=bt(q=>q.shipping),[f,h]=g.useState(),[_,y]=g.useState(!1),[x,v]=g.useState(!1),[C,j]=g.useState(!1),b=(M=(O=m.shippingData)==null?void 0:O.address)==null?void 0:M.postalCode,w=!(f!=null&&f.length)&&b?b:f,S=g.useRef(null),P=async q=>{const Q=q.target.value.replace(/\D/g,"").slice(0,8);Q.length>5?h(Q.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(Q)},N=async q=>{const U=q.target.value.replace(/\D/g,"");try{if((await kt.get(`https://viacep.com.br/ws/${U}/json/`)).data.erro){o&&o(l.messages.cep_not_found),i(!1),v(!0);return}o&&o(""),v(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},R=async()=>{y(!0);try{const q=await kt.post("/api/checkout/simulation",{items:[{id:s,quantity:a,seller:t}],country:"BRA",postalCode:w});e(Sh(q.data))}catch(q){console.error("Erro ao atualizar o documento:",q)}finally{y(!1),p(w,"BRA")}},k=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await N({target:{value:w}}),_||(R(),i(!0))};return n.jsxs("div",{ref:S,style:{position:"relative"},children:[!s&&C?n.jsx(Ph,{component:c,isOpen:C,parent:S.current,toolTipZIndex:u,freightConfig:l}):n.jsx(n.Fragment,{}),n.jsx("div",{style:{position:"relative"},children:n.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:n.jsx(d.TextField.Input,{defaultValue:(D=(X=m.shippingData)==null?void 0:X.address)==null?void 0:D.postalCode,label:l.messages.text_input_label,title:"textfield",value:f,sizeVariant:r,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:P,onKeyDown:q=>{q.key==="Enter"&&k()},className:ue["input-modifier"],feedback:x?"error":"none"}),right:n.jsx(d.Button,{onClick:k,size:r,title:"button",children:_?n.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},Nh=({children:e,freightConfig:t})=>n.jsxs("div",{className:ue.shippingFreight,children:[n.jsxs("div",{className:ue.shippingFreight__grid,children:[n.jsx("span",{className:ue.shippingFreight__grid__title,children:t.messages.title}),n.jsx("span",{className:ue.shippingFreight__grid__remember,children:n.jsx(Oe,{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})})]}),n.jsx("div",{className:ue.shippingFreight__postalCodeGrid,children:e})]}),Eh=({children:e})=>n.jsx("div",{className:ue.freightContainer,children:e}),ou=({className:e,sellerId:t,skuId:r,quantity:s,size:a,seller:o,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=ae(),[u,m]=g.useState(""),[p,f]=g.useState([]),[h,_]=g.useState(""),[y,x]=g.useState(!1),v=j=>m(j),C=j=>{f(j),l({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:j.map(b=>({shipping_tier:b.id,delivery_time:b.shippingEstimate.replace("bd",""),flag_pickup:b.name.toLowerCase().includes("retirada")?"true":"false",shipping:b.price,currency:c.currency||"BRL"}))}}})};return n.jsxs(Eh,{className:e,children:[n.jsxs(Nh,{freightConfig:c.freightConfig,children:[n.jsx(jh,{children:n.jsx(wh,{onUpdateFreightItems:C,skuId:r,quantity:s,size:a,sellerId:t,local:i,setError:_,setIsButtonClicked:x,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?n.jsx(ta,{size:a,message:h,setError:_}):p.length>0&&n.jsx(ta,{size:a,message:c.freightConfig.messages.delivered_by,seller:o})]}),y&&!h?p.length>0&&n.jsxs(vh,{children:[n.jsx(bh,{children:p.filter(({id:j})=>!j.includes("Retirada")).map(j=>n.jsx(xh,{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}${Ch(j.shippingEstimate)}`,radioValue:u,changeValue:v},j.id))}),c.deliveryInfoBoxesAllowed?n.jsx(yh,{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}):n.jsx(n.Fragment,{})]}):null]})},Ct={"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"},Ih=({children:e,href:t,isLast:r,title:s,ICONS:a})=>n.jsx(d.BreadCrumb.Item,{adornment:{end:r&&n.jsx(d.Icon,{name:a.arrow_right})},children:r?n.jsx(Oe,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e}),au=()=>{var o;const{state:e}=ze(),{ICONS:t}=De(),r=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",s=decodeURIComponent((o=e==null?void 0:e.base)!=null&&o.length?e.base:r??r).slice(1).split("/"),a=Li(s);return n.jsx("div",{className:Ct["pcd-navigation--breadcrumb"],children:n.jsx(d.BreadCrumb.DivWrapper,{children:n.jsx(d.BreadCrumb.List,{children:Array.isArray(a)&&a.map((i,c)=>{var l,u;return g.createElement(Ih,{...i,isLast:c!==a.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," "))})})})})};au.displayName="PLPNavigation.BreadCrumb";const iu=({children:e,...t})=>n.jsxs("div",{...t,className:Ct["pdc-navigation--content"],children:[n.jsx(ht.Filters,{}),e]});iu.displayName="PLPNavigation.Content";const Rh="_sort_35wro_1",er={sort:Rh,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},Th=({children:e,sortListOpen:t,btnAdornment:r,style:s,...a})=>n.jsx(d.Button,{...a,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:er["sort-button"],children:e}),Ah=e=>n.jsx(d.RadioButton.Radio,{...e}),kh=({children:e,className:t,name:r,...s})=>n.jsx(d.RadioButton.Group,{...s,name:r||"sort-group",className:d.helpers.classNameConcat(er["sort-list"],t),children:e}),Oh=({children:e,className:t,shadow:r=!0,padding:s="small",height:a="fit-content",...o})=>n.jsx(d.Card,{...o,shadow:r,className:d.helpers.classNameConcat(er["sort-list-wrapper"],t),padding:s,height:a,children:e}),cu=g.forwardRef(({children:e,className:t,...r},s)=>n.jsx("div",{...r,ref:s,className:d.helpers.classNameConcat(er.sort,t),children:e}));cu.displayName="SortRoot";const tr=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:s,ICONS:a,...o})=>{var f;const i=(f=s==null?void 0:s.get("sort"))==null?void 0:f.replace(":","_"),[c,l]=g.useState(i),{sendDataLayerEvent:u}=ae();g.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=ml(()=>r(!1)),p=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:qt.options[_]}}}),r(!1)};return n.jsxs(cu,{...o,ref:m,children:[n.jsx(Th,{btnAdornment:{listOpen:n.jsx(d.Icon,{name:a.arrow_up,size:"small"}),listClosed:n.jsx(d.Icon,{name:a.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:c?qt.options[c]:qt.placeholder},"sort-button"),t&&n.jsx(Oh,{children:n.jsx(kh,{name:"sort-group",value:c??"",onChange:p,children:Object.keys(qt.options).map(h=>n.jsx(Ah,{label:qt.options[h],value:h},h))})})]})};tr.displayName="Sort";const lu=g.createContext({}),Lh=({children:e,...t})=>{const[r,s]=g.useState(!1);return n.jsx(lu.Provider,{value:g.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:s}),[t,r,s]),children:e})},Mh=()=>{const e=g.useContext(lu);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},uu=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:s}=Mh(),{ICONS:a,PDC_NAVIGATION:o,searchParams:i}=De();return n.jsxs("div",{className:Ct["pdc-navigation--filters"],children:[n.jsx(ht.BreadCrumb,{}),n.jsxs("div",{className:Ct["pdc-navigation--filters--content"],children:[n.jsx(tr,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:a,searchParams:i}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:a.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:o.filter_button}),n.jsx(ht.Total,{})]})]})};uu.displayName="PLPNavigation.Filters";const du=({children:e,onSort:t,setOpenFilters:r,style:s,...a})=>{const o=g.useRef(null);return n.jsx(Lh,{onSort:t,setOpenFilters:r,children:n.jsx("div",{...a,className:Ct["pdc-navigation"],ref:o,style:{...s},children:n.jsx(ht.Content,{children:e})})})};du.displayName="Root";const mu=({callback:e,selected:t,...r})=>n.jsx("div",{...r,className:Ct["pdc-navigation--selected"],children:n.jsx("div",{className:Ct["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:n.jsx(ht.SelectedItem,{callback:e,facet:s},s.value)):null})});mu.displayName="PLPNavigation.Selected";const to=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,no=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(s=>s.value===e))==null?void 0:r.color)??"#F2F2F2"},pu=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(s=>s.key===e))==null?void 0:r.label},fu=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(s=>s.key===e))==null?void 0:r.order)??0},os=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],s=T.formatPriceToCurrency(Number(r));return`${T.formatPriceToCurrency(Number(t))} até ${s}`},hu=({items:e})=>{const t=e.flatMap(a=>[a.range.from,a.range.to]),r=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[r,s]},_u=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:to,createTagPrice:os,getAbsoluteMinMax:hu,getColor:no,getName:pu,getOrder:fu},Symbol.toStringTag,{value:"Module"})),Ve={"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"},gu=({columns:e=2,CONSTANTS:t,...r})=>{var o;const{filters:s,onToggleFacet:a}=Ut();return n.jsxs("div",{...r,className:Ve["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>n.jsx(ct.Item,{columns:e,facet:i,onToggleFacet:a,CONSTANTS:t},i.key)),!((o=s.facets)!=null&&o.length)&&n.jsx(ct.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};gu.displayName="Filter.Item.Content";const yu=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return n.jsxs("div",{className:Ve["filter--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h4",{children:e.title}),n.jsx("p",{children:e.subtitle})]}),n.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};yu.displayName="Filter.Empty";const xu=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:s,...a})=>{const o=fu({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return n.jsx(ct.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return n.jsx(ct.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return n.jsx(ct.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?n.jsx(ct.Price,{facet:t}):n.jsx("p",{children:"Filter not support!!!"})};return n.jsx("div",{...a,className:Ve["filter--item"],style:{order:o},children:n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:t.key,closeIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h4",{className:"typography-style-body-sm",children:pu({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),n.jsx(d.Accordion.Body,{children:i()})]})})};xu.displayName="Filter.Item";const vu=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:s,...a})=>n.jsx(et.Root,{...a,children:n.jsx(et.List,{children:Array.isArray(t)&&t.map(({key:o,selected:i,value:c})=>n.jsx(et.Option,{active:i,"data-color":to({key:o,PLP_FILTERS:r}),fill:no({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:o,value:c}),type:"color"},`${o}-${c}`))})});vu.displayName="Filter.Item.Color";const bu=({facet:e,...t})=>{var u,m;const{filters:{selected:r},price:s,onToggleFacet:a}=Ut(),[o,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=r==null?void 0:r.find(({key:p})=>p==="price"))==null?void 0:u.value)==null?void 0:m.split(":").map(Number))??[o,i];return n.jsx("div",{...t,className:Ve["filter--item--price"],children:n.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<o?o:c,l>i?i:l],min:o,max:i,type:"dual",step:1,onFinish:p=>{var f,h;p&&a({key:"price",value:`${(f=p.range)==null?void 0:f.min}:${(h=p.range)==null?void 0:h.max}`})},children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-min-value":!0})})}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-max-value":!0})})})]})})};bu.displayName="Filter.Item.Price";const ju=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...s})=>{const a=[...t].sort((o,i)=>{const c=r.indexOf(o.name),l=r.indexOf(i.name);return c-l});return n.jsx(et.Root,{...s,children:n.jsx(et.List,{children:Array.isArray(a)&&a.map(({key:o,selected:i,value:c})=>n.jsx(et.Option,{active:i,text:c,type:"size",onClick:()=>e({key:o,value:c})},c))})})};ju.displayName="Filter.Item.Sizes";const Cu=({columns:e,facetKey:t,onToggleFacet:r,values:s,ICONS:a,...o})=>n.jsx("div",{...o,className:Ve["filter--item--toggle"],children:n.jsx("div",{className:Ve["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>n.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:n.jsx(d.Icon,{name:a.check}),checked:i.selected,onChange:()=>r(i)},i.value))})});Cu.displayName="Filter.Item.Toggle";const Su=({...e})=>{const{isLoading:t}=Ut();return n.jsx("div",{className:Ve["filter--loading"],"data-active":t,...e,children:n.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Su.displayName="Filter.Loading";const Pu=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:a}})=>{var m;const{deleteAllFacets:o,filters:i,isOpen:c,target:l,setIsOpen:u}=Ut();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(Ve["filter--modal"],t),isMobile:r??!1,isOpen:c,parent:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[n.jsxs(d.Modal.Header,{navigation:"top",children:[n.jsx(d.Modal.Controls,{navigation:"top",isMobile:r,children:n.jsx(d.Button,{"data-close":!0,iconNameStart:a.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),n.jsx(d.Modal.Title,{navigation:"top",title:s})]}),n.jsxs(d.Modal.Body,{style:{width:500},children:[n.jsx("div",{className:Ve["filter--modal--body"],children:e}),n.jsx(ct.Loading,{})]}),n.jsx(d.Modal.Footer,{children:n.jsxs("div",{className:Ve["filter--modal--footer"],children:[n.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),n.jsx(d.Button,{"data-close":!0,onClick:()=>o(),variant:"tertiary",children:"limpar filtros"})]})})]})};Pu.displayName="Filter.Modal";const wu=({children:e,className:t,isMobile:r,CONSTANTS:s,...a})=>n.jsx(Zi,{...a,PLP_FILTERS:s.PLP_FILTERS,children:n.jsx(ct.Modal,{className:t,isMobile:r,CONSTANTS:s,children:e})});wu.displayName="Filter.Root";const Nu=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:s,onToggleFacet:a}=Ut();return n.jsx("div",{className:Ve["filter--selected"],children:n.jsx("div",{className:Ve["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:o,value:i})=>o==="productclusterids"?null:n.jsx(d.Tag,{title:o==="price"?os({value:i}):i,adornment:{end:n.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:no({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>a({key:o,value:i}),squareShow:to({key:o,PLP_FILTERS:r}),size:"medium",variant:"primary",children:o==="price"?os({value:i}):i},i))})})};Nu.displayName="Filter.Selected";const ct={Colors:vu,Content:gu,Empty:yu,Modal:Pu,Item:xu,Root:wu,Loading:Su,Selected:Nu,Price:bu,Sizes:ju,Toggle:Cu},{checkedColor:Dh,createTagPrice:na,getColor:Fh}=_u,Eu=({callback:e,facet:t})=>{const{ICONS:r,PLP_FILTERS_COLORS:s,PLP_FILTERS:a}=De();return n.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?na({value:t.value}):t.value.toUpperCase(),adornment:{end:n.jsx(d.Icon,{name:r.close,size:"x-small"})},colorSquare:Fh({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:Dh({key:t.key,PLP_FILTERS:a}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?na({value:t.value}):t.value.toUpperCase()})};Eu.displayName="PLPNavigation.Selected.Item";const Iu=()=>n.jsx(d.TextStructure.Root,{children:n.jsx("p",{id:"pdc-navigation--total"})});Iu.displayName="PLPNavigation.Total";const ht={BreadCrumb:au,Content:iu,Filters:uu,Root:du,Selected:mu,SelectedItem:Eu,Total:Iu},zh="_footer__bottom_198g6_2",Bh="_footer__wrapper_198g6_10",Uh="_footer__main_198g6_39",qh="_footer__legalInformation_198g6_55",Hh="_footer__column_198g6_77",$h="_footer__columnContent_198g6_87",Vh="_footer__item_198g6_91",Wh="_footer__itemLink_198g6_107",Gh="_footer__columnTitle_198g6_122",Kh="_footer__columnTitleIcon_198g6_134",Xh="_footer__iconList_198g6_147",Yh="_footer__itemSmallText_198g6_157",Qh="_payment_198g6_168",Zh="_footer__iconContainer_198g6_173",Jh="_footer__iconListSubHeader_198g6_178",e_="_accordionWrapper_198g6_200",t_="_accordionHeader_198g6_204",n_="_accordionTextWrapper_198g6_208",me={footer__bottom:zh,footer__wrapper:Bh,footer__main:Uh,footer__legalInformation:qh,footer__column:Hh,footer__columnContent:$h,footer__item:Vh,footer__itemLink:Wh,footer__columnTitle:Gh,footer__columnTitleIcon:Kh,footer__iconList:Xh,footer__itemSmallText:Yh,payment:Qh,footer__iconContainer:Zh,footer__iconListSubHeader:Jh,accordionWrapper:e_,accordionHeader:t_,accordionTextWrapper:n_,"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 Ru={},ro={},nr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=s=>{r.has(s)||console.warn(s),r.add(s)}}})(nr);var Tu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:s,heightInt:a,blurWidth:o,blurHeight:i,blurDataURL:c,objectFit:l}=r;const u=20,m=o?o*40:s,p=i?i*40:a,f=m&&p?"viewBox='0 0 "+m+" "+p+"'":"",h=f?"none":l==="contain"?"xMidYMid":l==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+f+"%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='"+h+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(Tu);var rr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(a,o){for(var i in o)Object.defineProperty(a,i,{enumerable:!0,get:o[i]})}t(e,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return s}});const r=["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}})(rr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=nr,r=Tu,s=rr,a=["lazy","eager",void 0];function o(_){return _.default!==void 0}function i(_){return _.src!==void 0}function c(_){return typeof _=="object"&&(o(_)||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 p(_,y,x){let{deviceSizes:v,allSizes:C}=_;if(x){const b=/(^|\s)(1?\d?\d)vw/g,w=[];for(let S;S=b.exec(x);S)w.push(parseInt(S[2]));if(w.length){const S=Math.min(...w)*.01;return{widths:C.filter(P=>P>=v[0]*S),kind:"w"}}return{widths:C,kind:"w"}}return typeof y!="number"?{widths:v,kind:"w"}:{widths:[...new Set([y,y*2].map(b=>C.find(w=>w>=b)||C[C.length-1]))],kind:"x"}}function f(_){let{config:y,src:x,unoptimized:v,width:C,quality:j,sizes:b,loader:w}=_;if(v)return{src:x,srcSet:void 0,sizes:void 0};const{widths:S,kind:P}=p(y,C,b),N=S.length-1;return{sizes:!b&&P==="w"?"100vw":b,srcSet:S.map((R,k)=>w({config:y,src:x,quality:j,width:R})+" "+(P==="w"?R:k+1)+P).join(", "),src:w({config:y,src:x,quality:j,width:S[N]})}}function h(_,y){let{src:x,sizes:v,unoptimized:C=!1,priority:j=!1,loading:b,className:w,quality:S,width:P,height:N,fill:R=!1,style:k,overrideSrc:O,onLoad:M,onLoadingComplete:X,placeholder:D="empty",blurDataURL:q,fetchPriority:U,decoding:Q="async",layout:G,objectFit:H,objectPosition:J,lazyBoundary:se,lazyRoot:de,...oe}=_;const{imgConf:le,showAltText:F,blurComplete:ee,defaultLoader:E}=y;let W,ie=le||s.imageConfigDefault;if("allSizes"in ie)W=ie;else{var he;const K=[...ie.deviceSizes,...ie.imageSizes].sort((te,_e)=>te-_e),L=ie.deviceSizes.sort((te,_e)=>te-_e),B=(he=ie.qualities)==null?void 0:he.sort((te,_e)=>te-_e);W={...ie,allSizes:K,deviceSizes:L,qualities:B}}if(typeof E>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
5
|
-
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let
|
|
6
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const
|
|
1
|
+
"use strict";var Rp=Object.defineProperty;var Wa=e=>{throw TypeError(e)};var Tp=(e,t,r)=>t in e?Rp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Jt=(e,t,r)=>Tp(e,typeof t!="symbol"?t+"":t,r),Es=(e,t,r)=>t.has(e)||Wa("Cannot "+r);var E=(e,t,r)=>(Es(e,t,"read from private field"),r?r.call(e):t.get(e)),re=(e,t,r)=>t.has(e)?Wa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),G=(e,t,r,s)=>(Es(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r),de=(e,t,r)=>(Es(e,t,"access private method"),r);var Rn=(e,t,r,s)=>({set _(o){G(e,t,o,r)},get _(){return E(e,t,s)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("react"),k=require("./index-Cqk3VcE0.js"),_t=require("idb-keyval"),xr=require("zustand"),Jn=require("js-cookie"),d=require("@soma-vertical-web/core-components"),Nr=require("axios"),ho=require("@date-fns/tz");require("jose");const Ir=require("@soma-vertical-web/foundations"),oa=require("react-dom"),vt=require("draft-js"),kc=require("react-intersection-observer");function Ap(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const it=Ap(y),aa=y.createContext({}),kp=({data:e,children:t})=>n.jsx(aa.Provider,{value:{tags:e==null?void 0:e.config},children:t}),Ot=()=>{const{tags:e}=y.useContext(aa),t=y.useCallback(r=>{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(f=>{var p;return(p=r??[])==null?void 0:p.find(h=>h.id===f.key)}),o=(m=(u=e==null?void 0:e.institucional)==null?void 0:u.items)==null?void 0:m.find(f=>{var p;return(p=r??[])==null?void 0:p.find(h=>h.id===f.key)}),a=e==null?void 0:e.flagPdp,i=(r==null?void 0:r.find(f=>{var p;return f.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}},Oc=({gridScrollBack:e})=>{y.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Lc=y.createContext({}),Op=({children:e,gridScrollBack:t})=>{const r=y.useRef(null);return Oc({gridScrollBack:t}),n.jsx(Lc.Provider,{value:{sizesContainerRef:r},children:e})},Mc=()=>{const e=y.useContext(Lc);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},Dt=({event:e,data:t})=>{const r=(window==null?void 0:window.dataLayer)||[];t.ecommerce&&r.push({ecommerce:null}),r.push({...e&&{event:`custom_${e}`},...t})},Ae={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:r,commonData:s,customData:o,promotionInfo:a,itemList:i,outsideEcommerceData:c}=e,{availableSizes:l,sizes:u,price:m}=s,f={...r==="view_item"?{currency:Ae.configs.currency,value:m,grade_disponivel:l??(u?Dc(u):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:m,currency:Ae.configs.currency}:{}},p=Tn({data:s,customData:{...o,...i,...a},configs:Ae.configs});Dt({event:r,data:{...c,ecommerce:{...i,...f,items:[p]}}}),typeof t=="function"&&t(p,f)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:s,outsideEcommerceData:o,customData:a}=e;if(t.length===0)return;const i=t.map(({node:c},l)=>Tn({data:{...c},customData:{...r,index:l,...a!=null&&a.item_list_name?{item_list_name:a==null?void 0:a.item_list_name}:s},configs:Ae.configs}));Dt({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:r},customData:s,supportData:{selectedSkus:o,price:a},promotionInfo:i,itemList:c,outsideEcommerceData:l}=e;let u=0;const m=r.map(f=>{var g,v,b,C,j,x,S,P,w;const p=o==null?void 0:o.find(N=>(f.productId??f.id)===N.productId);let h={...i,...c};if(p){const N=zc(),T=Bc(N,p);T&&(h={...h,...T}),t==="add_to_cart"&&(i||c)&&_o({persistedData:N,type:"add",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku),newData:{promotionInfo:i,itemList:c}}),t==="remove_from_cart"&&_o({persistedData:N,type:"remove",sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)})}u+=f.price??((b=(v=(g=p==null?void 0:p.offers)==null?void 0:g.offers)==null?void 0:v[0])==null?void 0:b.price)??0;const _=(p==null?void 0:p.size)??k.getColorAndSizeFromSkuName((p==null?void 0:p.skuName)??(p==null?void 0:p.name)??((C=f.itemOffered)==null?void 0:C.skuName),Ae.configs.NAME_SPLIT_SYMBOL).size;return Tn({data:f,customData:{...s,...h??{...i,...c},item_sku:(p==null?void 0:p.id)??(p==null?void 0:p.sku)??((j=f.itemOffered)==null?void 0:j.sku),quantity:(s==null?void 0:s.quantity)??f.quantity??1,item_variant2:_,seller_id:(p==null?void 0:p.sellerId)??(p==null?void 0:p.seller)??((w=(P=(S=(x=p==null?void 0:p.offers)==null?void 0:x.offers)==null?void 0:S[0])==null?void 0:P.seller)==null?void 0:w.identifier)??f.seller},configs:Ae.configs})});Dt({event:t,data:{...l,ecommerce:{value:a??u,currency:Ae.configs.currency,items:m}}})},filterEvent:e=>{var i;const{commonData:t,customData:r,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 f;const u=((f=Ae.configs.PLP_FILTERS.find(p=>p.key===c))==null?void 0:f.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(", "))),Dt({event:"filter",data:{...s,...a,...r}})},viewCartEvent:e=>{var m,f,p,h,_,g,v,b,C,j;const{commonData:t,outsideEcommerceData:r}=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:S,itemList:P}=a[x.id]??{};return Tn({data:{...x,price:x.price/100,listPrice:x.listPrice/100},customData:{...S,...P,item_sku:x.id??x.itemOffered.sku,quantity:x.quantity??1},configs:Ae.configs})}),c=(((m=s.totalizers.find(x=>x.name==="Total dos Itens"))==null?void 0:m.value)??0)/100,l=(((f=s.totalizers.find(x=>x.name==="Total dos Descontos"))==null?void 0:f.value)??0)/100,u=((p=s.marketingData)==null?void 0:p.utmiCampaign)===Ae.configs.VENDOR_CODE?(h=s.marketingData)==null?void 0:h.utmCampaign:(g=String((_=s.openTextField)==null?void 0:_.value))==null?void 0:g.split(" - ")[0];Dt({event:"view_cart",data:{...r,ecommerce:{currency:Ae.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:r}=e;Dt({event:t,data:{...r}})}},Dc=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),Lp=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(Ae.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},Tn=({data:e,customData:t,configs:r})=>({...Mp(e,r==null?void 0:r.MAIN_IMAGE),...Dp(e),...Fp(e),...zp(e),...t}),Fc=()=>{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("_"))??[]:[]},zc=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Bc=(e,t)=>e==null?void 0:e[t],_o=({persistedData:e,type:t,sku:r,newData:s})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:s}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:s}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Mp=(e,t="1")=>{var a,i,c,l,u,m,f,p,h,_,g;const r=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)??((f=(m=e.itemOffered)==null?void 0:m.isVariationOf)==null?void 0:f.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??k.splitNameAndSizeFromFullName((p=e.itemOffered)==null?void 0:p.name,Ae.configs.NAME_SPLIT_SYMBOL).name,item_brand:((h=e.brand)==null?void 0:h.brandName)??((_=e.brand)==null?void 0:_.name)??e.brand??((g=e.itemOffered)==null?void 0:g.brand.name),item_url:`${Ae.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},Ga=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,Dp=e=>{var u,m;const{categories:t,categoriesIds:r}=e,s=t??((u=e.itemOffered)==null?void 0:u.categories),o=r??((m=e.itemOffered)==null?void 0:m.categoriesIds),a=Ga(s),i=Ga(o),c=a.slice(1,-1).split("/"),l=i.slice(1,-1).split("/");return{item_category:c[0].toLowerCase().includes(Ae.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]}}},Fp=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:r,size:s}=k.getColorAndSizeFromSkuName(t,Ae.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:s}}},zp=e=>{var l,u;const{price:t,listPrice:r,installments:s}=e,o=t??((l=e.offers)==null?void 0:l.lowPrice)??0,a=r??((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:Ae.configs.currency}},Uc=()=>{const[e,t]=Fc(),[r,s]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&s?s:"",page_departament:o,id:t,name:e}},Bp=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:Ae,findDataInPersistedData:Bc,getAvailablesSizes:Dc,getCategories:Lp,getPageCategoryAndDepartmentFromSlug:Uc,getPersistedData:zc,getProductListInfoFromHead:Fc,pushDatalayer:Dt,updatePersistedData:_o},Symbol.toStringTag,{value:"Module"})),qc=y.createContext({}),Up=({children:e,evtFunctionsConfigs:t})=>{const r=y.useRef({}),s=y.useRef(null),o=y.useRef(null),a=y.useRef({}),i=y.useRef({trigger:!1,index:0}),c=({functionKey:m,data:f,callBack:p,timeout:h=100})=>{window.dataLayer||(window.dataLayer=[]),Ae.configs=t;try{typeof Ae[m]=="function"&&setTimeout(()=>{var _;f.promotionInfo=r.current,(_=o.current)!=null&&_.item_list_name&&(f.itemList=o.current),Ae[m](f,p)},h)}catch(_){Dt({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:f,index:p})=>{m&&(r.current={...f}),c({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...f,...p!==void 0&&{index:p}}}}})};return n.jsx(qc.Provider,{value:{sendDataLayerEvent:c,triggerSelectItemEventRef:i,promotionEventRef:r,currentLocalRef:s,itemListRef:o,cartProductsFullDataRef:a,handleSelectContent:l,handleSelectPromotionEvent:u},children:e})},le=()=>y.useContext(qc),Hc=y.createContext({}),qp=({children:e,productData:t,isKit:r,PDP_INFO:s,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:a})=>{var F,B;const{sendDataLayerEvent:i,triggerSelectItemEventRef:c}=le(),{productId:l,productName:u,items:m,items:[{images:f,Videos:p}],description:h,["Composição"]:_="",productReference:g,categories:[v]}=t,{getAvailableProductTag:b}=Ot(),C=b(Object.entries(t.clusterHighlights).map($=>({id:$[0],name:$[1]}))),j=v.slice(1,-1).split("/"),{installments:x,price:S,listPrice:P,sizes:w,allSizesAvailable:N}=k.getSkuInfos({items:m,NAME_SPLIT_SYMBOL:o}),T=k.getThumbImage({images:f,TEXTURE_IMAGE:a}),I=[{label:`${s.product.description}`,value:"description",content:h},{label:`${s.product.materiais}`,value:"composition",content:_}],O=((B=k.getColorAndSizeFromSkuName((F=t.items)==null?void 0:F[0].name,o))==null?void 0:B.color)??t["Cores Filtráveis"][0]??"",M=()=>({commonData:{...t,sizes:w,price:S,listPrice:P,installments:x},customData:{installments:x==null?void 0:x.count,installment_value:Number(x==null?void 0:x.value).toFixed(2)}}),H=({sku:$,size:te})=>{const{commonData:Z,customData:V}=M();i({functionKey:"productEvents",data:{event:"view_item",commonData:Z,customData:{...V,...$&&{item_sku:$},...te&&{item_variant2:te}}}})};return y.useEffect(()=>{if(c.current.trigger){const{commonData:$,customData:te}=M();i({functionKey:"productEvents",data:{event:"select_item",commonData:$,customData:{...te,index:c.current.index}}}),c.current.trigger=!1}H({})},[]),n.jsx(Hc.Provider,{value:{productData:t,productId:l,productName:u,productReference:g,tag:C,items:m,sizes:w,allSizesAvailable:N,installments:x,price:S,listPrice:P,thumbImage:T,images:f,video:p[0],descriptionContent:I,breadcrumbList:j,isKit:r,colorName:O,handleViewItemEvent:H},children:e})},Qe=()=>{const e=y.useContext(Hc);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Hp=()=>{const[e,t]=y.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}}]},$c=()=>{y.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)}},[])},$p=typeof window>"u",Vp=(e,t)=>{const[r,s]=y.useState(()=>{if($p)return null;const a=localStorage.getItem(e);return a===null?t:JSON.parse(a||"{}")});return y.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]),[r,a=>{s(i=>{const c=typeof a=="function"?a(i):a;return localStorage.setItem(e,JSON.stringify(c)),c})}]};function ia(e,t,r){const[s,o]=y.useState(!1),{threshold:a}=r||{};return y.useEffect(()=>{if(!e.current)return()=>null;let i=null;const c=new IntersectionObserver(([l])=>{if(r!=null&&r.delay){i&&clearTimeout(i),i=setTimeout(()=>{o(l.isIntersecting),t&&l.isIntersecting&&c.unobserve(e.current)},r.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 us=({callback:e,onEnterViewportOnce:t,options:r})=>{const s=y.useRef(null);return y.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()))},r);return a.observe(o),()=>{t&&a.unobserve(o),a.disconnect()}},[e,t,r]),{element:s}},Vc=({defaultScale:e=1,maxScale:t=3})=>{const r=y.useRef(null),s=y.useRef(null),[o,a]=y.useState(e),i=y.useRef(0),c=y.useRef({x:0,y:0}),l=y.useRef({x:0,y:0}),u=()=>{if(!s.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const h=r.current.getBoundingClientRect(),_=s.current.children[0].getBoundingClientRect(),g=_.width,v=_.height,b=Math.min(0,(h.width-g)/2),C=Math.max(0,(g-h.width)/2),j=Math.min(0,(h.height-v)/2),x=Math.max(0,(v-h.height)/2);return{minX:b,maxX:C,minY:j,maxY:x}},m=(h,_,g)=>{if(s.current){const v=s.current.children[0];v&&requestAnimationFrame(()=>{v.style.transform=`translate(calc(-50% + ${h}px), calc(-50% + ${_}px)) scale(${g})`})}},f=y.useCallback(h=>{const{minX:_,maxX:g,minY:v,maxY:b}=u(),{x:C,y:j}=l.current,x=Math.max(_,Math.min(g,C)),S=Math.max(v,Math.min(b,j));if(h.touches.length>1){const P=h.touches[0],w=h.touches[1],N=P.pageX-w.pageX,T=P.pageY-w.pageY;i.current=Math.sqrt(N*N+T*T),c.current={x:(P.pageX+w.pageX)/2,y:(P.pageY+w.pageY)/2}}else h.touches.length===1&&(c.current={x:h.touches[0].pageX-x,y:h.touches[0].pageY-S})},[o,l]),p=y.useCallback(h=>{if(!s.current||!r.current)return;const{minX:_,maxX:g,minY:v,maxY:b}=u();if(h.touches.length>1){h.preventDefault();const C=h.touches[0],j=h.touches[1],x=C.pageX-j.pageX,S=C.pageY-j.pageY,P=Math.sqrt(x*x+S*S);if(!i.current){i.current=P;return}const w=P/i.current,N=Math.max(1,Math.min(t,o*w));if(o===N)return;a(N);const T=(C.pageX+j.pageX)/2,I=(C.pageY+j.pageY)/2;let O=T-c.current.x,M=I-c.current.y;O=Math.max(_,Math.min(g,O)),M=Math.max(v,Math.min(b,M)),l.current={x:O,y:M},i.current=P,m(O,M,N)}else if(h.touches.length===1){const C=h.touches[0].pageX,j=h.touches[0].pageY;let x=C-c.current.x,S=j-c.current.y;x=Math.max(_,Math.min(g,x)),S=Math.max(v,Math.min(b,S)),l.current={x,y:S},m(x,S,o)}},[t,o]);return y.useEffect(()=>(document.addEventListener("touchstart",f),document.addEventListener("touchmove",p,{passive:!1}),()=>{document.removeEventListener("touchstart",f),document.removeEventListener("touchmove",p)}),[p,f]),{containerRef:r,imgRef:s,scale:o}},Wp=()=>{const e=async(h,_)=>k.proxyCartAPI("/_v/proxy/checkout/order-form/coupon",{body:{orderFormId:h,coupon:_}}),t=async(h,_,g={},v)=>{if(v)if(_){const b=_.includes(" - ")?_.split(" - ")[0]:_,C=await k.proxyCartAPI("/_v/proxy/checkout/order-form/seller-code",{body:{orderFormId:h,sellerCode:b}});return C instanceof Object&&g.name in C&&C[g.status]===!0?k.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:b,sellerName:C[g.name]}}).then(x=>({...x,openTextField:{...(x==null?void 0:x.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:b}})}else return k.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:h,sellerCode:"",sellerName:""}})},r=async(h,_)=>k.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:h,marketingData:_}}),s=async(h,_,g)=>k.proxyCartAPI("/_v/proxy/checkout/order-form/items",{body:{orderFormId:h,orderItems:k.addItemOrder(_,g)}}),o=async(h,_,g,v=!1)=>k.proxyCartAPI("/_v/proxy/checkout/order-form/offerings",{body:{id:_,itemIndex:g,orderFormId:h,remove:v}}),a=async h=>k.proxyCartAPI("/_v/proxy/checkout/order-form/items/remove-all",{body:{orderFormId:h}}),i=async h=>k.proxyCartAPI("/_v/proxy/checkout/order-form",{body:{orderFormId:h??""}}),c=async(h,_)=>k.proxyCartAPI("/_v/proxy/checkout/order-form/profile",{body:{orderFormId:h,email:_}}),l=async(h,_,g)=>{const v=k.removeQuantity(_,g);return k.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderItems:v.updateItems,orderFormId:h}})},u=async(h,_,g,v,b,C,j)=>{var P,w;const x=j?{startDateUtc:(P=C==null?void 0:C.deliveryWindow)==null?void 0:P.startDate,endDateUtc:(w=C==null?void 0:C.deliveryWindow)==null?void 0:w.endDate}:null,S={logisticsInfo:Array.from({length:v},(N,T)=>({itemIndex:T,selectedDeliveryChannel:(C==null?void 0:C.deliveryChannel)||null,selectedSla:(C==null?void 0:C.deliveryMethod)||null,deliveryWindow:x})),selectedAddresses:b,clearAddressIfPostalCodeNotFound:!0};return k.proxyCartAPI("/_v/proxy/checkout/order-form/shipping",{body:{...S,orderFormId:h,country:g,postalCode:_}})},m=async(h,_,g)=>k.proxyCartAPI("/_v/proxy/checkout/order-form/shipping/update",{body:{orderFormId:h,options:_,selectedAddresses:g}}),f=async(h,_,g,v)=>{const b=k.updateQuantity(_,g,v);return k.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderFormId:h,orderItems:b}})};return{addCoupon:e,addItem:s,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:a,getOrderForm:i,insertProfileEmail:c,removeItem:l,shipping:u,shippingUpdate:m,updateItemQuantity:async(h,_,g,v,b)=>f(h,_,g,v).then(C=>C&&Array.isArray(C.items)?k.updateItemSellerExternal(C.items,g)?f(h,_,g,b):C:!1)}},es="soma::cart",Yr="soma::options",hr=xr.create((e,t)=>{const r=Wp(),s=async(o,a,i)=>{e({loading:!0});const c=await k.updateOrderFormPromise(o);if(typeof c!="boolean"){e({...c});const l=await k.mergeOptionsPromise(_t.get(Yr),i);return _t.set(Yr,l),k.getValue(c,a).finally(()=>e({loading:!1,options:l}))}return k.promiseDefault};if(typeof window<"u"){const o=async a=>{if(a){const i=await _t.get(Yr).then(u=>k.findOptions(u,a.items));_t.set(es,a),_t.set(Yr,i),e({...a,options:i});const c=new URLSearchParams(window.location.search),l=c.get("utm_campaign")||c.get("utmi_campaign")||"";l&&s(()=>r.addSellerCode(t().id,l.toUpperCase()),"openTextField")}};return _t.get(es).then(a=>r.getOrderForm(a?a.id:"").then(o)),{...k.initialState,addCoupon:async a=>s(()=>r.addCoupon(t().id,a),"marketingData"),addItem:(a,i)=>{s(()=>r.addItem(t().id,t().items,a),"items",i)},addSellerCode:async(a,i)=>s(()=>r.addSellerCode(t().id,a,i,t().isOpen),"openTextField"),addMarketingData:async a=>s(()=>r.addMarketingData(t().id,a),"marketingData"),emptyCart:()=>{s(()=>r.emptyCart(t().id))},removeItem:async a=>{const i=await s(()=>r.removeItem(t().id,t().items,a),"items");return k.getRemoveId(a,i)},shipping:async(a,i="BR")=>s(()=>r.shipping(t().id,a??"",i,t().items.length,k.createNewAddress(a??"",null,i)),"shippingData"),shippingUpdate:async a=>s(()=>{var i;return r.shippingUpdate(t().id,a,(i=t().shippingData)==null?void 0:i.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(a,i,c)=>s(()=>r.giftItem(t().id,a,i,c),"items"),updateItemQuantity:async(a,i,c)=>{const{id:l,items:u}=t();return s(()=>{var m;return r.updateItemQuantity(l,u,a,i,((m=u.find(f=>f.id===a))==null?void 0:m.quantity)??1)},"items",c?[c]:void 0)},insertProfileEmail:async a=>s(()=>r.insertProfileEmail(t().id,a),"clientProfileData"),setIsOpen:a=>e({isOpen:a})}}return k.initialState}),Gp=()=>hr(e=>e),Wc=xr.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(s=>k.addNotification(s,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(s=>s.id!==t)}))}})),ca=()=>Wc(e=>e.notifications),la=()=>Wc(e=>e.actions),Kp=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:Yr,KEY_INDEXED_STORE:es,useCartStore:hr,useGetCartStoreState:Gp,useGetNotificationActions:la,useGetNotificationsStore:ca},Symbol.toStringTag,{value:"Module"})),Qp=6e3,Gc=y.createContext({}),Kc=({children:e,...t})=>{const{items:r}=hr(),[s,o]=y.useState([]),a=y.useRef(null),i=y.useMemo(()=>Array.isArray(s)&&s.length>0?s.map(c=>r.find(l=>l.id===c.id)).filter(c=>c!==void 0):[],[r,s]);return y.useEffect(()=>{s.length&&(clearTimeout(a.current??0),a.current=setTimeout(()=>{o([])},Qp))},[s]),n.jsx(Gc.Provider,{value:y.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:i}),[t,o,i]),children:e})},_n=()=>{const e=y.useContext(Gc);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class Qc{constructor(){Jt(this,"events",{});Jt(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(s=>s!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(s=>{this.prevData[t]=r,s(r)})}}const Xc=y.createContext({}),Xp=({children:e,headerConfigs:t,pathname:r,storeId:s,...o})=>{k.configureFetchProxy(s);const[a,i]=y.useState(!0),[c,l]=y.useState(!1),u=r==="/",m=y.useRef(new Qc),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},p=f(u),h=y.useRef(p);return y.useEffect(()=>{var v;const _=((v=new URLSearchParams(window.location.search))==null?void 0:v.toString())??"";(_.includes("utm_")||_.includes("gclid"))&&(Jn.get("lastMedias")||Jn.set("lastMedias",`${_}`,{expires:1/24}));const g=()=>{const b=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,C=window.innerWidth<1024||!!b.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);c||l(!0),a!==C&&(i(C),l(!0))};return c||g(),window.addEventListener("resize",g,{passive:!0}),()=>window.removeEventListener("resize",g)},[a,c]),y.useEffect(()=>{const _=f(u);m.current.publish("header:change_variant",_.headerVariant),m.current.publish("header:change_position",_.position),h.current=_},[u]),n.jsx(Xc.Provider,{value:{isMobile:a,mediatorRef:m,currentHeaderConfigsRef:h,deviceValidated:c,...o},children:n.jsx(Kc,{children:e})})},se=()=>y.useContext(Xc),Yc=y.createContext({}),Yp=({children:e,...t})=>n.jsx(Yc.Provider,{value:{...t},children:e}),me=()=>y.useContext(Yc),br=(e,t)=>xr.create(r=>{const s=()=>r({value:e});return t&&t instanceof Set&&t.add(s),{value:e,actions:{setValue:o=>r({value:o}),reset:s}}}),on={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},gn=new Set,Zp=()=>{gn.forEach(e=>{e()})},Zc=xr.create((e,t)=>{const r=()=>e({value:on.category});return gn.add(r),{value:on.category,actions:{reset:r,setValue:s=>e(()=>({value:s})),updateValue:s=>{t().value!==s&&e({value:s})}}}}),Jc=()=>Zc(e=>e.value),yn=()=>Zc(e=>e.actions),el=br(on.menuMobileIsOpen,gn),tl=()=>el(e=>e.value),rl=()=>el(e=>e.actions),nl=br(on.searchModalIsOpen,gn),sl=()=>nl(e=>e.value),ds=()=>nl(e=>e.actions),ol=br(on.userMenuIsOpen,gn),ua=()=>ol(e=>e.value),da=()=>ol(e=>e.actions),Jp=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Zp,useActionsHeaderCategory:yn,useActionsMenuMobileIsOpen:rl,useActionsSearchModalIsOpen:ds,useActionsUserMenuIsOpen:da,useGetHeaderCategoryStore:Jc,useGetMenuMobileIsOpen:tl,useGetSearchModalIsOpen:sl,useGetUserMenuIsOpen:ua},Symbol.toStringTag,{value:"Module"})),$r={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},Vr=new Set,eh=()=>{Vr.forEach(e=>{e()})},al=xr.create(e=>{const t=()=>e({value:$r.selectedSkuInfo});return Vr.add(t),{value:$r.selectedSkuInfo,actions:{setValue:r=>e(s=>({value:{...s,...r}})),reset:t}}}),vn=()=>al(e=>e.value),il=()=>al(e=>e.actions),cl=br($r.openLetMeKnow,Vr),th=()=>cl(e=>e.value),rh=()=>cl(e=>e.actions),ll=br($r.showNotify,Vr),ul=()=>ll(e=>e.value),fa=()=>ll(e=>e.actions),dl=br($r.showBottomNavigation,Vr),nh=()=>dl(e=>e.value),sh=()=>dl(e=>e.actions),fl=br($r.openMeasurements,Vr),ml=()=>fl(e=>e.value),pl=()=>fl(e=>e.actions),oh=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:eh,useActionsPDPOpenLetMeKnow:rh,useActionsPDPOpenMeasurements:pl,useActionsPDPSelectedSkuInfo:il,useActionsPDPShowBottomNavigation:sh,useActionsPDPShowNotify:fa,useGetPDPOpenLetMeKnow:th,useGetPDPOpenMeasurements:ml,useGetPDPSelectedSkuInfo:vn,useGetPDPShowBottomNavigation:nh,useGetPDPShowNotify:ul},Symbol.toStringTag,{value:"Module"})),Ka={feedback:{active:!1,action:"add"},list:[]},ma=xr.create((e,t)=>({value:Ka,actions:{reset:()=>e({value:Ka}),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:""}}}))}})),Wr=()=>ma(e=>e.value.list),pa=()=>ma(e=>e.value.feedback),jr=()=>ma(e=>e.actions),ah=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:jr,useGetWishlistFeedbackStore:pa,useGetWishlistStore:Wr},Symbol.toStringTag,{value:"Module"})),hl=y.createContext({}),ih=({children:e,headerData:t,...r})=>{var m,f;const s=y.useRef(null),o=y.useRef(null),a=y.useRef(null),i=y.useRef(null),c=y.useRef(null),{mediatorRef:l,currentHeaderConfigsRef:u}=se();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,g=s.current.getAttribute("data-interactiveVariant"),v=_?g: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))}),(f=l.current)==null||f.subscribe("header:change_position",p=>{s.current&&(s.current.style.position=p)}),y.useEffect(()=>{const p=new AbortController,h=d.helpers.throttle(()=>{var g;return(g=l.current)==null?void 0:g.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",h,{passive:!0,signal:p.signal});const _=g=>{var b;(b=g.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()}},[]),n.jsx(hl.Provider,{value:{headerData:t,structureRef:o,rootRef:s,tipbarRef:a,userMenuMobileRef:i,userMenuDesktopRef:c,...r},children:e})},Ee=()=>y.useContext(hl),_l=y.createContext({}),gl=({children:e,...t})=>n.jsx(_l.Provider,{value:y.useMemo(()=>t,[t]),children:e}),ha=()=>{const e=y.useContext(_l);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},ch=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},lh=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const s=t.getBoundingClientRect(),o=e.getBoundingClientRect(),a=e!=null&&e.parentElement?ch(e==null?void 0:e.parentElement):0;return{left:s.left+s.width/2-(o.width+a),top:s.top+s.height+r}},yl=y.createContext({}),vl=({children:e,delay:t=600,gap:r=20,...s})=>{const[o,a]=y.useState(!1),i=y.useRef(null),[c,l]=y.useState(!1),[u,m]=y.useState({left:0,top:0}),f=y.useCallback(()=>{l(!0),typeof window<"u"&&(i.current=window.setTimeout(()=>{a(!1),l(!1)},t))},[l,a,t]);return y.useEffect(()=>{if(typeof window>"u")return;const p=window.document.querySelector("#cart-button"),h=window.document.querySelector("#add-to-cart--tooltip");if(p&&h){const{left:_,top:g}=lh(h,p,r??0);m({left:_,top:g}),l(!1)}},[r,o]),n.jsx(yl.Provider,{value:y.useMemo(()=>({...s,...u,handleClose:f,isLeaving:c,isOpen:o,setIsOpen:a,setIsLeaving:l}),[s,u,f,c,o,a,l]),children:e})},Cr=()=>{const e=y.useContext(yl);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},xl=y.createContext({}),uh=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:s,...o})=>{var ie,_e,ce,pe;const a=hr(),{setRecentlyAdded:i}=_n(),c=y.useRef(""),l=ca(),{addNotification:u,removeNotification:m}=la(),[f,p]=y.useState(null),{addCoupon:h,addItem:_,addSellerCode:g,addMarketingData:v,emptyCart:b,isOpen:C,removeItem:j,shipping:x,shippingUpdate:S,toggleServiceToProduct:P,updateItemQuantity:w}=a;y.useEffect(()=>{(async()=>{var R,Q,ue,be;if(!a.id||!((Q=(R=s==null?void 0:s.promotion)==null?void 0:R.promotionCart)!=null&&Q.idPromotion)||((be=(ue=s==null?void 0:s.promotion)==null?void 0:ue.promotionCart)==null?void 0:be.selectPromotion)==="Desativar")return;const ne=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(A=>A.json());p(ne)})()},[a.id,a.items.length,s==null?void 0:s.versionId,(_e=(ie=s==null?void 0:s.promotion)==null?void 0:ie.promotionCart)==null?void 0:_e.idPromotion,(pe=(ce=s==null?void 0:s.promotion)==null?void 0:ce.promotionCart)==null?void 0:pe.versionAPI]),y.useEffect(()=>{const z=Jn.get("lastMedias");if(a.id&&z&&c.current!==z){c.current=z;const ne=new URLSearchParams(z),R=k.mountMarketingData(ne);v(R)}},[a,v]);const N=y.useCallback(async(z,ne)=>(ne==="coupon"?h(z):g(z,t??{})).then(Q=>{if(typeof Q!="boolean"&&Q instanceof Object){if(ne==="seller"&&"value"in Q){const{statusOk:ue,value:be}=Q,A=String(be??"").split(" - ");return k.getCode((A==null?void 0:A[0])??"",z,!!ue)}return k.getCode(String(Q.coupon),z,!0)}return k.getCode("","")}).catch(()=>Promise.resolve({code:400})),[h,g]),T=y.useCallback((z,ne,R)=>{const{id:Q}=z;w(Q,ne,R)},[w]),I=y.useCallback((z,ne,R=!1)=>{if(!z)return;const{id:Q}=z,ue=k.findItemIndex(a.items,Q);if(ue!==-1&&!R){const be=Number(a.items[ue].quantity),A=a.items[ue]?be+1:1;T(z,A,ne)}else _({id:Q,quantity:(z==null?void 0:z.quantity)??1,seller:z.seller});C||i(be=>[...be,z])},[_,T,a.items,C,i]),O=y.useCallback((z,ne)=>{if(!z||!Array.isArray(z))return;i(Q=>[...Q,...z]);const R=z.map(Q=>{const{id:ue,quantity:be,seller:A}=Q,L=k.findItemIndex(a.items,ue),qe=k.getQuantity(be??1,L);return{id:ue,quantity:qe,seller:A}});_(R,ne)},[_,a.items,i]),M=y.useCallback(async(z,ne,R)=>z?j(z).then(()=>(u(ne??`${r}`,R),k.getCode(z,z))):Promise.resolve(k.getCode("","Product id required")),[u,j]),H=y.useCallback(()=>{a.items.length>0&&b()},[b,a.items]),F=y.useCallback((z,ne="BRA")=>x(z,ne),[x]),B=y.useCallback(z=>{z&&S(z)},[S]),$=y.useCallback(async(z,ne,R=!1)=>{const Q=a.items.findIndex(be=>be.uniqueId===z);return a.items[Q]&&Q>=0?P(ne,Q,R):!1},[a.items,P]),te=y.useCallback(async(z,ne)=>w(z,ne).then(R=>{if(Array.isArray(R)){const Q=R.find(ue=>ue.id===z);if(Q&&(Q==null?void 0:Q.quantity)<ne)return String(Q.quantity)}return!1}),[w]),Z=y.useCallback(async()=>{await v({...a.marketingData,coupon:""})},[v,a.marketingData]),V=y.useCallback(async()=>{await v({...a.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[v,a.marketingData]),ee=y.useCallback(async()=>{await x("","BRA")},[x]);return n.jsx(xl.Provider,{value:y.useMemo(()=>({...o,data:s,addCouponSeller:N,addToCart:I,addItemsToCart:O,cartStore:a,notifications:l,clearCart:H,addNotification:u,isOpen:a.isOpen,removeNotification:m,removeToCart:M,setIsOpen:a.setIsOpen,shipping:F,shippingUpdateOption:B,toggleGiftItemCart:$,updateItemQuantity:te,removeCoupon:Z,removeSellerCode:V,removeCEP:ee,promotionRules:f,setPromotionRules:p}),[o,s,N,I,O,l,H,u,a,m,M,F,B,$,te,Z,V,ee,f,p]),children:e})},we=()=>{const e=y.useContext(xl);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},bl=y.createContext({}),_a=({children:e,state:t,collectionId:r,brand:s,searchParams:o})=>{const a=y.useMemo(()=>{var i;return r?[{key:"productclusterids",value:r.toString()}]:s?[{key:"brand",value:s}]:(i=t.base)!=null&&i.length?t.base.slice(1).split("/").map((c,l)=>({key:`category-${l+1}`,value:c})):[]},[t.base,r]);return n.jsx(bl.Provider,{value:y.useMemo(()=>({state:{...t,facets:[...a,...t.facets??[]]},searchParams:o}),[a,t,o]),children:e})},Fe=()=>{const e=y.useContext(bl);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e};var xn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dh={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},bt,nr,Cc,fh=(Cc=class{constructor(){re(this,bt,dh);re(this,nr,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&E(this,nr)&&e!==E(this,bt)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:E(this,bt),provider:e}),G(this,bt,e),process.env.NODE_ENV!=="production"&&G(this,nr,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&G(this,nr,!0),E(this,bt).setTimeout(e,t)}clearTimeout(e){E(this,bt).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&G(this,nr,!0),E(this,bt).setInterval(e,t)}clearInterval(e){E(this,bt).clearInterval(e)}},bt=new WeakMap,nr=new WeakMap,Cc),tr=new fh;function mh(e){setTimeout(e,0)}var _r=typeof window>"u"||"Deno"in globalThis;function Ze(){}function ph(e,t){return typeof e=="function"?e(t):e}function go(e){return typeof e=="number"&&e>=0&&e!==1/0}function jl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gt(e,t){return typeof e=="function"?e(t):e}function at(e,t){return typeof e=="function"?e(t):e}function Qa(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:a,queryKey:i,stale:c}=e;if(i){if(s){if(t.queryHash!==ga(i,t.options))return!1}else if(!cn(t.queryKey,i))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||a&&!a(t))}function Xa(e,t){const{exact:r,status:s,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(an(t.options.mutationKey)!==an(a))return!1}else if(!cn(t.options.mutationKey,a))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function ga(e,t){return((t==null?void 0:t.queryKeyHashFn)||an)(e)}function an(e){return JSON.stringify(e,(t,r)=>xo(r)?Object.keys(r).sort().reduce((s,o)=>(s[o]=r[o],s),{}):r)}function cn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>cn(e[r],t[r])):!1}var hh=Object.prototype.hasOwnProperty;function yo(e,t){if(e===t)return e;const r=Ya(e)&&Ya(t);if(!r&&!(xo(e)&&xo(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),i=a.length,c=r?new Array(i):{};let l=0;for(let u=0;u<i;u++){const m=r?u:a[u],f=e[m],p=t[m];if(f===p){c[m]=f,(r?u<o:hh.call(e,m))&&l++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){c[m]=p;continue}const h=yo(f,p);c[m]=h,h===f&&l++}return o===i&&l===o?e:c}function vo(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Ya(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xo(e){if(!Za(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Za(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Za(e){return Object.prototype.toString.call(e)==="[object Object]"}function _h(e){return new Promise(t=>{tr.setTimeout(t,e)})}function bo(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return yo(e,t)}catch(s){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${s}`),s}return yo(e,t)}return t}function gh(e){return e}function yh(e,t,r=0){const s=[...e,t];return r&&s.length>r?s.slice(1):s}function vh(e,t,r=0){const s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var ts=Symbol();function Cl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ts&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ts?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Sl(e,t){return typeof e=="function"?e(...t):!!e}function xh(e,t,r){let s=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),s||(s=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var sr,Bt,Ar,Sc,bh=(Sc=class extends xn{constructor(){super();re(this,sr);re(this,Bt);re(this,Ar);G(this,Ar,t=>{if(!_r&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){E(this,Bt)||this.setEventListener(E(this,Ar))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Bt))==null||t.call(this),G(this,Bt,void 0))}setEventListener(t){var r;G(this,Ar,t),(r=E(this,Bt))==null||r.call(this),G(this,Bt,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){E(this,sr)!==t&&(G(this,sr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof E(this,sr)=="boolean"?E(this,sr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},sr=new WeakMap,Bt=new WeakMap,Ar=new WeakMap,Sc),ya=new bh;function jo(){let e,t;const r=new Promise((o,a)=>{e=o,t=a});r.status="pending",r.catch(()=>{});function s(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{s({status:"fulfilled",value:o}),e(o)},r.reject=o=>{s({status:"rejected",reason:o}),t(o)},r}var jh=mh;function Ch(){let e=[],t=0,r=c=>{c()},s=c=>{c()},o=jh;const a=c=>{t?e.push(c):o(()=>{r(c)})},i=()=>{const c=e;e=[],c.length&&o(()=>{s(()=>{c.forEach(l=>{r(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||i()}return l},batchCalls:c=>(...l)=>{a(()=>{c(...l)})},schedule:a,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{o=c}}}var Be=Ch(),kr,Ut,Or,Pc,Sh=(Pc=class extends xn{constructor(){super();re(this,kr,!0);re(this,Ut);re(this,Or);G(this,Or,t=>{if(!_r&&window.addEventListener){const r=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){E(this,Ut)||this.setEventListener(E(this,Or))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,Ut))==null||t.call(this),G(this,Ut,void 0))}setEventListener(t){var r;G(this,Or,t),(r=E(this,Ut))==null||r.call(this),G(this,Ut,t(this.setOnline.bind(this)))}setOnline(t){E(this,kr)!==t&&(G(this,kr,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return E(this,kr)}},kr=new WeakMap,Ut=new WeakMap,Or=new WeakMap,Pc),rs=new Sh;function Ph(e){return Math.min(1e3*2**e,3e4)}function Pl(e){return(e??"online")==="online"?rs.isOnline():!0}var Co=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wl(e){let t=!1,r=0,s;const o=jo(),a=()=>o.status!=="pending",i=g=>{var v;if(!a()){const b=new Co(g);p(b),(v=e.onCancel)==null||v.call(e,b)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>ya.isFocused()&&(e.networkMode==="always"||rs.isOnline())&&e.canRun(),m=()=>Pl(e.networkMode)&&e.canRun(),f=g=>{a()||(s==null||s(),o.resolve(g))},p=g=>{a()||(s==null||s(),o.reject(g))},h=()=>new Promise(g=>{var v;s=b=>{(a()||u())&&g(b)},(v=e.onPause)==null||v.call(e)}).then(()=>{var g;s=void 0,a()||(g=e.onContinue)==null||g.call(e)}),_=()=>{if(a())return;let g;const v=r===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(f).catch(b=>{var P;if(a())return;const C=e.retry??(_r?0:3),j=e.retryDelay??Ph,x=typeof j=="function"?j(r,b):j,S=C===!0||typeof C=="number"&&r<C||typeof C=="function"&&C(r,b);if(t||!S){p(b);return}r++,(P=e.onFail)==null||P.call(e,r,b),_h(x).then(()=>u()?void 0:h()).then(()=>{t?p(b):_()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:c,continueRetry:l,canStart:m,start:()=>(m()?_():h().then(_),o)}}var or,wc,El=(wc=class{constructor(){re(this,or)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),go(this.gcTime)&&G(this,or,tr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_r?1/0:5*60*1e3))}clearGcTimeout(){E(this,or)&&(tr.clearTimeout(E(this,or)),G(this,or,void 0))}},or=new WeakMap,wc),ar,Lr,ot,ir,De,dn,cr,pt,Rt,Ec,wh=(Ec=class extends El{constructor(t){super();re(this,pt);re(this,ar);re(this,Lr);re(this,ot);re(this,ir);re(this,De);re(this,dn);re(this,cr);G(this,cr,!1),G(this,dn,t.defaultOptions),this.setOptions(t.options),this.observers=[],G(this,ir,t.client),G(this,ot,E(this,ir).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,G(this,ar,ei(this.options)),this.state=t.state??E(this,ar),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,De))==null?void 0:t.promise}setOptions(t){if(this.options={...E(this,dn),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=ei(this.options);r.data!==void 0&&(this.setState(Ja(r.data,r.dataUpdatedAt)),G(this,ar,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,ot).remove(this)}setData(t,r){const s=bo(this.state.data,t,this.options);return de(this,pt,Rt).call(this,{data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(t,r){de(this,pt,Rt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var s,o;const r=(s=E(this,De))==null?void 0:s.promise;return(o=E(this,De))==null||o.cancel(t),r?r.then(Ze).catch(Ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,ar))}isActive(){return this.observers.some(t=>at(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ts||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Gt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!jl(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,De))==null||r.continue()}onOnline(){var r;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,De))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,ot).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(E(this,De)&&(E(this,cr)?E(this,De).cancel({revert:!0}):E(this,De).cancelRetry()),this.scheduleGc()),E(this,ot).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,pt,Rt).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,m,f,p,h,_,g,v,b,C,j;if(this.state.fetchStatus!=="idle"&&((l=E(this,De))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(E(this,De))return E(this,De).continueRetry(),E(this,De).promise}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(S=>S.options.queryFn);x&&this.setOptions(x.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const s=new AbortController,o=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(G(this,cr,!0),s.signal)})},a=()=>{const x=Cl(this.options,r),P=(()=>{const w={client:E(this,ir),queryKey:this.queryKey,meta:this.meta};return o(w),w})();return G(this,cr,!1),this.options.persister?this.options.persister(x,P,this):x(P)},c=(()=>{const x={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:E(this,ir),state:this.state,fetchFn:a};return o(x),x})();(u=this.options.behavior)==null||u.onFetch(c,this),G(this,Lr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&de(this,pt,Rt).call(this,{type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta}),G(this,De,wl({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:x=>{x instanceof Co&&x.revert&&this.setState({...E(this,Lr),fetchStatus:"idle"}),s.abort()},onFail:(x,S)=>{de(this,pt,Rt).call(this,{type:"failed",failureCount:x,error:S})},onPause:()=>{de(this,pt,Rt).call(this,{type:"pause"})},onContinue:()=>{de(this,pt,Rt).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const x=await E(this,De).start();if(x===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(x),(h=(p=E(this,ot).config).onSuccess)==null||h.call(p,x,this),(g=(_=E(this,ot).config).onSettled)==null||g.call(_,x,this.state.error,this),x}catch(x){if(x instanceof Co){if(x.silent)return E(this,De).promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw de(this,pt,Rt).call(this,{type:"error",error:x}),(b=(v=E(this,ot).config).onError)==null||b.call(v,x,this),(j=(C=E(this,ot).config).onSettled)==null||j.call(C,this.state.data,x,this),x}finally{this.scheduleGc()}}},ar=new WeakMap,Lr=new WeakMap,ot=new WeakMap,ir=new WeakMap,De=new WeakMap,dn=new WeakMap,cr=new WeakMap,pt=new WeakSet,Rt=function(t){const r=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Nl(s.data,this.options),fetchMeta:t.meta??null};case"success":const o={...s,...Ja(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return G(this,Lr,t.manual?o:void 0),o;case"error":const a=t.error;return{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=r(this.state),Be.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),E(this,ot).notify({query:this,type:"updated",action:t})})},Ec);function Nl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ja(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ei(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Xe,fe,fn,$e,lr,Mr,Tt,qt,mn,Dr,Fr,ur,dr,Ht,zr,xe,Zr,So,Po,wo,Eo,No,Io,Ro,Il,Nc,Eh=(Nc=class extends xn{constructor(t,r){super();re(this,xe);re(this,Xe);re(this,fe);re(this,fn);re(this,$e);re(this,lr);re(this,Mr);re(this,Tt);re(this,qt);re(this,mn);re(this,Dr);re(this,Fr);re(this,ur);re(this,dr);re(this,Ht);re(this,zr,new Set);this.options=r,G(this,Xe,t),G(this,qt,null),G(this,Tt,jo()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,fe).addObserver(this),ti(E(this,fe),this.options)?de(this,xe,Zr).call(this):this.updateResult(),de(this,xe,Eo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return To(E(this,fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return To(E(this,fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,xe,No).call(this),de(this,xe,Io).call(this),E(this,fe).removeObserver(this)}setOptions(t){const r=this.options,s=E(this,fe);if(this.options=E(this,Xe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof at(this.options.enabled,E(this,fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,xe,Ro).call(this),E(this,fe).setOptions(this.options),r._defaulted&&!vo(this.options,r)&&E(this,Xe).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,fe),observer:this});const o=this.hasListeners();o&&ri(E(this,fe),s,this.options,r)&&de(this,xe,Zr).call(this),this.updateResult(),o&&(E(this,fe)!==s||at(this.options.enabled,E(this,fe))!==at(r.enabled,E(this,fe))||Gt(this.options.staleTime,E(this,fe))!==Gt(r.staleTime,E(this,fe)))&&de(this,xe,So).call(this);const a=de(this,xe,Po).call(this);o&&(E(this,fe)!==s||at(this.options.enabled,E(this,fe))!==at(r.enabled,E(this,fe))||a!==E(this,Ht))&&de(this,xe,wo).call(this,a)}getOptimisticResult(t){const r=E(this,Xe).getQueryCache().build(E(this,Xe),t),s=this.createResult(r,t);return Ih(this,s)&&(G(this,$e,s),G(this,Mr,this.options),G(this,lr,E(this,fe).state)),s}getCurrentResult(){return E(this,$e)}trackResult(t,r){return new Proxy(t,{get:(s,o)=>(this.trackProp(o),r==null||r(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&E(this,Tt).status==="pending"&&E(this,Tt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(t){E(this,zr).add(t)}getCurrentQuery(){return E(this,fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=E(this,Xe).defaultQueryOptions(t),s=E(this,Xe).getQueryCache().build(E(this,Xe),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(t){return de(this,xe,Zr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,$e)))}createResult(t,r){var T;const s=E(this,fe),o=this.options,a=E(this,$e),i=E(this,lr),c=E(this,Mr),u=t!==s?t.state:E(this,fn),{state:m}=t;let f={...m},p=!1,h;if(r._optimisticResults){const I=this.hasListeners(),O=!I&&ti(t,r),M=I&&ri(t,s,r,o);(O||M)&&(f={...f,...Nl(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:_,errorUpdatedAt:g,status:v}=f;h=f.data;let b=!1;if(r.placeholderData!==void 0&&h===void 0&&v==="pending"){let I;a!=null&&a.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(I=a.data,b=!0):I=typeof r.placeholderData=="function"?r.placeholderData((T=E(this,Fr))==null?void 0:T.state.data,E(this,Fr)):r.placeholderData,I!==void 0&&(v="success",h=bo(a==null?void 0:a.data,I,r),p=!0)}if(r.select&&h!==void 0&&!b)if(a&&h===(i==null?void 0:i.data)&&r.select===E(this,mn))h=E(this,Dr);else try{G(this,mn,r.select),h=r.select(h),h=bo(a==null?void 0:a.data,h,r),G(this,Dr,h),G(this,qt,null)}catch(I){G(this,qt,I)}E(this,qt)&&(_=E(this,qt),h=E(this,Dr),g=Date.now(),v="error");const C=f.fetchStatus==="fetching",j=v==="pending",x=v==="error",S=j&&C,P=h!==void 0,N={status:v,fetchStatus:f.fetchStatus,isPending:j,isSuccess:v==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:f.dataUpdatedAt,error:_,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:C,isRefetching:C&&!j,isLoadingError:x&&!P,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:x&&P,isStale:va(t,r),refetch:this.refetch,promise:E(this,Tt),isEnabled:at(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const I=H=>{N.status==="error"?H.reject(N.error):N.data!==void 0&&H.resolve(N.data)},O=()=>{const H=G(this,Tt,N.promise=jo());I(H)},M=E(this,Tt);switch(M.status){case"pending":t.queryHash===s.queryHash&&I(M);break;case"fulfilled":(N.status==="error"||N.data!==M.value)&&O();break;case"rejected":(N.status!=="error"||N.error!==M.reason)&&O();break}}return N}updateResult(){const t=E(this,$e),r=this.createResult(E(this,fe),this.options);if(G(this,lr,E(this,fe).state),G(this,Mr,this.options),E(this,lr).data!==void 0&&G(this,Fr,E(this,fe)),vo(r,t))return;G(this,$e,r);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!E(this,zr).size)return!0;const i=new Set(a??E(this,zr));return this.options.throwOnError&&i.add("error"),Object.keys(E(this,$e)).some(c=>{const l=c;return E(this,$e)[l]!==t[l]&&i.has(l)})};de(this,xe,Il).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,xe,Eo).call(this)}},Xe=new WeakMap,fe=new WeakMap,fn=new WeakMap,$e=new WeakMap,lr=new WeakMap,Mr=new WeakMap,Tt=new WeakMap,qt=new WeakMap,mn=new WeakMap,Dr=new WeakMap,Fr=new WeakMap,ur=new WeakMap,dr=new WeakMap,Ht=new WeakMap,zr=new WeakMap,xe=new WeakSet,Zr=function(t){de(this,xe,Ro).call(this);let r=E(this,fe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ze)),r},So=function(){de(this,xe,No).call(this);const t=Gt(this.options.staleTime,E(this,fe));if(_r||E(this,$e).isStale||!go(t))return;const s=jl(E(this,$e).dataUpdatedAt,t)+1;G(this,ur,tr.setTimeout(()=>{E(this,$e).isStale||this.updateResult()},s))},Po=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,fe)):this.options.refetchInterval)??!1},wo=function(t){de(this,xe,Io).call(this),G(this,Ht,t),!(_r||at(this.options.enabled,E(this,fe))===!1||!go(E(this,Ht))||E(this,Ht)===0)&&G(this,dr,tr.setInterval(()=>{(this.options.refetchIntervalInBackground||ya.isFocused())&&de(this,xe,Zr).call(this)},E(this,Ht)))},Eo=function(){de(this,xe,So).call(this),de(this,xe,wo).call(this,de(this,xe,Po).call(this))},No=function(){E(this,ur)&&(tr.clearTimeout(E(this,ur)),G(this,ur,void 0))},Io=function(){E(this,dr)&&(tr.clearInterval(E(this,dr)),G(this,dr,void 0))},Ro=function(){const t=E(this,Xe).getQueryCache().build(E(this,Xe),this.options);if(t===E(this,fe))return;const r=E(this,fe);G(this,fe,t),G(this,fn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Il=function(t){Be.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(E(this,$e))}),E(this,Xe).getQueryCache().notify({query:E(this,fe),type:"observerResultsUpdated"})})},Nc);function Nh(e,t){return at(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ti(e,t){return Nh(e,t)||e.state.data!==void 0&&To(e,t,t.refetchOnMount)}function To(e,t,r){if(at(t.enabled,e)!==!1&&Gt(t.staleTime,e)!=="static"){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&va(e,t)}return!1}function ri(e,t,r,s){return(e!==t||at(s.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&va(e,r)}function va(e,t){return at(t.enabled,e)!==!1&&e.isStaleByTime(Gt(t.staleTime,e))}function Ih(e,t){return!vo(e.getCurrentResult(),t)}function ni(e){return{onFetch:(t,r)=>{var m,f,p,h,_;const s=t.options,o=(p=(f=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],i=((_=t.state.data)==null?void 0:_.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const v=j=>{xh(j,()=>t.signal,()=>g=!0)},b=Cl(t.options,t.fetchOptions),C=async(j,x,S)=>{if(g)return Promise.reject();if(x==null&&j.pages.length)return Promise.resolve(j);const w=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:x,direction:S?"backward":"forward",meta:t.options.meta};return v(O),O})(),N=await b(w),{maxPages:T}=t.options,I=S?vh:yh;return{pages:I(j.pages,N,T),pageParams:I(j.pageParams,x,T)}};if(o&&a.length){const j=o==="backward",x=j?Rh:si,S={pages:a,pageParams:i},P=x(s,S);c=await C(S,P,j)}else{const j=e??a.length;do{const x=l===0?i[0]??s.initialPageParam:si(s,c);if(l>0&&x==null)break;c=await C(c,x),l++}while(l<j)}return c};t.options.persister?t.fetchFn=()=>{var g,v;return(v=(g=t.options).persister)==null?void 0:v.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function si(e,{pages:t,pageParams:r}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}function Rh(e,{pages:t,pageParams:r}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,r[0],r):void 0}var pn,jt,Ve,fr,Ct,Mt,Ic,Th=(Ic=class extends El{constructor(t){super();re(this,Ct);re(this,pn);re(this,jt);re(this,Ve);re(this,fr);G(this,pn,t.client),this.mutationId=t.mutationId,G(this,Ve,t.mutationCache),G(this,jt,[]),this.state=t.state||Ah(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,jt).includes(t)||(E(this,jt).push(t),this.clearGcTimeout(),E(this,Ve).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){G(this,jt,E(this,jt).filter(r=>r!==t)),this.scheduleGc(),E(this,Ve).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,jt).length||(this.state.status==="pending"?this.scheduleGc():E(this,Ve).remove(this))}continue(){var t;return((t=E(this,fr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,c,l,u,m,f,p,h,_,g,v,b,C,j,x,S,P,w,N,T;const r=()=>{de(this,Ct,Mt).call(this,{type:"continue"})},s={client:E(this,pn),meta:this.options.meta,mutationKey:this.options.mutationKey};G(this,fr,wl({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(I,O)=>{de(this,Ct,Mt).call(this,{type:"failed",failureCount:I,error:O})},onPause:()=>{de(this,Ct,Mt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Ve).canRun(this)}));const o=this.state.status==="pending",a=!E(this,fr).canStart();try{if(o)r();else{de(this,Ct,Mt).call(this,{type:"pending",variables:t,isPaused:a}),await((c=(i=E(this,Ve).config).onMutate)==null?void 0:c.call(i,t,this,s));const O=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,s));O!==this.state.context&&de(this,Ct,Mt).call(this,{type:"pending",context:O,variables:t,isPaused:a})}const I=await E(this,fr).start();return await((f=(m=E(this,Ve).config).onSuccess)==null?void 0:f.call(m,I,t,this.state.context,this,s)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,I,t,this.state.context,s)),await((g=(_=E(this,Ve).config).onSettled)==null?void 0:g.call(_,I,null,this.state.variables,this.state.context,this,s)),await((b=(v=this.options).onSettled)==null?void 0:b.call(v,I,null,t,this.state.context,s)),de(this,Ct,Mt).call(this,{type:"success",data:I}),I}catch(I){try{await((j=(C=E(this,Ve).config).onError)==null?void 0:j.call(C,I,t,this.state.context,this,s))}catch(O){Promise.reject(O)}try{await((S=(x=this.options).onError)==null?void 0:S.call(x,I,t,this.state.context,s))}catch(O){Promise.reject(O)}try{await((w=(P=E(this,Ve).config).onSettled)==null?void 0:w.call(P,void 0,I,this.state.variables,this.state.context,this,s))}catch(O){Promise.reject(O)}try{await((T=(N=this.options).onSettled)==null?void 0:T.call(N,void 0,I,t,this.state.context,s))}catch(O){Promise.reject(O)}throw de(this,Ct,Mt).call(this,{type:"error",error:I}),I}finally{E(this,Ve).runNext(this)}}},pn=new WeakMap,jt=new WeakMap,Ve=new WeakMap,fr=new WeakMap,Ct=new WeakSet,Mt=function(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Be.batch(()=>{E(this,jt).forEach(s=>{s.onMutationUpdate(t)}),E(this,Ve).notify({mutation:this,type:"updated",action:t})})},Ic);function Ah(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var At,ht,hn,Rc,kh=(Rc=class extends xn{constructor(t={}){super();re(this,At);re(this,ht);re(this,hn);this.config=t,G(this,At,new Set),G(this,ht,new Map),G(this,hn,0)}build(t,r,s){const o=new Th({client:t,mutationCache:this,mutationId:++Rn(this,hn)._,options:t.defaultMutationOptions(r),state:s});return this.add(o),o}add(t){E(this,At).add(t);const r=An(t);if(typeof r=="string"){const s=E(this,ht).get(r);s?s.push(t):E(this,ht).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,At).delete(t)){const r=An(t);if(typeof r=="string"){const s=E(this,ht).get(r);if(s)if(s.length>1){const o=s.indexOf(t);o!==-1&&s.splice(o,1)}else s[0]===t&&E(this,ht).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=An(t);if(typeof r=="string"){const s=E(this,ht).get(r),o=s==null?void 0:s.find(a=>a.state.status==="pending");return!o||o===t}else return!0}runNext(t){var s;const r=An(t);if(typeof r=="string"){const o=(s=E(this,ht).get(r))==null?void 0:s.find(a=>a!==t&&a.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Be.batch(()=>{E(this,At).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,At).clear(),E(this,ht).clear()})}getAll(){return Array.from(E(this,At))}find(t){const r={exact:!0,...t};return this.getAll().find(s=>Xa(r,s))}findAll(t={}){return this.getAll().filter(r=>Xa(t,r))}notify(t){Be.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Be.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ze))))}},At=new WeakMap,ht=new WeakMap,hn=new WeakMap,Rc);function An(e){var t;return(t=e.options.scope)==null?void 0:t.id}var St,Tc,Oh=(Tc=class extends xn{constructor(t={}){super();re(this,St);this.config=t,G(this,St,new Map)}build(t,r,s){const o=r.queryKey,a=r.queryHash??ga(o,r);let i=this.get(a);return i||(i=new wh({client:t,queryKey:o,queryHash:a,options:t.defaultQueryOptions(r),state:s,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){E(this,St).has(t.queryHash)||(E(this,St).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=E(this,St).get(t.queryHash);r&&(t.destroy(),r===t&&E(this,St).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,St).get(t)}getAll(){return[...E(this,St).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(s=>Qa(r,s))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(s=>Qa(t,s)):r}notify(t){Be.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},St=new WeakMap,Tc),Te,$t,Vt,Br,Ur,Wt,qr,Hr,Ac,Rl=(Ac=class{constructor(e={}){re(this,Te);re(this,$t);re(this,Vt);re(this,Br);re(this,Ur);re(this,Wt);re(this,qr);re(this,Hr);G(this,Te,e.queryCache||new Oh),G(this,$t,e.mutationCache||new kh),G(this,Vt,e.defaultOptions||{}),G(this,Br,new Map),G(this,Ur,new Map),G(this,Wt,0)}mount(){Rn(this,Wt)._++,E(this,Wt)===1&&(G(this,qr,ya.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Te).onFocus())})),G(this,Hr,rs.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Te).onOnline())})))}unmount(){var e,t;Rn(this,Wt)._--,E(this,Wt)===0&&((e=E(this,qr))==null||e.call(this),G(this,qr,void 0),(t=E(this,Hr))==null||t.call(this),G(this,Hr,void 0))}isFetching(e){return E(this,Te).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,$t).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Te).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=E(this,Te).build(this,t),s=r.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Gt(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return E(this,Te).findAll(e).map(({queryKey:t,state:r})=>{const s=r.data;return[t,s]})}setQueryData(e,t,r){const s=this.defaultQueryOptions({queryKey:e}),o=E(this,Te).get(s.queryHash),a=o==null?void 0:o.state.data,i=ph(t,a);if(i!==void 0)return E(this,Te).build(this,s).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Be.batch(()=>E(this,Te).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Te).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=E(this,Te);Be.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=E(this,Te);return Be.batch(()=>(r.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},s=Be.batch(()=>E(this,Te).findAll(e).map(o=>o.cancel(r)));return Promise.all(s).then(Ze).catch(Ze)}invalidateQueries(e,t={}){return Be.batch(()=>(E(this,Te).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},s=Be.batch(()=>E(this,Te).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,r);return r.throwOnError||(a=a.catch(Ze)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(s).then(Ze)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=E(this,Te).build(this,t);return r.isStaleByTime(Gt(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ze).catch(Ze)}fetchInfiniteQuery(e){return e.behavior=ni(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ze).catch(Ze)}ensureInfiniteQueryData(e){return e.behavior=ni(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return rs.isOnline()?E(this,$t).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Te)}getMutationCache(){return E(this,$t)}getDefaultOptions(){return E(this,Vt)}setDefaultOptions(e){G(this,Vt,e)}setQueryDefaults(e,t){E(this,Br).set(an(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,Br).values()],r={};return t.forEach(s=>{cn(e,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(e,t){E(this,Ur).set(an(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,Ur).values()],r={};return t.forEach(s=>{cn(e,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,Vt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ga(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ts&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,Vt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Te).clear(),E(this,$t).clear()}},Te=new WeakMap,$t=new WeakMap,Vt=new WeakMap,Br=new WeakMap,Ur=new WeakMap,Wt=new WeakMap,qr=new WeakMap,Hr=new WeakMap,Ac),Tl=it.createContext(void 0),Lh=e=>{const t=it.useContext(Tl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Al=({client:e,children:t})=>(it.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),n.jsx(Tl.Provider,{value:e,children:t})),kl=it.createContext(!1),Mh=()=>it.useContext(kl);kl.Provider;function Dh(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Fh=it.createContext(Dh()),zh=()=>it.useContext(Fh),Bh=(e,t,r)=>{const s=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Sl(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},Uh=e=>{it.useEffect(()=>{e.clearReset()},[e])},qh=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&e.data===void 0||Sl(r,[e.error,s])),Hh=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...o)=>r(s(...o)):r(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$h=(e,t)=>e.isLoading&&e.isFetching&&!t,Vh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,oi=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Wh(e,t,r){var p,h,_,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const s=Mh(),o=zh(),a=Lh(),i=a.defaultQueryOptions(e);(h=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||h.call(p,i);const c=a.getQueryCache().get(i.queryHash);process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),i._optimisticResults=s?"isRestoring":"optimistic",Hh(i),Bh(i,o,c),Uh(o);const l=!a.getQueryCache().get(i.queryHash),[u]=it.useState(()=>new t(a,i)),m=u.getOptimisticResult(i),f=!s&&e.subscribed!==!1;if(it.useSyncExternalStore(it.useCallback(v=>{const b=f?u.subscribe(Be.batchCalls(v)):Ze;return u.updateResult(),b},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),it.useEffect(()=>{u.setOptions(i)},[i,u]),Vh(i,m))throw oi(i,u,o);if(qh({result:m,errorResetBoundary:o,throwOnError:i.throwOnError,query:c,suspense:i.suspense}))throw m.error;if((g=(_=a.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||g.call(_,i,m),i.experimental_prefetchInRender&&!_r&&$h(m,s)){const v=l?oi(i,u,o):c==null?void 0:c.promise;v==null||v.catch(Ze).finally(()=>{u.updateResult()})}return i.notifyOnChangeProps?m:u.trackResult(m)}function Gh(e,t){return Wh(e,Eh)}const Kr={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"}},Kh={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Qh="Imagem do produto",ai=1,Xh="Sair",Yh=e=>e.exit,ii=({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"}],Zh=(e,t)=>{const r=(t??"").split("@")[0];return e?`Olá${r.length?", ":" "}${r}!`:"Olá!"},Jh=e=>"Seja bem vindo!",e_="Marque a caixa para aceitar os termos de política de privacidade.",t_="Algumas informações estão incorretas ou não foram preenchidas",r_="Enviar",n_="ditoTrackedProfile",s_=new Rl,Ol=y.createContext({}),o_=({brand:e,constants:t,collectionId:r,children:s,itemsPerPage:o=24,pathname:a,searchParams:i,slug:c,...l})=>{const{PLP_SORT_DEFAULT:u}=t,m=y.useRef(""),[f,p]=y.useState(!1),h=(i==null?void 0:i.toString())??"",_=y.useMemo(()=>{const g=new URLSearchParams(h),v=g.get("query"),b=Number(g.get("page")??1),C=Number(g.get("count")??o),j=g.get("sort"),x=g.getAll("facets"),S=j??(r?"":u);return{base:v?"":a,count:C,facets:k.selectedFacets(x),page:b,sort:S,term:v??null}},[h,a,o,r,u]);return y.useEffect(()=>{m.current!==a&&(m.current=a,window.document.body.scrollTo(0,0))},[a]),n.jsx(Ol.Provider,{value:y.useMemo(()=>({...l,constants:t,openFilters:f,setOpenFilters:p}),[t,f,l]),children:n.jsx(Al,{client:s_,children:n.jsx(_a,{brand:e,collectionId:r,state:_,searchParams:i??new URLSearchParams,children:s})})})},Me=()=>{const e=y.useContext(Ol);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},ns=(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)=>ns(o,t[a]));if(Array.isArray(t))return!1;const r=Object.keys(e),s=Object.keys(t);return r.length!==s.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&ns(e[o],t[o]))},a_=(e,t,r="page")=>Object.keys(t).some(s=>s===r?!1:!ns(t[s],e[s])),i_=async e=>{const t=await k.fetchProxy("/_v/proxy/search/product",{method:"POST",body:JSON.stringify(e)});if(!t.ok)throw new Error("[FAILED TO FETCH DATA]");const r=await t.json();return r==null?void 0:r.data},Ll=()=>({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}}}),Ml=(e,t,r,s=24)=>{const o=new Set,a=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:a};const i=t*s*r;for(const c of e){let l=Number(c.position_grid),u=!1;for(;l<i;){const m=l%r;if(m+c.columns>r){l+=r-m;continue}if(!Array.from({length:c.columns}).some((h,_)=>o.has(l+_))){for(let h=0;h<c.columns;h++)o.add(l+h);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}},fs=(e,t,r,s=24)=>{const{placedBanners:o,taken:a}=Ml(e??[],t,r),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}},Ao=(e,t=!1)=>Array.from({length:e},(r,s)=>{const o=s+1;return{loading:t?!1:e===o,page:o}}),c_=(e,t)=>[...e,{loading:!1,page:t}],l_=(e=1,t=24)=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:t,total:e}),u_=(e,t,r,s,o)=>{const a=o,i=(e.length-1)*o+a-1,c=r[i];return t.filter((l,u)=>{const m=s[u];return m<=c||o>a&&m>c})},Dl=(e,t)=>{const r=new Map;for(const o of e){const a=Math.floor(o/t);r.has(a)||r.set(a,[]),r.get(a).push(o)}const s=[];for(const[,o]of r){const a=o[Math.floor(Math.random()*o.length)];s.push(a)}return s},Fl=(e,t)=>{if(!e)return[];const r=e.map((s,o)=>s.video&&s.video!==""?o:null).filter(s=>s);return Dl(r,t)},zl=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],d_=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:zl,createPage:c_,createPages:Ao,createPagination:l_,createProduct:Ll,deepEqual:ns,fetchPage:i_,getBanners:Ml,getPositions:fs,getProductsWithVideo:Fl,getRandomVideoPerRow:Dl,getVisibleBanners:u_,hasStateChangedExceptPage:a_},Symbol.toStringTag,{value:"Module"})),f_=(e,t,r,s=0)=>{if(!e.length)return[];let o=0;const a=[];for(let i=0;i<e.length;i+=r){const c=e.slice(i,i+r),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,f=s+m,p=t.find(_=>_.position_grid===f+1),h=f+o+1;p&&(o+=p.columns),a.push({position:h,canPlayVideo:u===l})}}return a},Bl=(e,t,r)=>{const s=(t-1)*r,o=t*r;return e>=s&&e<=o},bn=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:k.disableSKU(r),size:k.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},m_=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:f_,getSkusNotify:bn,isPositionInCurrentPage:Bl},Symbol.toStringTag,{value:"Module"})),Ul=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),n.jsx(d.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Ul.displayName="Notify.Controls";const gt={"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 ql(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const s of r){const[o,a]=s.trim().split("=");if(o===e)return a}}function xa(e,t,r={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...r};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}const Hl=y.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),p_=({children:e,AUTH_TOKEN_COOKIE:t})=>{var m;const{shipping:r,cartStore:s}=we(),[o,a]=y.useState({amount:null,boxes:null,toExpire:null,loading:!0}),i=y.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(f=>f.json()).then(f=>{const{userCredits:p,userId:h,sub:_,...g}=f,{wishlist:v,...b}=g;a({amount:p==null?void 0:p.amount,boxes:p==null?void 0:p.boxes,toExpire:p==null?void 0:p.toExpire,user:{...b,userId:h,sub:_??""},loading:!1,wishlist:(typeof v=="string"?v.split(",").filter(Boolean):v)??[]})})}catch(f){console.error("user info and my credits request",f),a({...o,loading:!1})}},[a]),c=y.useCallback(()=>{xa(t),i()},[i]),l=y.useCallback(()=>o.boxes?o.boxes.reduce((f,p)=>p.gift_card_box.refid==="C1643"?(f.cashback+=p.amount,f):(f.credits+=p.amount,f),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),u=y.useCallback(async()=>{var f,p,h;if((f=o.user)!=null&&f.postalCode&&(s!=null&&s.id)&&!(s!=null&&s.loading)&&!((h=(p=s==null?void 0:s.shippingData)==null?void 0:p.address)!=null&&h.postalCode))try{await r(o.user.postalCode)}catch(_){console.error("Error auto-filling CEP:",_)}},[(m=o.user)==null?void 0:m.postalCode]);return y.useEffect(()=>{i()},[i]),y.useEffect(()=>{u()},[u]),n.jsx(Hl.Provider,{value:y.useMemo(()=>({...o,getCurrentCredits:l,logout:c}),[o,l,c]),children:e})},Gr=()=>{const e=y.useContext(Hl);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},$l=({color:e,delay:t=3e3,sku:r,setStatus:s,setIsLoading:o,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i})=>{const c=y.useRef(null),[l,u]=y.useState(null),{sendDataLayerEvent:m}=le(),{user:f}=Gr(),p=f!=null&&f.firstName?`${f==null?void 0:f.firstName} ${f==null?void 0:f.lastName}`:"";return n.jsx("div",{className:gt["notify--form"],children:n.jsxs("form",{action:"POST",onSubmit:async h=>{var v;h.preventDefault();const _=h.currentTarget,g=((v=_.querySelector("input"))==null?void 0:v.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:p,email:g,sku:r==null?void 0:r.skuID})}).then(b=>s(b.ok)).finally(()=>{o(!1),_.reset(),m({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.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:[n.jsx(d.TextField.Structure,{input:n.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:h=>u(!h.target.validity.valid),required:!0}),supportText:typeof l=="boolean"&&l?n.jsx(d.TextField.SupportText,{text:a.messages.invalid_email,feedback:"error"}):n.jsx(n.Fragment,{})}),n.jsx(d.Button,{disabled:!(l===!1||!r)||!r,type:"submit",size:"large",children:i.button})]})})};$l.displayName="Notify.Form";const Vl=({isLoading:e=!1})=>n.jsx("div",{className:gt["notify--loading"],"data-loading":e,children:n.jsx(d.Spinner,{})});Vl.displayName="Notify.Loading";const ba={"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"},Wl=({children:e,...t})=>n.jsx("div",{...t,className:ba["product-variation-list--list"],children:e});Wl.displayName="ProductVariationList.List";const Gl=({fill:e="#1352C7",src:t="",type:r="size",text:s,...o})=>{const{nextimage:a}=me();return r==="size"?n.jsxs(d.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),n.jsx(d.ToggleSize.Text,{children:s})]}):n.jsxs(d.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?n.jsx(d.ToggleStyle.Color,{background:e,title:"color"}):n.jsx(d.ToggleStyle.Texture,{title:"texture",children:n.jsx(a,{alt:s??"image",height:40,src:t,width:40})})]})};Gl.displayName="ProductVariationList.Option";const Kl=({children:e,...t})=>n.jsx("div",{className:ba["product-variation-list"],...t,children:e});Kl.displayName="ProductVariationList.Root";const Ql=({children:e,title:t,...r})=>n.jsxs("div",{...r,className:ba["product-variation-list--title"],children:[t?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.SectionWrapper,{children:n.jsx("p",{children:t})})}):n.jsx(n.Fragment,{}),e]});Ql.displayName="ProductVariationList.Title";const xt={List:Wl,Option:Gl,Title:Ql,Root:Kl},h_=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(s=>e[s]===t[s])},Xl=({children:e,label:t="",skus:r,sku:s,setSku:o})=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:gt["notify--selector--header"],children:e}),n.jsxs(xt.Root,{className:gt["notify--selector"],children:[n.jsx(xt.Title,{title:t}),n.jsx(xt.List,{children:Array.isArray(r)&&r.map((a,i)=>{const c=h_(s,a);return n.jsx(xt.Option,{active:c,onClick:()=>o(c?null:a),text:String(a.size),type:"size"},i)})})]})]});Xl.displayName="Notify.Selector";const ci=({type:e,icon:t,title:r,subtitle:s})=>n.jsx("div",{className:gt[`notify--status--${e}`],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{children:r}),n.jsx("h3",{children:s})]})})}),Yl=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>n.jsxs("div",{className:gt["notify--status"],"data-status":e,children:[n.jsx(ci,{...r.success,icon:t.check_circle,type:"success"}),n.jsx(ci,{...r.error,icon:t.alert_circle,type:"error"})]});Yl.displayName="Notify.Status";const ja=({color:e,open:t,setVisible:r,skus:s,sku:o,setSku:a,ICONS:i,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l,PRODUCT_CARD_TEXTS:u,Z_INDEX_WAR:m})=>{const[f,p]=y.useState(!1),[h,_]=y.useState(null),{isMobile:g}=se();return n.jsxs(d.Modal.Root,{isMobile:g??!1,isOpen:t,setIsOpen:r,variant:g?"sideBottom":"sideLeft",style:{zIndex:m.modal},className:gt["modal-modifier"],children:[n.jsx(d.Modal.Header,{navigation:"top",className:gt["notify--header-modifier"],children:n.jsx(Ul,{isMobile:g??!1,ICONS:i,NOTIFY_INFO:l})}),n.jsxs(d.Modal.Body,{className:gt["notify--modal--body"],children:[n.jsxs("div",{className:gt["notify--container"],children:[n.jsxs(Xl,{label:l.selector_label,sku:o,skus:s,setSku:a,children:[n.jsx("p",{children:l.subtitle}),n.jsx("span",{children:l.description})]}),n.jsx($l,{delay:4e3,sku:o,setStatus:_,setIsLoading:p,color:e,NEWSLETTER_CONFIGS:c,NOTIFY_INFO:l}),n.jsx(Vl,{isLoading:f}),n.jsx("div",{className:gt["notify--selector--header"],children:n.jsx("span",{children:l.legal})})]}),n.jsx(Yl,{status:h,ICONS:i,PRODUCT_CARD_TEXTS:u})]})]})};ja.displayName="Notify";const jn=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a,...i})=>{const c=bn(e??[]);return n.jsx(ja,{...i,skus:c,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:s,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:a})};jn.displayName="PDC.Notification";const Xt=xr.create(e=>({banners:[],load:!1,pages:[],products:[],createPagesScroll:(t,r)=>{e(s=>({...s,...r,pages:Ao(t)}))},trimPages:t=>{e(r=>r.pages.length?{...r,pages:r.pages.filter(s=>s.page<=t).map(s=>({...s,loading:!1}))}:r)},addPage:(t,r)=>{e(s=>s.pages.some(o=>o.page===t)?s:{...s,...r,pages:[...s.pages,{page:t,loading:!1}]})},reset:()=>e(()=>({pages:Ao(1,!0)})),setLoad:t=>e(r=>r.load===t?r:{load:t}),setPositions:t=>e({...t}),updateProducts:t=>{e(r=>r.pages.find(o=>o.page===t)?{...r,pages:r.pages.map(o=>o.page===t?{...o,loading:!0}:o)}:r)}})),Zl=y.createContext({}),Jl=({banners:e,children:t})=>{const{router:r}=me(),{isMobile:s}=se(),{searchParams:o}=Fe(),{addPage:a}=Xt(),{constants:i}=Me(),[c,l]=y.useState(!1),[u,m]=y.useState(null),[f,p]=y.useState([]),h=s?8:16,_=s?2:4,{ITEMS_PER_PAGE:g,ICONS:v,NEWSLETTER_CONFIGS:b,NOTIFY_INFO:C,PRODUCT_CARD_TEXTS:j,Z_INDEX_WAR:x}=i,S=y.useCallback((N,T,I=!1)=>{const O=N.page+1;if(I===!0&&O<=T){const M=fs(e,O,_,g);a(O,M)}},[a,e,_,g]),P=y.useCallback(N=>{const T=new URLSearchParams(o.toString()),I=Number(T.get("page")??1);N!==I&&(T.set("page",String(N)),r.replace(`?${T.toString()}`,{scroll:!1}))},[r,o]),w=y.useCallback((N,T)=>{const I=T?bn([T]):null;p(N),m(I!=null&&I.length?I[0]:null),l(!0)},[]);return n.jsxs(Zl.Provider,{value:y.useMemo(()=>({addNewPage:S,gap:h,columns:_,handleNotify:w,updateParamPage:P}),[S,w,h,_,P]),children:[t,n.jsx(jn,{open:c,sku:u,skus:f,setSku:m,setVisible:l,ICONS:v,NEWSLETTER_CONFIGS:b,NOTIFY_INFO:C,PRODUCT_CARD_TEXTS:j,Z_INDEX_WAR:x})]})},Yt=()=>{const e=y.useContext(Zl);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},eu=y.createContext({gridBanners:void 0,banners:[]}),__=({children:e,data:t,device:r,SectionZone:s,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:a}=se(),i=(t==null?void 0:t.sections.filter(f=>f.name!=="List Product Banners"))??[],c=i.slice(0,ai),l=i.slice(ai,i.length),u=t==null?void 0:t.sections.find(f=>f.name==="List Product Banners"),m=y.useMemo(()=>{var f,p;return((p=(f=u==null?void 0:u.data)==null?void 0:f.banners)==null?void 0:p.map(h=>({...h.banner,columns:h.bannerWidth,position_grid:h.bannerPosition})))??[]},[u]);return a&&r==="mobile"||!a&&r==="desktop"?n.jsxs(eu.Provider,{value:{gridBanners:u,banners:m},children:[n.jsx(s,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:o,className:d.helpers.classNameConcat("utils-column-modifier"),children:[e,n.jsx(s,{data:l??[]})]})]}):n.jsx(n.Fragment,{})},Cn=()=>{const e=y.useContext(eu);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},tu=y.createContext({}),ru=({children:e,filters:t,...r})=>{var a;const{constants:{PLP_FILTERS:s}}=Me(),o=(a=t.facets)==null?void 0:a.filter(i=>s.find(c=>c.key===i.key));return n.jsx(tu.Provider,{value:y.useMemo(()=>({...r,filters:{...t,facets:o}}),[t,o,r]),children:e})},Zt=()=>{const e=y.useContext(tu);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},nu=y.createContext({product:void 0}),g_=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:s,SectionZone:o})=>n.jsxs(nu.Provider,{value:{productId:r},children:[e,n.jsx(d.Utils.Column,{gap:s,className:d.helpers.classNameConcat("utils-column-modifier"),children:n.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),su=()=>{const e=y.useContext(nu);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},ko=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function y_(e,t=1e3){let r=!1;return(...s)=>{r||(e(...s),r=!0,setTimeout(()=>{r=!1},t))}}function v_(e,t=1e3){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>{e(...s)},t)}}const ou=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,Jr=(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),x_=["name","email","phone","date","cpf","cep"],li={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}$/},au=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!li[e])return!0;const s=t.trim();return li[e].test(s)},b_=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):Qh},j_=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:x_,debounce:v_,getAltTextFromUrl:b_,getAuthenticatedUser:k.getAuthenticatedUser,getCookie:ql,getDaysHoursMinutesSeconds:Jr,getMilliSeconds:ou,removeAccentsAndReplaceSpaces:ko,setCookie:xa,throttle:y_,validateInput:au},Symbol.toStringTag,{value:"Module"})),C_=({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}},S_=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:s,checkboxRef:o,setFormStatus:a})=>{let i=!1,c=!1;const l={...r};return s&&!o.current&&(a("unchecked"),i=!0),e.forEach((u,m)=>{var h;if(m==="terms-and-conditions")return;const f=(h=t[m])==null?void 0:h.required;if(f&&!u){l[m]="required",i=!0;return}au({type:t[m].type,input:u,required:f})||(l[m]="error",c=!0),typeof u=="string"&&e.set(m,u.toString().trim())}),{hasEmptyFields:i,hasErrors:c,inputStatusToUpdate:l}};async function iu(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(a=>a.toString(16).padStart(2,"0")).join("")}const cu=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),lu=y.createContext({}),uu=({children:e,masterDataEmailField:t,fields:r,variant:s,dito:o,CONSTANTS:{MASTER_DATA_ENTITY:a,NEWSLETTER_CONFIGS:i}})=>{const{sendDataLayerEvent:c}=le(),l=i.hasTermsAndConditions,{mountedFields:u,mountedInputsStatus:m}=y.useMemo(()=>C_({fields:r}),[r]),f=y.useRef(!1),[p,h]=y.useState("idle"),[_,g]=y.useState(m),v=async({searchFields:w,entity:N})=>{const T=await Nr.post("/api/master-data/search",{body:{masterDataEntity:N,searchFields:w,headers:{"REST-Range":"resources=0-49"}}});return console.info(T),T.data},b=async({documentId:w,fieldsToBeUpdated:N,entity:T})=>(await Nr.post("/api/master-data/update",{dataEntityName:T,documentId:w,fieldsToBeUpdated:N})).status,C=y.useCallback(async({payload:w,response:N},T,I)=>{var B;const{email:O,...M}=w,[H]=await v({searchFields:{[T]:O},entity:I??a.newsletter}),F=Array.isArray(H)?(B=H[0])==null?void 0:B.id:void 0;return H&&await b({documentId:F,fieldsToBeUpdated:M,entity:I??a.newsletter})!==204?{...N,status:"error"}:{...N,status:"success"}},[]),j=y.useCallback(async({formData:w},N,T)=>{const I={status:"idle",inputsStatus:{}},O={};w.forEach((B,$)=>{O[$]=B});const M=await iu(O.email||""),H=new Date().toISOString(),F=[{action:o==null?void 0:o.actionName,timestamp:H,type:"TRACK",user_id:M,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:O.email||T,nome:O.name,origem:o==null?void 0:o.originName}}}];M&&(F.push({user_id:M,timestamp:H,type:"IDENTIFY",traits:{id:M,created_at:H,name:O.name,email:O.email||T,phone:O==null?void 0:O.phone}}),Jn.set(n_,M));try{const B=await Nr.post("/api/master-data",{body:{payload:O,masterDataEntity:N??a.newsletter}});cu(F);const $=B.data;return($==null?void 0:$.Message)==="duplicated entry"?C({payload:O,response:I},T,N):$!=null&&$.Id?{...I,status:"success"}:{...I,status:"error"}}catch(B){return console.error("error",B),{...I,status:"error"}}},[C]),x=y.useCallback(async(w,N,T)=>{w.preventDefault();const I=new FormData(w.target);if(I.append("acceptedTerms",f.current?"true":"false"),f.current){const M=new ho.TZDate(new Date,"America/Sao_Paulo").toISOString();I.append("termsAcceptedAt",M)}N&&Object.keys(N).forEach(M=>{I.append(M,N[M])});const O=await j({formData:I},T??"",t);O&&(h(O==null?void 0:O.status),g(O.inputsStatus),O.status==="success"&&c({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,j,h,g,c]),S=y.useCallback(w=>{const N=new FormData(w.currentTarget.parentElement),{hasEmptyFields:T,hasErrors:I,inputStatusToUpdate:O}=S_({formData:N,mountedFields:u,inputsStatus:_,hasTermsAndConditions:l,checkboxRef:f,setFormStatus:h});if(g(O),T||I){w.preventDefault();return}h("loading")},[u,_,l,f]),P=y.useCallback(()=>{h("idle"),g(m)},[m]);return n.jsx(lu.Provider,{value:y.useMemo(()=>({formStatus:p,handleSubmit:x,setFormStatus:h,inputsStatus:_,setInputsStatus:g,hasTermsAndConditions:l,handleClickToSubmit:S,checkboxRef:f,masterDataEmailField:t,fields:r,variant:s,resetNewsletter:P}),[p,x,h,_,g,S,l,f,t,r,s,P]),children:e})},Ca=()=>{const e=y.useContext(lu);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},du=y.createContext({}),fu=({children:e,data:t})=>{const[r,s]=y.useState(),[o,a]=y.useState(),i=y.useCallback(u=>{const m=t.filter(f=>f.cidade===u);s(m)},[t]),c=y.useCallback(u=>{a(u)},[]),l=y.useCallback(()=>{a("")},[]);return n.jsx(du.Provider,{value:y.useMemo(()=>({clearSelectedStore:l,data:t,handleSelectCity:i,handleSelectStore:c,selectedCity:r,selectedStore:o}),[l,t,i,c,r,o]),children:e})},ms=()=>{const e=y.useContext(du);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},ss={contexts:{addToCart:{hook:Cr,provider:vl},cart:{hook:we,provider:uh},cms:{FlagsAndTags:{context:aa,hook:Ot,provider:kp}},newsletter:{hook:Ca,provider:uu},events:{hook:le,provider:Up},global:{hook:se,provider:Xp,mediator:Qc},header:{hook:Ee,provider:ih},menuMobile:{hook:ha,provider:gl},next:{hook:me,provider:Yp},pdp:{provider:Op},PDPContent:{provider:g_,hook:su},plp:{provider:o_,hook:Me},plpFilter:{hook:Zt,provider:ru},PLPContent:{provider:__,hook:Cn},plpInfinite:{provider:Jl,hook:Yt},pdpdata:{provider:qp},searchSearch:{hook:Fe,provider:_a},session:{hook:Gr,provider:p_},ui:{hook:_n,provider:Kc},lpStore:{hook:ms,provider:fu}},hooks:{useBackPDC:Oc,useClipboard:Hp,useDisableZoom:$c,useLocalStorage:Vp,useOnScreen:ia,useSentinel:us,useTouchZoomPan:Vc},stores:{cart:Kp,header:Jp,pdp:oh,wishlist:ah}},P_={cart:k.cart,events:Bp,plp:d_,product:k.productHelpers,utils:j_,search:k.search},Sa={helpers:P_},st={"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"},mu=({brand:e,className:t,name:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(st["add-to-cart--card--name"],t),children:[n.jsx(d.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:n.jsx("p",{className:"typography-style-body-md",children:r})})})]});mu.displayName="AddToCart.Card.Name";const pu=({className:e,listPrice:t,price:r,quantity:s,productId:o,...a})=>{const i=k.formatPriceToCurrency(r/100),c=k.formatPriceToCurrency(t/100);return n.jsx("div",{...a,className:d.helpers.classNameConcat(st["add-to-cart--card--price-quantity"],e),children:n.jsx(d.ProductInfo.Root,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:n.jsx(d.ProductInfo.ValuesWrapper,{children:r!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i,size:"small"},"price-list"),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c,size:"small"},"price-low")]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c,size:"small"},"price-low")})})})})};pu.displayName="AddToCart.Card.PriceQuantity";const w_="_skeleton_12b79_1",E_={skeleton:w_},hu=({style:e})=>n.jsx("div",{style:e,className:E_.skeleton}),N_="_image_1y08u_1",I_={image:N_},R_=({alt:e,className:t,objectFit:r,...s})=>{const{nextimage:o}=me();return n.jsx(o,{quality:90,...s,alt:e??"",className:d.helpers.classNameConcat(I_.image,t),"data-object-fit":r??"cover"})},T_=({videoRef:e,...t})=>n.jsx("video",{...t,ref:e,children:n.jsx("track",{kind:"captions"})}),Oe={Image:R_,Video:T_},_u=({className:e,productGroupID:t,size:r,texture:s,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:i}}=Cr(),[c,l]=y.useState(s??"");return y.useEffect(()=>{c||k.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[t]})}).then(u=>u.json()).then(u=>{const m=u.data[0].items[0];if(m){const f=m.images.find(p=>a.includes(p.imageLabel));f!=null&&f.imageUrl?l(f.imageUrl):l(m.images[0].imageUrl)}}).catch(u=>{console.error(u)})},[c,t]),n.jsxs("div",{...o,className:d.helpers.classNameConcat(st["add-to-cart--card--style-size"],e),children:[n.jsx(d.ToggleStyle.Wrapper,{size:"x-small",style:i,children:n.jsx(d.ToggleStyle.Texture,{children:c?n.jsx(Oe.Image,{alt:"",src:c??"",width:164,height:164,style:i}):n.jsx(hu,{})})}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&n.jsxs(d.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:r})]})]})};_u.displayName="AddToCart.Card.StyleSize";const{helpers:A_}=Sa,gu=({className:e,item:t,texture:r,...s})=>{const{itemOffered:{name:o,brand:a,skuName:i,isVariationOf:{productGroupID:c}},quantity:l,price:u,sellingPrice:m}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:f}}=Cr(),{size:p}=A_.product.getColorAndSizeFromSkuName(i??o,f);return n.jsxs("div",{...s,className:d.helpers.classNameConcat(st["add-to-cart--card--content"],e),children:[n.jsx(mu,{brand:a.name,name:o}),n.jsx(pu,{price:u,listPrice:m,quantity:l,productId:t.id}),n.jsx(_u,{size:p,texture:r,productGroupID:c})]})};gu.displayName="AddToCart.Card.Content";const yu=({image:e,thumbnail:t=!1})=>n.jsx(Oe.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});yu.displayName="AddToCart.Card";const vu=({className:e,item:t,texture:r,thumbnail:s,...o})=>{const{itemOffered:{image:[a]}}=t,i=k.updatedResizedImg(a.url,{width:200,height:300});return n.jsxs("div",{...o,className:d.helpers.classNameConcat(st["add-to-cart--card"],e),children:[n.jsx(yu,{image:{alternateName:a.alternateName||"Produto",url:i||""},thumbnail:s}),!s&&n.jsx(gu,{item:t,texture:r})]})};vu.displayName="AddToCart.Card";const xu=({className:e,children:t,title:r,...s})=>n.jsxs("div",{...s,className:d.helpers.classNameConcat(st["add-to-cart--content"],e),children:[n.jsx("div",{className:st["add-to-cart--content--title"],children:r&&n.jsx("h2",{children:r})}),t,n.jsx(mr.Footer,{})]});xu.displayName="AddToCart.Layout.Content";const bu=({className:e,...t})=>{var h,_;const{isMobile:r,handleClose:s,CONSTANTS:{ADD_TO_CART:o}}=Cr(),{cartStore:{totalizers:a},setIsOpen:i}=we(),c=(h=a.find(g=>g.id==="Discounts"))==null?void 0:h.value,l=((_=a.find(g=>g.id==="Items"))==null?void 0:_.value)??0,u=a.find(g=>g.id==="Shipping"),f=(l-Math.abs(c??0)+((u==null?void 0:u.value)??0))/100,p=k.formatPriceToCurrency(f??0);return n.jsxs("div",{...t,className:d.helpers.classNameConcat(st["add-to-cart--footer"],e),children:[n.jsxs("div",{className:st["add-to-cart--footer--total"],children:[n.jsx("span",{children:"Subtotal:"}),n.jsx("span",{children:p})]}),n.jsx(d.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>i(!0),children:o.footer.bag}),r?n.jsx(d.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):n.jsx(d.Button,{onClick:()=>s(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};bu.displayName="AddToCart.Layout.Footer";const ju=({children:e,className:t,thumbnail:r=!1,...s})=>{const{cartStore:{options:o}}=we(),{recentlyAddedProducts:a}=_n(),i=a.length>3?4:a.length;return n.jsxs("div",{...s,className:st["add-to-cart--items"],"data-thumbnail":r,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 n.jsx(mr.Card,{item:c,thumbnail:r,texture:l},c.itemOffered.sku)}),e]})};ju.displayName="AddToCart.Layout.Items";const Cu=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:s}=Cr(),{isMobile:o}=se();return n.jsxs(d.Modal.Root,{"data-modal":"add-to-cart--modal",className:st["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:s,variant:"sideBottom",style:{zIndex:t.modal},children:[n.jsx(d.Modal.Header,{navigation:"top",children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0})}),n.jsx(d.Modal.Body,{children:e})]})};Cu.displayName="AddToCart.Modal";const k_=({children:e})=>{const{count:t,handleClose:r,setIsOpen:s}=Cr(),o=y.useRef(t);return y.useEffect(()=>{t>o.current&&s(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,s]),n.jsx(n.Fragment,{children:e})},Su=({children:e,component:t,CONSTANTS:r,...s})=>{const{recentlyAddedProducts:o}=_n(),{isMobile:a}=se(),i=o.length>3?4:o.length;return n.jsx(vl,{...s,count:i,isMobile:a,CONSTANTS:r,children:n.jsx(k_,{children:a?n.jsxs(n.Fragment,{children:[n.jsx(mr.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):n.jsx(mr.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};Su.displayName="AddToCart.Root";const Pu=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,target:c,isOpen:l,top:u}=Cr();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:o,children:t}),id:"add-to-cart--tooltip",className:st["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:i,isOpen:l,left:a,size:"medium",position:"top",top:u,children:n.jsx("div",{className:st["add-to-cart--tooltip"],ref:c,children:e})})};Pu.displayName="AddToCart.Tooltip";const mr={Card:vu,Content:xu,Footer:bu,Items:ju,Modal:Cu,Root:Su,Tooltip:Pu},Pa=({title:e,...t})=>{const{recentlyAddedProducts:r}=_n(),{isMobile:s}=se(),o=r.length>3?4:r.length,a=r.length>(o??1),i=r.length>1;return n.jsx(mr.Root,{isMobile:s,count:r.length,component:n.jsx(mr.Content,{title:e,children:n.jsx(mr.Items,{thumbnail:i,children:a&&n.jsx(d.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};Pa.displayName="AddToCart";const ui={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},O_=({children:e,className:t,classNameButton:r,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]}:{},f=()=>{window&&window.document.body.scrollTo({...l})};return n.jsx(d.Card,{...c,shadow:!0,padding:"small",className:d.helpers.classNameConcat(ui["card-modifier"],t),style:{...i,padding:0},children:n.jsxs("button",{className:d.helpers.classNameConcat(ui["backtotop-btn"],r),onClick:f,style:{...m},"data-orientation":o,children:[s,e]})})},L_="_container_1sy8s_16",zt={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:L_,"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"},M_=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const s=Object.values(e.products).length;return n.jsxs("div",{className:zt["add-itens-to-cart-container"],children:[n.jsxs("div",{className:zt["add-itens-to-cart-container-values"],children:[n.jsx("div",{className:zt["add-itens-to-cart-qty-products"],children:n.jsx("span",{children:s===0?r.BUY_PACKAGE.group_cart.select_all_product:`${s} ${s===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),n.jsx("div",{className:zt["add-itens-to-cart-total"],children:n.jsx("span",{children:k.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),n.jsx(d.Button,{onClick:t,className:zt["add-button"],size:"large",disabled:s===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},D_=e=>e.reduce((t,r)=>{var o;const s=t.find(a=>a.node.id===r.node.id);if(!s)return[...t,r];if((o=s==null?void 0:s.node.isVariantOf)!=null&&o.hasVariant){const a=s.node.isVariantOf.hasVariant,i=r.node.isVariantOf.hasVariant;a&&i&&(s.node.isVariantOf.hasVariant=[...a,...i])}return t},[]),F_=({selectedProduct:e,productId:t,prevState:r,mainSellerId:s})=>{const{products:o,totalPrice:a}=r;try{if(!e){const{[t]:u,...m}=o;return{...r,totalPrice:a-u.price,products:m}}const i=k.getValidOffer(e.offers.offers,s);if(!i)return r;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),r}},wu=y.createContext({}),z_=({children:e,item:t,index:r,shelfTitle:s,...o})=>{const[a,i]=y.useState(null),c=y.useRef(null),l=y.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:u,itemListRef:m}=le(),f=g=>{u({functionKey:"productEvents",data:{commonData:{...t,availableSizes:l.current.availableSkus,...l.current.priceInfo},customData:{index:r+1},event:g}})},p=()=>{f("add_to_wishlist")},h=()=>{u({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...l.current.priceInfo}]},supportData:{selectedSku:a,selectedSkus:[a]},customData:{index:r}}})},_=()=>{s&&(m.current={item_list_name:s}),f("select_item")};return n.jsx(wu.Provider,{value:y.useMemo(()=>({...o,index:r,item:t,element:c,selectedSku:a,setSelectedSku:i,eventDataRef:l,sendAddToWishlistEvent:p,sendSelectItemEvent:_,sendAddToCartEvent:h}),[o,t,c,a]),children:e})},dt=()=>{const e=y.useContext(wu);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},Ue={"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"},Eu=({callback:e,children:t,className:r,data:s,isKit:o,...a})=>{const{item:{availability:{status:i},image:c}}=dt();return i?n.jsxs("div",{...a,className:d.helpers.classNameConcat(Ue["product-card--actions"],r),children:[n.jsxs(ve.Wrapper,{type:"actions--group",children:[n.jsx(ve.Price,{}),n.jsx("div",{className:Ue["product-card--actions--selectors"],children:!o&&n.jsx(ve.StyleSelector,{data:s,images:c,callback:e})})]}),t]}):null};Eu.displayName="ProductCard.Actions";const Nu=({className:e,isKit:t,...r})=>{const{addToCart:s}=we(),{isMobile:o=!1,selectedSku:a,outStock:i,item:c,sendAddToCartEvent:l,CONSTANTS:u}=dt(),m=()=>{var h;if(!a)return;const p=k.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:(h=c==null?void 0:c.image.find(_=>u.TEXTURE_IMAGE.includes(_.alternateName)))==null?void 0:h.url}),l()},f=a?u.BUY_BUTTON_LABELS.add_to_cart:u.BUY_BUTTON_LABELS.select_size;return n.jsx(d.Button,{...r,className:d.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!a&&!i,size:o?"medium":"large",variant:i?"secondary":"primary",onClick:i?r.onClick:m,children:i?"Avise-me quando chegar":f})};Nu.displayName="ProductCard.Actions.BuyButton";const B_={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},Rr=({size:e,adornment:t,title:r,subtitle:s,supportChildren:o,className:a,Z_INDEX_WAR:i,...c})=>n.jsxs(d.SnackBar.Structure,{...c,size:e,className:d.helpers.classNameConcat(B_["snackbar-modifier"],a),width:360,style:{zIndex:i.snackbar},children:[n.jsx(d.SnackBar.Content,{adornment:t,title:r,subtitle:s}),o&&n.jsx(d.SnackBar.Support,{children:o})]});Rr.displayName="SnackBar";const rn={"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 Oo={exports:{}},Ge={};Ge._=Ge._interop_require_default=U_;function U_(e){return e&&e.__esModule?e:{default:e}}var kn={exports:{}},Ns={},di;function Iu(){return di||(di=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 r},urlQueryToSearchParams:function(){return o}});function r(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(f=>c.append(u,s(f))):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(f=>i.delete(f)),m.forEach((f,p)=>i.append(p,f))}),i}}(Ns)),Ns}var Is={},gr={};function Ru(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Ru=function(s){return s?r:t})(e)}gr._=gr._interop_require_wildcard=q_;function q_(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Ru(t);if(r&&r.has(e))return r.get(e);var s={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(s,a,i):s[a]=e[a]}return s.default=e,r&&r.set(e,s),s}var fi;function Tu(){return fi||(fi=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=gr._(Iu()),o=/https?|ftp|gopher|file/;function a(l){let{auth:u,hostname:m}=l,f=l.protocol||"",p=l.pathname||"",h=l.hash||"",_=l.query||"",g=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",l.host?g=u+l.host:m&&(g=u+(~m.indexOf(":")?"["+m+"]":m),l.port&&(g+=":"+l.port)),_&&typeof _=="object"&&(_=String(s.urlQueryToSearchParams(_)));let v=l.search||_&&"?"+_||"";return f&&!f.endsWith(":")&&(f+=":"),l.slashes||(!f||o.test(f))&&g!==!1?(g="//"+(g||""),p&&p[0]!=="/"&&(p="/"+p)):g||(g=""),h&&h[0]!=="#"&&(h="#"+h),v&&v[0]!=="?"&&(v="?"+v),p=p.replace(/[?#]/g,encodeURIComponent),v=v.replace("#","%23"),""+f+g+p+v+h}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)}}(Is)),Is}var Rs={},mi;function H_(){return mi||(mi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,s){const o={};return Object.keys(r).forEach(a=>{s.includes(a)||(o[a]=r[a])}),o}}(Rs)),Rs}var Ts={},pi;function ps(){return pi||(pi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(x,S){for(var P in S)Object.defineProperty(x,P,{enumerable:!0,get:S[P]})}t(e,{DecodeError:function(){return _},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return b},NormalizeError:function(){return g},PageNotFoundError:function(){return v},SP:function(){return p},ST:function(){return h},WEB_VITALS:function(){return r},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 f},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return j}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function s(x){let S=!1,P;return function(){for(var w=arguments.length,N=new Array(w),T=0;T<w;T++)N[T]=arguments[T];return S||(S=!0,P=x(...N)),P}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=x=>o.test(x);function i(){const{protocol:x,hostname:S,port:P}=window.location;return x+"//"+S+(P?":"+P:"")}function c(){const{href:x}=window.location,S=i();return x.substring(S.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 S=x.split("?");return S[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(S[1]?"?"+S.slice(1).join("?"):"")}async function f(x,S){if(process.env.NODE_ENV!=="production"){var P;if((P=x.prototype)!=null&&P.getInitialProps){const T='"'+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(T)}}const w=S.res||S.ctx&&S.ctx.res;if(!x.getInitialProps)return S.ctx&&S.Component?{pageProps:await f(S.Component,S.ctx)}:{};const N=await x.getInitialProps(S);if(w&&u(w))return N;if(!N){const T='"'+l(x)+'.getInitialProps()" should resolve to an object. But found "'+N+'" instead.';throw new Error(T)}return process.env.NODE_ENV!=="production"&&Object.keys(N).length===0&&!S.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"),N}const p=typeof performance<"u",h=p&&["mark","measure","getEntriesByName"].every(x=>typeof performance[x]=="function");class _ extends Error{}class g extends Error{}class v extends Error{constructor(S){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+S}}class b extends Error{constructor(S,P){super(),this.message="Failed to load static file for page: "+S+" "+P}}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})}}(Ts)),Ts}var On={exports:{}},hi;function hs(){return hi||(hi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=k.removeTrailingSlash,s=k.parsePath,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,r.removeTrailingSlash)(i)+c+l:i.endsWith("/")?""+i+c+l:i+"/"+c+l:""+(0,r.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 As={},Ln={exports:{}},_i;function $_(){return _i||(_i=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=k.pathHasPrefix,s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a){return(0,r.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)}(Ln,Ln.exports)),Ln.exports}var gi;function Au(){return gi||(gi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return s}});const t=ps(),r=$_();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,r.hasBasePath)(i.pathname)}catch{return!1}}}(As)),As}var ks={},Os={},yi;function V_(){return yi||(yi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return r}});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(f,p){if(f!==null&&f!==p)throw new Error("You cannot use different slug names for the same dynamic path ('"+f+"' !== '"+p+"').");a.forEach(h=>{if(h===p)throw new Error('You cannot have the same slug name "'+p+'" repeat within a single dynamic path');if(h.replace(/\W/g,"")===c.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+h+'" 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 r(s){const o=new t;return s.forEach(a=>o.insert(a)),o.smoosh()}}(Os)),Os}var Ls={},Ms={},Ds={},Fs={},vi;function W_(){return vi||(vi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ensureLeadingSlash",{enumerable:!0,get:function(){return t}});function t(r){return r.startsWith("/")?r:"/"+r}}(Fs)),Fs}var zs={},xi;function ku(){return xi||(xi=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 r}});function r(a){return a[0]==="("&&a.endsWith(")")}const s="__PAGE__",o="__DEFAULT__"}(zs)),zs}var bi;function G_(){return bi||(bi=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 r=W_(),s=ku();function o(i){return(0,r.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")}}(Ds)),Ds}var ji;function Ou(){return ji||(ji=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 r=G_(),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(f=>m.startsWith(f)),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,r.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}}}(Ms)),Ms}var Ci;function K_(){return Ci||(Ci=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return s}});const t=Ou(),r=/\/\[[^/]+?\](?=\/|$)/;function s(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(Ls)),Ls}var Si;function Q_(){return Si||(Si=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 r.getSortedRoutes},isDynamicRoute:function(){return s.isDynamicRoute}});const r=V_(),s=K_()}(ks)),ks}var Bs={},Us={},Pi;function X_(){return Pi||(Pi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=ps();function r(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 f=a[m],p=c[f.pos];p!==void 0&&(u[m]=~p.indexOf("/")?p.split("/").map(h=>l(h)):f.repeat?[l(p)]:l(p))}),u}}}(Us)),Us}var qs={},Hs={},wi;function Y_(){return wi||(wi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return s}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function s(o){return t.test(o)?o.replace(r,"\\$&"):o}}(Hs)),Hs}var Ei;function Z_(){return Ei||(Ei=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(_,g){for(var v in g)Object.defineProperty(_,v,{enumerable:!0,get:g[v]})}t(e,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return p},getRouteRegex:function(){return l},parseParameter:function(){return i}});const r=k.constants,s=Ou(),o=Y_(),a=k.removeTrailingSlash;function i(_){const g=_.startsWith("[")&&_.endsWith("]");g&&(_=_.slice(1,-1));const v=_.startsWith("...");return v&&(_=_.slice(3)),{key:_,repeat:v,optional:g}}function c(_){const g=(0,a.removeTrailingSlash)(_).slice(1).split("/"),v={};let b=1;return{parameterizedRoute:g.map(C=>{const j=s.INTERCEPTION_ROUTE_MARKERS.find(S=>C.startsWith(S)),x=C.match(/\[((?:\[.*\])|.+)\]/);if(j&&x){const{key:S,optional:P,repeat:w}=i(x[1]);return v[S]={pos:b++,repeat:w,optional:P},"/"+(0,o.escapeStringRegexp)(j)+"([^/]+?)"}else if(x){const{key:S,repeat:P,optional:w}=i(x[1]);return v[S]={pos:b++,repeat:P,optional:w},P?w?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(C)}).join(""),groups:v}}function l(_){const{parameterizedRoute:g,groups:v}=c(_);return{re:new RegExp("^"+g+"(?:/)?$"),groups:v}}function u(){let _=0;return()=>{let g="",v=++_;for(;v>0;)g+=String.fromCharCode(97+(v-1)%26),v=Math.floor((v-1)/26);return g}}function m(_){let{interceptionMarker:g,getSafeRouteKey:v,segment:b,routeKeys:C,keyPrefix:j}=_;const{key:x,optional:S,repeat:P}=i(b);let w=x.replace(/\W/g,"");j&&(w=""+j+w);let N=!1;(w.length===0||w.length>30)&&(N=!0),isNaN(parseInt(w.slice(0,1)))||(N=!0),N&&(w=v()),j?C[w]=""+j+x:C[w]=x;const T=g?(0,o.escapeStringRegexp)(g):"";return P?S?"(?:/"+T+"(?<"+w+">.+?))?":"/"+T+"(?<"+w+">.+?)":"/"+T+"(?<"+w+">[^/]+?)"}function f(_,g){const v=(0,a.removeTrailingSlash)(_).slice(1).split("/"),b=u(),C={};return{namedParameterizedRoute:v.map(j=>{const x=s.INTERCEPTION_ROUTE_MARKERS.some(P=>j.startsWith(P)),S=j.match(/\[((?:\[.*\])|.+)\]/);if(x&&S){const[P]=j.split(S[0]);return m({getSafeRouteKey:b,interceptionMarker:P,segment:S[1],routeKeys:C,keyPrefix:g?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return S?m({getSafeRouteKey:b,segment:S[1],routeKeys:C,keyPrefix:g?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(j)}).join(""),routeKeys:C}}function p(_,g){const v=f(_,g);return{...l(_),namedRegex:"^"+v.namedParameterizedRoute+"(?:/)?$",routeKeys:v.routeKeys}}function h(_,g){const{parameterizedRoute:v}=c(_),{catchAll:b=!0}=g;if(v==="/")return{namedRegex:"^/"+(b?".*":"")+"$"};const{namedParameterizedRoute:C}=f(_,!1);let j=b?"(?:(/.*)?)":"";return{namedRegex:"^"+C+j+"$"}}}(qs)),qs}var Ni;function J_(){return Ni||(Ni=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return s}});const t=X_(),r=Z_();function s(o,a,i){let c="";const l=(0,r.getRouteRegex)(o),u=l.groups,m=(a!==o?(0,t.getRouteMatcher)(l)(a):"")||i;c=o;const f=Object.keys(u);return f.every(p=>{let h=m[p]||"";const{repeat:_,optional:g}=u[p];let v="["+(_?"...":"")+p+"]";return g&&(v=(h?"":"/")+"["+v+"]"),_&&!Array.isArray(h)&&(h=[h]),(g||p in m)&&(c=c.replace(v,_?h.map(b=>encodeURIComponent(b)).join("/"):encodeURIComponent(h))||"/")})||(c=""),{params:f,result:c}}}(Bs)),Bs}var Ii;function eg(){return Ii||(Ii=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return m}});const r=Iu(),s=Tu(),o=H_(),a=ps(),i=hs(),c=Au(),l=Q_(),u=J_();function m(f,p,h){let _,g=typeof p=="string"?p:(0,s.formatWithValidation)(p);const v=g.match(/^[a-zA-Z]{1,}:\/\//),b=v?g.slice(v[0].length):g;if((b.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+g+"' passed to next/router in page: '"+f.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const j=(0,a.normalizeRepeatedSlashes)(b);g=(v?v[0]:"")+j}if(!(0,c.isLocalURL)(g))return h?[g]:g;try{_=new URL(g.startsWith("#")?f.asPath:f.pathname,"http://n")}catch{_=new URL("/","http://n")}try{const j=new URL(g,_);j.pathname=(0,i.normalizePathTrailingSlash)(j.pathname);let x="";if((0,l.isDynamicRoute)(j.pathname)&&j.searchParams&&h){const P=(0,r.searchParamsToUrlQuery)(j.searchParams),{result:w,params:N}=(0,u.interpolateAs)(j.pathname,j.pathname,P);w&&(x=(0,s.formatWithValidation)({pathname:w,hash:j.hash,query:(0,o.omit)(P,N)}))}const S=j.origin===_.origin?j.href.slice(j.origin.length):j.href;return h?[S,x||S]:S}catch{return h?[g]:g}}(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)}(kn,kn.exports)),kn.exports}var Mn={exports:{}},Ri;function tg(){return Ri||(Ri=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return s}});const r=hs(),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,r.normalizePathTrailingSlash)(k.addLocale.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)}(Mn,Mn.exports)),Mn.exports}var $s={},Ti;function Lu(){return Ti||(Ti=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});const s=Ge._(y).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="RouterContext")}($s)),$s}var Vs={},Ai;function Mu(){return Ai||(Ai=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(u,m){for(var f in m)Object.defineProperty(u,f,{enumerable:!0,get:m[f]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return c}});const s=Ge._(y),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)}(Vs)),Vs}var Dn={exports:{}},Fn={exports:{}},ki;function Du(){return ki||(ki=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}r(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)}(Fn,Fn.exports)),Fn.exports}var Oi;function rg(){return Oi||(Oi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return u}});const r=y,s=Du(),o=typeof IntersectionObserver=="function",a=new Map,i=[];function c(m){const f={root:m.root||null,margin:m.rootMargin||""},p=i.find(v=>v.root===f.root&&v.margin===f.margin);let h;if(p&&(h=a.get(p),h))return h;const _=new Map,g=new IntersectionObserver(v=>{v.forEach(b=>{const C=_.get(b.target),j=b.isIntersecting||b.intersectionRatio>0;C&&j&&C(j)})},m);return h={id:f,observer:g,elements:_},i.push(f),a.set(f,h),h}function l(m,f,p){const{id:h,observer:_,elements:g}=c(p);return g.set(m,f),_.observe(m),function(){if(g.delete(m),_.unobserve(m),g.size===0){_.disconnect(),a.delete(h);const b=i.findIndex(C=>C.root===h.root&&C.margin===h.margin);b>-1&&i.splice(b,1)}}}function u(m){let{rootRef:f,rootMargin:p,disabled:h}=m;const _=h||!o,[g,v]=(0,r.useState)(!1),b=(0,r.useRef)(null),C=(0,r.useCallback)(x=>{b.current=x},[]);(0,r.useEffect)(()=>{if(o){if(_||g)return;const x=b.current;if(x&&x.tagName)return l(x,P=>P&&v(P),{root:f==null?void 0:f.current,rootMargin:p})}else if(!g){const x=(0,s.requestIdleCallback)(()=>v(!0));return()=>(0,s.cancelIdleCallback)(x)}},[_,p,f,g,b.current]);const j=(0,r.useCallback)(()=>{v(!1)},[]);return[C,g,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)}(Dn,Dn.exports)),Dn.exports}var zn={exports:{}},Bn={exports:{}},Li;function ng(){return Li||(Li=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(s,o)=>process.env.__NEXT_I18N_SUPPORT?k.normalizeLocalePath.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)}(Bn,Bn.exports)),Bn.exports}var Un={exports:{}},Mi;function sg(){return Mi||(Mi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];if(process.env.__NEXT_I18N_SUPPORT)return k.detectDomainLocale.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)}(Un,Un.exports)),Un.exports}var Di;function og(){return Di||(Di=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=hs(),s=process.env.__NEXT_ROUTER_BASEPATH||"";function o(a,i,c,l){if(process.env.__NEXT_I18N_SUPPORT){const u=ng().normalizeLocalePath,m=sg().detectDomainLocale,f=i||u(a,c).detectedLocale,p=m(l,void 0,f);if(p){const h="http"+(p.http?"":"s")+"://",_=f===p.defaultLocale?"":"/"+f;return""+h+p.domain+(0,r.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)}(zn,zn.exports)),zn.exports}var qn={exports:{}},Fi;function ag(){return Fi||(Fi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});const r=k.addPathPrefix,s=hs(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function a(i,c){return(0,s.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!c?i:(0,r.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)}(qn,qn.exports)),qn.exports}var Hn={exports:{}},zi;function ig(){return zi||(zi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,_){for(var g in _)Object.defineProperty(h,g,{enumerable:!0,get:_[g]})}r(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 f},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(h){h.AUTO="auto",h.FULL="full",h.TEMPORARY="temporary"})(m||(m={}));var f;(function(h){h.fresh="fresh",h.reusable="reusable",h.expired="expired",h.stale="stale"})(f||(f={}));function p(h){return h&&(typeof h=="object"||typeof h=="function")&&typeof h.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 P}});const r=Ge,s=n,o=r._(y),a=eg(),i=Au(),c=Tu(),l=ps(),u=tg(),m=Lu(),f=Mu(),p=rg(),h=og(),_=ag(),g=ig(),v=new Set;function b(w,N,T,I,O,M){if(typeof window>"u"||!M&&!(0,i.isLocalURL)(N))return;if(!I.bypassPrefetchedCheck){const F=typeof I.locale<"u"?I.locale:"locale"in w?w.locale:void 0,B=N+"%"+T+"%"+F;if(v.has(B))return;v.add(B)}(async()=>M?w.prefetch(N,O):w.prefetch(N,T,I))().catch(F=>{if(process.env.NODE_ENV!=="production")throw F})}function C(w){const T=w.currentTarget.getAttribute("target");return T&&T!=="_self"||w.metaKey||w.ctrlKey||w.shiftKey||w.altKey||w.nativeEvent&&w.nativeEvent.which===2}function j(w,N,T,I,O,M,H,F,B){const{nodeName:$}=w.currentTarget;if($.toUpperCase()==="A"&&(C(w)||!B&&!(0,i.isLocalURL)(T)))return;w.preventDefault();const Z=()=>{const V=H??!0;"beforePopState"in N?N[O?"replace":"push"](T,I,{shallow:M,locale:F,scroll:V}):N[O?"replace":"push"](I||T,{scroll:V})};B?o.default.startTransition(Z):Z()}function x(w){return typeof w=="string"?w:(0,c.formatUrl)(w)}const P=o.default.forwardRef(function(N,T){let I;const{href:O,as:M,children:H,prefetch:F=null,passHref:B,replace:$,shallow:te,scroll:Z,locale:V,onClick:ee,onMouseEnter:ie,onTouchStart:_e,legacyBehavior:ce=!1,...pe}=N;I=H,ce&&(typeof I=="string"||typeof I=="number")&&(I=(0,s.jsx)("a",{children:I}));const z=o.default.useContext(m.RouterContext),ne=o.default.useContext(f.AppRouterContext),R=z??ne,Q=!z,ue=F!==!1,be=F===null?g.PrefetchKind.AUTO:g.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let U=function(q){return new Error("Failed prop type: The prop `"+q.key+"` expects a "+q.expected+" in `<Link>`, but got `"+q.actual+"` instead."+(typeof window<"u"?`
|
|
2
|
+
Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(q=>{if(q==="href"&&(N[q]==null||typeof N[q]!="string"&&typeof N[q]!="object"))throw U({key:q,expected:"`string` or `object`",actual:N[q]===null?"null":typeof N[q]})}),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(q=>{const oe=typeof N[q];if(q==="as"){if(N[q]&&oe!=="string"&&oe!=="object")throw U({key:q,expected:"`string` or `object`",actual:oe})}else if(q==="locale"){if(N[q]&&oe!=="string")throw U({key:q,expected:"`string`",actual:oe})}else if(q==="onClick"||q==="onMouseEnter"||q==="onTouchStart"){if(N[q]&&oe!=="function")throw U({key:q,expected:"`function`",actual:oe})}else if((q==="replace"||q==="scroll"||q==="shallow"||q==="passHref"||q==="prefetch"||q==="legacyBehavior")&&N[q]!=null&&oe!=="boolean")throw U({key:q,expected:"`boolean`",actual:oe})});const D=o.default.useRef(!1);N.prefetch&&!D.current&&!Q&&(D.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"&&Q&&!M){let U;if(typeof O=="string"?U=O:typeof O=="object"&&typeof O.pathname=="string"&&(U=O.pathname),U&&U.split("/").some(Se=>Se.startsWith("[")&&Se.endsWith("]")))throw new Error("Dynamic href `"+U+"` 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:A,as:L}=o.default.useMemo(()=>{if(!z){const Se=x(O);return{href:Se,as:M?x(M):Se}}const[U,ye]=(0,a.resolveHref)(z,O,!0);return{href:U,as:M?(0,a.resolveHref)(z,M):ye||U}},[z,O,M]),qe=o.default.useRef(A),K=o.default.useRef(L);let Y;if(ce)if(process.env.NODE_ENV==="development"){ee&&console.warn('"onClick" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),ie&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+O+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{Y=o.default.Children.only(I)}catch{throw I?new Error("Multiple children were passed to <Link> with `href` of `"+O+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
|
|
3
|
+
Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+O+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else Y=o.default.Children.only(I);else if(process.env.NODE_ENV==="development"&&(I==null?void 0:I.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 Ne=ce?Y&&typeof Y=="object"&&Y.ref:T,[ze,Ie,Ce]=(0,p.useIntersection)({rootMargin:"200px"}),He=o.default.useCallback(U=>{(K.current!==L||qe.current!==A)&&(Ce(),K.current=L,qe.current=A),ze(U),Ne&&(typeof Ne=="function"?Ne(U):typeof Ne=="object"&&(Ne.current=U))},[L,Ne,A,Ce,ze]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&R&&(!Ie||!ue||b(R,A,L,{locale:V},{kind:be},Q))},[L,A,Ie,V,ue,z==null?void 0:z.locale,R,Q,be]);const Re={ref:He,onClick(U){if(process.env.NODE_ENV!=="production"&&!U)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!ce&&typeof ee=="function"&&ee(U),ce&&Y.props&&typeof Y.props.onClick=="function"&&Y.props.onClick(U),R&&(U.defaultPrevented||j(U,R,A,L,$,te,Z,V,Q))},onMouseEnter(U){!ce&&typeof ie=="function"&&ie(U),ce&&Y.props&&typeof Y.props.onMouseEnter=="function"&&Y.props.onMouseEnter(U),R&&((!ue||process.env.NODE_ENV==="development")&&Q||b(R,A,L,{locale:V,priority:!0,bypassPrefetchedCheck:!0},{kind:be},Q))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(ye){!ce&&typeof _e=="function"&&_e(ye),ce&&Y.props&&typeof Y.props.onTouchStart=="function"&&Y.props.onTouchStart(ye),R&&(!ue&&Q||b(R,A,L,{locale:V,priority:!0,bypassPrefetchedCheck:!0},{kind:be},Q))}};if((0,l.isAbsoluteUrl)(L))Re.href=L;else if(!ce||B||Y.type==="a"&&!("href"in Y.props)){const U=typeof V<"u"?V:z==null?void 0:z.locale,ye=(z==null?void 0:z.isLocaleDomain)&&(0,h.getDomainLocale)(L,U,z==null?void 0:z.locales,z==null?void 0:z.domainLocales);Re.href=ye||(0,_.addBasePath)((0,u.addLocale)(L,U,z==null?void 0:z.defaultLocale))}return ce?o.default.cloneElement(Y,Re):(0,s.jsx)("a",{...pe,...Re,children:I})});(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Oo,Oo.exports);var cg=Oo.exports,lg=cg;const Je=k.getDefaultExportFromCjs(lg),ug="_link_w24h0_1",dg="_wrapper_w24h0_98",fg="_text_w24h0_106",Ws={link:ug,wrapper:dg,text:fg},Ke=({children:e,adornments:t,className:r,disableUnderline:s,href:o,mode:a,size:i,title:c,onClick:l,disablePadding:u,...m})=>{const f=d.helpers.ValidateProp({fieldTypes:Ir.SizesSmallExtended,property:i,fallback:"medium"}),p=d.helpers.ValidateProp({fieldTypes:Ir.Mode,property:a,fallback:"default"});return n.jsx(Je,{...m,className:d.helpers.classNameConcat(Ws.link,r),href:o&&o.length>0?o:"#","data-size":f,"data-variant":p,title:c||"NextLink","data-disable-underline":s??!1,"data-disable-padding":u??!0,children:n.jsxs("div",{className:Ws.wrapper,onClick:l,children:[t==null?void 0:t.start,n.jsx("p",{className:Ws.text,"data-size":f,children:e}),t==null?void 0:t.end]})})},mg=({ICONS:e})=>{const{resetFeedback:t}=jr();return n.jsxs("div",{className:rn["wishlist--snack--actions"],children:[n.jsx(Ke,{href:"/favoritos",children:"Ver Favoritos"}),n.jsx(d.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:n.jsx(d.Icon,{name:e.close})}})]})},wa=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=pa(),{resetFeedback:o}=jr(),a=y.useRef(null);return y.useEffect(()=>{a.current&&clearTimeout(a.current),s&&(a.current=setTimeout(()=>{o()},5e3))},[s,o]),(s==null?void 0:s.active)&&n.jsx(Rr,{Z_INDEX_WAR:r,className:rn["wishlist--snack"],"data-action":s.action,title:s.action==="add"?e.messages.add:e.messages.remove,supportChildren:n.jsx(mg,{ICONS:t}),size:"medium"})};wa.displayName="WishList.Feedback";const Ea={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Fu=({className:e,children:t,columns:r=1,isMobile:s=!1,gap:o=8,position_grid:a,totalColumns:i=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,...l})=>{const u=y.useMemo(()=>r%i===0?"initial":s||r<2?c:c.split("/").reverse().join("/"),[r,i,s]);return n.jsx("div",{...l,className:d.helpers.classNameConcat(Ea["product-list--banner"],e),style:{aspectRatio:u,maxWidth:`${r/i*100}%`,order:a,padding:o/2},children:t})};Fu.displayName="ProductList.Banner";class pg{constructor(){Jt(this,"cache",new Map);Jt(this,"pendingRequests",new Map);Jt(this,"rafId",null)}request(t,r,s){const o=this.getCacheKey(t,s==null?void 0:s.filterTexture);if(this.cache.has(o)){r(this.cache.get(o));return}const a=this.pendingRequests.get(o);a?a.callbacks.push(r):this.pendingRequests.set(o,{productId:t,callbacks:[r],filterTexture:s.filterTexture}),this.rafId===null&&(this.rafId=requestAnimationFrame(()=>this.executeGroup()))}getCacheKey(t,r){return r!=null&&r.length?`${t}|${r.sort().join(",")}`:t}async executeGroup(){this.rafId=null;const t=this.pendingRequests;if(t.size===0)return;const r=[],s=[];if(t.forEach((a,i)=>{this.cache.has(i)?s.push([i,a]):r.push(a)}),s.forEach(([a,i])=>{const c=this.cache.get(a);c&&i.callbacks.forEach(l=>l(c)),t.delete(a)}),r.length===0)return;const o=new Map;r.forEach(a=>{var l;const i=((l=a.filterTexture)==null?void 0:l.sort().join(","))||"no-filter",c=o.get(i)||[];c.push(a),o.set(i,c)}),await Promise.all(Array.from(o.values()).map(a=>this.executeGroupRequest(a)))}async executeGroupRequest(t){const r=t.map(o=>o.productId),s=t[0].filterTexture;try{const o=await k.fetchProxy("/_v/proxy/catalog/product/similars",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:r})});if(!o.ok)throw new Error("Erro ao buscar similares.");const a=await o.json();t.forEach(i=>{const c=a[i.productId]||[],l=s&&c.length?k.formattedSimilars(c,s):c,u=this.getCacheKey(i.productId,s);this.cache.set(u,l),i.callbacks.forEach(m=>m(l)),this.pendingRequests.delete(u)})}catch(o){console.error("Erro ao buscar similares:",o),t.forEach(a=>{const i=this.getCacheKey(a.productId,s);a.callbacks.forEach(c=>c([])),this.pendingRequests.delete(i)})}}clearCache(){this.cache.clear()}}const Bi=new pg;function Na(e,t){const[r,s]=y.useState([]),o=y.useRef(!1);y.useEffect(()=>{o.current=!1},[e]);const a=y.useCallback(()=>{!e||o.current||(o.current=!0,Bi.request(e,s,t))},[e,t]),i=y.useCallback(()=>Bi.clearCache(),[]);return{items:r,loadSimilars:a,clearCache:i}}const zu=({isKit:e,parent:t,productId:r,setNotify:s,CONSTANTS:o})=>{const{router:a}=me(),{items:i,loadSimilars:c}=Na(r,{filterTexture:o.TEXTURE_IMAGE}),l=y.useRef(!1),u=y.useRef(null),m=h=>a.push(h??""),f=y.useCallback(h=>{!r||!h||c()},[r,c]),p=y.useCallback((h,_)=>{if(!h.isIntersecting){o.PLP_INFINITE_SCROLL&&u.current&&(clearTimeout(u.current),u.current=null);return}if(h.intersectionRatio>=_.threshold&&!l.current){if(o.PLP_INFINITE_SCROLL){u.current=setTimeout(()=>{f(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}f(!0)}},[f]);return y.useEffect(()=>{if(e||!t.current)return;const h={root:null,threshold:.1},_=new IntersectionObserver(([g])=>{p(g,h)},h);return _.observe(t.current),()=>{u.current&&clearTimeout(u.current),_.disconnect()}},[p,t,e]),n.jsx(ve.Actions,{data:i,callback:m,isKit:e,children:!e&&n.jsx(ve.SizeSelector,{setNotify:s,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};zu.displayName="ProductList.Card.Actions";const Bu=({className:e,children:t,gap:r=32,item:s,isMobile:o,order:a,tag:i,hasMaxWidth:c=!0,index:l,setSkuSelected:u,showVideo:m,CONSTANTS:f,...p})=>{const h=y.useRef(null),{availability:{status:_}}=s,g=y.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 n.jsxs("div",{...p,className:d.helpers.classNameConcat(Ea["product-list--card"],e),"data-mobile":o,"data-order":a,ref:h,style:{...c&&{maxWidth:o?"50%":"25%"},order:a,padding:r/2},children:[n.jsxs(ve.Root,{item:s,isMobile:o,index:l,size:o?"small":"medium",order:a,outStock:!_,CONSTANTS:f,children:[n.jsx(ve.Header,{product:s,tag:i==null?void 0:i.commercial}),n.jsx(ve.Media,{showVideo:m,hasPriority:!0}),n.jsxs(ve.Wrapper,{type:"body",children:[n.jsx(ve.Title,{tag:i==null?void 0:i.institucional}),n.jsx(zu,{productId:s.isVariantOf.productGroupID,parent:h,setNotify:g,isKit:v,CONSTANTS:f}),!v&&n.jsx(ve.OutStock,{callback:g})]}),n.jsx(ve.Wrapper,{type:"footer",children:_&&n.jsx(ve.BuyButton,{isKit:v})})]}),t]})};Bu.displayName="ProductList.Card";const Uu=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(Ea["product-list"],t),children:e});Uu.displayName="ProductList.Grid";const rt={Banner:Fu,Card:Bu,Root:Uu,helpers:m_},hg="_pdc_av7d8_1",We={"pdc--empty":"_pdc--empty_av7d8_1","pdc--grid":"_pdc--grid_av7d8_17","pdc--grid--content":"_pdc--grid--content_av7d8_26","pdc--infinite":"_pdc--infinite_av7d8_41","pdc--infinite--card--anchor-pdp":"_pdc--infinite--card--anchor-pdp_av7d8_44","pdc--infinite--loader":"_pdc--infinite--loader_av7d8_44","pdc--infinite--card--anchor-pdp--page":"_pdc--infinite--card--anchor-pdp--page_av7d8_52","pdc--infinite--loader--page":"_pdc--infinite--loader--page_av7d8_52","pdc--infinite--card--disabled":"_pdc--infinite--card--disabled_av7d8_62","pdc--infinite--next-page":"_pdc--infinite--next-page_av7d8_113","pdc--infinite--next-page--card":"_pdc--infinite--next-page--card_av7d8_123","pdc--infinite--next-page--spinner":"_pdc--infinite--next-page--spinner_av7d8_133","pdc--pagination":"_pdc--pagination_av7d8_140",pdc:hg},Ia=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:s}=me(),{isMobile:o}=se(),a=()=>{s.push(r==null?void 0:r.link)};return n.jsxs("div",{className:d.helpers.classNameConcat(We["pdc--empty"],e),children:[n.jsxs(d.TextStructure.DivWrapper,{className:We["pdc--empty-wrapper"],children:[n.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),n.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>a(),variant:"tertiary",children:n.jsx("b",{children:r.text})})]})};Ia.displayName="PDC.Empty";const Ra=e=>n.jsx("div",{...e,className:We["pdc--infinite--next-page"],children:n.jsx(d.Spinner,{className:We["pdc--infinite--next-page--spinner"]})});Ra.displayName="PDC.Spinner";function qu({CONSTANTS:e}){const{sendDataLayerEvent:t}=le(),{isMobile:r}=se(),{getAvailableProductTag:s}=Ot(),[o,a]=y.useState([]),[i,c]=y.useState(!0),l=Wr(),u=l.join(","),m=r?16:32;return y.useEffect(()=>{const f=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){f();return}if(l.length===0&&o.length===0){c(!1);return}a([]),c(!1)},[u]),n.jsx("section",{className:rn["wishlist-grid"],children:n.jsxs("div",{className:rn["wishlist-grid--container"],children:[i&&n.jsx(Ra,{}),!l.length&&!(o!=null&&o.length)&&!i&&n.jsx(Ia,{className:rn["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),n.jsx(rt.Root,{children:Array.isArray(o)&&o.map((f,p)=>{const h=f.node.cluster.highlights||[],_=s(h);return n.jsx(rt.Card,{gap:m,isMobile:r??!1,item:f.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}},f.node.sku)})})]})})}qu.displayName="Wishlist.Grid";const _g=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],Hu=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const s=Gr(),o=Wr(),a=pa(),{updateList:i}=jr();return y.useEffect(()=>{var l,u;a.active&&_t.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(f=>{console.error("Error updating wishlist:",f)})};a.active&&((l=s.user)!=null&&l.id)&&o.length!==((u=s.wishlist)==null?void 0:u.length)&&c()},[a,s,o]),y.useEffect(()=>{var u;const c=async()=>{const m=await _t.get("fs::wishlist");m&&(m==null?void 0:m.length)!==o.length&&i(m)},l=async()=>{var h;const m=await _t.get("fs::wishlist")??[],f=s.wishlist?typeof s.wishlist[0]=="object"?_g(s.wishlist):s.wishlist:[],p=[...new Set([...m,...f])];i(p),_t.set("fs::wishlist",p),f.length!==p.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:p,docId:(h=s.user)==null?void 0:h.id})}).catch(_=>{console.error("Error updating wishlist:",_)})};if((u=s.user)!=null&&u.id){l();return}c()},[s,i]),n.jsx(wa,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};Hu.displayName="Wishlist.Init";const $u=({product:e,priceInfo:t,size:r="medium",style:s,ICONS:o})=>{const{sendDataLayerEvent:a,currentLocalRef:i}=le(),c=Wr(),{toggleProduct:l}=jr(),{isVariantOf:{productGroupID:u}}=e;return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{size:r,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"})};$u.displayName="WishList.Toggle";const Vu={Feedback:wa,Toggle:$u,Grid:qu,Init:Hu},Wu=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:s}=dt(),{tags:o}=Ot(),a=e.offers.offers[0],i=k.getDiscountPercent(a.listPrice,a.price),c=o==null?void 0:o.flagDiscount;return n.jsxs(ve.Wrapper,{type:"header",style:{zIndex:s.Z_INDEX_WAR.product_card_header},children:[i>0&&!t&&(c==null?void 0:c.enableTag)&&n.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?n.jsx(d.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?n.jsx(d.Icon,{name:t.icon,size:"small",style:{color:t.iconColor}}):null},size:r,variant:"quaternary",style:{background:t.tagColor,color:t.textColor},children:t.value}):null,s.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&n.jsx(Vu.Toggle,{product:e,priceInfo:{price:a.price,listPrice:a.listPrice},variant:"card",ICONS:s.ICONS})]})};Wu.displayName="ProductCard.Actions.Header";const Gu=({className:e,children:t,hasPriority:r=!1,showVideo:s=!1,...o})=>{const{element:a,index:i,item:{image:c,slug:l,video:u},sendSelectItemEvent:m,order:f,CONSTANTS:p}=dt(),h=k.getFirstImages({images:c,label:{first:p.MAIN_IMAGE,second:p.SECOND_IMAGE}});return n.jsxs("div",{...o,className:d.helpers.classNameConcat(Ue["product-card--image"],e),ref:a,style:{aspectRatio:p.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[n.jsx(Je,{href:`/${l}/p`,onClick:m,onMouseUp:_=>{_.button===1&&m(),p.PLP_INFINITE_SCROLL&&sessionStorage.setItem(p.PLP_GRID_SCROLL_BACK.order,String(f))},children:n.jsx("div",{className:Ue["product-card--image--container"],children:Array.isArray(h)&&h.map(({url:_,alternateName:g},v)=>y.createElement(Oe.Image,{...p.PRODUCT_IMAGE_DIMENSIONS.product_card,style:p.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:g??"product image",key:v,...r&&{priority:v===0&&i<4},objectFit:"cover",src:_}))})}),p.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&s&&u&&n.jsx(ve.Video,{url:u,poster:h[0].url}),t]})};Gu.displayName="ProductCard.Media.Media";const Ku=({className:e,callback:t,children:r,...s})=>{const{isMobile:o,item:a,CONSTANTS:{PRODUCT_CARD_TEXTS:i}}=dt(),{availability:{status:c}}=a;return c?null:n.jsxs("div",{...s,className:d.helpers.classNameConcat(Ue["product-card--outstock"],e),children:[n.jsx(d.Tag,{size:"small",variant:"secondary",title:i.disabled,children:i.disabled}),n.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})]})};Ku.displayName="ProductCard.OutStock";const Qu=({children:e,className:t="",index:r,isMobile:s=!1,item:o,size:a,order:i,outStock:c,shelfTitle:l,CONSTANTS:u,...m})=>n.jsx(z_,{item:o,isMobile:s,outStock:c,order:i,size:a,index:r,shelfTitle:l,CONSTANTS:u,children:n.jsx("div",{...m,className:d.helpers.classNameConcat(Ue["product-card--wrapper"],t),"data-size":a,children:e})});Qu.displayName="ProductCard.Root";const Xu=({disabled:e,label:t,size:r,value:s,onClick:o,...a})=>n.jsxs(d.ToggleSize.Wrapper,{...a,disabled:!1,outOfStock:e,size:r,onClick:o,children:[n.jsx(d.ToggleSize.DisabledAdornment,{}),n.jsx(d.ToggleSize.Text,{children:t})]});Xu.displayName="ProductCard.SizeSelector.Item";const Yu=({active:e=!1,callback:t,selectedSku:r=null,item:s,setNotify:o})=>{const{item:a,isMobile:i,setSelectedSku:c,eventDataRef:l}=dt();s.productId=a.id;const u=k.disableSKU(s),m=k.getSKUName(s,"tamanho");!u&&!l.current.availableSkus.includes(m)&&l.current.availableSkus.push(m);const f=y.useCallback(h=>{const _=r===h?null:h;typeof c=="function"&&c(_),typeof t=="function"&&t(_)},[t,c,r]),p=y.useCallback(()=>{if(u&&typeof o=="function"){o(a,s);return}f(s)},[s,o,f,u,a]);return n.jsx(Xu,{active:e,disabled:u,label:m,onClick:()=>p(),size:i?"x-small":"small",value:s})};Yu.displayName="ProductCard.SizeSelector.SkuItem";const Zu=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((s,o)=>{const a=t(s).toUpperCase(),i=t(o).toUpperCase(),c=r.indexOf(a)-r.indexOf(i);return c!==0?c:a.localeCompare(i,"pt-BR")}):[],Ju=({callback:e,className:t="",children:r,setNotify:s,PLP_SIZE_ORDER:o,...a})=>{const{isMobile:i,item:{isVariantOf:{hasVariant:c}},selectedSku:l}=dt(),u=y.useMemo(()=>Array.isArray(c)?Zu({items:c,getLabel:m=>k.getSKUName(m,"tamanho"),PLP_SIZE_ORDER:o}):[],[c]);return n.jsxs("div",{...a,className:d.helpers.classNameConcat(Ue["product-card--selectors--size"],t),"data-mobile":i,children:[n.jsx("div",{className:Ue["product-card--selectors--size--skus"],children:u.map((m,f)=>n.jsx(Yu,{active:l===m,callback:e,item:m,selectedSku:l,setNotify:s},`size--${f}--${m.sku}`))}),n.jsx("div",{className:Ue["product-card--selectors--size--button"],children:r})]})};Ju.displayName="ProductCard.SizeSelector";const Lo=({alt:e="",callback:t,more:r,total:s=4,src:o,url:a,...i})=>n.jsxs(d.ToggleStyle.Wrapper,{...i,onClick:()=>{typeof t=="function"&&t(a)},children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsxs(d.ToggleStyle.Texture,{children:[o&&n.jsx(Oe.Image,{alt:e??o,src:o,height:34,width:34}),r&&n.jsx(d.TextStructure.DivWrapper,{className:Ue["product-card--selectors--style--more"],children:n.jsxs("p",{children:["+ ",s]})})]})]}),gg=({children:e,callback:t,data:r,total:s=4,size:o,...a})=>{const{index:i}=dt(),{triggerSelectItemEventRef:c}=le();return n.jsxs("div",{...a,children:[e,Array.isArray(r)&&r.slice(0,s).map((l,u)=>n.jsx(Lo,{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(r)&&(r==null?void 0:r.length)>s&&n.jsx(Lo,{size:o,total:r.length-s,more:!0})]})},ed=({callback:e,className:t,data:r,images:s=[],findTexture:o,...a})=>{const{CONSTANTS:i}=dt(),c=o||i.TEXTURE_IMAGE,l=s==null?void 0:s.find(u=>c.includes(u.alternateName));return n.jsx(gg,{...a,callback:e,className:d.helpers.classNameConcat(Ue["product-card--selectors--style"],t),data:r,size:"x-small",children:l&&n.jsx(Lo,{active:!0,size:"x-small",src:l.url})})};ed.displayName="ProductCard.StyleSelector";const td=({className:e,hasDecimal:t,...r})=>{const{isMobile:s,item:{offers:{lowPrice:o,highPrice:a},installments:{count:i,value:c}},eventDataRef:l}=dt();l.current.priceInfo={price:o,listPrice:a};const u=k.formatPriceToCurrency(a,t),m=k.formatPriceToCurrency(o,t),f=k.formatPriceToCurrency(c??0),p=s?"horizontal":"stacked";return n.jsx("div",{...r,className:d.helpers.classNameConcat(Ue["product-card--price"],e),"data-mobile":s,children:n.jsx(d.ProductInfo.Root,{size:"small",layout:p,children:n.jsxs(d.ProductInfo.Wrapper,{size:"small",layout:p,children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:m!==u?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:u,size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:m,size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:m,size:"small"})}),i&&i>1&&c?n.jsx(d.ProductInfo.Price,{label:"installment",value:`${i}x ${f}`,size:"small"}):null]})})})};td.displayName="ProductCard.Price";const rd=({tag:e,className:t})=>{const{item:{name:r}}=dt();return n.jsxs("div",{className:d.helpers.classNameConcat(Ue["product-card--title"],t),children:[n.jsx("div",{className:Ue["product-card--title--tag"],children:e?n.jsx(d.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?n.jsx(d.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):n.jsx("div",{})}),n.jsx("div",{className:Ue["product-card--title--content"],children:r&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h3",{children:r})})})})]})};rd.displayName="ProductCard.Title";const nd=({className:e,url:t,poster:r,...s})=>{const{element:o}=dt();return y.useEffect(()=>{if(!(o!=null&&o.current))return;const a=o.current,i=a.querySelector("video");if(i){const c=new IntersectionObserver(m=>{m.forEach(f=>{k.setVideoPlay(f.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]),n.jsx("div",{...s,className:d.helpers.classNameConcat(Ue["product-card--video"],e),children:t&&n.jsx(Oe.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};nd.displayName="ProductCard.Media.Video";const sd=({children:e,className:t,type:r,...s})=>n.jsx("div",{...s,className:d.helpers.classNameConcat(Ue[`product-card--${r}`],t),children:e});sd.displayName="ProductCard.Wrapper";const ve={Actions:Eu,BuyButton:Nu,Header:Wu,Media:Gu,Root:Qu,OutStock:Ku,Price:td,SizeSelector:Ju,StyleSelector:ed,Title:rd,Video:nd,Wrapper:sd},yg="_carousel_1egdv_1",vg="_shelf__container_1egdv_14",xg="_shelf_without_carousel_1egdv_34",bg="_card_container_1egdv_57",Er={carousel:yg,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:vg,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:xg,card_container:bg},Ui=({title:e})=>n.jsx("div",{className:Er.shelf__container,children:e&&n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-body-md",k.responsive["responsive-mobile-flex"]),children:e}),n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-md",k.responsive["responsive-desktop-flex"]),children:e})]})})}),jg=({children:e,ICONS:t,itemsPerPage:r,title:s})=>{const{isMobile:o}=se(),a=r[o?"mobile":"desktop"],{initialize:i,controller:c,itemsStyles:l,pagination:u}=d.Carousel.useCarousel({itemsPerPage:a,gap:10,loop:!0,direction:"row"}),m=y.Children.toArray(e).length;return o||m>=4?n.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:Er.carousel,children:[n.jsxs("div",{className:Er["custom-controllers"],children:[s&&n.jsx(Ui,{title:s}),a<m&&n.jsxs(d.Carousel.Controller,{className:Er["controllers-arrows-bullets"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.prevPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>c==null?void 0:c.nextPage(),adornment:{start:n.jsx(d.Icon,{name:t.arrow_right})}})]}),!o&&a>2&&n.jsx(d.Carousel.Bullets,{page:u.currentPage,total:u.totalPages,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})]})]}),n.jsx(d.Carousel.Body,{children:y.Children.map(e,(p,h)=>n.jsx(d.Carousel.Item,{style:{...l,overflow:"hidden"},children:p},`${s}_${h}`))})]}):n.jsxs(n.Fragment,{children:[s&&n.jsx(Ui,{title:s}),n.jsx("div",{className:Er.shelf_without_carousel,children:e})]})},od=({className:e,item:t,isMobile:r,size:s,shelfTitle:o,...a})=>{const i=y.useRef(null),{getAvailableProductTag:c}=Ot(),{availability:{status:l}}=t,u=f=>{const p=f.filter(h=>!a.CONSTANTS.TEXTURE_IMAGE.includes(h.keywords));return r?p.splice(0,2):p},m=c(t.cluster.highlights);return n.jsx("div",{ref:i,className:Er.card_container,children:n.jsxs(ve.Root,{...a,item:{...t,image:u(t.image)},isMobile:r,size:r?"small":"medium",outStock:!l,shelfTitle:o,children:[n.jsx(ve.Header,{product:t,tag:m==null?void 0:m.commercial}),n.jsx(ve.Media,{}),n.jsxs(ve.Wrapper,{type:"body",children:[n.jsx(ve.Title,{tag:m==null?void 0:m.institucional}),n.jsx(ve.Actions,{})]}),n.jsx(ve.Wrapper,{type:"footer"})]})})};od.displayName="ProductList.Card";const ln={Shelf:jg,Card:od},ad=({CONSTANTS:e,inView:t,products:r,innerRef:s})=>{const o=y.useMemo(()=>D_(r),[r]),{isMobile:a}=se(),{addItemsToCart:i}=we(),{sendDataLayerEvent:c}=le(),{getAvailableProductTag:l}=Ot(),[u,m]=y.useState({totalPrice:0,products:{}}),f=()=>{const h=Object.values(u.products);i(h),c({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:h.map(_=>{const g=o.find(v=>v.node.id===_.productId);return g==null?void 0:g.node})},supportData:{selectedSkus:h,price:u.totalPrice}}})},p=({selectedProduct:h,productId:_})=>{const g=F_({selectedProduct:h,productId:_,prevState:u,mainSellerId:e.StoreConfig_MainSellerId});m(g)};return y.useEffect(()=>{if(!t||o.length===0)return;const h=e.BUY_PACKAGE.header.title;c({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[t]),n.jsxs("div",{className:zt.container,ref:s,children:[n.jsx("div",{className:zt["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:n.jsx(ln.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:h},_)=>{var b,C,j;const g=l(h.cluster.highlights),{availability:{status:v}}=h;return v?n.jsxs(ve.Root,{item:{...h,image:Sa.helpers.product.getFirstImages({images:h.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:a,size:"medium",index:_,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[n.jsx(ve.Header,{product:h,tag:g.commercial}),n.jsx(ve.Media,{}),n.jsxs(ve.Wrapper,{type:"body",children:[n.jsx(ve.Title,{tag:{value:(b=g.institucional)==null?void 0:b.value,enableIcon:(C=g.institucional)==null?void 0:C.enableIcon,icon:(j=g.institucional)==null?void 0:j.icon}}),n.jsx(ve.Actions,{children:n.jsx(ve.SizeSelector,{callback:x=>p({selectedProduct:x,productId:h.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},h.id):null})})}),n.jsx("div",{className:zt["add-cart-container"],children:n.jsx(M_,{handleAddAllToCart:f,selectedProducts:u,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},Ta={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Aa=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=we(),{handleSelectContent:s}=le(),{CONSTANTS:o}=Ee(),a=r.reduce((i,c)=>i+(c.quantity??0),0);return n.jsx(d.Header.SupportItem,{onClick:()=>{t(!0),s({content:"header:minicart"})},id:e,children:n.jsxs(d.Badge.AutoPositioner,{children:[n.jsx(d.Badge.Count,{count:a,size:"medium",variant:"primary",style:{backgroundColor:"black",display:a>0?"flex":"none"}}),n.jsx(d.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};Aa.displayName="Header.Bag";const Sn=({children:e,href:t,...r})=>t&&t!=="#"?n.jsx(Je,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,id=()=>{const{headerData:e}=Ee(),{handleSelectContent:t}=le(),{reset:r,updateValue:s}=yn(),o=a=>{a?s(a):r()};return n.jsx(d.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((a,i)=>n.jsx(Sn,{href:a.link,onMouseEnter:()=>o(a.submenuId),onFocus:()=>o(a.submenuId),children:n.jsx(d.Header.CategoryItem,{className:Ta["btn-header"],value:a.submenuId??null,adornment:{start:n.jsx(d.Icon,{name:a.iconStart}),end:n.jsx(d.Icon,{name:a.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${a.label}`})},children:a.label})},`category-${a.label}-${i}`))})};id.displayName="Header.Categories";function Cg(){const{handleSelectContent:e}=le(),{CONSTANTS:t}=Ee(),{setValue:r}=ds();return n.jsx(d.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:n.jsx(d.Icon,{name:t.header.ICONS.search,size:"medium"})})}const Sg={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},Pg={"observer-wrapper":"_observer-wrapper_r43gk_1"},_s=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:s,stopOnIntersection:o=!0,className:a,...i})=>{const c=y.useRef(null),l=ia(c,o,r),{sendDataLayerEvent:u}=le();return y.useEffect(()=>{l&&(typeof s=="function"&&s(),t&&u({...t}))},[l]),n.jsx("div",{...i,ref:c,className:d.helpers.classNameConcat(Pg["observer-wrapper"],a),children:e})},cd=({thumbnails:e,category:t,isMobile:r=!0,callBack:s})=>{const{handleSelectPromotionEvent:o}=le(),a=50/e.length;return n.jsx("div",{className:Sg["menu-subcategories-container"],children:e.map((i,c)=>{const l=r?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 n.jsx(_s,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...u}}}},observerOptions:{delay:1e3},children:n.jsxs(Je,{href:i.link??"#",onClick:()=>{typeof s=="function"&&s(),o({updatePromotionRef:!0,promotion:u})},children:[n.jsx(Oe.Image,{src:l,alt:i.label??l,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${a}vw`}),i.label&&n.jsx("p",{children:i.label})]})},`thumb-${i.label}-${c}`)})})};cd.displayName="Menu.Thumbnail";const Mo={"menu-desktop":"_menu-desktop_1b799_1","menu-categories":"_menu-categories_1b799_12"},ld=({children:e,dividerOnRight:t=!0,subMenu:r,...s})=>{var l;const{router:o}=me(),{reset:a}=yn(),{handleSelectContent:i}=le(),{CONSTANTS:c}=Ee();return n.jsxs("div",{...s,className:Mo["menu-categories"],children:[(l=r==null?void 0:r.subCategories)==null?void 0:l.map((u,m)=>{var h,_,g,v;const f=u.listCollapseDesk&&!((h=u.see_all)!=null&&h.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:n.jsx(d.Icon,{name:c.header.ICONS.arrow_right,size:"small"})}};return n.jsxs(d.ComponentList.Structure,{children:[n.jsx(Sn,{href:u.linkLabel,title:u.label,onClick:()=>{u.linkLabel&&(a(),i({content:`menu:${u.label??""}:${r.label??""}`}))},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{children:u.label})})})}),n.jsx(d.ComponentList.List,{columns:1,...f,className:Mo["submenu-categories"],children:(g=u.items)==null?void 0:g.map((b,C)=>n.jsx(d.ComponentList.ListItem,{id:`list-item-${b.label}-${C}`,children:n.jsx(Ke,{href:b.link??"#",size:"x-small",title:b.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{a(),i({content:`menu:${u.label??""}:${b.label??""}:${r.label??""}`})},children:b.label})},`list-item-${b.label}-${C}`))}),((v=u.see_all)==null?void 0:v.link)&&n.jsx(d.ComponentList.Support,{...p,size:"small",onClick:()=>{var b;(b=u.see_all)!=null&&b.link&&(a(),i({content:`menu:${u.label??""}:${r.label}`}),o.push(u.see_all.link))},children:u.see_all.link&&u.see_all.label})]},`list-${u.label}-${m}`)}),t&&n.jsx(d.Utils.Divider,{size:"small",direction:"vertical"})]})};ld.displayName="Menu.Categories";const ud=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:s}=Ee();return n.jsxs(n.Fragment,{children:[n.jsx("div",{...r,className:Mo["menu-desktop"],style:{...r.style,justifyContent:s.header.ALIGNMENT_MENU},children:e}),t&&n.jsx(d.Utils.Divider,{size:"small"})]})};ud.displayName="Menu.MenuRoot";const Gs={Root:ud,Categories:ld,Thumbnail:cd},dd=()=>{const{headerData:e,CONSTANTS:t}=Ee(),r=Jc(),{reset:s}=yn();return n.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===r,m=i==null?void 0:i.some(f=>!!f.srcDesk);return n.jsxs(Gs.Root,{id:l,style:u?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:u,children:[n.jsx(Gs.Categories,{dividerOnRight:!!m,subMenu:o}),Array.isArray(i)&&n.jsx(Gs.Thumbnail,{thumbnails:i,isMobile:!1,category:c,callBack:s})]},`submenu-${l}-${a}`)})})};dd.displayName="Header.SubMenu";const fd=()=>{const{handleSelectContent:e}=le(),{CONSTANTS:t}=Ee();return n.jsx(Je,{href:"/favoritos",children:n.jsx(d.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:n.jsx(d.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};fd.displayName="Header.WishList";const wg="_root_im5yf_125",ct={"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:wg},md=({className:e,children:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(ct["user-menu--content"],e),children:t});md.displayName="UserMenu.Content";var pd=(e=>(e.Account="account",e))(pd||{});const hd=({className:e,cashBack:t,credits:r,link:s,total:o,...a})=>{const i=t?k.formatPriceToCurrency(t):void 0,c=r?k.formatPriceToCurrency(r):void 0,l=o?k.formatPriceToCurrency(o):void 0;return n.jsx(d.Credits.Account,{...a,className:d.helpers.classNameConcat(ct["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:i,creditsValue:c,linkMore:s,totalValue:l,type:pd.Account})};hd.displayName="UserMenu.Credits";const _d=({className:e,children:t,description:r,text:s,...o})=>{const{isMobile:a}=se();return n.jsx("div",{...o,className:d.helpers.classNameConcat(ct["user-menu--login"],e),"data-mobile":a,children:n.jsxs("div",{className:ct["user-menu--login--content"],children:[n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[n.jsx("h3",{className:"typography-style-body-lg-strong",children:s}),n.jsx("p",{children:r})]})}),t]})})};_d.displayName="UserMenu.Login";const gd=({className:e,isLogged:t,onLogoutClick:r,ICONS:s,storeConfig:o,isMobile:a})=>{const i=a?ii:ii({ICONS:s,storeConfig:o}).filter(c=>c.deviceShown==="both"||c.deviceShown===(a?"mobile":"desktop"));return n.jsxs("ul",{className:d.helpers.classNameConcat(ct["user-menu--menu"],e),children:[Array.isArray(i)&&i.map((c,l)=>n.jsx("li",{children:n.jsx(Ke,{href:c.href??"#",size:"small",disableUnderline:!0,adornments:{start:n.jsx(d.Icon,{name:c.icon??"delete"})},children:c.label})},l)),t?n.jsx("li",{children:n.jsx(Ke,{href:`${o.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${o.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:n.jsx(d.Icon,{name:Yh(s)})},children:Xh})}):n.jsx(n.Fragment,{})]})};gd.displayName="UserMenu.Menu";const yd=e=>{const t=y.useRef(null),r=y.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),s=y.useCallback(a=>{t.current&&!t.current.contains(a.target)&&e()},[e]),o=y.useCallback(a=>{a.key==="Escape"&&e()},[e]);return y.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",s)}),[r,o,s]),{ref:t}},Eg=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Ng=(e,t,r)=>{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?Eg(e==null?void 0:e.parentElement):0;return{left:o+i/2-(c.width+l*2),top:a+s+r}},vd=y.createContext({}),Ig=({children:e,delay:t=600,gap:r=20,isOpen:s,setIsOpen:o,target:a,...i})=>{const c=y.useRef(null),[l,u]=y.useState(!1),[m,f]=y.useState({left:0,top:0}),{ref:p}=yd(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{o(!1),u(!1)},t))});return y.useEffect(()=>{if(a&&(p!=null&&p.current)){const{left:h,top:_}=Ng(p.current,a,r??0);f({left:h,top:_}),u(!1)}},[r,s,a,p]),n.jsx(vd.Provider,{value:y.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})},xd=()=>{const e=y.useContext(vd);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},bd=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:s,setIsOpen:o}=xd();return n.jsxs(d.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:s,setIsOpen:o,variant:"sideBottom",className:ct["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[n.jsx(d.Modal.Header,{navigation:"top",className:ct["modal-header-modifier"],children:n.jsx(d.Modal.Controls,{navigation:"top",isMobile:!0,className:ct["modal-controls-modifier"]})}),n.jsx(d.Modal.Body,{children:e})]})};bd.displayName="UserMenu.Modal";const jd=({children:e,component:t,Z_INDEX_WAR:r,isMobile:s,...o})=>n.jsx(Ig,{...o,className:ct.root,children:s?n.jsxs(n.Fragment,{children:[n.jsx(Ft.Modal,{Z_INDEX_WAR:r,children:t}),e]}):n.jsx(Ft.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});jd.displayName="UserMenu.Root";const Cd=({children:e,component:t,Z_INDEX_WAR:r,...s})=>{const{contentRef:o,left:a,isLeaving:i,isOpen:c,top:l}=xd();return n.jsx(d.Tooltip.Root,{arrow:"top-right",component:n.jsx("div",{...s,ref:o,children:t}),className:d.helpers.classNameConcat(ct["user-menu--tooltip"],ct["tooltip-modifier"]),isLeaving:i,isOpen:c,left:a,size:"medium",position:"top",top:l,style:{zIndex:r.user_menu},children:n.jsx("div",{className:ct["user-menu--tooltip"],children:e})})};Cd.displayName="UserMenu.Tooltip";const Ft={Credits:hd,Content:md,Login:_d,Menu:gd,Modal:bd,Root:jd,Tooltip:Cd},gs=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:s,mobileUserMenuTarget:o,storeConfig:a})=>{var h,_,g;const{isMobile:i}=se(),{CONSTANTS:c}=Ee(),l=Gr(),u=()=>{window.location.href=`${a.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},m=!!((h=l.user)!=null&&h.userId),{cashback:f,credits:p}=y.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 n.jsx(Ft.Root,{component:n.jsxs(Ft.Content,{children:[n.jsx(Ft.Login,{description:Jh(m),text:Zh(m,((_=l==null?void 0:l.user)==null?void 0:_.firstName)??((g=l==null?void 0:l.user)==null?void 0:g.email)),children:!m&&n.jsx(d.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>u(),children:c.header.MENU_INFO.login.button_text})}),p+f&&m?n.jsx(Ft.Credits,{credits:p,cashBack:f,link:`${a.secureSubdomain}/account#/meus-creditos`,total:p+f}):n.jsx(n.Fragment,{}),n.jsx(d.Utils.Divider,{}),n.jsx(Ft.Menu,{ICONS:c.header.ICONS,storeConfig:a,isLogged:m,className:k.responsive["responsive-desktop-flex"],onLogoutClick:()=>l.logout()}),n.jsx(Ft.Menu,{ICONS:c.header.ICONS,storeConfig:a,isMobile:!0,isLogged:m,className:k.responsive["responsive-mobile-flex"],onLogoutClick:()=>l.logout()})]}),isOpen:t,isMobile:i,setIsOpen:r,target:i?o:s,Z_INDEX_WAR:c.header.Z_INDEX_WAR,children:e})};gs.displayName="UserMenu";const Sd=({storeConfig:e})=>{const{CONSTANTS:t}=Ee(),{handleSelectContent:r}=le(),{reset:s}=yn(),{setValue:o}=da(),a=ua(),i=y.useRef(null);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-desktop-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(Je,{href:"/",onMouseEnter:s,children:n.jsx(d.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),n.jsx(id,{}),n.jsxs(d.Header.Support,{onMouseEnter:s,style:{justifyContent:"flex-end"},children:[n.jsx(Cg,{}),n.jsx(gs,{isOpen:a,setIsOpen:o,desktopUserMenuTarget:i.current,storeConfig:e,children:n.jsx(d.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:Ta["btn-login"],innerRef:i,children:n.jsx(d.Icon,{name:t.header.ICONS.person,size:"medium"})})}),n.jsx(fd,{}),n.jsx(Aa,{id:"cart-button"})]})]}),n.jsx(dd,{})]})};Sd.displayName="Header.HeaderDesktopWrapper";const et={"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"},Pd=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:s,submenuId:o,label:a,...i})=>n.jsx("button",{...i,className:et["menu--banners--item"],children:r?n.jsxs(d.Banner.Container,{children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Oe.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),n.jsx(d.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:et["menu--banners--item--text"],children:n.jsx("h2",{className:"typography-style-body-xs",style:s?{color:s}:{},children:e})})})})]}):n.jsx("h2",{...i,children:e})});Pd.displayName="Menu.Mobile.Category";const wd=({label:e,...t})=>{const{CONSTANTS:r}=Ee();return n.jsx(d.Button,{...t,adornment:{end:n.jsx(d.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};wd.displayName="Menu.Mobile.Body.Category";const Ed=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>n.jsx("div",{...s,className:et["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,a)=>n.jsx(Ke,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},a)))});Ed.displayName="Menu.Mobile.List";const Nd=({current:e,onHandleOut:t})=>{var r;return e?n.jsx("div",{className:et["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((s,o)=>n.jsxs("div",{className:et["menu--sub-category--item"],children:[n.jsx(nn.Title,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id}),n.jsx(nn.List,{onHandleOut:t,subCategory:s,submenuLabel:e==null?void 0:e.id})]},o)))}):n.jsx(n.Fragment,{})};Nd.displayName="Menu.Mobile.Body.SubCategory";const Id=({subCategory:e,submenuLabel:t,onHandleOut:r,...s})=>{var c;const{router:o}=me(),{handleSelectContent:a}=le(),{CONSTANTS:i}=Ee();return n.jsxs("div",{...s,className:et["menu--categories--title"],children:[n.jsx(Sn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{a({content:`menu:${e.label??""}:${t}`})},children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.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)&&n.jsx(d.ComponentList.Support,{adornment:{end:n.jsx(d.Icon,{name:i.header.ICONS.arrow_right,size:"small"})},size:"small",onClick:()=>{var l;r(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})]})};Id.displayName="Menu.Mobile";const nn={Banner:Pd,Category:wd,List:Ed,SubCategory:Nd,Title:Id},Rd=y.createContext({}),Rg=({children:e})=>{const[t,r]=y.useState(null),s=y.useCallback(()=>{r(null)},[]),o=a=>{a!==t&&r(a)};return n.jsx(Rd.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:s,handleChangeSubMenuOpened:o},children:e})},Td=()=>y.useContext(Rd),Ad=e=>{const{router:t}=me(),{headerData:r}=Ee(),{handleSelectContent:s}=le(),{currentCategory:o,setCurrentCategory:a}=Td(),i=y.useRef(null),c=()=>{if(i.current){const h=i.current;h&&(a(null),h==null||h.click())}},l=(h,_)=>{s({content:`menu:${h}`}),t.push(_),c()},u=(h,_)=>{s({content:`menu:${h}:${_}`}),c()},m=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],f=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],p=h=>{h.submenuId?a(h.submenuId):l(h.label,h.link)};return n.jsxs("div",{...e,className:et["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[n.jsx("button",{className:et["menu--dummy-close"],ref:i,"data-close":!0}),n.jsxs("div",{className:et["menu--step"],"data-active":"true",children:[n.jsx("div",{className:et["menu--banners"],children:n.jsx("div",{className:et["menu--banners--list"],children:m.map((h,_)=>y.createElement(nn.Banner,{...h,key:_,onClick:()=>l(h.label,h.link)},h.mobileBannerAlt))})}),n.jsx("div",{className:et["menu--categories"],children:m.map((h,_)=>n.jsx(nn.Category,{label:h.label,onClick:()=>p(h)},_))})]}),n.jsx("div",{className:et["menu--step"],"data-active":!!o,children:n.jsx(nn.SubCategory,{current:f.find(h=>h.id===o),onHandleOut:u})})]})};Ad.displayName="Menu.Mobile.Body";const Tg={"menu--header":"_menu--header_1ozdf_1"},kd=()=>{var o;const{headerData:e}=Ee(),{currentCategory:t,setCurrentCategory:r}=Td(),s=(o=e==null?void 0:e.categories)==null?void 0:o.find(a=>a.submenuId===t);return n.jsxs("div",{className:Tg["menu--header"],children:[n.jsx(d.Button,{"data-out":!s,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),s&&n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{alignContent:"center",children:n.jsx("h2",{className:"typography-style-body-lg",children:s==null?void 0:s.label})})}),n.jsx(d.Button,{iconNameStart:"close","data-close":!0,"data-only":!s,mode:"inverse",onClick:()=>r(null)})]})};kd.displayName="Menu.Mobile.Header";var Do={exports:{}};function Ag(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 Ks={},Qs={},qi;function kg(){return qi||(qi=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return s}});const s=Ge._(y).default.createContext(null);process.env.NODE_ENV!=="production"&&(s.displayName="LoadableContext")}(Qs)),Qs}var Hi;function Og(){return Hi||(Hi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});const r=Ge._(y),s=kg();function o(_){return _&&_.default?_.default:_}const a=[],i=[];let c=!1;function l(_){let g=_(),v={loading:!0,loaded:null,error:null};return v.promise=g.then(b=>(v.loading=!1,v.loaded=b,b)).catch(b=>{throw v.loading=!1,v.error=b,b}),v}function u(_,g){let v=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},g),b=null;function C(){if(!b){const S=new m(_,v);b={getCurrentValue:S.getCurrentValue.bind(S),subscribe:S.subscribe.bind(S),retry:S.retry.bind(S),promise:S.promise.bind(S)}}return b.promise()}if(typeof window>"u"&&a.push(C),!c&&typeof window<"u"){const S=v.webpack&&typeof Ag.resolveWeak=="function"?v.webpack():v.modules;S&&i.push(P=>{for(const w of S)if(P.includes(w))return C()})}function j(){C();const S=r.default.useContext(s.LoadableContext);S&&Array.isArray(v.modules)&&v.modules.forEach(P=>{S(P)})}function x(S,P){j();const w=r.default.useSyncExternalStore(b.subscribe,b.getCurrentValue,b.getCurrentValue);return r.default.useImperativeHandle(P,()=>({retry:b.retry}),[]),r.default.useMemo(()=>w.loading||w.error?r.default.createElement(v.loading,{isLoading:w.loading,pastDelay:w.pastDelay,timedOut:w.timedOut,error:w.error,retry:b.retry}):w.loaded?r.default.createElement(o(w.loaded),S):null,[S,w])}return x.preload=()=>C(),x.displayName="LoadableComponent",r.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:g,_opts:v}=this;g.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(g){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...g},this._callbacks.forEach(v=>v())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(g){return this._callbacks.add(g),()=>{this._callbacks.delete(g)}}constructor(g,v){this._loadFn=g,this._opts=v,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function f(_){return u(l,_)}function p(_,g){let v=[];for(;_.length;){let b=_.pop();v.push(b(g))}return Promise.all(v).then(()=>{if(_.length)return p(_,g)})}f.preloadAll=()=>new Promise((_,g)=>{p(a).then(_,g)}),f.preloadReady=_=>(_===void 0&&(_=[]),new Promise(g=>{const v=()=>(c=!0,g());p(i,_).then(v,v)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=f.preloadReady);const h=f}(Ks)),Ks}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(m,f){for(var p in f)Object.defineProperty(m,p,{enumerable:!0,get:f[p]})}r(t,{default:function(){return u},noSSR:function(){return l}});const s=Ge,o=n,a=s._(Og()),i=typeof window>"u";function c(m){return{default:(m==null?void 0:m.default)||m}}function l(m,f){if(delete f.webpack,delete f.modules,!i)return m(f);const p=f.loading;return()=>(0,o.jsx)(p,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function u(m,f){let p=a.default,h={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?h.loader=()=>m:typeof m=="function"?h.loader=m:typeof m=="object"&&(h={...h,...m}),h={...h,...f};const _=h.loader,g=()=>_!=null?_().then(c):Promise.resolve(c(()=>null));return h.loadableGenerated&&(h={...h,...h.loadableGenerated},delete h.loadableGenerated),typeof h.ssr=="boolean"&&!h.ssr?(delete h.webpack,delete h.modules,l(p,h)):p({...h,loader:g})}(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)})(Do,Do.exports);var Lg=Do.exports,Mg=Lg;const Od=k.getDefaultExportFromCjs(Mg),os={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Ld=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=ha(),{CONSTANTS:s}=Ee();return n.jsxs(d.Modal.RootWithoutPortal,{className:d.helpers.classNameConcat(os["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:s.header.Z_INDEX_WAR.menu_mobile},children:[n.jsx(kd,{}),n.jsx(d.Modal.Body,{className:os["menu--root"],children:e})]})};Ld.displayName="Menu.MenuRoot";const Dg=Od(()=>Promise.resolve(Ld),{ssr:!1}),Md=({children:e,last:t=!1,...r})=>n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",className:os.divider})]});Md.displayName="Menu.NavigationBarItem";const Dd=()=>{const{setUserMenuIsOpen:e}=ha(),{handleSelectContent:t}=le(),{CONSTANTS:r}=Ee(),{router:s}=me(),o=[{iconNameStart:r.header.ICONS.person,onClick:()=>{e(!0),t({content:"menu:user_menu"})},text:r.header.MENU_INFO.login.button_text},{iconNameStart:r.header.MENU_INFO.bag.button_icon,onClick:()=>{t({content:"menu:wishlist"}),s.push("/favoritos")},text:r.header.MENU_INFO.bag.button_text},{last:!0,iconNameStart:r.header.MENU_INFO.store.button_icon,onClick:()=>{t({content:"menu:store"}),s.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return n.jsx(d.Card,{id:"menu-navigationbar",shadow:!0,className:os["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((a,i)=>y.createElement(Md,{...a,key:i},a.text))})};Dd.displayName="Menu.NavigationBar";const Xs={Body:Ad,NavigationBar:Dd,Root:Dg},Fd=({storeConfig:e})=>{const t=y.useRef(null),{CONSTANTS:r}=Ee(),{MENU_NAVIGATION_BAR_ALLOWED:s,ICONS:o}=r.header,{handleSelectContent:a}=le(),{setValue:i}=ds(),{setValue:c}=rl(),{setValue:l}=da(),u=ua(),m=tl(),{isMobile:f}=se();return n.jsxs(n.Fragment,{children:[n.jsxs(d.Header.Wrapper,{className:"header-mobile-wrapper",children:[n.jsx(d.Header.Logo,{style:{width:"100%"},children:n.jsx(Je,{href:"/",children:n.jsx(d.Icon,{name:o.logo,size:"x-large",onClick:()=>{a({content:"header:logo"})}})})}),n.jsxs(d.Header.Support,{children:[n.jsx(d.Header.SupportItem,{onClick:()=>{i(!0),a({content:"header:search"})},children:n.jsx(d.Icon,{name:o.search,size:"medium"})}),n.jsx(Aa,{}),n.jsxs(d.Header.SupportItem,{onClick:()=>c(!0),children:[n.jsx("span",{ref:t}),n.jsx(d.Icon,{name:o.menu,size:"medium"})]})]})]}),f&&n.jsx(gl,{menuIsOpen:m,setMenuIsOpen:c,userMenuIsOpen:m,setUserMenuIsOpen:l,children:n.jsx(gs,{storeConfig:e,isOpen:u,setIsOpen:l,mobileUserMenuTarget:t==null?void 0:t.current,children:n.jsxs(Xs.Root,{children:[n.jsx(Xs.Body,{}),s?n.jsx(Xs.NavigationBar,{}):n.jsx(n.Fragment,{})]})})})]})};Fd.displayName="Header.HeaderMobileWrapper";const Fg=y.createContext({}),zg=({children:e})=>{const{sendDataLayerEvent:t}=le(),{cartStore:r,isOpen:s}=we();y.useEffect(()=>{s&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[s]),y.useEffect(()=>{var a,i,c;if(r.id&&!((i=(a=r.marketingData)==null?void 0:a.marketingTags)!=null&&i.includes("faststore"))){const{id:l}=r;k.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:l,marketingData:{...r==null?void 0:r.marketingData,marketingTags:k.marketingTagsBuilder(((c=r.marketingData)==null?void 0:c.marketingTags)??[])}}}).catch(u=>{console.error(u)})}},[r]);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 n.jsx(Fg.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},Bg="var(--color-background-brand-primary-lighter)",Ug="_fadeInOut_1l5ow_1",qg="_fadeOut_1l5ow_1",ae={brandPrimaryLighter:Bg,"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:Ug,fadeOut:qg,"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"},zd=({item:{id:e,message:t,callback:r},removeNotification:s,ICONS:o})=>{const a=y.useRef(null),i=()=>{var l;(l=a.current)==null||l.setAttribute("data-animation-out","true")},c=l=>{s(l)};return n.jsx("div",{className:ae["mc--notify--item"],ref:a,onAnimationEnd:()=>c(e),children:n.jsxs(d.SnackBar.Structure,{size:"medium",children:[n.jsx(d.SnackBar.Content,{title:t}),n.jsxs(d.SnackBar.Support,{children:[typeof r=="function"&&n.jsx(d.Button,{onClick:()=>{r(),i()},size:"small",variant:"tertiary",children:"Desfazer"}),n.jsx(d.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>i(),variant:"tertiary"})]})]})},e)};zd.displayName="MiniCart.Notify.Item";const Bd=({ICONS:e})=>{const t=ca(),{removeNotification:r}=la(),s=t.length?[...t].sort((o,a)=>a.id-o.id):[];return s.length?n.jsx("div",{className:ae["mc--notify"],children:n.jsx("div",{className:ae["mc--notify--content"],children:Array.isArray(s)&&s.map(o=>n.jsx(zd,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};Bd.displayName="MiniCart.Notifications";const Hg=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:s,...o})=>{const a=Wr(),{toggleProduct:i}=jr(),{itemOffered:{isVariationOf:{productGroupID:c}},quantity:l}=r;return n.jsx(d.Button,{...o,adornment:{end:n.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})},Ud=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:s,...o})=>{const{addToCart:a,removeToCart:i}=we(),{bundleItems:c=[],id:l,uniqueId:u,seller:m,offerings:f,quantity:p}=t,h=(_,g,v)=>{i(l,_.title,()=>{typeof v=="function"&&v(),a({id:l,quantity:g,seller:m},{id:l,texture:_.texture},!0)})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:ae["mc--card--actions--add-remove"],children:[s.has_wishlist_button&&n.jsx(Hg,{...o,product:t,handleSendEvent:e,onHandleRemove:h,ICONS:r,MINICART_CONFIG:s}),n.jsx(d.Button,{...o,adornment:{end:n.jsx(d.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{h({texture:"mini-cart",title:`${s.messages.remove}`},p),e("remove_from_cart","skuEvents")},children:s.messages.remove_button})]}),s.has_gift_option&&n.jsx(wr.Gift,{uniqueId:u,bundleItems:c,offerings:f,ICONS:r,MINICART_CONFIG:s})]})};Ud.displayName="MiniCart.Card.Actions";const qd=({bundleItems:e,offerings:t,uniqueId:r,ICONS:s,MINICART_CONFIG:o})=>{const[a,i]=y.useState(!1),{toggleGiftItemCart:c}=we(),l=()=>{if(t instanceof Object&&Array.isArray(t)){const[f]=t;if(f){i(!0);const p=e.some(h=>h.id===f.id);c(r,String(f.id),p).then(()=>i(!1))}}},u=t[0],m=e.find(f=>f.id===u.id);return u&&"id"in u?n.jsx("div",{className:ae["mc--card--actions--gift"],children:n.jsx(d.Checkbox,{adornment:n.jsx(d.Icon,{name:s.check}),checked:!!m,disabled:a,label:o.messages.giftPackage,onChange:l})}):null};qd.displayName="MiniCart.Card.Gift";const Hd=({itemOffered:e})=>{const t=k.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return n.jsx(Je,{href:`${e==null?void 0:e.slug}`,className:ae["mc--card--product-link"],children:n.jsx(Oe.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};Hd.displayName="MiniCart.Card.Media";const $d=({name:e,skuName:t,tagName:r,className:s})=>n.jsxs(n.Fragment,{children:[r&&n.jsx(d.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),n.jsx("p",{className:d.helpers.classNameConcat(ae["mc--card--name"],s),children:k.getProductNameWithoutSku(e??"",t??"")})]});$d.displayName="MiniCart.Card.Name";const Vd=({total:e,totalList:t})=>n.jsx(d.ProductInfo.Root,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:ae["mc--card--price"],children:n.jsx(d.ProductInfo.Wrapper,{className:ae["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:k.formatPriceToCurrency(t),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:k.formatPriceToCurrency(e),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:k.formatPriceToCurrency(e),size:"small"})})})})});Vd.displayName="MiniCart.ProductPrice";const Wd=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{var u;const[s,o]=y.useState(""),a=y.useRef(null),{cartStore:{options:i}}=we(),c=e.itemOffered.isVariationOf.productGroupID,l=y.useCallback(()=>{var f;const m=(f=i==null?void 0:i.find(p=>p.id===c))==null?void 0:f.texture;if(m){o(m);return}k.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[c]})}).then(p=>p.json()).then(p=>{const h=p.data[0].items.find(_=>_.itemId===e.id);if(h){const _=h.images.find(g=>t.includes(g.imageLabel));if(_!=null&&_.imageUrl){o(_.imageUrl);return}o(h.images[0].imageUrl)}}).catch(p=>{console.error(p)})},[i,c,e.id]);return y.useEffect(()=>{if(!a.current)return;const m=new IntersectionObserver(f=>{f[0].isIntersecting&&l()});return m.observe(a.current),()=>{m.disconnect()}},[l]),n.jsx("div",{ref:a,children:n.jsx(d.ToggleStyle.Wrapper,{size:"small",style:r,children:n.jsx(d.ToggleStyle.Texture,{children:s?n.jsx(Oe.Image,{alt:((u=e.itemOffered)==null?void 0:u.image[0].alternateName)??"Produto",src:s,width:164,height:164,style:r}):n.jsx(hu,{})})})})};Wd.displayName="MiniCart.Card.Style";const Gd=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{size:a}=k.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return n.jsxs(d.Utils.Row,{alignItems:"center",children:[n.jsx(Wd,{product:e,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o}),n.jsx(d.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),a&&n.jsx(d.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:ae["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${ae.brandPrimaryLighter}`},children:n.jsx(d.ToggleSize.Text,{children:a})})]})};Gd.displayName="MiniCart.Card.Sku";const wr={Actions:Ud,Gift:qd,Media:Hd,Name:$d,Price:Vd,Sku:Gd},$g=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}},Kd=({available:e=!0,index:t,product:r,ICONS:s,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c})=>{var f,p;const{sendDataLayerEvent:l}=le(),u=$g(r),m=(h,_)=>{const g={commonData:{...r,...u},customData:{index:t},event:h};if(_==="skuEvents"){const v={...r,...u};g.supportData={selectedSkus:[v]},g.commonData.products=[v]}l({functionKey:_,data:g})};return n.jsxs("div",{className:d.helpers.classNameConcat(ae["mc--card"],e?"":ae["mc--card--unavailable"]),children:[n.jsx(wr.Media,{itemOffered:r.itemOffered}),n.jsxs("div",{className:ae["mc--card--content-info"],children:[n.jsx(wr.Name,{name:((f=r.itemOffered)==null?void 0:f.name)??"",skuName:(p=r.itemOffered)==null?void 0:p.skuName}),n.jsxs("div",{className:ae["mc--card--details"],children:[n.jsx("div",{className:ae["mc--card--actions"],children:e?n.jsx(wr.Price,{total:u.price,totalList:u.listPrice}):n.jsx(d.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),n.jsxs("div",{className:ae["mc--card--actions--secondary"],children:[e&&n.jsx(wr.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:a,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}),n.jsx(wr.Actions,{handleSendEvent:m,product:r,size:"small",variant:"tertiary",ICONS:s,MINICART_CONFIG:o})]})]})]})]})};Kd.displayName="MiniCart.Card";const Qd=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var a;const{toExpire:s}=Gr(),o=((a=s==null?void 0:s.cashback)==null?void 0:a.reduce((i,c)=>i+c.remaining_value,0))??0;return o>0?n.jsxs("div",{className:d.helpers.classNameConcat(ae["mc--cashback"],ae[`mc--cashback--${e}`]),children:[n.jsx(d.Icon,{name:t.alert_circle,size:"medium"}),n.jsxs("p",{children:[n.jsx("span",{children:k.formatPriceToCurrency(o)})," ",r.title]})]}):null};Qd.displayName="MiniCart.Cashback";const Xd=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:s,removeCoupon:o,removeSellerCode:a,cartStore:{marketingData:i,openTextField:c}}=we(),[l,u]=y.useState(!1),[m,f]=y.useState(!1),p=y.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]),[h,_]=y.useState(!!p()),g=async v=>{f(!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(()=>f(!1))};return n.jsx(Ye.Field,{hasError:l,hasSuccess:h,isLoading:m,onHandler:g,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:p(),MINICART_CONFIG:r,ICONS:t})};Xd.displayName="MiniCart.CouponSeller";const Yd=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:s}=me(),o=()=>{s.push(r.link)};return n.jsxs(d.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:ae["mc--body--empty--feedback"],children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("p",{className:`typography-style-body-xs ${ae["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),n.jsx(d.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:n.jsx(d.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};Yd.displayName="MiniCart.Feedback";const Vg=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},Zd=({feedback:e,hasError:t,onHandler:r,hasSuccess:s,type:o,title:a,value:i,ICONS:c})=>{const[l,u]=y.useState(i);y.useEffect(()=>{t||u(i)},[i,t]);const m=()=>t?n.jsx(d.Icon,{name:c.delete_circle}):String(i).length&&s?n.jsx(d.Icon,{name:c.check_circle}):null,f=()=>{if(o==="seller"){const g=String(i).includes(" - ")?String(i).split(" - ")[0]:l;u(g)}},p=()=>{if(o==="seller"){const g=String(i).includes(" - ")?i:l;u(g)}},h=g=>{const v=g.currentTarget.value;if(v===""&&typeof r=="function"||s&&String(i).length>0&&v!==String(i)||t&&v!==String(i)){u(""),r("");return}if(o==="cep"){const C=Vg(v);u(C)}else u(v)},_=g=>{if(g.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const v=g.currentTarget.value;r(v)}};return n.jsx(d.TextField.Input,{adornment:{end:m()},mode:"over-label",label:a,feedback:e,value:l,type:"text",onFocus:f,onBlur:p,onChange:h,onKeyDown:_})};Zd.displayName="MiniCart.Field.Input";const Jd=({title:e,ICONS:t,MINICART_CONFIG:r,...s})=>{const o=y.useRef(null),{hasSuccess:a,hasError:i,isLoading:c,onHandler:l,type:u,value:m}=s,f=()=>i?"error":String(m).length&&a?"success":"none",p=y.useCallback(()=>{if(o.current){const g=o.current.querySelector("input");g&&typeof l=="function"&&(m!==""||i?(l(""),g.value=""):l((g==null?void 0:g.value)??""))}},[l,m,i]),h=f();return n.jsx("div",{ref:o,children:n.jsx(d.TextField.Structure,{className:ae["mc--field"],input:n.jsx(Zd,{...s,feedback:h,title:e,ICONS:t}),right:n.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?n.jsx(d.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:u==="cep"&&h==="success"?n.jsx(d.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};Jd.displayName="MiniCart.Field";const $i=e=>{const t=e*100;return Math.round(t)},Wg=e=>(e/100).toFixed(2).replace(".",","),Gg=(e,t)=>{const{valueType:r,remainingValueToActivate:s}=e;if(r==="quantity")return`Adicione mais ${s} ${s===1?"item":"itens"} ${t}`;if(r==="price"){const o=s===100?"Falta":"Faltam",a=Wg(s);return`${o} R$ ${a} ${t}`}return t},ef=({ICONS:e})=>{var b;const{promotionRules:t,data:r,cartStore:s,cartStore:{items:o,marketingData:a},addCouponSeller:i,setIsOpen:c}=we(),{sendDataLayerEvent:l}=le(),u=(b=r==null?void 0:r.promotion)==null?void 0:b.promotionCart,m=y.useRef(!1),{router:f}=me();if(y.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,h=u.subtitle,_=u.titleSuccess,g=u.subtitleSuccess,v=u.linkLabel;return n.jsxs("div",{className:ae["mc--body--promotion"],children:[t.remainingValueToActivate>0&&n.jsx(d.Closeness,{className:ae["mc--body--promotion--closeness"],title:Gg(t,p),subtitle:h,percentage:$i(t.completeness),iconLink:e.arrow_right,linkLabel:v,onClick:()=>{l({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:s}}}),f.push(`${u.link}`),c(!1)}}),t.remainingValueToActivate<=0&&n.jsx(d.Closeness,{className:`${ae["mc--body--promotion--closeness"]} ${ae["mc--body--promotion--closeness--success"]}`,title:_,subtitle:g,percentage:$i(t.completeness)})]})};ef.displayName="MiniCart.Modal.Body.Promotion";const tf=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:s,marketingData:o},addCouponSeller:a}=we(),i=t==null?void 0:t.flags.flagCart.flagCupom,c=(o==null?void 0:o.coupon)===(i==null?void 0:i.valueCupom),[l,u]=y.useState(!1),[m,f]=y.useState(!1);if(y.useEffect(()=>{l&&setTimeout(()=>{u(!1)},e.snackbar_timeout)},[l]),y.useEffect(()=>{m&&setTimeout(()=>{f(!1)},e.snackbar_timeout)},[m]),!i||i.active==="Desativar"||i.valueCupom===""||s.length===0)return null;const p=async()=>{if(!r.items.length){f(!0);return}(await a(i==null?void 0:i.valueCupom,"coupon")).code!==200&&u(!0)};return n.jsxs("div",{className:ae["mc--body--coupon-tag"],style:{backgroundColor:`${i.tagColor}`,color:`${i.textColor}`},children:[n.jsx("div",{className:ae["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:i.value}}),n.jsx("div",{className:ae["mc--body--coupon-tag--button"],children:n.jsx(d.Button,{variant:"quaternary",mode:"inverse",onClick:p,disabled:c,children:c?"Cupom Aplicado":"Aplicar Cupom"})})]})};tf.displayName="MiniCart.Modal.Body.CouponTag";const rf=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,PLP_NOT_RESULT:o,TEXTURE_IMAGE:a,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c})=>{const{cartStore:{items:l,messages:u}}=we();return n.jsxs(d.Modal.Body,{className:ae["mc--body"],children:[e,n.jsx(ef,{ICONS:t}),n.jsx(tf,{TIPBAR_CONFIGS:i}),n.jsx("div",{className:ae["mc--body--products"],children:Array.isArray(l)&&l.length?l.map((m,f)=>{const p=u.find(h=>{var _;return h.code==="withoutStock"&&((_=h.fields)==null?void 0:_.ean)===m.ean})!==void 0;return n.jsx(Ye.Card,{available:!m.availability.includes("outStock")||!p,index:f,product:m,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:c},`${m.id}-${m.itemOffered.sku}-${f}`)}):n.jsx(Ye.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};rf.displayName="MiniCart.Body";const nf=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:s}=we();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 n.jsxs(d.Modal.Footer,{className:ae["mc--footer"],children:[e,n.jsx("div",{className:ae["mc--footer--actions"],children:n.jsx(d.Button,{variant:"primary",size:"large","data-close":!0,className:ae["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};nf.displayName="MiniCart.Modal.Footer";const sf=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:s})=>{const[o,a]=y.useState(!1),i=y.useRef(null),c=()=>a(l=>!l);return n.jsxs(n.Fragment,{children:[o&&n.jsx(d.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:n.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:ae["inputs--tooltip"],style:{zIndex:s.modal},isOpen:!0,size:"medium",parent:i.current}),n.jsxs(d.Accordion.Wrapper,{className:ae["mc--discount"],children:[n.jsx(d.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),className:d.helpers.classNameConcat(ae["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:n.jsxs(d.TextStructure.Root,{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),n.jsx("div",{ref:i,onMouseEnter:c,onMouseLeave:c,"aria-label":"Mostrar descrição",children:n.jsx(d.Icon,{name:t.alert_circle,size:"small"})})]})}),n.jsx(d.Accordion.Body,{className:ae["mc--discount--body"],children:e})]})]})};sf.displayName="MiniCart.Discount";const of=({discount:e,shipping:t,total:r})=>{var l,u;const{data:s}=we(),o=(u=(l=s==null?void 0:s.flags)==null?void 0:l.flagCart)==null?void 0:u.flagTotal,a=r-Math.abs(e??0)+(t??0),i=t===0?"Frete Grátis":k.formatPriceToCurrency((t??0)/100),c=[{title:"Frete",value:t===void 0?"A calcular":i},{title:"Desconto",value:k.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${k.formatPriceToCurrency(a/100)}`}];return n.jsx("div",{className:ae["mc--footer--total"],children:Array.isArray(c)&&c.map((m,f)=>n.jsxs("div",{className:ae["mc--footer--total--info"],"data-discount":m.title==="Desconto",children:[n.jsx("p",{children:m.title}),n.jsxs("div",{className:ae["mc--footer--total--info--content"],children:[m.message&&(o==null?void 0:o.active)==="Ativar"&&n.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}),n.jsx(d.ProductInfo.Price,{className:ae["mc--footer--total--info"],label:m.title,value:m.value})]})]},f))})};of.displayName="MiniCart.Modal.Footer.Resume.Items";const af=()=>{var o,a,i;const{totalizers:e}=hr(),t=((o=e.find(c=>c.id==="Items"))==null?void 0:o.value)??0,r=(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 n.jsx(of,{discount:r??0,total:t,shipping:s})};af.displayName="MiniCart.Modal.Footer.Totals";const cf=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=se(),{cartStore:{items:s}}=we(),o=s.reduce((a,i)=>a+(i.quantity??0),0);return n.jsx(d.Modal.Header,{navigation:"top",className:ae["mc--header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Modal.Title,{navigation:"top",title:t.messages.title}),n.jsx("span",{className:ae["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),n.jsx(d.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};cf.displayName="MiniCart.Modal.Header";const lf=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:s,removeCEP:o}=we(),{sendDataLayerEvent:a}=le(),[i,c]=y.useState(!1),[l,u]=y.useState(!1),m=y.useCallback(()=>{var C;const b=((C=r==null?void 0:r.address)==null?void 0:C.postalCode)??"";return b.length===8&&!b.includes("-")?`${b.slice(0,5)}-${b.slice(5)}`:b},[r]),[f,p]=y.useState(!!m()),h=()=>{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 T;const S=(T=x==null?void 0:x.slas)==null?void 0:T.find(I=>(I==null?void 0:I.id)===(x==null?void 0:x.selectedSla));if(!S)return j;const P=parseInt(String((S==null?void 0:S.shippingEstimate)??"").replace("bd","")),w=Number((((S==null?void 0:S.price)??0)/100).toFixed(2));if(j.shipping_tier===void 0)return j.shipping_tier=x==null?void 0:x.selectedSla,j.delivery_time=P.toString(),j.shipping=w,j.flag_retirada=(x==null?void 0:x.selectedDeliveryChannel)==="delivery"?"false":"true",j;const N=parseInt(j.delivery_time??"0");return P>N&&(j.delivery_time=P.toString()),j.shipping=(j.shipping??0)+w,j},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},g=async b=>{const C=b.replace(/\D/g,"");if(C.length!==8)return!1;try{return!(await Nr.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(),h(),u(!1);return}if(!await g(b)){c(!0),p(!1),u(!1);return}try{const S=await s(b);if(c(!1),S){p(!0);const P=_(S);P&&a({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:P}})}}catch{c(!0)}finally{u(!1)}};return n.jsx(Ye.Field,{hasSuccess:f,hasError:i,isLoading:l,onHandler:v,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:m(),ICONS:e,MINICART_CONFIG:t})};lf.displayName="MiniCart.Shipping";const uf=()=>{var r,s;const{data:e}=we(),t=(s=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:s.flagHeader;return t!=null&&t.value?n.jsx(d.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?n.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};uf.displayName="MiniCart.TagMessage";const Ye={Body:rf,Card:Kd,Cashback:Qd,CouponSeller:Xd,Discount:sf,Field:Jd,Feedback:Yd,Shipping:lf,Footer:nf,Header:cf,TagMessage:uf,Totals:af},Kg=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,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:f}=we(),{isMobile:p}=se();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(ae["minicart--modal-modifier"],u),isMobile:!0,isOpen:m,setIsOpen:f,style:{zIndex:c.modal},variant:p?"sideBottom":"sideRight",children:[n.jsx(Ye.Header,{ICONS:e,MINICART_CONFIG:t}),n.jsx(Ye.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:s,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:i,TIPBAR_CONFIGS:a,children:n.jsx(Ye.TagMessage,{})}),n.jsxs(Ye.Footer,{MINICART_CONFIG:t,storeConfig:l,children:[n.jsxs(Ye.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:c,children:[n.jsx(Ye.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),n.jsx(Ye.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),n.jsx(Ye.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),n.jsx(Ye.Totals,{})]}),n.jsx(Bd,{ICONS:e})]})},df=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:s,className:o})=>{const{structureRef:a,rootRef:i,CONSTANTS:c}=Ee(),{header:{HEADER_CONFIGS:l,Z_INDEX_WAR:u},minicart:m}=c;return n.jsx(d.Header.Structure,{innerRef:a,adornment:{start:e},style:{position:"sticky",top:0,zIndex:u.header},className:d.helpers.classNameConcat(Ta["header-animation"],o),children:n.jsxs(d.Header.Root,{innerRef:i,style:{zIndex:u.header},variant:l.default_variant,interactiveVariant:l.interactive_variant,children:[r??n.jsxs(Rg,{children:[n.jsx("div",{className:k.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:u.header_mobile},children:n.jsx(Fd,{storeConfig:s})}),n.jsx("div",{className:k.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:u.header_desktop},children:n.jsx(Sd,{storeConfig:s})})]}),n.jsx(zg,{children:n.jsx(Kg,{...m,minicartStyleModifiers:t})}),n.jsx(Pa,{title:"Produto adicionado à sua sacola!",CONSTANTS:c.addToCart})]})})};df.displayName="Header";const Qg="_shippingFreight_6z8rf_6",Xg="_shippingFreight__postalCodeGrid_6z8rf_10",Yg="_shippingFreight__grid_6z8rf_14",Zg="_shippingFreight__grid__title_6z8rf_18",Jg="_shippingFreight__grid__remember_6z8rf_29",ey="_postalCodeContainer_6z8rf_44",ty="_deliveryStatusBar__tag_6z8rf_49",ry="_deliveryStatusBarError__tag_6z8rf_66",ny="_deliveryInfo_6z8rf_74",sy="_deliveryInfo__content_6z8rf_78",oy="_deliveryInfo__text_6z8rf_84",ay="_deliveryInfo__title_6z8rf_89",iy="_deliveryInfo__subtitle_6z8rf_99",cy="_deliveryInfo__tooltipIcon_6z8rf_109",ly="_deliveryInfo__tooltip_6z8rf_109",uy="_freightGrid_6z8rf_148",dy="_freightContainer_6z8rf_155",fy="_freightOption__content_6z8rf_160",my="_freightOption__value_6z8rf_166",py="_freightOption__title_6z8rf_177",hy="_freightOption__title_item_6z8rf_181",_y="_freightOption__paragraph_6z8rf_192",he={shippingFreight:Qg,shippingFreight__postalCodeGrid:Xg,shippingFreight__grid:Yg,shippingFreight__grid__title:Zg,shippingFreight__grid__remember:Jg,postalCodeContainer:ey,deliveryStatusBar__tag:ty,deliveryStatusBarError__tag:ry,deliveryInfo:ny,deliveryInfo__content:sy,deliveryInfo__text:oy,deliveryInfo__title:ay,deliveryInfo__subtitle:iy,deliveryInfo__tooltipIcon:cy,deliveryInfo__tooltip:ly,freightGrid:uy,freightContainer:dy,freightOption__content:fy,freightOption__value:my,freightOption__title:py,freightOption__title_item:hy,freightOption__paragraph:_y,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},gy=({icon:e,title:t,subtitle:r,packageCount:s,packageUnit:o="",labelDescription:a,freightConfig:i,toolTipZIndex:c})=>{const[l,u]=y.useState(!1),m=y.useRef(null),f=()=>u(p=>!p);return n.jsxs("div",{className:he.deliveryInfo,ref:m,children:[n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsx("div",{children:n.jsx("p",{children:i.messages.select_size_tag})}),id:"freight--tooltip",className:he["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:m.current}),n.jsxs("div",{className:he.deliveryInfo__content,children:[n.jsx("div",{className:he.deliveryInfo__icon,children:n.jsx(d.Icon,{name:e,size:"medium"})}),n.jsxs("div",{className:he.deliveryInfo__text,children:[n.jsxs("span",{className:he.deliveryInfo__title,children:[t," ",s," ",o]}),r&&n.jsx("span",{className:he.deliveryInfo__subtitle,children:r})]}),a&&n.jsxs("div",{className:he.deliveryInfo__tooltipIcon,onMouseEnter:f,onMouseLeave:f,"aria-label":"Mostrar descrição",children:[n.jsx("span",{children:n.jsx(d.Icon,{name:i.icons.feedback_help,size:"small"})}),l&&n.jsx("div",{className:he.deliveryInfo__tooltip,children:a})]})]})]})},yy=({value:e,title:t,paragraph:r})=>n.jsx("div",{className:he.freightOption,children:n.jsxs("div",{className:he.freightOption__content,children:[n.jsx("span",{className:he.freightOption__value,children:e}),n.jsx("span",{className:he.freightOption__title,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:he.footer__item,children:[n.jsx("span",{className:he.freightOption__title_item,children:t}),r&&n.jsx("span",{className:he.freightOption__paragraph,children:r})]})})})]})}),vy=({children:e})=>n.jsx("div",{className:he.freightContainer,children:e}),xy=({children:e})=>n.jsx("div",{className:he.freightGrid,children:e}),by=({children:e})=>n.jsx("div",{className:he.postalCodeContainer,children:e}),Vi=({message:e,seller:t="",size:r="small",setError:s})=>n.jsx("div",{className:s?he.deliveryStatusBarError:he.deliveryStatusBar,children:n.jsxs(d.Tag,{title:e,className:s?he.deliveryStatusBarError__tag:he.deliveryStatusBar__tag,size:r,children:[e," ",!s&&t]})}),jy=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},Cy=e=>{var r,s,o;const t=[];return(o=(s=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[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},Sy=({component:e,parent:t,top:r,left:s,target:o,contentRef:a,freightConfig:i,toolTipZIndex:c=999,...l})=>{const{isMobile:u}=se();return n.jsx(n.Fragment,{children:u?n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:he["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):n.jsx(d.Tooltip.Root,{arrow:"bottom",component:n.jsxs("div",{...l,ref:a,children:[e,n.jsx("p",{children:i.messages.select_size_tag})]}),id:"freight--tooltip",className:he["freight--tooltip"],style:{zIndex:c},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},Py=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:s,quantity:o,setError:a,setIsButtonClicked:i,component:c,freightConfig:l,toolTipZIndex:u})=>{var O,M,H,F;const m=hr(),f=hr(B=>B.shipping),[p,h]=y.useState(),[_,g]=y.useState(!1),[v,b]=y.useState(!1),[C,j]=y.useState(!1),x=(M=(O=m.shippingData)==null?void 0:O.address)==null?void 0:M.postalCode,S=!(p!=null&&p.length)&&x?x:p,P=y.useRef(null),w=async B=>{const te=B.target.value.replace(/\D/g,"").slice(0,8);te.length>5?h(te.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):h(te)},N=async B=>{const $=B.target.value.replace(/\D/g,"");try{if((await Nr.get(`https://viacep.com.br/ws/${$}/json/`)).data.erro){a&&a(l.messages.cep_not_found),i(!1),b(!0);return}a&&a(""),b(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},T=async()=>{g(!0);try{const B=await Nr.post("/api/checkout/simulation",{items:[{id:s,quantity:o,seller:t}],country:"BRA",postalCode:S});e(Cy(B.data))}catch(B){console.error("Erro ao atualizar o documento:",B)}finally{g(!1),f(S,"BRA")}},I=async()=>{if(!s){j(!0),setTimeout(()=>j(!1),1500);return}await N({target:{value:S}}),_||(T(),i(!0))};return n.jsxs("div",{ref:P,style:{position:"relative"},children:[!s&&C?n.jsx(Sy,{component:c,isOpen:C,parent:P.current,toolTipZIndex:u,freightConfig:l}):n.jsx(n.Fragment,{}),n.jsx("div",{style:{position:"relative"},children:n.jsx(d.TextField.Structure,{title:"structure",style:{width:"100%"},input:n.jsx(d.TextField.Input,{defaultValue:(F=(H=m.shippingData)==null?void 0:H.address)==null?void 0:F.postalCode,label:l.messages.text_input_label,title:"textfield",value:p,sizeVariant:r,onMouseOver:()=>s?null:j(!0),onMouseOut:()=>s?null:j(!1),mode:"simple",onChange:w,onKeyDown:B=>{B.key==="Enter"&&I()},className:he["input-modifier"],feedback:v?"error":"none"}),right:n.jsx(d.Button,{onClick:I,size:r,title:"button",children:_?n.jsx(d.Spinner,{size:"small",indicatorColor:"#ffffff"}):l.messages.text_input_btn})})})]})},wy=({children:e,freightConfig:t})=>n.jsxs("div",{className:he.shippingFreight,children:[n.jsxs("div",{className:he.shippingFreight__grid,children:[n.jsx("span",{className:he.shippingFreight__grid__title,children:t.messages.title}),n.jsx("span",{className:he.shippingFreight__grid__remember,children:n.jsx(Ke,{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})})]}),n.jsx("div",{className:he.shippingFreight__postalCodeGrid,children:e})]}),Ey=({children:e})=>n.jsx("div",{className:he.freightContainer,children:e}),ff=({className:e,sellerId:t,skuId:r,quantity:s,size:o,seller:a,local:i,CONSTANTS_PROPS:c})=>{const{sendDataLayerEvent:l}=le(),[u,m]=y.useState(""),[f,p]=y.useState([]),[h,_]=y.useState(""),[g,v]=y.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 n.jsxs(Ey,{className:e,children:[n.jsxs(wy,{freightConfig:c.freightConfig,children:[n.jsx(by,{children:n.jsx(Py,{onUpdateFreightItems:C,skuId:r,quantity:s,size:o,sellerId:t,local:i,setError:_,setIsButtonClicked:v,freightConfig:c.freightConfig,toolTipZIndex:c.toolTipZIndex})}),h?n.jsx(Vi,{size:o,message:h,setError:_}):f.length>0&&n.jsx(Vi,{size:o,message:c.freightConfig.messages.delivered_by,seller:a})]}),g&&!h?f.length>0&&n.jsxs(vy,{children:[n.jsx(xy,{children:f.filter(({id:j})=>!j.includes("Retirada")).map(j=>n.jsx(yy,{id:j.id,value:k.freightParsePrice({valueInCents:j.price,hasFree:!1,freeTaxMessage:c.freightConfig.messages.free_tax}),title:j.name,paragraph:`${c.freightConfig.messages.prefix_days}${jy(j.shippingEstimate)}`,radioValue:u,changeValue:b},j.id))}),c.deliveryInfoBoxesAllowed?n.jsx(gy,{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}):n.jsx(n.Fragment,{})]}):null]})},yr={"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"},Ny=({children:e,href:t,isLast:r,title:s})=>{const{constants:{ICONS:o}}=Me();return n.jsx(d.BreadCrumb.Item,{adornment:{end:r&&n.jsx(d.Icon,{name:o.arrow_right})},children:r?n.jsx(Ke,{href:t??"/",size:"medium",title:s,disableUnderline:!0,children:e}):e})},mf=()=>{var o;const{state:e}=Fe(),t=e!=null&&e.term&&e.term.length>0?`/${e.term}`:"",r=decodeURIComponent((o=e==null?void 0:e.base)!=null&&o.length?e.base:t??t).slice(1).split("/"),s=zl(r);return n.jsx("div",{className:yr["pcd-navigation--breadcrumb"],children:n.jsx(d.BreadCrumb.DivWrapper,{children:n.jsx(d.BreadCrumb.List,{children:Array.isArray(s)&&s.map((a,i)=>{var c,l;return y.createElement(Ny,{...a,isLast:i!==s.length-1,key:a.href,title:(c=a.name)==null?void 0:c.replace(/-/g," ")},(l=a.name)==null?void 0:l.replace(/-/g," "))})})})})};mf.displayName="PLPNavigation.BreadCrumb";const pf=({children:e,...t})=>n.jsxs("div",{...t,className:yr["pdc-navigation--content"],children:[n.jsx(Qt.Filters,{}),e]});pf.displayName="PLPNavigation.Content";const Iy="_sort_35wro_1",ys={sort:Iy,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},Ry=({children:e,sortListOpen:t,btnAdornment:r,style:s,...o})=>n.jsx(d.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...s,textDecoration:"none"},className:ys["sort-button"],children:e}),Ty=e=>n.jsx(d.RadioButton.Radio,{...e}),Ay=({children:e,className:t,name:r,...s})=>n.jsx(d.RadioButton.Group,{...s,name:r||"sort-group",className:d.helpers.classNameConcat(ys["sort-list"],t),children:e}),ky=({children:e,className:t,shadow:r=!0,padding:s="small",height:o="fit-content",...a})=>n.jsx(d.Card,{...a,shadow:r,className:d.helpers.classNameConcat(ys["sort-list-wrapper"],t),padding:s,height:o,children:e}),hf=y.forwardRef(({children:e,className:t,...r},s)=>n.jsx("div",{...r,ref:s,className:d.helpers.classNameConcat(ys.sort,t),children:e}));hf.displayName="SortRoot";const vs=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:s,ICONS:o,...a})=>{var p;const i=(p=s==null?void 0:s.get("sort"))==null?void 0:p.replace(":","_"),[c,l]=y.useState(i),{sendDataLayerEvent:u}=le();y.useEffect(()=>{l(i||void 0)},[i]);const{ref:m}=yd(()=>r(!1)),f=h=>{const _=h.target.value;l(_),typeof e=="function"&&e(_),u({functionKey:"filterEvent",data:{customData:{ordering:Kr.options[_]}}}),r(!1)};return n.jsxs(hf,{...a,ref:m,children:[n.jsx(Ry,{btnAdornment:{listOpen:n.jsx(d.Icon,{name:o.arrow_up,size:"small"}),listClosed:n.jsx(d.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:c?Kr.options[c]:Kr.placeholder},"sort-button"),t&&n.jsx(ky,{children:n.jsx(Ay,{name:"sort-group",value:c??"",onChange:f,children:Object.keys(Kr.options).map(h=>n.jsx(Ty,{label:Kr.options[h],value:h},h))})})]})};vs.displayName="Sort";const _f=y.createContext({}),Oy=({children:e,...t})=>{const[r,s]=y.useState(!1);return n.jsx(_f.Provider,{value:y.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:s}),[t,r,s]),children:e})},Ly=()=>{const e=y.useContext(_f);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},gf=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:s}=Ly(),{constants:{ICONS:o,PDC_NAVIGATION:a}}=Me();return n.jsxs("div",{className:yr["pdc-navigation--filters"],children:[n.jsx(Qt.BreadCrumb,{}),n.jsxs("div",{className:yr["pdc-navigation--filters--content"],children:[n.jsx(vs,{handleSelectValue:i=>t(i??"release_desc"),sortListOpen:e,setSortListOpen:s,ICONS:o,searchParams:new URLSearchParams}),n.jsx(d.Button,{adornment:{end:n.jsx(d.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:a.filter_button}),n.jsx(Qt.Total,{})]})]})};gf.displayName="PLPNavigation.Filters";const yf=({children:e,onSort:t,setOpenFilters:r,style:s,...o})=>{const a=y.useRef(null);return n.jsx(Oy,{onSort:t,setOpenFilters:r,children:n.jsx("div",{...o,className:yr["pdc-navigation"],ref:a,style:{...s},children:n.jsx(Qt.Content,{children:e})})})};yf.displayName="Root";const vf=({callback:e,selected:t,...r})=>n.jsx("div",{...r,className:yr["pdc-navigation--selected"],children:n.jsx("div",{className:yr["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(s=>s.key==="productclusterids"?null:n.jsx(Qt.SelectedItem,{callback:e,facet:s},s.value)):null})});vf.displayName="PLPNavigation.Selected";const ka=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,Oa=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(s=>s.value===e))==null?void 0:r.color)??"#F2F2F2"},xf=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(s=>s.key===e))==null?void 0:r.label},bf=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(s=>s.key===e))==null?void 0:r.order)??0},Fo=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],s=k.formatPriceToCurrency(Number(r));return`${k.formatPriceToCurrency(Number(t))} até ${s}`},jf=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),s=Math.max(...t.map(Math.abs));return[r,s]},Cf=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:ka,createTagPrice:Fo,getAbsoluteMinMax:jf,getColor:Oa,getName:xf,getOrder:bf},Symbol.toStringTag,{value:"Module"})),lt={"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"},Sf=({columns:e=2,CONSTANTS:t,...r})=>{var a;const{filters:s,onToggleFacet:o}=Zt();return n.jsxs("div",{...r,className:lt["filter--modal--body--content"],children:[Array.isArray(s.facets)&&s.facets.map(i=>n.jsx(kt.Item,{columns:e,facet:i,onToggleFacet:o,CONSTANTS:t},i.key)),!((a=s.facets)!=null&&a.length)&&n.jsx(kt.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Sf.displayName="Filter.Item.Content";const Pf=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return n.jsxs("div",{className:lt["filter--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h4",{children:e.title}),n.jsx("p",{children:e.subtitle})]}),n.jsx(d.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Pf.displayName="Filter.Empty";const wf=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:s,...o})=>{const a=bf({key:t.key,PLP_FILTERS:s.PLP_FILTERS}),i=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return n.jsx(kt.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:s.PLP_FILTERS,PLP_FILTERS_COLORS:s.PLP_FILTERS_COLORS});if(t.key==="tamanho")return n.jsx(kt.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:s.PLP_SIZE_ORDER});if(t.key==="category-2")return n.jsx(kt.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:s.ICONS})}return t.__typename==="FacetRange"?n.jsx(kt.Price,{facet:t}):n.jsx("p",{children:"Filter not support!!!"})};return n.jsx("div",{...o,className:lt["filter--item"],style:{order:a},children:n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:t.key,closeIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_up}),openIndicator:n.jsx(d.Icon,{name:s.ICONS.arrow_down}),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h4",{className:"typography-style-body-sm",children:xf({key:t.key,PLP_FILTERS:s.PLP_FILTERS})})})})}),n.jsx(d.Accordion.Body,{children:i()})]})})};wf.displayName="Filter.Item";const Ef=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:s,...o})=>{const{filters:{selected:a}}=Zt();return n.jsx(xt.Root,{...o,children:n.jsx(xt.List,{children:Array.isArray(t)&&t.map(({key:i,value:c})=>n.jsx(xt.Option,{active:!!(a!=null&&a.find(l=>l.key===i&&l.value===c)),"data-color":ka({key:i,PLP_FILTERS:r}),fill:Oa({value:c,PLP_FILTERS_COLORS:s}),onClick:()=>e({key:i,value:c}),type:"color"},`${i}-${c}`))})})};Ef.displayName="Filter.Item.Color";const Nf=({facet:e,...t})=>{var u,m;const{filters:{selected:r},price:s,onToggleFacet:o}=Zt(),[a,i]=(s==null?void 0:s.split(":").map(Number))??[0,100],[c,l]=((m=(u=r==null?void 0:r.find(({key:f})=>f==="price"))==null?void 0:u.value)==null?void 0:m.split(":").map(Number))??[a,i];return n.jsx("div",{...t,className:lt["filter--item--price"],children:n.jsxs(d.Slider.SliderDual,{format:"price",initialValue:[c<a?a:c,l>i?i:l],min:a,max:i,type:"dual",step:1,onFinish:f=>{var p,h;f&&o({key:"price",value:`${(p=f.range)==null?void 0:p.min}:${(h=f.range)==null?void 0:h.max}`})},children:[n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-min-value":!0})})}),n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{"data-max-value":!0})})})]})})};Nf.displayName="Filter.Item.Price";const If=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...s})=>{const{filters:{selected:o}}=Zt(),a=[...t].sort((i,c)=>{const l=r.indexOf(i.name),u=r.indexOf(c.name);return l-u});return n.jsx(xt.Root,{...s,children:n.jsx(xt.List,{children:Array.isArray(a)&&a.map(({key:i,value:c})=>n.jsx(xt.Option,{active:!!(o!=null&&o.find(l=>l.key===i&&l.value===c)),text:c,type:"size",onClick:()=>e({key:i,value:c})},c))})})};If.displayName="Filter.Item.Sizes";const Rf=({columns:e,facetKey:t,onToggleFacet:r,values:s,ICONS:o,...a})=>n.jsx("div",{...a,className:lt["filter--item--toggle"],children:n.jsx("div",{className:lt["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(s)&&s.map(i=>n.jsx(d.Checkbox,{label:(i==null?void 0:i.name)??"",adornment:n.jsx(d.Icon,{name:o.check}),checked:i.selected,onChange:()=>r(i)},i.value))})});Rf.displayName="Filter.Item.Toggle";const Tf=({...e})=>{const{isLoading:t}=Zt();return n.jsx("div",{className:lt["filter--loading"],"data-active":t,...e,children:n.jsx(d.Spinner,{indicatorColor:"#000",background:"#222"})})};Tf.displayName="Filter.Loading";const Af=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:s,ICONS:o}})=>{var m;const{deleteAllFacets:a,filters:i,isOpen:c,target:l,setIsOpen:u}=Zt();return n.jsxs(d.Modal.Root,{className:d.helpers.classNameConcat(lt["filter--modal"],t),isMobile:r??!1,isOpen:c,parent:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[n.jsxs(d.Modal.Header,{navigation:"top",children:[n.jsx(d.Modal.Controls,{navigation:"top",isMobile:r,children:n.jsx(d.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),n.jsx(d.Modal.Title,{navigation:"top",title:s})]}),n.jsxs(d.Modal.Body,{style:{width:500},children:[n.jsx("div",{className:lt["filter--modal--body"],children:e}),n.jsx(kt.Loading,{})]}),n.jsx(d.Modal.Footer,{children:n.jsxs("div",{className:lt["filter--modal--footer"],children:[n.jsx(d.Button,{"data-close":!0,size:"large",variant:"primary",children:(m=i.facets)!=null&&m.length?"ver resultados":"fechar"}),n.jsx(d.Button,{"data-close":!0,onClick:()=>a(),variant:"tertiary",children:"limpar filtros"})]})})]})};Af.displayName="Filter.Modal";const kf=({children:e,className:t,isMobile:r,CONSTANTS:s,...o})=>n.jsx(ru,{...o,PLP_FILTERS:s.PLP_FILTERS,children:n.jsx(kt.Modal,{className:t,isMobile:r,CONSTANTS:s,children:e})});kf.displayName="Filter.Root";const Of=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:s,onToggleFacet:o}=Zt();return n.jsx("div",{className:lt["filter--selected"],children:n.jsx("div",{className:lt["filter--selected--content"],children:Array.isArray(s.selected)&&s.selected.map(({key:a,value:i})=>a==="productclusterids"?null:n.jsx(d.Tag,{title:a==="price"?Fo({value:i}):i,adornment:{end:n.jsx(d.Icon,{name:e.close,size:"x-small"})},colorSquare:Oa({value:i,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:a,value:i}),squareShow:ka({key:a,PLP_FILTERS:r}),size:"medium",variant:"primary",children:a==="price"?Fo({value:i}):i},i))})})};Of.displayName="Filter.Selected";const kt={Colors:Ef,Content:Sf,Empty:Pf,Modal:Af,Item:wf,Root:kf,Loading:Tf,Selected:Of,Price:Nf,Sizes:If,Toggle:Rf},{checkedColor:My,createTagPrice:Wi,getColor:Dy}=Cf,Lf=({callback:e,facet:t})=>{const{constants:{ICONS:r,PLP_FILTERS_COLORS:s,PLP_FILTERS:o}}=Me();return n.jsx(d.Tag,{title:(t==null?void 0:t.key)==="price"?Wi({value:t.value}):t.value.toUpperCase(),adornment:{end:n.jsx(d.Icon,{name:r.close,size:"x-small"})},colorSquare:Dy({value:t.value,PLP_FILTERS_COLORS:s}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:My({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Wi({value:t.value}):t.value.toUpperCase()})};Lf.displayName="PLPNavigation.Selected.Item";const Mf=()=>n.jsx(d.TextStructure.Root,{children:n.jsx("p",{id:"pdc-navigation--total"})});Mf.displayName="PLPNavigation.Total";const Qt={BreadCrumb:mf,Content:pf,Filters:gf,Root:yf,Selected:vf,SelectedItem:Lf,Total:Mf},Fy="_footer__bottom_198g6_2",zy="_footer__wrapper_198g6_10",By="_footer__main_198g6_39",Uy="_footer__legalInformation_198g6_55",qy="_footer__column_198g6_77",Hy="_footer__columnContent_198g6_87",$y="_footer__item_198g6_91",Vy="_footer__itemLink_198g6_107",Wy="_footer__columnTitle_198g6_122",Gy="_footer__columnTitleIcon_198g6_134",Ky="_footer__iconList_198g6_147",Qy="_footer__itemSmallText_198g6_157",Xy="_payment_198g6_168",Yy="_footer__iconContainer_198g6_173",Zy="_footer__iconListSubHeader_198g6_178",Jy="_accordionWrapper_198g6_200",ev="_accordionHeader_198g6_204",tv="_accordionTextWrapper_198g6_208",ge={footer__bottom:Fy,footer__wrapper:zy,footer__main:By,footer__legalInformation:Uy,footer__column:qy,footer__columnContent:Hy,footer__item:$y,footer__itemLink:Vy,footer__columnTitle:Wy,footer__columnTitleIcon:Gy,footer__iconList:Ky,footer__itemSmallText:Qy,payment:Xy,footer__iconContainer:Yy,footer__iconListSubHeader:Zy,accordionWrapper:Jy,accordionHeader:ev,accordionTextWrapper:tv,"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 Df={},La={},xs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=s=>{r.has(s)||console.warn(s),r.add(s)}}})(xs);var Ff={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:s,heightInt:o,blurWidth:a,blurHeight:i,blurDataURL:c,objectFit:l}=r;const u=20,m=a?a*40:s,f=i?i*40:o,p=m&&f?"viewBox='0 0 "+m+" "+f+"'":"",h=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='"+h+"' style='filter: url(%23b);' href='"+c+"'/%3E%3C/svg%3E"}})(Ff);var bs={};(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 r},imageConfigDefault:function(){return s}});const r=["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}})(bs);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return h}});const t=xs,r=Ff,s=bs,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 f(_,g,v){let{deviceSizes:b,allSizes:C}=_;if(v){const x=/(^|\s)(1?\d?\d)vw/g,S=[];for(let P;P=x.exec(v);P)S.push(parseInt(P[2]));if(S.length){const P=Math.min(...S)*.01;return{widths:C.filter(w=>w>=b[0]*P),kind:"w"}}return{widths:C,kind:"w"}}return typeof g!="number"?{widths:b,kind:"w"}:{widths:[...new Set([g,g*2].map(x=>C.find(S=>S>=x)||C[C.length-1]))],kind:"x"}}function p(_){let{config:g,src:v,unoptimized:b,width:C,quality:j,sizes:x,loader:S}=_;if(b)return{src:v,srcSet:void 0,sizes:void 0};const{widths:P,kind:w}=f(g,C,x),N=P.length-1;return{sizes:!x&&w==="w"?"100vw":x,srcSet:P.map((T,I)=>S({config:g,src:v,quality:j,width:T})+" "+(w==="w"?T:I+1)+w).join(", "),src:S({config:g,src:v,quality:j,width:P[N]})}}function h(_,g){let{src:v,sizes:b,unoptimized:C=!1,priority:j=!1,loading:x,className:S,quality:P,width:w,height:N,fill:T=!1,style:I,overrideSrc:O,onLoad:M,onLoadingComplete:H,placeholder:F="empty",blurDataURL:B,fetchPriority:$,decoding:te="async",layout:Z,objectFit:V,objectPosition:ee,lazyBoundary:ie,lazyRoot:_e,...ce}=_;const{imgConf:pe,showAltText:z,blurComplete:ne,defaultLoader:R}=g;let Q,ue=pe||s.imageConfigDefault;if("allSizes"in ue)Q=ue;else{var be;const X=[...ue.deviceSizes,...ue.imageSizes].sort((oe,je)=>oe-je),D=ue.deviceSizes.sort((oe,je)=>oe-je),q=(be=ue.qualities)==null?void 0:be.sort((oe,je)=>oe-je);Q={...ue,allSizes:X,deviceSizes:D,qualities:q}}if(typeof R>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
5
|
+
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let A=ce.loader||R;delete ce.loader,delete ce.srcSet;const L="__next_img_default"in A;if(L){if(Q.loader==="custom")throw new Error('Image with src "'+v+`" is missing "loader" prop.
|
|
6
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const X=A;A=D=>{const{config:q,...oe}=D;return X(oe)}}if(Z){Z==="fill"&&(T=!0);const X={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},D={responsive:"100vw",fill:"100vw"},q=X[Z];q&&(I={...I,...q});const oe=D[Z];oe&&!b&&(b=oe)}let qe="",K=m(w),Y=m(N),Ne,ze;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(Ne=X.blurWidth,ze=X.blurHeight,B=B||X.blurDataURL,qe=X.src,!T){if(!K&&!Y)K=X.width,Y=X.height;else if(K&&!Y){const D=K/X.width;Y=Math.round(X.height*D)}else if(!K&&Y){const D=Y/X.height;K=Math.round(X.width*D)}}}v=typeof v=="string"?v:qe;let Ie=!j&&(x==="lazy"||typeof x>"u");(!v||v.startsWith("data:")||v.startsWith("blob:"))&&(C=!0,Ie=!1),Q.unoptimized&&(C=!0),L&&v.endsWith(".svg")&&!Q.dangerouslyAllowSVG&&(C=!0),j&&($="high");const Ce=m(P);if(process.env.NODE_ENV!=="production"){if(Q.output==="export"&&L&&!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(T){if(w)throw new Error('Image with src "'+v+'" has both "width" and "fill" properties. Only one should be used.');if(N)throw new Error('Image with src "'+v+'" has both "height" and "fill" properties. Only one should be used.');if(I!=null&&I.position&&I.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(I!=null&&I.width&&I.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(I!=null&&I.height&&I.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 K>"u")throw new Error('Image with src "'+v+'" is missing required "width" property.');if(isNaN(K))throw new Error('Image with src "'+v+'" has invalid "width" property. Expected a numeric value in pixels but received "'+w+'".');if(typeof Y>"u")throw new Error('Image with src "'+v+'" is missing required "height" property.');if(isNaN(Y))throw new Error('Image with src "'+v+'" has invalid "height" property. Expected a numeric value in pixels but received "'+N+'".')}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(F!=="empty"&&F!=="blur"&&!F.startsWith("data:image/"))throw new Error('Image with src "'+v+'" has invalid "placeholder" property "'+F+'".');if(F!=="empty"&&K&&Y&&K*Y<1600&&(0,t.warnOnce)('Image with src "'+v+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),F==="blur"&&!B){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:
|
|
8
8
|
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
9
|
-
- Change the "src" property to a static import with one of the supported file types: `+
|
|
9
|
+
- Change the "src" property to a static import with one of the supported file types: `+X.join(",")+` (animated images not supported)
|
|
10
10
|
- Remove the "placeholder" property, effectively no blur effect
|
|
11
|
-
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in
|
|
12
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}
|
|
13
|
-
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!u&&window.PerformanceObserver){u=new PerformanceObserver(
|
|
14
|
-
Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{u.observe({type:"largest-contentful-paint",buffered:!0})}catch(
|
|
15
|
-
See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else
|
|
16
|
-
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(S,{key:N})})}function v(j){let{children:b}=j;const w=(0,i.useContext)(l.AmpStateContext),S=(0,i.useContext)(u.HeadManagerContext);return(0,o.jsx)(c.default,{reduceComponentsToState:x,headManager:S,inAmpMode:(0,m.isInAmpMode)(w),children:b})}const C=v;(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Sn,Sn.exports)),Sn.exports}var Mr={},ca;function i_(){return ca||(ca=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return a}});const r=ke._(g),s=rr,a=r.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(a.displayName="ImageConfigContext")}(Mr)),Mr}var Dr={},Fr={},zr={exports:{}},la;function ku(){return la||(la=1,(()=>{var e={170:(a,o,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,p,f=!1){return p&&(p.windows===null||p.windows===void 0)&&(p={...p,windows:l()}),c(m,p,f)}Object.assign(u,c),a.exports=u},154:a=>{const o="\\\\/",i=`[^${o}]`,c="\\.",l="\\+",u="\\?",m="\\/",p="(?=.)",f="[^/]",h=`(?:${m}|$)`,_=`(?:^|${m})`,y=`${c}{1,2}${h}`,x=`(?!${c})`,v=`(?!${_}${y})`,C=`(?!${c}{0,1}${h})`,j=`(?!${y})`,b=`[^.${m}]`,w=`${f}*?`,P={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:m,ONE_CHAR:p,QMARK:f,END_ANCHOR:h,DOTS_SLASH:y,NO_DOT:x,NO_DOTS:v,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:b,STAR:w,START_ANCHOR:_,SEP:"/"},N={...P,SLASH_LITERAL:`[${o}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${o}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${o}])${c}{1,2}(?:[${o}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${o}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${o}]|$))`,QMARK_NO_DOT:`[^.${o}]`,START_ANCHOR:`(?:^|[${o}])`,END_ANCHOR:`(?:[${o}]|$)`,SEP:"\\"},R={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"};a.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:R,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(k){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${k.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(k){return k===!0?N:P}}},697:(a,o,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:m,REGEX_NON_SPECIAL_CHARS:p,REGEX_SPECIAL_CHARS_BACKREF:f,REPLACEMENTS:h}=c,_=(v,C)=>{if(typeof C.expandRange=="function")return C.expandRange(...v,C);v.sort();const j=`[${v.join("-")}]`;try{new RegExp(j)}catch{return v.map(w=>l.escapeRegex(w)).join("..")}return j},y=(v,C)=>`Missing ${v}: "${C}" - use "\\\\${C}" to match literal characters`,x=(v,C)=>{if(typeof v!="string")throw new TypeError("Expected a string");v=h[v]||v;const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let w=v.length;if(w>b)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${b}`);const S={type:"bos",value:"",output:j.prepend||""},P=[S],N=j.capture?"":"?:",R=c.globChars(j.windows),k=c.extglobChars(R),{DOT_LITERAL:O,PLUS_LITERAL:M,SLASH_LITERAL:X,ONE_CHAR:D,DOTS_SLASH:q,NO_DOT:U,NO_DOT_SLASH:Q,NO_DOTS_SLASH:G,QMARK:H,QMARK_NO_DOT:J,STAR:se,START_ANCHOR:de}=R,oe=$=>`(${N}(?:(?!${de}${$.dot?q:O}).)*?)`,le=j.dot?"":U,F=j.dot?H:J;let ee=j.bash===!0?oe(j):se;j.capture&&(ee=`(${ee})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const E={input:v,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:P};v=l.removePrefix(v,E),w=v.length;const W=[],ie=[],he=[];let I=S,A;const Te=()=>E.index===w-1,V=E.peek=($=1)=>v[E.index+$],Y=E.advance=()=>v[++E.index]||"",be=()=>v.slice(E.index+1),Ie=($="",K=0)=>{E.consumed+=$,E.index+=K},je=$=>{E.output+=$.output!=null?$.output:$.value,Ie($.value)},ge=()=>{let $=1;for(;V()==="!"&&(V(2)!=="("||V(3)==="?");)Y(),E.start++,$++;return $%2===0?!1:(E.negated=!0,E.start++,!0)},Ae=$=>{E[$]++,he.push($)},Ce=$=>{E[$]--,he.pop()},z=$=>{if(I.type==="globstar"){const K=E.braces>0&&($.type==="comma"||$.type==="brace"),L=$.extglob===!0||W.length&&($.type==="pipe"||$.type==="paren");$.type!=="slash"&&$.type!=="paren"&&!K&&!L&&(E.output=E.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=ee,E.output+=I.output)}if(W.length&&$.type!=="paren"&&(W[W.length-1].inner+=$.value),($.value||$.output)&&je($),I&&I.type==="text"&&$.type==="text"){I.output=(I.output||I.value)+$.value,I.value+=$.value;return}$.prev=I,P.push($),I=$},pe=($,K)=>{const L={...k[K],conditions:1,inner:""};L.prev=I,L.parens=E.parens,L.output=E.output;const B=(j.capture?"(":"")+L.open;Ae("parens"),z({type:$,value:K,output:E.output?"":D}),z({type:"paren",extglob:!0,value:Y(),output:B}),W.push(L)},ye=$=>{let K=$.close+(j.capture?")":""),L;if($.type==="negate"){let B=ee;if($.inner&&$.inner.length>1&&$.inner.includes("/")&&(B=oe(j)),(B!==ee||Te()||/^\)+$/.test(be()))&&(K=$.close=`)$))${B}`),$.inner.includes("*")&&(L=be())&&/^\.[^\\/.]+$/.test(L)){const te=x(L,{...C,fastpaths:!1}).output;K=$.close=`)${te})${B})`}$.prev.type==="bos"&&(E.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:A,output:K}),Ce("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(v)){let $=!1,K=v.replace(f,(L,B,te,_e,Ee,cr)=>_e==="\\"?($=!0,L):_e==="?"?B?B+_e+(Ee?H.repeat(Ee.length):""):cr===0?F+(Ee?H.repeat(Ee.length):""):H.repeat(te.length):_e==="."?O.repeat(te.length):_e==="*"?B?B+_e+(Ee?ee:""):ee:B?L:`\\${L}`);return $===!0&&(j.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,L=>L.length%2===0?"\\\\":L?"\\":"")),K===v&&j.contains===!0?(E.output=v,E):(E.output=l.wrapOutput(K,E,C),E)}for(;!Te();){if(A=Y(),A==="\0")continue;if(A==="\\"){const L=V();if(L==="/"&&j.bash!==!0||L==="."||L===";")continue;if(!L){A+="\\",z({type:"text",value:A});continue}const B=/^\\+/.exec(be());let te=0;if(B&&B[0].length>2&&(te=B[0].length,E.index+=te,te%2!==0&&(A+="\\")),j.unescape===!0?A=Y():A+=Y(),E.brackets===0){z({type:"text",value:A});continue}}if(E.brackets>0&&(A!=="]"||I.value==="["||I.value==="[^")){if(j.posix!==!1&&A===":"){const L=I.value.slice(1);if(L.includes("[")&&(I.posix=!0,L.includes(":"))){const B=I.value.lastIndexOf("["),te=I.value.slice(0,B),_e=I.value.slice(B+2),Ee=m[_e];if(Ee){I.value=te+Ee,E.backtrack=!0,Y(),!S.output&&P.indexOf(I)===1&&(S.output=D);continue}}}(A==="["&&V()!==":"||A==="-"&&V()==="]")&&(A=`\\${A}`),A==="]"&&(I.value==="["||I.value==="[^")&&(A=`\\${A}`),j.posix===!0&&A==="!"&&I.value==="["&&(A="^"),I.value+=A,je({value:A});continue}if(E.quotes===1&&A!=='"'){A=l.escapeRegex(A),I.value+=A,je({value:A});continue}if(A==='"'){E.quotes=E.quotes===1?0:1,j.keepQuotes===!0&&z({type:"text",value:A});continue}if(A==="("){Ae("parens"),z({type:"paren",value:A});continue}if(A===")"){if(E.parens===0&&j.strictBrackets===!0)throw new SyntaxError(y("opening","("));const L=W[W.length-1];if(L&&E.parens===L.parens+1){ye(W.pop());continue}z({type:"paren",value:A,output:E.parens?")":"\\)"}),Ce("parens");continue}if(A==="["){if(j.nobracket===!0||!be().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));A=`\\${A}`}else Ae("brackets");z({type:"bracket",value:A});continue}if(A==="]"){if(j.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){z({type:"text",value:A,output:`\\${A}`});continue}if(E.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(y("opening","["));z({type:"text",value:A,output:`\\${A}`});continue}Ce("brackets");const L=I.value.slice(1);if(I.posix!==!0&&L[0]==="^"&&!L.includes("/")&&(A=`/${A}`),I.value+=A,je({value:A}),j.literalBrackets===!1||l.hasRegexChars(L))continue;const B=l.escapeRegex(I.value);if(E.output=E.output.slice(0,-I.value.length),j.literalBrackets===!0){E.output+=B,I.value=B;continue}I.value=`(${N}${B}|${I.value})`,E.output+=I.value;continue}if(A==="{"&&j.nobrace!==!0){Ae("braces");const L={type:"brace",value:A,output:"(",outputIndex:E.output.length,tokensIndex:E.tokens.length};ie.push(L),z(L);continue}if(A==="}"){const L=ie[ie.length-1];if(j.nobrace===!0||!L){z({type:"text",value:A,output:A});continue}let B=")";if(L.dots===!0){const te=P.slice(),_e=[];for(let Ee=te.length-1;Ee>=0&&(P.pop(),te[Ee].type!=="brace");Ee--)te[Ee].type!=="dots"&&_e.unshift(te[Ee].value);B=_(_e,j),E.backtrack=!0}if(L.comma!==!0&&L.dots!==!0){const te=E.output.slice(0,L.outputIndex),_e=E.tokens.slice(L.tokensIndex);L.value=L.output="\\{",A=B="\\}",E.output=te;for(const Ee of _e)E.output+=Ee.output||Ee.value}z({type:"brace",value:A,output:B}),Ce("braces"),ie.pop();continue}if(A==="|"){W.length>0&&W[W.length-1].conditions++,z({type:"text",value:A});continue}if(A===","){let L=A;const B=ie[ie.length-1];B&&he[he.length-1]==="braces"&&(B.comma=!0,L="|"),z({type:"comma",value:A,output:L});continue}if(A==="/"){if(I.type==="dot"&&E.index===E.start+1){E.start=E.index+1,E.consumed="",E.output="",P.pop(),I=S;continue}z({type:"slash",value:A,output:X});continue}if(A==="."){if(E.braces>0&&I.type==="dot"){I.value==="."&&(I.output=O);const L=ie[ie.length-1];I.type="dots",I.output+=A,I.value+=A,L.dots=!0;continue}if(E.braces+E.parens===0&&I.type!=="bos"&&I.type!=="slash"){z({type:"text",value:A,output:O});continue}z({type:"dot",value:A,output:O});continue}if(A==="?"){if(!(I&&I.value==="(")&&j.noextglob!==!0&&V()==="("&&V(2)!=="?"){pe("qmark",A);continue}if(I&&I.type==="paren"){const B=V();let te=A;(I.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(be()))&&(te=`\\${A}`),z({type:"text",value:A,output:te});continue}if(j.dot!==!0&&(I.type==="slash"||I.type==="bos")){z({type:"qmark",value:A,output:J});continue}z({type:"qmark",value:A,output:H});continue}if(A==="!"){if(j.noextglob!==!0&&V()==="("&&(V(2)!=="?"||!/[!=<:]/.test(V(3)))){pe("negate",A);continue}if(j.nonegate!==!0&&E.index===0){ge();continue}}if(A==="+"){if(j.noextglob!==!0&&V()==="("&&V(2)!=="?"){pe("plus",A);continue}if(I&&I.value==="("||j.regex===!1){z({type:"plus",value:A,output:M});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||E.parens>0){z({type:"plus",value:A});continue}z({type:"plus",value:M});continue}if(A==="@"){if(j.noextglob!==!0&&V()==="("&&V(2)!=="?"){z({type:"at",extglob:!0,value:A,output:""});continue}z({type:"text",value:A});continue}if(A!=="*"){(A==="$"||A==="^")&&(A=`\\${A}`);const L=p.exec(be());L&&(A+=L[0],E.index+=L[0].length),z({type:"text",value:A});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=A,I.output=ee,E.backtrack=!0,E.globstar=!0,Ie(A);continue}let $=be();if(j.noextglob!==!0&&/^\([^?]/.test($)){pe("star",A);continue}if(I.type==="star"){if(j.noglobstar===!0){Ie(A);continue}const L=I.prev,B=L.prev,te=L.type==="slash"||L.type==="bos",_e=B&&(B.type==="star"||B.type==="globstar");if(j.bash===!0&&(!te||$[0]&&$[0]!=="/")){z({type:"star",value:A,output:""});continue}const Ee=E.braces>0&&(L.type==="comma"||L.type==="brace"),cr=W.length&&(L.type==="pipe"||L.type==="paren");if(!te&&L.type!=="paren"&&!Ee&&!cr){z({type:"star",value:A,output:""});continue}for(;$.slice(0,3)==="/**";){const dn=v[E.index+4];if(dn&&dn!=="/")break;$=$.slice(3),Ie("/**",3)}if(L.type==="bos"&&Te()){I.type="globstar",I.value+=A,I.output=oe(j),E.output=I.output,E.globstar=!0,Ie(A);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&!_e&&Te()){E.output=E.output.slice(0,-(L.output+I.output).length),L.output=`(?:${L.output}`,I.type="globstar",I.output=oe(j)+(j.strictSlashes?")":"|$)"),I.value+=A,E.globstar=!0,E.output+=L.output+I.output,Ie(A);continue}if(L.type==="slash"&&L.prev.type!=="bos"&&$[0]==="/"){const dn=$[1]!==void 0?"|$":"";E.output=E.output.slice(0,-(L.output+I.output).length),L.output=`(?:${L.output}`,I.type="globstar",I.output=`${oe(j)}${X}|${X}${dn})`,I.value+=A,E.output+=L.output+I.output,E.globstar=!0,Ie(A+Y()),z({type:"slash",value:"/",output:""});continue}if(L.type==="bos"&&$[0]==="/"){I.type="globstar",I.value+=A,I.output=`(?:^|${X}|${oe(j)}${X})`,E.output=I.output,E.globstar=!0,Ie(A+Y()),z({type:"slash",value:"/",output:""});continue}E.output=E.output.slice(0,-I.output.length),I.type="globstar",I.output=oe(j),I.value+=A,E.output+=I.output,E.globstar=!0,Ie(A);continue}const K={type:"star",value:A,output:ee};if(j.bash===!0){K.output=".*?",(I.type==="bos"||I.type==="slash")&&(K.output=le+K.output),z(K);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&j.regex===!0){K.output=A,z(K);continue}(E.index===E.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(E.output+=Q,I.output+=Q):j.dot===!0?(E.output+=G,I.output+=G):(E.output+=le,I.output+=le),V()!=="*"&&(E.output+=D,I.output+=D)),z(K)}for(;E.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","]"));E.output=l.escapeLast(E.output,"["),Ce("brackets")}for(;E.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing",")"));E.output=l.escapeLast(E.output,"("),Ce("parens")}for(;E.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(y("closing","}"));E.output=l.escapeLast(E.output,"{"),Ce("braces")}if(j.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&z({type:"maybe_slash",value:"",output:`${X}?`}),E.backtrack===!0){E.output="";for(const $ of E.tokens)E.output+=$.output!=null?$.output:$.value,$.suffix&&(E.output+=$.suffix)}return E};x.fastpaths=(v,C)=>{const j={...C},b=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,w=v.length;if(w>b)throw new SyntaxError(`Input length: ${w}, exceeds maximum allowed length: ${b}`);v=h[v]||v;const{DOT_LITERAL:S,SLASH_LITERAL:P,ONE_CHAR:N,DOTS_SLASH:R,NO_DOT:k,NO_DOTS:O,NO_DOTS_SLASH:M,STAR:X,START_ANCHOR:D}=c.globChars(j.windows),q=j.dot?O:k,U=j.dot?M:k,Q=j.capture?"":"?:",G={negated:!1,prefix:""};let H=j.bash===!0?".*?":X;j.capture&&(H=`(${H})`);const J=le=>le.noglobstar===!0?H:`(${Q}(?:(?!${D}${le.dot?R:S}).)*?)`,se=le=>{switch(le){case"*":return`${q}${N}${H}`;case".*":return`${S}${N}${H}`;case"*.*":return`${q}${H}${S}${N}${H}`;case"*/*":return`${q}${H}${P}${N}${U}${H}`;case"**":return q+J(j);case"**/*":return`(?:${q}${J(j)}${P})?${U}${N}${H}`;case"**/*.*":return`(?:${q}${J(j)}${P})?${U}${H}${S}${N}${H}`;case"**/.*":return`(?:${q}${J(j)}${P})?${S}${N}${H}`;default:{const F=/^(.*?)\.(\w+)$/.exec(le);if(!F)return;const ee=se(F[1]);return ee?ee+S+F[2]:void 0}}},de=l.removePrefix(v,G);let oe=se(de);return oe&&j.strictSlashes!==!0&&(oe+=`${P}?`),oe},a.exports=x},510:(a,o,i)=>{const c=i(716),l=i(697),u=i(96),m=i(154),p=h=>h&&typeof h=="object"&&!Array.isArray(h),f=(h,_,y=!1)=>{if(Array.isArray(h)){const P=h.map(R=>f(R,_,y));return R=>{for(const k of P){const O=k(R);if(O)return O}return!1}}const x=p(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!x)throw new TypeError("Expected pattern to be a non-empty string");const v=_||{},C=v.windows,j=x?f.compileRe(h,_):f.makeRe(h,_,!1,!0),b=j.state;delete j.state;let w=()=>!1;if(v.ignore){const P={..._,ignore:null,onMatch:null,onResult:null};w=f(v.ignore,P,y)}const S=(P,N=!1)=>{const{isMatch:R,match:k,output:O}=f.test(P,j,_,{glob:h,posix:C}),M={glob:h,state:b,regex:j,posix:C,input:P,output:O,match:k,isMatch:R};return typeof v.onResult=="function"&&v.onResult(M),R===!1?(M.isMatch=!1,N?M:!1):w(P)?(typeof v.onIgnore=="function"&&v.onIgnore(M),M.isMatch=!1,N?M:!1):(typeof v.onMatch=="function"&&v.onMatch(M),N?M:!0)};return y&&(S.state=b),S};f.test=(h,_,y,{glob:x,posix:v}={})=>{if(typeof h!="string")throw new TypeError("Expected input to be a string");if(h==="")return{isMatch:!1,output:""};const C=y||{},j=C.format||(v?u.toPosixSlashes:null);let b=h===x,w=b&&j?j(h):h;return b===!1&&(w=j?j(h):h,b=w===x),(b===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?b=f.matchBase(h,_,y,v):b=_.exec(w)),{isMatch:!!b,match:b,output:w}},f.matchBase=(h,_,y)=>(_ instanceof RegExp?_:f.makeRe(_,y)).test(u.basename(h)),f.isMatch=(h,_,y)=>f(_,y)(h),f.parse=(h,_)=>Array.isArray(h)?h.map(y=>f.parse(y,_)):l(h,{..._,fastpaths:!1}),f.scan=(h,_)=>c(h,_),f.compileRe=(h,_,y=!1,x=!1)=>{if(y===!0)return h.output;const v=_||{},C=v.contains?"":"^",j=v.contains?"":"$";let b=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(b=`^(?!${b}).*$`);const w=f.toRegex(b,_);return x===!0&&(w.state=h),w},f.makeRe=(h,_={},y=!1,x=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let v={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(v.output=l.fastpaths(h,_)),v.output||(v=l(h,_)),f.compileRe(v,_,y,x)},f.toRegex=(h,_)=>{try{const y=_||{};return new RegExp(h,y.flags||(y.nocase?"i":""))}catch(y){if(_&&_.debug===!0)throw y;return/$^/}},f.constants=m,a.exports=f},716:(a,o,i)=>{const c=i(96),{CHAR_ASTERISK:l,CHAR_AT:u,CHAR_BACKWARD_SLASH:m,CHAR_COMMA:p,CHAR_DOT:f,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:y,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:v,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:b,CHAR_RIGHT_PARENTHESES:w,CHAR_RIGHT_SQUARE_BRACKET:S}=i(154),P=k=>k===_||k===m,N=k=>{k.isPrefix!==!0&&(k.depth=k.isGlobstar?1/0:1)},R=(k,O)=>{const M=O||{},X=k.length-1,D=M.parts===!0||M.scanToEnd===!0,q=[],U=[],Q=[];let G=k,H=-1,J=0,se=0,de=!1,oe=!1,le=!1,F=!1,ee=!1,E=!1,W=!1,ie=!1,he=!1,I=!1,A=0,Te,V,Y={value:"",depth:0,isGlob:!1};const be=()=>H>=X,Ie=()=>G.charCodeAt(H+1),je=()=>(Te=V,G.charCodeAt(++H));for(;H<X;){V=je();let pe;if(V===m){W=Y.backslashes=!0,V=je(),V===y&&(E=!0);continue}if(E===!0||V===y){for(A++;be()!==!0&&(V=je());){if(V===m){W=Y.backslashes=!0,je();continue}if(V===y){A++;continue}if(E!==!0&&V===f&&(V=je())===f){if(de=Y.isBrace=!0,le=Y.isGlob=!0,I=!0,D===!0)continue;break}if(E!==!0&&V===p){if(de=Y.isBrace=!0,le=Y.isGlob=!0,I=!0,D===!0)continue;break}if(V===b&&(A--,A===0)){E=!1,de=Y.isBrace=!0,I=!0;break}}if(D===!0)continue;break}if(V===_){if(q.push(H),U.push(Y),Y={value:"",depth:0,isGlob:!1},I===!0)continue;if(Te===f&&H===J+1){J+=2;continue}se=H+1;continue}if(M.noext!==!0&&(V===C||V===u||V===l||V===j||V===h)===!0&&Ie()===x){if(le=Y.isGlob=!0,F=Y.isExtglob=!0,I=!0,V===h&&H===J&&(he=!0),D===!0){for(;be()!==!0&&(V=je());){if(V===m){W=Y.backslashes=!0,V=je();continue}if(V===w){le=Y.isGlob=!0,I=!0;break}}continue}break}if(V===l){if(Te===l&&(ee=Y.isGlobstar=!0),le=Y.isGlob=!0,I=!0,D===!0)continue;break}if(V===j){if(le=Y.isGlob=!0,I=!0,D===!0)continue;break}if(V===v){for(;be()!==!0&&(pe=je());){if(pe===m){W=Y.backslashes=!0,je();continue}if(pe===S){oe=Y.isBracket=!0,le=Y.isGlob=!0,I=!0;break}}if(D===!0)continue;break}if(M.nonegate!==!0&&V===h&&H===J){ie=Y.negated=!0,J++;continue}if(M.noparen!==!0&&V===x){if(le=Y.isGlob=!0,D===!0){for(;be()!==!0&&(V=je());){if(V===x){W=Y.backslashes=!0,V=je();continue}if(V===w){I=!0;break}}continue}break}if(le===!0){if(I=!0,D===!0)continue;break}}M.noext===!0&&(F=!1,le=!1);let ge=G,Ae="",Ce="";J>0&&(Ae=G.slice(0,J),G=G.slice(J),se-=J),ge&&le===!0&&se>0?(ge=G.slice(0,se),Ce=G.slice(se)):le===!0?(ge="",Ce=G):ge=G,ge&&ge!==""&&ge!=="/"&&ge!==G&&P(ge.charCodeAt(ge.length-1))&&(ge=ge.slice(0,-1)),M.unescape===!0&&(Ce&&(Ce=c.removeBackslashes(Ce)),ge&&W===!0&&(ge=c.removeBackslashes(ge)));const z={prefix:Ae,input:k,start:J,base:ge,glob:Ce,isBrace:de,isBracket:oe,isGlob:le,isExtglob:F,isGlobstar:ee,negated:ie,negatedExtglob:he};if(M.tokens===!0&&(z.maxDepth=0,P(V)||U.push(Y),z.tokens=U),M.parts===!0||M.tokens===!0){let pe;for(let ye=0;ye<q.length;ye++){const $=pe?pe+1:J,K=q[ye],L=k.slice($,K);M.tokens&&(ye===0&&J!==0?(U[ye].isPrefix=!0,U[ye].value=Ae):U[ye].value=L,N(U[ye]),z.maxDepth+=U[ye].depth),(ye!==0||L!=="")&&Q.push(L),pe=K}if(pe&&pe+1<k.length){const ye=k.slice(pe+1);Q.push(ye),M.tokens&&(U[U.length-1].value=ye,N(U[U.length-1]),z.maxDepth+=U[U.length-1].depth)}z.slashes=q,z.parts=Q}return z};a.exports=R},96:(a,o,i)=>{const{REGEX_BACKSLASH:c,REGEX_REMOVE_BACKSLASH:l,REGEX_SPECIAL_CHARS:u,REGEX_SPECIAL_CHARS_GLOBAL:m}=i(154);o.isObject=p=>p!==null&&typeof p=="object"&&!Array.isArray(p),o.hasRegexChars=p=>u.test(p),o.isRegexChar=p=>p.length===1&&o.hasRegexChars(p),o.escapeRegex=p=>p.replace(m,"\\$1"),o.toPosixSlashes=p=>p.replace(c,"/"),o.removeBackslashes=p=>p.replace(l,f=>f==="\\"?"":f),o.escapeLast=(p,f,h)=>{const _=p.lastIndexOf(f,h);return _===-1?p:p[_-1]==="\\"?o.escapeLast(p,f,_-1):`${p.slice(0,_)}\\${p.slice(_)}`},o.removePrefix=(p,f={})=>{let h=p;return h.startsWith("./")&&(h=h.slice(2),f.prefix="./"),h},o.wrapOutput=(p,f={},h={})=>{const _=h.contains?"":"^",y=h.contains?"":"$";let x=`${_}(?:${p})${y}`;return f.negated===!0&&(x=`(?:^(?!${x}).*$)`),x},o.basename=(p,{windows:f}={})=>{const h=p.split(f?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function r(a){var o=t[a];if(o!==void 0)return o.exports;var i=t[a]={exports:{}},c=!0;try{e[a](i,i.exports,r),c=!1}finally{c&&delete t[a]}return i.exports}typeof r<"u"&&(r.ab=__dirname+"/");var s=r(170);zr.exports=s})()),zr.exports}var ua;function c_(){return ua||(ua=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}t(e,{hasLocalMatch:function(){return a},matchLocalPattern:function(){return s}});const r=ku();function s(o,i){if(o.search!==void 0&&o.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=o.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function a(o,i){if(!o)return!0;const c=new URL(i,"http://n");return o.some(l=>s(l,c))}}(Fr)),Fr}var Br={},da;function l_(){return da||(da=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}t(e,{hasRemoteMatch:function(){return a},matchRemotePattern:function(){return s}});const r=ku();function s(o,i){if(o.protocol!==void 0){const l=i.protocol.slice(0,-1);if(o.protocol!==l)return!1}if(o.port!==void 0&&o.port!==i.port)return!1;if(o.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
17
|
-
`+JSON.stringify(o));if(!(0,r.makeRe)(o.hostname).test(i.hostname)||o.search!==void 0&&o.search!==i.search)return!1;var c;return!!(0,r.makeRe)((c=o.pathname)!=null?c:"**",{dot:!0}).test(i.pathname)}function a(o,i,c){return o.some(l=>c.hostname===l)||i.some(l=>s(l,c))}}(Br)),Br}var ma;function Ou(){return ma||(ma=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function r(a){let{config:o,src:i,width:c,quality:l}=a;var u;if(process.env.NODE_ENV!=="production"){const p=[];if(i||p.push("src"),c||p.push("width"),p.length>0)throw new Error("Next Image Optimization requires "+p.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("/")&&o.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:f}=c_();if(!f(o.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("/")&&(o.domains||o.remotePatterns)){let f;try{f=new URL(i)}catch(h){throw console.error(h),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:h}=l_();if(!h(o.domains,o.remotePatterns,f))throw new Error("Invalid src prop ("+i+') on `next/image`, hostname "'+f.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&&o.qualities&&!o.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=o.qualities)==null?void 0:u.reduce((p,f)=>Math.abs(f-t)<Math.abs(p-t)?f:p))||t;return o.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+m+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const s=r}(Dr)),Dr}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const r=ke,s=jt,a=n,o=s._(g),i=r._(ws),c=r._(a_()),l=ro,u=rr,m=i_(),p=nr,f=Ic(),h=r._(Ou()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function y(b,w,S,P,N,R,k){const O=b==null?void 0:b.src;if(!b||b["data-loaded-src"]===O)return;b["data-loaded-src"]=O,("decode"in b?b.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!b.parentElement||!b.isConnected)){if(w!=="empty"&&N(!0),S!=null&&S.current){const X=new Event("load");Object.defineProperty(X,"target",{writable:!1,value:b});let D=!1,q=!1;S.current({...X,nativeEvent:X,currentTarget:b,target:b,isDefaultPrevented:()=>D,isPropagationStopped:()=>q,persist:()=>{},preventDefault:()=>{D=!0,X.preventDefault()},stopPropagation:()=>{q=!0,X.stopPropagation()}})}if(P!=null&&P.current&&P.current(b),process.env.NODE_ENV!=="production"){const X=new URL(O,"http://n").searchParams.get("url")||O;if(b.getAttribute("data-nimg")==="fill"){if(!R&&(!k||k==="100vw")&&b.getBoundingClientRect().width/window.innerWidth<.6&&(k==="100vw"?(0,p.warnOnce)('Image with src "'+X+'" 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,p.warnOnce)('Image with src "'+X+'" 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')),b.parentElement){const{position:U}=window.getComputedStyle(b.parentElement),Q=["absolute","fixed","relative"];Q.includes(U)||(0,p.warnOnce)('Image with src "'+X+'" has "fill" and parent element with invalid "position". Provided "'+U+'" should be one of '+Q.map(String).join(",")+".")}b.height===0&&(0,p.warnOnce)('Image with src "'+X+'" 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=b.height.toString()!==b.getAttribute("height"),q=b.width.toString()!==b.getAttribute("width");(D&&!q||!D&&q)&&(0,p.warnOnce)('Image with src "'+X+`" 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 x(b){return o.use?{fetchPriority:b}:{fetchpriority:b}}const v=(0,o.forwardRef)((b,w)=>{let{src:S,srcSet:P,sizes:N,height:R,width:k,decoding:O,className:M,style:X,fetchPriority:D,placeholder:q,loading:U,unoptimized:Q,fill:G,onLoadRef:H,onLoadingCompleteRef:J,setBlurComplete:se,setShowAltText:de,sizesInput:oe,onLoad:le,onError:F,...ee}=b;return(0,a.jsx)("img",{...ee,...x(D),loading:U,width:k,height:R,decoding:O,"data-nimg":G?"fill":"1",className:M,style:X,sizes:N,srcSet:P,src:S,ref:(0,o.useCallback)(E=>{w&&(typeof w=="function"?w(E):typeof w=="object"&&(w.current=E)),E&&(F&&(E.src=E.src),process.env.NODE_ENV!=="production"&&(S||console.error('Image is missing required "src" property:',E),E.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.')),E.complete&&y(E,q,H,J,se,Q,oe))},[S,q,H,J,se,F,Q,oe,w]),onLoad:E=>{const W=E.currentTarget;y(W,q,H,J,se,Q,oe)},onError:E=>{de(!0),q!=="empty"&&se(!0),F&&F(E)}})});function C(b){let{isAppRouter:w,imgAttributes:S}=b;const P={as:"image",imageSrcSet:S.srcSet,imageSizes:S.sizes,crossOrigin:S.crossOrigin,referrerPolicy:S.referrerPolicy,...x(S.fetchPriority)};return w&&i.default.preload?(i.default.preload(S.src,P),null):(0,a.jsx)(c.default,{children:(0,a.jsx)("link",{rel:"preload",href:S.srcSet?void 0:S.src,...P},"__nimg-"+S.src+S.srcSet+S.sizes)})}const j=(0,o.forwardRef)((b,w)=>{const P=!(0,o.useContext)(f.RouterContext),N=(0,o.useContext)(m.ImageConfigContext),R=(0,o.useMemo)(()=>{var J;const se=_||N||u.imageConfigDefault,de=[...se.deviceSizes,...se.imageSizes].sort((F,ee)=>F-ee),oe=se.deviceSizes.sort((F,ee)=>F-ee),le=(J=se.qualities)==null?void 0:J.sort((F,ee)=>F-ee);return{...se,allSizes:de,deviceSizes:oe,qualities:le}},[N]),{onLoad:k,onLoadingComplete:O}=b,M=(0,o.useRef)(k);(0,o.useEffect)(()=>{M.current=k},[k]);const X=(0,o.useRef)(O);(0,o.useEffect)(()=>{X.current=O},[O]);const[D,q]=(0,o.useState)(!1),[U,Q]=(0,o.useState)(!1),{props:G,meta:H}=(0,l.getImgProps)(b,{defaultLoader:h.default,imgConf:R,blurComplete:D,showAltText:U});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{...G,unoptimized:H.unoptimized,placeholder:H.placeholder,fill:H.fill,onLoadRef:M,onLoadingCompleteRef:X,setBlurComplete:q,setShowAltText:Q,sizesInput:b.sizes,ref:w}),H.priority?(0,a.jsx)(C,{isAppRouter:P,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)})(as,as.exports);var u_=as.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 r=ke,s=ro,a=u_,o=r._(Ou());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:o.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[m,p]of Object.entries(u))p===void 0&&delete u[m];return{props:u}}const c=a.Image})(Ru);var d_=Ru;const en=T.getDefaultExportFromCjs(d_),m_=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?n.jsxs(Fe,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:me["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(en,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]}):n.jsxs("div",{className:me["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(en,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]})},p_=({content:e,CONSTANTS:t})=>n.jsx("div",{className:me["support-container"],children:e==null?void 0:e.map((r,s)=>n.jsxs("div",{"data-device":r.device,className:me["support-section"],children:[n.jsxs("div",{className:me["support-text"],children:[r.title&&n.jsx("h3",{children:r.title}),r.description&&n.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&n.jsx("div",{className:me["support-items"],"data-gap":r.gap,children:r.items.map((a,o)=>n.jsx(m_,{item:a,CONSTANTS:t},`footer-support-item-${o}`))})]},`footer-support-${s}`))}),f_=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:s,columnAlignContent:a,columnAlignItems:o,textAlignContent:i,textAlignItems:c,children:l})=>n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:a,alignItems:o}},children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:me.footer__column,children:[n.jsxs("div",{className:t?me.footer__columnTitleIcon:me.footer__columnTitle,children:[n.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&n.jsx("div",{children:e})]}),n.jsx("div",{className:me.footer__columnContent,style:{maxWidth:`${r}px`},children:l})]})}),h_=({name:e,nameIcon:t,maxWidth:r,children:s,ICONS:a,...o})=>n.jsxs(d.Accordion.Wrapper,{className:me.accordionWrapper,title:"accordion-wrapper",...o,children:[n.jsx(d.Accordion.Header,{id:(o==null?void 0:o.id)??"",className:me.accordionHeader,closeIndicator:n.jsx(d.Icon,{name:a.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:a.arrow_down,size:"medium"}),title:"accordion-header",children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:t?me.accordionTextWrapper:"",children:[n.jsx(d.Icon,{name:`${t}`,size:"medium"}),n.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:me.footer__columnContent,style:{maxWidth:`${r}px`},children:s})})})]}),Ur=e=>{const{isMobile:t}=ne();return t?n.jsx(h_,{...e}):n.jsx(f_,{...e})},Pn=({type:e,children:t,className:r,collumnName:s,collumnNameIcon:a,icons:o,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:p,columnAlignContent:f,columnAlignItems:h,textAlignContent:_,textAlignItems:y,...x})=>{let v;const{handleSelectContent:C}=ae(),{nextimage:j}=ce();switch(e){case"menu":v=n.jsx(Fe,{className:me.footer__itemLink,href:l??"#",prefetch:!1,children:n.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":v=n.jsxs("div",{className:d.helpers.classNameConcat(me.payment,me.footer__itemSmallText),...x,children:[u,n.jsxs("div",{className:d.helpers.classNameConcat(me.footer__iconContainer,me.footer__iconListSubHeader),children:[m,n.jsx("div",{className:me.footer__iconList,children:o==null?void 0:o.map((b,w)=>n.jsx(j,{alt:b,src:`/assets/${b}.svg`,width:c??20,height:c??20},w))})]})]});break;case"social-media":v=n.jsx("div",{className:me.footer__iconContainer,...x,children:n.jsx("div",{className:me.footer__iconList,children:i==null?void 0:i.map((b,w)=>n.jsx(Fe,{prefetch:!1,href:b.link??"#",target:"_blank",children:n.jsx(d.Icon,{size:"medium",name:b.icon,onClick:()=>C({content:`footer:redes-sociais:${b.icon}`})})},w))})});break;default:v=n.jsx("div",{className:r,...x,children:t})}return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:p,alignItems:p},columnWrapper:{alignContent:f,alignItems:h}},...x,children:n.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:y,className:d.helpers.classNameConcat(me.footer__item,r),children:v})})},__=({className:e,text:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(me.footer__legalInformation,e),children:n.jsx("span",{children:t})}),Lu=()=>{const{nextimage:e}=ce();return n.jsx("div",{className:me["footer--stamps"],children:n.jsx(e,{alt:"Empresa B",className:me["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Lu.displayName="Footer.Stamps";const Mu=({children:e,legalTextSlot:t,adornment:r,className:s,...a})=>{const{isMobile:o}=ne(),i=g.Children.toArray(e).filter(Boolean),c=i.length;return n.jsxs("div",{className:me.footer__main,children:[(r==null?void 0:r.top)&&n.jsx("div",{className:me.footer__top,children:r==null?void 0:r.top}),c>0&&n.jsx("div",{...a,className:d.helpers.classNameConcat(me.footer__wrapper,s),children:i.map((l,u)=>n.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${o?1:"fit-content"})`},children:l},u))}),(r==null?void 0:r.bottom)&&n.jsx("div",{className:me.footer__bottom,children:r.bottom}),t&&n.jsx("div",{className:me.footer__legalText,children:t})]})};Mu.displayName="Footer.Wrapper";const Du=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:s,adornment:a,LEGAL_INFORMATION_TEXT:o,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return n.jsxs(Mu,{className:c,adornment:a,legalTextSlot:n.jsx(__,{text:o}),children:[Array.isArray(e.column)&&e.column.map((m,p)=>n.jsx(Ur,{id:`${p}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((f,h)=>n.jsx(Pn,{type:"menu",link:f.link,collumnName:m.name,collumnNameIcon:m.nameIcon,children:f.text},h))},p)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&n.jsx(Ur,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:n.jsx(Pn,{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})}),n.jsxs(Ur,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:i,children:[r!=null&&r.subTitle?n.jsx(Pn,{children:r==null?void 0:r.subTitle}):null,n.jsx(Pn,{type:"social-media",iconSize:24,iconLink:s}),l&&n.jsx(Lu,{})]})]})};Du.displayName="Footer";const g_=Object.freeze(Object.defineProperty({__proto__:null,Footer:Du,FooterSupport:p_},Symbol.toStringTag,{value:"Module"})),y_="_header_9xxjk_57",x_="_actions_9xxjk_131",v_="_breadcrumb_9xxjk_142",b_="_credits_9xxjk_157",j_="_pdplinks_9xxjk_185",C_="_similars_9xxjk_212",S_="_sizes_9xxjk_251",P_="_measurementTable_9xxjk_267",w_="_measurementHead_9xxjk_280",N_="_measurementRows_9xxjk_285",E_="_measurementRowsTitle_9xxjk_302",I_="_measurementRowsText_9xxjk_314",R_="_measurementImage_9xxjk_325",T_="_measurementImageContainer_9xxjk_328",A_="_measurementContent_9xxjk_337",k_="_measurementTitle_9xxjk_341",O_="_measurementClose_9xxjk_352",L_="_productref_9xxjk_417",M_="_slideOut_9xxjk_1",D_="_slideIn_9xxjk_1",F_="_content_9xxjk_397",z_="_pdp_9xxjk_185",B_="_divider_9xxjk_575",Z={"bottom-navigation":"_bottom-navigation_9xxjk_1","bottom-navigation__credits-modifier":"_bottom-navigation__credits-modifier_9xxjk_18","bottom-navigation__header":"_bottom-navigation__header_9xxjk_21","bottom-navigation__header-content":"_bottom-navigation__header-content_9xxjk_26","golden-tag-content":"_golden-tag-content_9xxjk_45","bottom-navigation__price-and-promo":"_bottom-navigation__price-and-promo_9xxjk_48",header:y_,"golden-tag":"_golden-tag_9xxjk_45","golden-tag-video":"_golden-tag-video_9xxjk_86","golden-tag-content-text":"_golden-tag-content-text_9xxjk_105",actions:x_,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:v_,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:b_,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:j_,"links-wrapper":"_links-wrapper_9xxjk_195",similars:C_,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:S_,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:P_,measurementHead:w_,measurementRows:N_,measurementRowsTitle:E_,measurementRowsText:I_,measurementImage:R_,measurementImageContainer:T_,measurementContent:A_,measurementTitle:k_,measurementClose:O_,"tabs-root-modifier":"_tabs-root-modifier_9xxjk_358","tabs-list-modifier":"_tabs-list-modifier_9xxjk_376","tabs-item-modifier":"_tabs-item-modifier_9xxjk_393","content-wrapper":"_content-wrapper_9xxjk_397",productref:L_,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:M_,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:D_,content:F_,pdp:z_,"pdp-main":"_pdp-main_9xxjk_496","pdp-main__gallery-wrapper":"_pdp-main__gallery-wrapper_9xxjk_501","pdp-main__info":"_pdp-main__info_9xxjk_518","pdp-main__info-main-content":"_pdp-main__info-main-content_9xxjk_533","pdp-main__info-subsection":"_pdp-main__info-subsection_9xxjk_533","subsection-product-info":"_subsection-product-info_9xxjk_544","subsection-similars":"_subsection-similars_9xxjk_547","subsection-sizes":"_subsection-sizes_9xxjk_550","subsection-actions":"_subsection-actions_9xxjk_553","pdp-main__info-secondary-content":"_pdp-main__info-secondary-content_9xxjk_557","sections-title":"_sections-title_9xxjk_563",divider:B_,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},U_=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:s}=ne(),{router:a}=ce(),o=()=>{t&&a.push(t)},i=g.useRef(null);return n.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...r,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:o,active:i.current===t,children:e})},Fu=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:s}=Le(),a=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return n.jsx("div",{children:a.map((o,i)=>o.textureImage?n.jsxs(U_,{link:o.slug?o.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsx(d.ToggleStyle.Texture,{children:n.jsx(we.Image,{alt:o.textureAlt,src:o.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},q_=({children:e,storeId:t,productId:r,PDP_INFO:s,TEXTURE_IMAGE:a,TOGGLE_STYLE_MODIFIER:o})=>{const{items:i,loadSimilars:c}=Qs(r,{filterTexture:a});return g.useEffect(()=>{c()},[c]),n.jsxs("div",{className:Z.similars,children:[n.jsxs("div",{className:Z["similars-info"],children:[n.jsx("span",{className:Z["sections-title"],children:s.product.color_title}),e]}),n.jsx(Fu,{productId:r,similars:i,TOGGLE_STYLE_MODIFIER:o})]})},H_=()=>{const{colorName:e}=Le();return n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":Z["accessibility-info"],children:n.jsx("p",{children:e})})})},sr=({className:e,titleId:t})=>{var a,o,i;const{productName:r,tag:s}=Le();return n.jsxs("div",{className:d.helpers.classNameConcat(Z.header,e),children:[s!=null&&s.commercial?n.jsx(d.Tag,{size:"small",title:(a=s.commercial)==null?void 0:a.value,variant:"quaternary",adornment:{start:(o=s.commercial)!=null&&o.icon?n.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h1",{id:t,children:r})})})]})};sr.displayName="PDP.PDPHeader";const so=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:s}=Le(),{count:a,value:o}=s,i=T.formatPriceToCurrency(r??0,!0),c=T.formatPriceToCurrency(t??0,!0),l=T.formatPriceToCurrency(o??0);return n.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:n.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:Z["price-wrapper"],children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:t!==r?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),a&&a>1&&o?n.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${a}x ${l}`,size:"small"}):null]})})},is=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})=>{const a=sn(),{productId:o,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Le(),{isMobile:p}=ne(),{addToCart:f}=ve(),{sendDataLayerEvent:h}=ae(),_=!m&&(!a.sku||!a.available),y=()=>{if(_&&typeof t=="function"){t();return}typeof e=="function"&&e({id:a.sku,quantity:a.quantity,seller:a.sellerId,sku:o}),f({id:a.sku,quantity:a.quantity,seller:a.sellerId},{id:o,texture:u==null?void 0:u.imageUrl}),h({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[a]},customData:{quantity:a.quantity}}})};return n.jsx(d.Button,{className:Z["add-to-cart"],size:p?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:y,children:a.sku&&a.available?`${s.add_to_cart}`:`${s.select_size}`})},$_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=ne(),s=sn(),{sizesContainerRef:a}=Ma(),{structureRef:o}=Ne();return s.sku&&s.available?n.jsx(is,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):n.jsx(d.Button,{className:Z["add-to-cart"],size:r?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{a.current&&o.current&&window.document.body.scrollTo({top:a.current.offsetTop-o.current.offsetHeight,behavior:"smooth"})},children:s.sku&&s.available?t.add_to_cart:t.select_size})},wn=({value:e,label:t,suppressHydrationWarning:r=!1},s)=>{const a={value:e,...r&&{suppressHydrationWarning:!0}},o=s==="compact"?a:{...a,label:t};return n.jsx(d.Timer.Digit,{...o})},zn=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:s,...a})=>{const[o,i]=g.useState(tc(new Yr.TZDate(Date.now(),s),new Yr.TZDate(e,s))),[c,l]=g.useState(!1);if(g.useEffect(()=>{l(!0);const h=setInterval(()=>{i(_=>_<=0?(clearInterval(h),0):_-1e3)},1e3);return()=>clearInterval(h)},[]),!c||o<=0)return n.jsx(n.Fragment,{});const u=Wt(o,"days"),m=Wt(o,"hours"),p=Wt(o,"minutes"),f=Wt(o);return n.jsxs(d.Timer.Root,{...a,children:[u?n.jsxs(n.Fragment,{children:[wn({value:u,label:"dias"},r),n.jsx(d.Timer.Separator,{})]}):null,wn({value:m,label:"horas"},r),n.jsx(d.Timer.Separator,{}),wn({value:p,label:"min"},r),n.jsx(d.Timer.Separator,{}),wn({value:f,label:"segs",suppressHydrationWarning:!0},r)]})},oo=({TIME_ZONE:e})=>{const{tag:t}=Le(),r=t==null?void 0:t.flagGoldenPdp,s=g.useMemo(()=>{var a;if((a=r==null?void 0:r.tagImage)!=null&&a.includes("player.vimeo")){const o=r.tagImage.split("?")[1],i=o==null?void 0:o.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`${r.tagImage.split("?")[0]}?${l}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?n.jsxs("div",{className:Z["golden-tag"],style:(r==null?void 0:r.backgroundSelect)==="color"?{backgroundColor:r==null?void 0:r.backgroundColor}:(r==null?void 0:r.backgroundSelect)==="image"?{backgroundImage:`url(${r==null?void 0:r.tagImage})`}:void 0,children:[(r==null?void 0:r.backgroundSelect)==="video"&&n.jsx("div",{className:Z["golden-tag-video"],children:n.jsx(we.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),n.jsxs("div",{className:Z["golden-tag-content"],children:[n.jsx("span",{className:Z["golden-tag-content-text"],style:{color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}),(r==null?void 0:r.countDownEndDate)&&n.jsx(zn,{mode:r==null?void 0:r.timerMode,size:"x-small",type:"compact",dateEnd:new Date((r==null?void 0:r.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};oo.displayName="PDP.GoldenTag";const V_=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:s})=>{const{isMobile:a}=ne();return a?n.jsxs(d.Card,{className:Z["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[n.jsxs("div",{className:Z["bottom-navigation__header"],children:[n.jsx(oo,{TIME_ZONE:r}),n.jsxs("div",{className:Z["bottom-navigation__header-content"],children:[n.jsx(sr,{}),n.jsx(so,{layout:"name-vertical"})]})]}),n.jsx($_,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},W_=({children:e,setShowBottomNavigation:t})=>{const r=g.useRef(null),s=Es(r),a=g.useRef(s);return g.useEffect(()=>{var i;const{top:o}=((i=r.current)==null?void 0:i.getBoundingClientRect())??{top:0};a.current!==s&&o>0&&(t(!s),a.current=s)},[s]),n.jsx("div",{ref:r,style:{width:"100%"},children:e})},G_=({ICONS:e})=>{const{isMobile:t}=ne(),{price:r,listPrice:s,productData:a,productId:o}=Le(),{sendDataLayerEvent:i}=ae(),c=zt(),{toggleProduct:l}=Nt();return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{name:e[c.includes(o)?"favorite_true":"favorite_false"],size:"medium"})},className:Z["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{l(o),i({functionKey:"productEvents",data:{event:c.includes(o)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...a,price:r,listPrice:s}}})}})},zu=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s,ICONS:a,TIME_ZONE:o,Z_INDEX_WAR:i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(!0);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:Z.actions,children:[c?n.jsx(W_,{setShowBottomNavigation:u,children:n.jsx(is,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})}):n.jsx(is,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s}),e&&n.jsx(G_,{ICONS:a})]}),c&&l&&n.jsx(V_,{addToCartBtnSize:r,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:o})]})},Bu=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:s,productName:a}=Le(),o=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return n.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(Z.breadcrumb,[t==="mobile"?Z["breadcrumbs-mobile"]:Z["breadcrumbs-desktop"],e]),children:n.jsxs(d.BreadCrumb.List,{children:[Array.isArray(s)&&s.map((i,c)=>{const l=o(s.slice(0,c+1).map(u=>u.replace(/\s/g,"-").toLowerCase()).join("/"));return n.jsx(d.BreadCrumb.Item,{adornment:{end:n.jsx(d.Icon,{name:r.arrow_right})},role:"listitem",children:n.jsx(Fe,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),n.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(Z["breadcrumb--active"],e),children:a},"pdp-breadcrumb-productName")]})})};Bu.displayName="PDP.BreadCrumb";const Uu=({className:e})=>{var s;const{tag:t}=Le(),r=t==null?void 0:t.flagPdp;return r&&((s=r==null?void 0:r.value)!=null&&s.length)?n.jsx(d.Tag,{className:d.helpers.classNameConcat(Z.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?n.jsx(d.Icon,{name:r==null?void 0:r.icon,style:{color:r==null?void 0:r.iconColor}}):null},style:{background:r==null?void 0:r.tagColor,color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}):n.jsx(n.Fragment,{})};Uu.displayName="PDPCredits";const K_=()=>{const{descriptionContent:e,productReference:t}=Le(),[r,s]=g.useState("description");return n.jsxs(d.Tabs.Root,{className:Z["tabs-root-modifier"],children:[n.jsx(d.Tabs.TabList,{className:Z["tabs-list-modifier"],children:e==null?void 0:e.map(({label:a,value:o})=>n.jsx(d.Tabs.Item,{label:a,value:o,activeTab:r,onTabChange:s,size:"large",className:`${Z["tabs-item-modifier"]} ${r===o?Z["tabs-item-active"]:""}`},o))}),n.jsxs("div",{className:Z["content-wrapper"],children:[r==="description"?n.jsx("div",{children:n.jsxs("span",{className:Z.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:a,content:o})=>r===a?n.jsx(d.Tabs.Panel,{className:`${Z["tabs-panel"]} ${r===a?Z["tabs-panel-enter"]:Z["tabs-panel-exit"]}`,children:n.jsx("div",{className:Z.content,dangerouslySetInnerHTML:{__html:o}})},a):null)]})]})},X_=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:s})=>{const a=sn(),{isMobile:o}=ne();return n.jsxs(n.Fragment,{children:[o?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,n.jsx(ou,{skuId:a.available?a.sku:"",size:o?r.inputSize.mobile:r.inputSize.desktop,quantity:a.quantity,sellerId:a.sellerId,seller:a.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),o?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},pa=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})=>{const a=T.resizingImg(e.imageUrl,s.pdp),{nextimage:o}=ce();return n.jsx(o,{src:a,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},Y_=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:s}=ae(),a=g.useRef(!1);return n.jsx(we.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{a.current||(a.current=!0,s({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:r})},qu=({images:e,video:t,handleZoom:r,productName:s,PRODUCT_IMAGE_DIMENSIONS:a})=>{var u,m;const{initialize:o,pagination:i,controller:c,itemsStyles:l}=d.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return n.jsxs(d.Carousel.Root,{innerRef:p=>{o(p)},className:Z["gallery-carousel-modifier"],children:[n.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:n.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:p=>c==null?void 0:c.navigateTo(p)})}),n.jsxs(d.Carousel.Body,{children:[n.jsx(d.Carousel.Item,{style:l,children:n.jsx(pa,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:a})},"PDP_gallery_0"),t&&n.jsx(d.Carousel.Item,{style:l,children:n.jsx(Y_,{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((p,f)=>f===0?null:n.jsx(d.Carousel.Item,{style:l,children:n.jsx(pa,{image:p,index:f,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:a})},`PDP_gallery_${f}`))]})]})};qu.displayName="PDP.Carousel";const Q_="_thumbs_1954e_65",Z_="_selected_1954e_92",J_="_carousel_1954e_164",eg="_bullets_1954e_201",Pe={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1954e_1","button-close-container":"_button-close-container_1954e_10","button-close":"_button-close_1954e_10","main-image-container":"_main-image-container_1954e_22","image-desktop":"_image-desktop_1954e_52",thumbs:Q_,selected:Z_,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1954e_117","image-mobile":"_image-mobile_1954e_147","image-zoom--image":"_image-zoom--image_1954e_161",carousel:J_,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:eg,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},fa=({onClose:e,ICONS:t})=>n.jsx("div",{className:`${Pe["button-close-container"]}`,children:n.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${Pe["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),tg=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:Pe["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),Hu=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:a})=>{const{nextimage:o}=ce();let i=null;const c=g.useRef(null),{initialize:l,controller:u,pagination:m,itemsStyles:p}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),f=_=>{u==null||u.navigateTo(_)},h=()=>{r(!0)};return g.useEffect(()=>{t(m.currentPage)},[m.currentPage,t]),n.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:Pe.carousel,children:[n.jsxs(d.Carousel.Controller,{className:Pe["carousel-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:Pe["arrow-left"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:Pe["arrow-right"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_right})}})]}),n.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,y)=>n.jsx(d.Carousel.Item,{style:p,children:n.jsx(o,{...a.image_zoom.mobile,...y===0&&{priority:!0,loading:"eager"},ref:c,className:Pe.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...y===0&&{onLoad:h}})},y))}),n.jsx(d.Carousel.Bullets,{className:Pe.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:f})]})};Hu.displayName="ImageZoom.Mobile.Carousel";const $u=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{$a();const{nextimage:s}=ce();return n.jsx("div",{className:Pe["image-zoom--image"],ref:e,children:n.jsx(s,{...r.image_zoom.mobile,alt:t.imageText,className:Pe["image-zoom--image--img"],quality:100,src:t.imageUrl})})};$u.displayName="ImageZoom.ImageZoom";const Vu=({loaded:e=!1})=>n.jsx("div",{className:Pe["zoom-popup"],"data-loaded":e,children:n.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[n.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"}),n.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"}),n.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"})]})});Vu.displayName="ImageZoom.ZoomPopup";const Wu=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[a,o]=g.useState(!1),[i,c]=g.useState(0),{containerRef:l,imgRef:u,scale:m}=Va({defaultScale:1,maxScale:3});return n.jsxs("div",{...s,className:Pe["image-mobile"],"data-disable-carrousel-pan":m>1,children:[n.jsx(Vu,{loaded:a}),n.jsx(Hu,{images:e,setCurrent:c,setFirstImgLoaded:o,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),n.jsx("div",{className:Pe["image-zoom--mobile"],ref:l,children:n.jsx($u,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:r})})]})};Wu.displayName="ImageZoom.ImageMobile";const ng=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:Pe["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),rg="_modal_1u87b_1",nt={modal:rg,"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 sg({headerTitle:e,isMobile:t,ICONS:r}){return n.jsx(d.Modal.Header,{navigation:"top",className:nt["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[n.jsx("div",{className:nt["modal-header__title"],children:n.jsx(d.Modal.Title,{navigation:"top",className:nt["quick-shop__title"],title:e})}),n.jsx(d.Button,{className:nt["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const Gu=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:a,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Le(),m=g.useMemo(()=>c!=null&&c.length?Wc({items:c,getLabel:b=>b.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:p}=Ma(),{isMobile:f}=ne(),h=sn(),_=ui(),{setValue:y}=ii(),{setValue:x}=ks(),v=g.useRef({}),[C,j]=g.useState(null);return n.jsxs("div",{ref:p,className:d.helpers.classNameConcat(Z.sizes,"PDP_sizes"),children:[n.jsx("span",{className:Z["sections-title"],children:e.product.size_title}),n.jsx("div",{children:m.map(b=>(!b.available&&!v.current[b.value]&&(v.current[b.value]={disable:!b.available,size:b.value,skuID:b.sku}),n.jsxs(d.ToggleSize.Wrapper,{size:f?"medium":"large",title:b.value,outOfStock:!b.available,onClick:()=>{b.available||(j({skuID:b.sku,size:b.value,disable:!0}),x(!0)),h.sku!==b.sku&&(y({...h,productId:l,name:b.name,size:b.value,sku:b.sku,sellerId:b.sellerId,sellerName:b.sellerName,available:b.available}),u({sku:b.sku,size:b.value}))},active:h.sku===b.sku,children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:b==null?void 0:b.value})]},`sizes-${b.sku}-${b.value}`)))}),n.jsx(Vs,{open:_,setVisible:x,sku:C,setSku:j,skus:Object.values(v.current),ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:a,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i})]})},Gt=({children:e,className:t,type:r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-subsection"],[Z[`subsection-${r}`],t]),children:e}),Ku=({children:e,className:t})=>{const{structureRef:r,tipbarRef:s}=Ne(),a=g.useMemo(()=>{var c,l;const o=((c=r.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return o+i},[r,s]);return n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info"],t),id:"pdpmaininfo",style:{top:a},children:e})},Xu=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=Le(),{items:s,loadSimilars:a}=Qs(r,{filterTexture:e});return g.useEffect(()=>{a()},[a]),n.jsxs("div",{className:Z.similars,children:[n.jsx("span",{className:Z["sections-title"],children:"Cor"}),n.jsx(Fu,{productId:r,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};Xu.displayName="PDP.Info.Similars";const og=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:a,PDP_INFO:o,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,TEXTURE_IMAGE:l,TIME_ZONE:u,TOGGLE_STYLE_MODIFIER:m,Z_INDEX_WAR:p})=>n.jsx(d.Modal.Body,{className:nt["modal-product-body"],children:n.jsxs(Ku,{className:nt["pdp-main__info-modifier"],children:[n.jsxs(Gt,{type:"product-info",children:[n.jsx(sr,{}),n.jsx(so,{})]}),n.jsx(Gt,{type:"similars",children:n.jsx(Xu,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),n.jsx(Gt,{type:"sizes",children:n.jsx(Gu,{ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:a,PDP_INFO:o,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:p})}),n.jsx(Gt,{type:"actions",children:n.jsx(zu,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:u,Z_INDEX_WAR:p})})]})});function ag({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...s}){const[a,o]=g.useState(!1),i=()=>o(c=>!c);return n.jsxs("div",{className:nt["quick-shop"],children:[n.jsx(d.Button,{onClick:i,size:"x-large",className:nt["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),n.jsxs(d.Modal.Root,{isOpen:a,setIsOpen:o,className:`${nt.modal} ${nt["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[n.jsx(sg,{headerTitle:t.title,ICONS:r}),n.jsx(og,{callBackProductAdded:e,ICONS:r,...s})]})]})}const ig=({image:e})=>n.jsx(en,{src:T.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:Pe.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:r,...s})=>{const[a,o]=g.useState(!1),{nextimage:i}=ce();return n.jsx("div",{...s,className:Pe["main-image-container"],children:n.jsxs("div",{className:Pe["image-desktop"],children:[!a&&n.jsx(ig,{image:e==null?void 0:e[t]}),n.jsx(i,{src:T.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:Pe.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{o(!0)}})]})})},lg=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:s}=ce();return n.jsx("div",{className:Pe.thumbs,children:e.map((a,o)=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(o),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(o)},className:o===r?Pe.selected:"",children:n.jsx(s,{src:a.imageUrl,alt:a.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},o))})},Yu=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:a,Z_INDEX_WAR:o,...i})=>{const{isMobile:c}=ne(),[l,u]=g.useState(t),m=p=>{u(p)};return c?n.jsxs(ng,{Z_INDEX_WAR:o,children:[n.jsx(fa,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(Wu,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:a})]}):n.jsxs(tg,{Z_INDEX_WAR:o,children:[n.jsx(fa,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(cg,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:a},e[l].imageId??`${e[l].imageText}-${l}`),n.jsx(lg,{images:e,selectedImageIndex:l,onThumbnailClick:m}),n.jsx(ag,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:o,...i})]})};Yu.displayName="ImageZoom";const ug=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:s,productName:a}=Le(),[o,i]=g.useState({show:!1,initialIndex:0});g.useEffect(()=>(o.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[o]);const c=l=>{i({show:!0,initialIndex:l})};return n.jsxs(n.Fragment,{children:[n.jsx(qu,{images:e,video:s,handleZoom:c,productName:a,PRODUCT_IMAGE_DIMENSIONS:t}),o.show&&n.jsx(Yu,{images:e,initialSelectedImageIndex:o.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},Qu=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:s}=Le(),a=g.useMemo(()=>{const o=s.filter(i=>!e.includes(i.imageLabel));return o.length>0?o:s},[]);return n.jsx(ug,{productImgs:a,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};Qu.displayName="PDP.Gallery";const dg=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:s})=>{const{allSizesAvailable:a,productId:o}=Le(),{setValue:i}=ks(),{sendDataLayerEvent:c}=ae();return n.jsx("div",{className:d.helpers.classNameConcat(Z.links,e),id:"pdp-container","data-product-id":o,children:n.jsxs("div",{className:Z["links-wrapper"],children:[!a&&n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.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}),n.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})=>n.jsx("div",{className:Z["pdp-main__info-main-content"],children:e}),pg=({head:e,className:t})=>n.jsx("thead",{className:t,children:n.jsx("tr",{children:e.map((r,s)=>n.jsx("th",{children:r},`head-title-${s}`))})}),fg=({rows:e,className:t})=>n.jsx("tbody",{className:t,children:e.map((r,s)=>n.jsx("tr",{children:r.map(a=>typeof a=="string"&&a.includes("blocks")?JSON.parse(a).blocks.map(o=>`${o.text}
|
|
18
|
-
`):a).map((a,o)=>n.jsx("td",{children:a},`cell-content-${o}`))},`row-content-${s}`))}),hg="_tableContainer_1yxy2_1",_g={tableContainer:hg},gg=({children:e,className:t=""})=>n.jsx("table",{className:`${_g.tableContainer} ${t}`,children:e}),kn={Head:pg,Rows:fg,Root:gg},yg=({title:e,text:t})=>n.jsxs("p",{className:Z.measurementRowsText,children:[n.jsx("h1",{className:Z.measurementRowsTitle,children:e}),t]}),xg=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const s=pi(),{setValue:a}=fi();return n.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:a,isOpen:s,className:Z.measurementModal,children:n.jsx(d.Modal.Body,{children:n.jsxs("div",{className:Z.measurementContainer,children:[n.jsx("h1",{className:Z.measurementTitle,children:t.title}),n.jsxs("div",{className:Z.measurementContent,children:[n.jsx("div",{className:Z.measurementImageContainer,children:n.jsx(en,{width:264,height:402,alt:"",className:Z.measurementImage,src:t.bannerImage})}),n.jsxs(kn.Root,{className:Z.measurementTable,children:[n.jsx(kn.Head,{className:Z.measurementHead,head:t.head}),n.jsx(kn.Rows,{className:Z.measurementRows,rows:t.rows.map((o,i)=>[n.jsx(yg,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...o])})]})]}),n.jsx(d.Button,{onClick:()=>a(!1),className:Z.measurementClose,variant:"tertiary",children:n.jsx(d.Icon,{name:e.close})})]})})},"minicart")},vg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__gallery-wrapper"],t),...r,children:e}),bg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z.pdp,t),...r,children:e}),jg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main"],t),...r,children:e}),Cg=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(Z["pdp-main__info-secondary-content"],t),...r,children:e}),Sg={gallery:vg,pdp:bg,main:jg,secondary:Cg},Pg=({className:e,...t})=>n.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(Z.divider,e)}),wg=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:H_,Actions:zu,BreadCrumb:Bu,Credits:Uu,DescriptionsTabs:K_,Divider:Pg,Freight:X_,Gallery:Qu,GoldenTag:oo,Header:sr,Links:dg,MainContent:mg,MainInfo:Ku,PDPSimilars:q_,Price:so,ProductMeasurements:xg,Sizes:Gu,SubSectionWrapper:Gt,containers:Sg},Symbol.toStringTag,{value:"Module"})),Ng=(e,t)=>{const[r,s]=hu({items:e}),[a,o]=t.split(":").map(Number);return isNaN(a)||isNaN(o)?[r,s]:[r<a?r:a,s>o?s:o]},Eg=()=>{var S;const{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:a,PLP_SIZE_ORDER:o}=De(),[i,c]=g.useState("10000:0"),{isMobile:l}=ne(),{sendDataLayerEvent:u}=ae(),{openFilters:m,setOpenFilters:p}=Us(),{state:f}=ze(),{breadcrumb:h,deleteAllFacets:_,isLoading:y=!1,facets:x,onToggleFacet:v,selectedFacets:C}=Zt.contexts.searchFacets.hook(),j=g.useRef(""),b={isLast:!0,href:(S=f.term)!=null&&S.length?`/${f.term}`:"",name:f.term},w=T.filterNonRootFacets(C,f==null?void 0:f.base);return g.useEffect(()=>{const P=x.find(({key:N})=>N==="price");if(P){const[N,R]=Ng(P.values,i??"10000:0");c(`${N}:${R}`)}},[x,i,c]),g.useEffect(()=>{if(!w.length)return;const P=JSON.stringify(w);j.current!==P&&(j.current=P,u({functionKey:"filterEvent",data:{commonData:{selectedFacets:w}}}))},[w]),n.jsxs(Ln.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:a,PLP_FILTERS:t},breadcrumb:h.length?h:[b],deleteAllFacets:_,filters:{facets:T.filterNonCategorySelected(x,f==null?void 0:f.base),selected:w},isMobile:l??!1,isLoading:y,isOpen:m,price:i,onToggleFacet:v,setIsOpen:p,target:document.body,children:[n.jsx(Ln.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),n.jsx(Ln.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:o}})]})},Zu=()=>typeof document>"u"?null:n.jsx(Eg,{});Zu.displayName="Filters";const ao=({total:e=0})=>{const{SEARCH_TOTAL_PORTAL_ID:t}=De();if(typeof window>"u")return null;const r=document.getElementById(t);return r?ws.createPortal(n.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};ao.displayName="PDC.Grid.NavigationTotal";const Ig=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{g.useEffect(()=>{var o;const s=new URLSearchParams(window.location.search).get("page");if(e){const[i,c]=((o=sessionStorage.getItem(t.key))==null?void 0:o.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 a=()=>{e>0&&window.document.body.scrollTop&&sessionStorage.setItem(t.key,`${window.document.body.scrollTop.toString()}-${s}`)};return window.document.body.addEventListener("scroll",a,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",a)}},[e])},Rg=()=>{const{isMobile:e}=ne(),{isLoading:t,products:r,total:s}=on(),a=De();return Ig({productCount:r.length,PLP_GRID_SCROLL_BACK:a.PLP_GRID_SCROLL_BACK}),n.jsxs(n.Fragment,{children:[n.jsx(tt.Products,{isMobile:e??!1,items:r,...a}),!r.length&&!t&&n.jsx(tt.Empty,{ICONS:a.ICONS,PLP_NOT_RESULT:a.PLP_NOT_RESULT}),n.jsx(ao,{total:s})]})},Ju=({infinite:e=!1})=>n.jsx("div",{className:Ge["pdc--grid"],children:n.jsx("div",{className:Ge["pdc--grid--content"],children:e?n.jsx(tt.InfiniteScroller,{}):n.jsx(Rg,{})})});Ju.displayName="Grid";const It=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ed=({children:e,contentState:t,entityKey:r})=>{const{url:s}=t.getEntity(r).getData();return s?n.jsx(Fe,{href:s,children:e}):e},Tg=(e,t,r)=>{e.findEntityRanges(s=>{const a=s.getEntity();return a===null?!1:r.getEntity(a).getType()==="LINK"},t)},Bn=e=>{const t=new Je.CompositeDecorator([{strategy:Tg,component:ed}]),r=Je.convertFromRaw(e);return Je.EditorState.createWithContent(r,t)},Ag=e=>Je.convertFromRaw(e),Un=Je.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),ha="superior-direita",Nn="dentro-inferior-centro",kg="inferior-direita",qr="dentro-inferior-esquerda",td=e=>({position:e===Nn||e===qr?"absolute":"default",shouldRender:[ha,Nn,qr].includes(e)?"top":"bottom",alignItems:[Nn].includes(e)?"center":[ha,kg].includes(e)?"flex-end":"flex-start",left:e===qr?"16px":e===Nn?"45%":"unset"}),Og=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Bn,EXTENDED_BLOCK_RENDER_MAP:Un,GET_CONTENT_STATE:Ag,controllersPositionsAdapter:td},Symbol.toStringTag,{value:"Module"})),Lg=({expanded:e,content:t})=>n.jsxs("details",{open:e,children:[t.textStructureReduced?n.jsx("summary",{onClick:r=>r.preventDefault(),children:n.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Un,editorState:t!=null&&t.textStructureReduced?Bn(JSON.parse(t.textStructureReduced)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{}),t.showTextStructureExpander&&t.textStructure?n.jsx(n.Fragment,{children:n.jsx(Je.Editor,{editorKey:"draft-editor-1",blockRenderMap:Un,editorState:t.textStructure?Bn(JSON.parse(t.textStructure)):Je.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{})]}),Mg="_textContentWrapper_176ht_5",Dg="_textContentSection_176ht_13",cs={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:Mg,textContentSection:Dg},nd=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var o;const[s,a]=g.useState(!1);return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:It(e.textStructureAlignment),alignItems:It(e.textStructureAlignment)},columnWrapper:{alignContent:It(e.textStructureAlignment),alignItems:It(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?n.jsx(d.Button,{variant:"tertiary",adornment:{end:n.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>a(i=>!i),size:"small",children:s?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):n.jsx(n.Fragment,{})},children:n.jsxs(d.Utils.Column,{className:cs.textContentWrapper,style:{alignItems:It(e.textStructureAlignment)},children:[n.jsx(d.TextStructure.DivWrapper,{style:{textAlign:It(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?n.jsx(Lg,{content:e,expanded:s}):n.jsx(n.Fragment,{})}),e.textStructureButtonLabel?n.jsx(Oe,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:cs["link-modifier"],adornments:(o=e.textStructureButtonIcon)!=null&&o.length&&e.enableIcon?{end:n.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):n.jsx(n.Fragment,{})]})})},Fg=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],_a=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ga={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},ya=({data:e,videoUrl:t,priority:r,videoRef:s,ICONS:a,TEXTCONTENT_EXPANDED:o,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:p,imageOpacity:f,altImage:h,backgroundColor:_,position:y,contentAlignment:x,showTimer:v,contentOrder:C,timerMode:j,timerEnd:b,timerInit:w,textStructure:S,textStructureReduced:P}=e.banner,N=(p==null?void 0:p.trim())||(m==null?void 0:m.trim())||null,{nextimage:R}=ce();return n.jsxs(d.Banner.Container,{...l,children:[n.jsxs(d.Banner.ImageWrapper,{className:ga["banner-image-wrapper-modifier"],style:f?{background:_}:void 0,children:[u&&n.jsx(we.Video,{videoRef:s,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),N&&!(u!=null&&u.length)&&n.jsx(R,{src:N,width:"1920",height:"1080",alt:h??m??"",...r?{priority:r}:{},style:f?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&n.jsx("div",{style:{background:_}})]}),v||P||S?n.jsx(d.Banner.Slot,{...Fg(y??"centro"),className:d.helpers.classNameConcat(ga["content-modifier"],c),style:{textAlign:_a(x)},children:n.jsxs(d.Utils.Column,{gap:"16px",alignItems:_a(x),children:[v&&C==="timer-first"&&n.jsx(zn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i}),n.jsx(nd,{data:e.banner,ICONS:a,TEXTCONTENT_EXPANDED:o}),v&&C!=="timer-first"&&n.jsx(zn,{mode:j??"default",size:"small",dateEnd:b?new Date(b):new Date,dateInit:w?new Date(w):new Date,TIME_ZONE:i})]})}):n.jsx(n.Fragment,{})]})};class Xe extends g.Component{constructor(){super(...arguments);gt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(r==null?void 0:r.message)??r),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:s,fallback:a}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&a!==void 0?a:s}}const cn=({data:e,className:t,priority:r,creative:s,name:a,...o})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=ae(),{banner:{promotion_name:l},index:u,componentIndex:m}=e,p=typeof u=="number"?`:${u+1}`:"",f={creative_name:s,creative_slot:`${s}-${c.current}:${m+1}${p}`,promotion_id:e.banner.href,promotion_name:l},h=g.useRef(null),_=g.useMemo(()=>{var x;if((x=e.banner.video)!=null&&x.includes("player.vimeo")){const v=e.banner.video.split("?")[1],C=v==null?void 0:v.split("&"),j=C==null?void 0:C.filter(w=>w.includes("loc")||w.includes("signature")||w.includes("user_id")),b=j==null?void 0:j.join("&");return`${e.banner.video.split("?")[0]}?${b}`}return e.banner.video},[e]),y=()=>{var x;(x=h.current)!=null&&x.paused&&h.current.play()};return n.jsx(Xe,{name:a,children:n.jsx(Zn,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...f,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:y},children:e.banner.href?n.jsx(Fe,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:f,index:u})},children:n.jsx(ya,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...o})}):n.jsx(ya,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...o})})})},io=e=>n.jsx(Xe,{name:e.name,children:n.jsx(cn,{...e})}),rd=({columns:e,count:t,gap:r,className:s})=>{var x;const{banners:a,pages:o,products:i}=lt(),{isMobile:c}=ne(),{banners:l}=Gn(),{ICONS:u,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f}=De(),h=((x=o[o.length-1])==null?void 0:x.products.length)??t,_=i[(o.length-1)*t+h-1],y=l.filter((v,C)=>a[C]<_);return Array.isArray(y)?y.map((v,C)=>n.jsx(st.Banner,{columns:v.columns,gap:r,isMobile:c??!1,position_grid:a[C]+1,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:m,children:n.jsx(cn,{name:"Banner Carousel",data:{banner:v,componentIndex:C},creative:"banner_grid",ICONS:u,TEXTCONTENT_EXPANDED:p,TIME_ZONE:f,className:s})},`${v.position_grid}-${C}`)):null};rd.displayName="PDC.InfiniteScroller.Banners";const sd=e=>{var s;const{pages:t}=lt(),r=t[t.length-1];return(r==null?void 0:r.page)!==((s=r==null?void 0:r.pagination)==null?void 0:s.total)&&!(r!=null&&r.loading)?n.jsx(Qn,{...e}):null};sd.displayName="PDC.InfiniteScroller.Loading";const od=({page:e,...t})=>{const{updateParamPage:r}=lt(),{element:s}=Hn({callback:()=>r(e),options:{threshold:0}});return n.jsx("div",{...t,id:`pdc-scroll-infinite-${e.page}`,className:Ge["pdc--infinite--loader"],"data-page":e.page,ref:s})};od.displayName="PDC.Page.Anchor";const ad=({first:e,gap:t,isMobile:r=!1,item:s,index:a,last:o=!1,order:i,page:c,showVideo:l=!1})=>{const{load:u,handleNotify:m}=lt(),{getAvailableProductTag:p}=_t(),{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:v,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:b,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:w,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:P,StoreConfig_MainSellerId:N,TEXTURE_IMAGE:R,Z_INDEX_WAR:k,ICONS:O}=De(),M=p(s==null?void 0:s.cluster.highlights);return n.jsx(st.Card,{className:s.id==="skeleton"?Ge["pdc--infinite--card--disabled"]:"",gap:t,isMobile:r??!1,item:s,order:i,tag:M,index:a,setSkuSelected:m,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:f,MAIN_IMAGE:h,PLP_GRID_SCROLL_BACK:_,PLP_INFINITE_SCROLL:y,PLP_PRODUCT_SIMILAR_DELAY:x,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:v,PLP_SIZE_ORDER:C,PRODUCT_CARD_IMAGE_ASPECT_RATIO:j,PRODUCT_CARD_TEXTS:b,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:w,PRODUCT_IMAGE_DIMENSIONS:S,SECOND_IMAGE:P,StoreConfig_MainSellerId:N,TEXTURE_IMAGE:R,Z_INDEX_WAR:k,ICONS:O},children:c&&u&&n.jsxs(n.Fragment,{children:[e&&n.jsx(On.Anchor,{page:c}),!c.loading&&n.jsx(On.Loader,{page:c}),o&&c.loading&&n.jsx(On.NextPage,{page:c})]})})};ad.displayName="PDC.Page.Card";const id=({type:e="default",page:t,...r})=>{const{load:s,updatePage:a}=lt(),{element:o}=Hn({callback:()=>a(t),onEnterViewportOnce:!0,options:{threshold:1}});return s===!0&&n.jsx("div",{...r,className:Ge[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:o})};id.displayName="PDC.Page.Loader";const cd=({page:e,...t})=>{var a;const{addNewPage:r}=lt(),{element:s}=Hn({callback:()=>{r(e)},onEnterViewportOnce:!0,options:{threshold:[.5,1]}});return((a=e==null?void 0:e.pagination)==null?void 0:a.nextPage)===!0&&e.loading===!0?n.jsx("div",{...t,className:Ge["pdc--infinite--next-page--card"],"data-next-page":!0,ref:s}):null};cd.displayName="PDC.Page.NextPage";const On={Anchor:od,Card:ad,Loader:id,NextPage:cd},ld=({count:e,gap:t,page:r})=>{const{isMobile:s}=ne(),{columns:a,products:o}=lt(),i=(r.page-1)*e,c=Oi(r.products,a);return Array.isArray(r.products)?r.products.map((l,u)=>n.jsx(On.Card,{first:u===0,last:u===r.products.length-1,gap:t,index:u,item:l.node,isMobile:s??!1,order:o[i+u]+1,page:u===0||u===r.products.length-1?r:void 0,showVideo:!!c.indexOf(u)},o[i+u]+1)):null};ld.displayName="PDC.Page";const zg=({pages:e,load:t,PLP_GRID_SCROLL_BACK:r})=>{const s=g.useRef(!1);g.useEffect(()=>{const a=e[e.length-1];if(t&&a&&!s.current){const o=sessionStorage.getItem(r.refer),i=sessionStorage.getItem(r.order),c=document.querySelector(o==="true"?`[data-order="${i}"]`:`#pdc-scroll-infinite-${a.page}`);c&&(s.current=!0,sessionStorage.setItem(r.refer,"false"),a.page>1&&c.scrollIntoView({behavior:"instant",block:"start"}))}if(!t&&s.current){s.current=!1;const o=document.querySelector("body > main");o&&o.scrollIntoView({behavior:"instant",block:"start"})}},[t,e])},Bg=()=>{var l,u;const{count:e}=ze(),{columns:t,gap:r,load:s,pages:a,total:o}=lt(),i=De(),{PLP_GRID_SCROLL_BACK:c}=De();return zg({pages:a,load:s,PLP_GRID_SCROLL_BACK:c}),n.jsxs(n.Fragment,{children:[s===!0&&((u=(l=a[0])==null?void 0:l.pagination)==null?void 0:u.count)===0&&n.jsx(tt.Empty,{ICONS:i.ICONS,PLP_NOT_RESULT:i.PLP_NOT_RESULT}),n.jsxs(st.Root,{children:[Array.isArray(a)&&a.map((m,p)=>n.jsx(ld,{count:e,gap:r,page:m},p)),n.jsx(rd,{columns:t,count:e,gap:r})]}),n.jsx(ao,{total:o}),n.jsx(sd,{})]})},ud=()=>{const{banners:e}=Gn();return n.jsx(Xi,{banners:e,children:n.jsx(Bg,{})})};ud.displayName="PDC.InfiniteScroller";const dd=()=>{const{setOpenFilters:e}=Us(),{selectedFacets:t,onToggleFacet:r,onSort:s}=wi(),{state:a}=ze(),{Z_INDEX_WAR:o}=De(),i=T.filterNonRootFacets(t,a==null?void 0:a.base);return n.jsx(ht.Root,{onSort:s,setOpenFilters:e,style:{zIndex:o.plp_navigation},children:n.jsx(ht.Selected,{callback:r,selected:i})})};dd.displayName="Navigation";const ls=({currentPage:e,callback:t,type:r,...s})=>n.jsx(d.Button,{...s,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});ls.displayName="Arrow";const us=({active:e,prev:t,ellipses:r,page:s,selectedPage:a})=>n.jsxs(n.Fragment,{children:[r&&t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&n.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof a=="function"&&a(s)},children:s}),r&&!t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});us.displayName="PageEllipses";const md=({children:e,endPage:t,page:r,total:s,selectedPage:a,ITEMS_PER_SECTION:o})=>n.jsxs(n.Fragment,{children:[n.jsx(us,{active:r>=o&&s>o,selectedPage:a,currentPage:r,prev:!1,ellipses:r>o&&s>o,page:1}),e,n.jsx(us,{active:s-r>1&&s!==t,selectedPage:a,currentPage:r,prev:!0,ellipses:t<s-1,page:s})]});md.displayName="Pagination.Layout";const Ug=(e,t,r)=>{const s=new URLSearchParams(r);return s.set(e,t),s.toString()},qg=(e,t)=>{const r=[];for(let s=e;s<=t;s++)r.push(s);return r},Hg=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const a=t>=s?s:t,o=Math.max(1,e===a?a-r+1:e-Math.floor(r/2)),i=Math.min(a,o+r-1);return{startPage:o,endPage:i,totalPages:a}},pd=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:s})=>{const{router:a,pathname:o}=ce();return Array.isArray(t)?t.map(i=>n.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>a.push(`${o}?${Ug("page",i.toString(),r)}`),children:i},i)):null};pd.displayName="Pages";const co=({query:e,type:t="default",searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:o,SEARCH_PAGE_ITEM_THRESHOLD:i,VARIANT_PAGINATION:c,...l})=>{const{router:u,pathname:m}=ce(),{state:{page:p=1}}=ze(),{pagination:{total:f}}=on(),{endPage:h,totalPages:_,startPage:y}=Hg({currentPage:p,total:f,maxVisiblePages:a,SEARCH_PAGE_ITEM_THRESHOLD:i}),x=C=>{const j=C.toString(),b=new URLSearchParams(r.toString());t==="default"&&b.set("page",j),t==="search"&&(b.set("query",e??""),b.set("count",o.toString()),b.set("page",j),s&&b.set("sort",s.replace("_",":")));const S=`${t==="search"?"/search":m}?${b.toString()}`;u.push(S)},v=C=>{x(C==="prev"?p-1:p+1)};return f?n.jsx("div",{...l,className:Ge["pdc--pagination"],children:n.jsx(d.Pagination.Wrapper,{adornment:{start:n.jsx(ls,{callback:v,currentPage:p,disabled:p<2,type:"left"}),end:n.jsx(ls,{callback:v,currentPage:p,disabled:p>=_,type:"right"})},children:n.jsx(md,{endPage:h,page:p,selectedPage:x,total:f,ITEMS_PER_SECTION:a,children:n.jsx(pd,{currentPage:p,pages:qg(y,h),searchParams:r,VARIANT_PAGINATION:c})})})}):n.jsx(n.Fragment,{})};co.displayName="Pagination";const fd=({gap:e,isMobile:t,className:r})=>{const{count:s,state:a}=ze(),{banners:o}=Gn(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=De(),m=o.filter(p=>Mi(p.position_grid,a.page,s));return Array.isArray(m)?m.map((p,f)=>n.jsx(st.Banner,{columns:p.columns,gap:e,isMobile:t,position_grid:p.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:n.jsx(cn,{name:"Banner Carousel",data:{banner:p,componentIndex:f},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r})},p.position_grid)):null};fd.displayName="PDC.Grid.Banners";const lo=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:s,MAIN_IMAGE:a,NEWSLETTER_CONFIGS:o,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:p,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:v,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:b}=_t(),{count:w,state:S}=ze(),[P,N]=g.useState(!1),[R,k]=g.useState(null),[O,M]=g.useState([]),X=g.useCallback((Q,G)=>{const H=G?Vn([G]):null;M(Q),k(H!=null&&H.length?H[0]:null),N(!0)},[]),D=e?8:16,q=(S.page-1)*w,U=st.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return n.jsxs(n.Fragment,{children:[n.jsxs(st.Root,{children:[Array.isArray(t)&&t.map((Q,G)=>{var J,se;const H=b(Q.node.cluster.highlights);return n.jsx(st.Card,{gap:D,isMobile:e??!1,item:Q.node,order:q+(((J=U[G])==null?void 0:J.position)??0),tag:H,index:G,setSkuSelected:X,showVideo:(se=U[G])==null?void 0:se.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:a,PLP_GRID_SCROLL_BACK:c,PLP_INFINITE_SCROLL:l,PLP_PRODUCT_SIMILAR_DELAY:u,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:m,PLP_SIZE_ORDER:p,PRODUCT_CARD_IMAGE_ASPECT_RATIO:f,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:y,SECOND_IMAGE:x,StoreConfig_MainSellerId:v,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s}},Q.node.sku)}),t.length>0&&n.jsx(fd,{gap:D,isMobile:e??!1})]}),n.jsx(Wn,{open:P,sku:R,skus:O,setSku:k,setVisible:N,ICONS:s,NEWSLETTER_CONFIGS:o,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};lo.displayName="PDC.Products";const tt={Empty:Zs,Filters:Zu,Grid:Ju,InfiniteScroller:ud,Spinner:Qn,Navigation:dd,Notification:Wn,Pagination:co,Products:lo},hd=({className:e,...t})=>{const{searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:o,PLP_INFINITE_SCROLL:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l}=t;return n.jsx(Km,{...t,children:n.jsxs("div",{className:d.helpers.classNameConcat(Ge.pdc,e),children:[n.jsxs(Pi,{forceUpdate:!0,children:[n.jsx(tt.Navigation,{}),n.jsx(tt.Filters,{})]}),i===!0?n.jsx(tt.Grid,{infinite:!0}):n.jsxs(Bs,{forceUpdate:!0,query:r.get("query")??void 0,children:[n.jsx(tt.Grid,{}),n.jsx(tt.Pagination,{searchParams:r,ITEMS_DEFAULT_SORT:s,ITEMS_PER_SECTION:a,ITEMS_PER_PAGE:o,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l})]})]})})};hd.displayName="Templates.PDC";const _d=g.createContext({}),$g=({children:e,...t})=>n.jsx(_d.Provider,{value:t,children:e}),or=()=>{const e=g.useContext(_d);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",ft={"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"},gd=({term:e})=>{const{router:t}=ce(),{SEARCH_RESULT:r,ICONS:s}=or(),a=()=>{t.push(r.EMPTY.ALL_TERMS)};return n.jsxs("div",{className:ft["rearch-result--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),n.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),n.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),n.jsx(d.Button,{onClick:()=>a(),variant:"tertiary",size:"medium",adornment:{end:n.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};gd.displayName="RearchResult.Empty";const Xg=e=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),n.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),n.jsx(d.Spinner,{className:ft.spinner})]}),Yg=(e,t,r)=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),n.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),n.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),yd=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:s}=or();return n.jsx(d.TextStructure.DivWrapper,{children:e?Xg(s):Yg(t,s,r)})};yd.displayName="Search.Loading";const Qg=({term:e})=>{const[t,r]=g.useState(!1),{router:s}=ce(),{searchParams:a}=ze(),{ITEMS_DEFAULT_SORT:o,ITEMS_PER_PAGE:i,ICONS:c}=or(),l=u=>{T.navigateToSearchPage(s,e,i,1,u??o)};return n.jsx("div",{className:ft.sort,children:n.jsx(tr,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:a,ICONS:c})})},Zg=({query:e})=>{const{isLoading:t,products:r,pagination:s}=on();return n.jsxs("div",{className:ft["grid-header"],children:[n.jsxs("div",{className:ft.navigation,children:[!t&&(r!=null&&r.length)?n.jsx(Qg,{term:e}):null,n.jsx(d.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?n.jsx("div",{className:ft["result-disclaimer"],children:n.jsx(yd,{term:e,isLoading:t,quantity:s.count})}):null]})},xd=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:s,pagination:a}=on(),{searchParams:o}=ze(),i=or(),{sendDataLayerEvent:c}=ae(),l=g.useRef({query:t,sended:!1}),u=g.useMemo(()=>!r&&s.length>0&&a.count>0,[r,s.length,a.count]);return g.useEffect(()=>{if(!r){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,r,c]),n.jsxs("div",{className:ft.grid,children:[u?n.jsx(Zg,{query:t}):n.jsx(n.Fragment,{}),!r&&(s!=null&&s.length)?n.jsx(lo,{isMobile:e??!1,items:s,...i}):n.jsx(n.Fragment,{}),(s==null?void 0:s.length)===0&&!r?n.jsx(gd,{term:t}):null,u&&n.jsx(co,{searchParams:o,...i})]})};xd.displayName="SearchResultContent";const Jg=({className:e})=>{const{state:t}=ze(),{isMobile:r}=ne();return n.jsx(Bs,{forceUpdate:!1,query:t.term??"",children:n.jsx("div",{className:d.helpers.classNameConcat(ft["search-result"],e),children:n.jsx(xd,{currentPage:t.page,isMobile:r??!1,query:t.term??""})})})},vd=({className:e,searchParams:t,CONSTANTS:r})=>{const s=new URLSearchParams(t??""),a=String((s==null?void 0:s.get("query"))??""),o=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 n.jsx($g,{...r,children:n.jsx(zs,{sort:c,state:{sort:c,base:"",facets:[],term:a,page:i,count:o},count:o,searchParams:s,ITEMS_PER_PAGE:r.ITEMS_PER_PAGE,children:n.jsx(Jg,{className:e})})})};vd.displayName="Search";const ey=({page:e,data:t})=>{const{pathname:r}=ce(),s=g.useRef(null),{sendDataLayerEvent:a,currentLocalRef:o,itemListRef:i,promotionEventRef:c}=ae();return g.useEffect(()=>{const l=Fi("login_event")||"{}",u=JSON.parse(l);if(u.name||u.method){const m=new Date(0);a({functionKey:"readyEvents",data:{event:u.name,readyData:{method:u.method}}}),Hs("login_event","",{expires:m})}},[]),g.useEffect(()=>{if(s.current===r)return;s.current=r;let l={};switch(e){case"PDP":{const m=t,p={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:f,sellers:h})=>p[f]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:f})=>f[0].sellerId).join(),skuStocks:p,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:p,id:f,name:h}=Ua(),_=h,y=f;l={page_category:"lista_produtos",...p&&{page_departament:p}},i.current={item_list_name:r==="/search"?"busca":_??void 0,item_list_id:r==="/search"?void 0:y??void 0},p&&a({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:p}}});break}default:l={page_category:e},c.current={},i.current={};break}const u={region:e,...l};o.current=e,a({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...u}},timeout:0})},[r]),null};var ds={exports:{}},En={exports:{}},xa;function ty(){return xa||(xa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}r(t,{DOMAttributeNames:function(){return s},default:function(){return c},isEqualNode:function(){return o}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function a(l){let{type:u,props:m}=l;const p=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")?p[y]=!!m[_]:p.setAttribute(y,m[_])}const{children:f,dangerouslySetInnerHTML:h}=m;return h?p.innerHTML=h.__html||"":f&&(p.textContent=typeof f=="string"?f:Array.isArray(f)?f.join(""):""),p}function o(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const p=u.cloneNode(!0);return p.setAttribute("nonce",""),p.nonce=m,m===l.nonce&&l.isEqualNode(p)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const m=document.querySelector("head");if(!m)return;const p=m.querySelectorAll('meta[name="next-head"]')||[],f=[];if(l==="meta"){const y=m.querySelector("meta[charset]");y&&f.push(y)}for(let y=0;y<p.length;y++){var h;const v=p[y].nextSibling;(v==null||(h=v.tagName)==null?void 0:h.toLowerCase())===l&&f.push(v)}const _=u.map(a).filter(y=>{for(let x=0,v=f.length;x<v;x++){const C=f[x];if(o(C,y))return f.splice(x,1),!1}return!0});f.forEach(y=>{var x;const v=y.previousSibling;if(v&&v.getAttribute("name")==="next-head"){var C;(C=y.parentNode)==null||C.removeChild(v)}(x=y.parentNode)==null||x.removeChild(y)}),_.forEach(y=>{var x;const v=document.createElement("meta");v.name="next-head",v.content="1",((x=y.tagName)==null?void 0:x.toLowerCase())==="meta"&&y.getAttribute("charset")||m.appendChild(v),m.appendChild(y)})}:i=(l,u)=>{const m=document.getElementsByTagName("head")[0],p=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!p){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const f=Number(p.content),h=[];for(let x=0,v=p.previousElementSibling;x<f;x++,v=(v==null?void 0:v.previousElementSibling)||null){var _;(v==null||(_=v.tagName)==null?void 0:_.toLowerCase())===l&&h.push(v)}const y=u.map(a).filter(x=>{for(let v=0,C=h.length;v<C;v++){const j=h[v];if(o(j,x))return h.splice(v,1),!1}return!0});h.forEach(x=>{var v;return(v=x.parentNode)==null?void 0:v.removeChild(x)}),y.forEach(x=>m.insertBefore(x,p)),p.content=(f-h.length+y.length).toString()};function c(){return{mountedInstances:new Set,updateHead:l=>{const u={};l.forEach(f=>{if(f.type==="link"&&f.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+f.props["data-href"]+'"]'))return;f.props.href=f.props["data-href"],f.props["data-href"]=void 0}const h=u[f.type]||[];h.push(f),u[f.type]=h});const m=u.title?u.title[0]:null;let p="";if(m){const{children:f}=m.props;p=typeof f=="string"?f:Array.isArray(f)?f.join(""):""}p!==document.title&&(document.title=p),["meta","base","link","style","script"].forEach(f=>{i(f,u[f]||[])})}}}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(En,En.exports)),En.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(S,P){for(var N in P)Object.defineProperty(S,N,{enumerable:!0,get:P[N]})}r(t,{default:function(){return w},handleClientScriptLoad:function(){return x},initScriptLoader:function(){return j}});const s=ke,a=jt,o=n,i=s._(ws),c=a._(g),l=Au(),u=ty(),m=Tc(),p=new Map,f=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=S=>{if(i.default.preinit){S.forEach(P=>{i.default.preinit(P,{as:"style"})});return}if(typeof window<"u"){let P=document.head;S.forEach(N=>{let R=document.createElement("link");R.type="text/css",R.rel="stylesheet",R.href=N,P.appendChild(R)})}},y=S=>{const{src:P,id:N,onLoad:R=()=>{},onReady:k=null,dangerouslySetInnerHTML:O,children:M="",strategy:X="afterInteractive",onError:D,stylesheets:q}=S,U=N||P;if(U&&f.has(U))return;if(p.has(P)){f.add(U),p.get(P).then(R,D);return}const Q=()=>{k&&k(),f.add(U)},G=document.createElement("script"),H=new Promise((J,se)=>{G.addEventListener("load",function(de){J(),R&&R.call(this,de),Q()}),G.addEventListener("error",function(de){se(de)})}).catch(function(J){D&&D(J)});O?(G.innerHTML=O.__html||"",Q()):M?(G.textContent=typeof M=="string"?M:Array.isArray(M)?M.join(""):"",Q()):P&&(G.src=P,p.set(P,H));for(const[J,se]of Object.entries(S)){if(se===void 0||h.includes(J))continue;const de=u.DOMAttributeNames[J]||J.toLowerCase();G.setAttribute(de,se)}X==="worker"&&G.setAttribute("type","text/partytown"),G.setAttribute("data-nscript",X),q&&_(q),document.body.appendChild(G)};function x(S){const{strategy:P="afterInteractive"}=S;P==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>y(S))}):y(S)}function v(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(P=>{const N=P.id||P.getAttribute("src");f.add(N)})}function j(S){S.forEach(x),C()}function b(S){const{id:P,src:N="",onLoad:R=()=>{},onReady:k=null,strategy:O="afterInteractive",onError:M,stylesheets:X,...D}=S,{updateScripts:q,scripts:U,getIsSsr:Q,appDir:G,nonce:H}=(0,c.useContext)(l.HeadManagerContext),J=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const de=P||N;J.current||(k&&de&&f.has(de)&&k(),J.current=!0)},[k,P,N]);const se=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{se.current||(O==="afterInteractive"?y(S):O==="lazyOnload"&&v(S),se.current=!0)},[S,O]),(O==="beforeInteractive"||O==="worker")&&(q?(U[O]=(U[O]||[]).concat([{id:P,src:N,onLoad:R,onReady:k,onError:M,...D}]),q(U)):Q&&Q()?f.add(P||N):Q&&!Q()&&y(S)),G){if(X&&X.forEach(de=>{i.default.preinit(de,{as:"style"})}),O==="beforeInteractive")return N?(i.default.preload(N,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin}),(0,o.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([N,{...D,id:P}])+")"}})):(D.dangerouslySetInnerHTML&&(D.children=D.dangerouslySetInnerHTML.__html,delete D.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:H,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...D,id:P}])+")"}}));O==="afterInteractive"&&N&&i.default.preload(N,D.integrity?{as:"script",integrity:D.integrity,nonce:H,crossOrigin:D.crossOrigin}:{as:"script",nonce:H,crossOrigin:D.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});const w=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)})(ds,ds.exports);var ny=ds.exports,ry=ny;const uo=T.getDefaultExportFromCjs(ry),sy=({children:e,ONE_TRUST:t})=>n.jsxs(n.Fragment,{children:[n.jsx(uo,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),oy=El(()=>Promise.resolve(sy),{ssr:!1}),ay="_lgpd_vffd3_82",iy="_success_vffd3_248",cy="_error_vffd3_312",xe={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:ay,"textfield-structure-modifier":"_textfield-structure-modifier_vffd3_190","input-wrapper-modifier":"_input-wrapper-modifier_vffd3_196","submit-btn":"_submit-btn_vffd3_200","loading-spinner":"_loading-spinner_vffd3_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_vffd3_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_vffd3_230","terms-and-conditions-checked":"_terms-and-conditions-checked_vffd3_244",success:iy,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:cy,"newsletter-wrapper":"_newsletter-wrapper_vffd3_332","banner-container":"_banner-container_vffd3_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_vffd3_358","newsletter-root-banner":"_newsletter-root-banner_vffd3_371","banner-background":"_banner-background_vffd3_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_vffd3_401"},bd=({invalid_message:e,master_data_field:t,placeholder:r,required:s=!1,CONSTANTS:a})=>{const{isMobile:o}=ne(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Ws();return n.jsx(d.TextField.Structure,{className:`${xe["textfield-structure-modifier"]} ${u}`,input:n.jsx(d.TextField.Input,{mode:"simple",label:r,sizeVariant:o?a.NEWSLETTER_CONFIGS.interactionSizeMob:a.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${xe["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"?n.jsx("div",{className:u==="horizontal"?xe["support-text-modifier"]:"",children:n.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??a.NEWSLETTER_CONFIGS.messages.invalid_generic:a.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};bd.displayName="Newsletter.Input";const jd=({formStatus:e,fields:t,CONSTANTS:r})=>n.jsxs(n.Fragment,{children:[Array.isArray(t)&&t.map((s,a)=>n.jsx(bd,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:r},`nt-field-${s.master_data_field}-${a}`)),e==="error"&&n.jsx("div",{className:xe.error,children:n.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});jd.displayName="Newsletter.FormFields";const Cd=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:s}=ne();return n.jsxs(d.Button,{...r,className:xe["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[n.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&n.jsx(d.Spinner,{className:xe["loading-spinner"],size:"small"})]})};Cd.displayName="Newsletter.SubmitButton";const Sd=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:s})=>{const a=o=>{o.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return n.jsxs(n.Fragment,{children:[n.jsx(d.Checkbox,{adornment:n.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:a,sizeVariant:"small",className:xe["terms-and-conditions-checkbox"]}),t==="unchecked"&&n.jsx("div",{className:xe["terms-and-conditions-unchecked"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Sd.displayName="Newsletter.Terms";const Pd=({title:e,description:t,CONSTANTS:r})=>n.jsx("div",{className:xe.success,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:xe["text-structure-modifier"],children:[n.jsxs("div",{className:xe["success-title"],children:[n.jsx(d.Icon,{name:r.ICONS.check_circle,size:"medium"}),n.jsx("h3",{children:e})]}),n.jsx("p",{children:t})]})})});Pd.displayName="Newsletter.Success";const wd=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:s,lgpdLinkLable:a,lgpdLink:o,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:p,handleClickToSubmit:f,handleSubmit:h,setFormStatus:_}=Ws();return n.jsx(n.Fragment,{children:m==="success"?n.jsx(Pd,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):n.jsxs(n.Fragment,{children:[n.jsxs("form",{className:xe["form-wrapper"],onSubmit:y=>h(y,e,t),children:[n.jsx(jd,{formStatus:m,fields:u,CONSTANTS:c}),p&&n.jsx(Sd,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),n.jsx(Cd,{formStatus:m,type:"submit",variant:"primary",onClick:f,CONSTANTS:c})]}),(r||i==="vertical")&&n.jsxs("div",{className:xe.lgpd,children:[s&&n.jsx("p",{children:s}),a&&n.jsx(Oe,{href:o,children:a})]})]})})};wd.displayName="Newsletter.Form";const ly=["horizontal","vertical"],mo=({className:e,description:t,formPayloadOptionals:r,fields:s,masterDataEntity:a,masterDataEmailField:o,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:p,lgpdLink:f,title:h,variant:_,borderTop:y,borderBottom:x,CONSTANTS:v,...C})=>{if(!o||!i)return null;const j=d.helpers.ValidateProp({fieldTypes:ly,property:_,fallback:"horizontal"});return n.jsxs("div",{className:c?u?xe["banner-background"]:xe["newsletter-wrapper"]:"",children:[c&&n.jsx(d.Banner.Container,{className:xe["banner-container"],children:n.jsx(d.Banner.ImageWrapper,{children:n.jsx(we.Image,{src:c,alt:l,width:"1920",height:"500"})})}),n.jsx("div",{className:c?xe["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:n.jsx(sc,{fields:s,masterDataEmailField:o,masterDataNameField:i,variant:j,CONSTANTS:v,children:n.jsx("div",{...C,className:d.helpers.classNameConcat(xe["newsletter-root"+(c||j==="vertical"?"-banner":"")],[y&&xe["has-border-top"],x&&xe["has-border-bottom"],e].filter(Boolean)),"data-variant":j,children:n.jsxs("div",{className:c||j==="vertical"?xe["newsletter-container-banner"]:xe["newsletter-container"],children:[n.jsxs("div",{className:xe["content-text"],children:[n.jsx("h2",{children:h}),n.jsx("p",{children:t}),!c&&j==="horizontal"&&n.jsxs("div",{className:xe.lgpd,children:[n.jsx("p",{children:m}),p&&n.jsx(Oe,{target:"_blank",href:f,children:p})]})]}),n.jsx(wd,{formPayloadOptionals:r,masterDataEntity:a,CONSTANTS:v,banner:c,lgpdLink:f,lgpdLinkLable:p,termsDescription:m,variant:j})]})})})})]})};mo.displayName="Newsletter";const Nd=({children:e,...t})=>n.jsx("div",{...t,children:e});Nd.displayName="CallToAction";const uy="_wrapper_aejhu_1",dy="_body_aejhu_8",qn={wrapper:uy,body:dy,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},my=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(qn.wrapper,t),children:e}),py=({data:e,ICONS:t})=>{const[r,s]=g.useState(null),a=i=>{s(c=>c===i?null:i)},{router:o}=ce();return n.jsx("div",{className:d.helpers.classNameConcat(qn.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var p;const l=r===i.id,u=i.buttonHref&&i.buttonHref!=="#",m=i.buttonHref&&i.type==="button"&&u?{onClick:()=>{var f;if((f=i.buttonHref)!=null&&f.startsWith("/")){o.push(i.buttonHref);return}window.open(i.buttonHref,"_blank")}}:{};return n.jsx("div",{children:i.type==="button"?n.jsxs(n.Fragment,{children:[n.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}),n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):n.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(qn["accordion-modifier"]),children:[n.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>a(i.id),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:l&&n.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?n.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):n.jsx(n.Fragment,{}),n.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?n.jsx(Oe,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(p=i.buttonIcon)!=null&&p.length?{end:n.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):n.jsx(n.Fragment,{})]})})})]})},i.id)}))})},fy=({className:e,data:t,ICONS:r,...s})=>{const[a,o]=g.useState(!1),[i,c]=g.useState(null);g.useEffect(()=>{!a&&!i&&t&&c(t)},[a,i]);const l=g.useCallback(()=>{o(u=>!u)},[]);return i?n.jsxs(my,{...s,className:e,children:[n.jsx("div",{className:qn["wrapper-body"],hidden:!a,children:a&&n.jsx(py,{data:i.content,ICONS:r})}),n.jsx(Nd,{children:n.jsx("div",{onClick:l,children:a?n.jsx(d.Button,{iconNameEnd:r.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):n.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??r.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):n.jsx(n.Fragment,{})},hy="_formContainer_zwlly_1",_y="_formFieldGroup_zwlly_6",gy="_formFieldGroupName_zwlly_10",yy="_formFieldWrapper_zwlly_20",xy="_formFieldInput_zwlly_30",vy="_success_zwlly_73",by="_button_zwlly_110",jy="_error_zwlly_114",ot={formContainer:hy,formFieldGroup:_y,formFieldGroupName:gy,formFieldWrapper:yy,formFieldInput:xy,success:vy,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:by,error:jy},Cy=({group:e,children:t,className:r})=>n.jsx(n.Fragment,{children:n.jsxs("div",{className:d.helpers.classNameConcat(ot.formFieldGroup,r),children:[n.jsx("h1",{className:ot.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)});async function Sy(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(o=>o.toString(16).padStart(2,"0")).join("")}const Py=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),Ed=g.createContext({});function Id({children:e,groups:t,masterDataEntity:r,postFn:s,actionName:a="",originName:o="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=g.useState(!1),[u,m]=g.useState({}),[p,f]=g.useState([]),[h,_]=g.useState("idle"),[y,x]=g.useState(""),v=({target:{name:j,value:b}})=>{m({...u,[j]:b})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:r,payload:u}}).then(async({Message:b})=>{if(b){const S=b.match(/'(.*?[^\\])'/g)||[];var w="-";for(const P of S){const N=P.substring(1,P.length-1),k=t.flatMap(O=>O.fields).find(({name:O})=>O===N);x(N),k&&(w=k.name)}return _("error"),f([w])}if(u.email){const S=await Sy(u.email||""),P=new Date().toISOString();Py([{user_id:S,timestamp:P,type:"IDENTIFY",traits:{id:S,created_at:P,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:a,timestamp:P,type:"TRACK",user_id:S,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:u.email,nome:u.name,origem:o,...u}}}])}return window.localStorage.setItem(i,"true"),m({}),l(!0),_("success"),f([])})};return n.jsx(Ed.Provider,{value:{formErrors:p,handleInputChange:v,submitForm:C,formData:u,status:h,fieldMessage:y,success:c,setSuccess:l},children:e})}function ar(){return g.useContext(Ed)}const wy=({fields:e,className:t})=>{const{formData:r,handleInputChange:s,formErrors:a}=ar();return n.jsx("div",{className:d.helpers.classNameConcat(ot.formFieldWrapper,t),children:e.map(({label:o,name:i,required:c,width:l="medium"})=>n.jsx(d.TextField.Input,{label:`${o}${c?"*":""}`,title:i,value:r[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:a.includes(i)?"error":"none",className:ot.formFieldInput,"data-inputsize":l},i))})},Ny=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=ce();return n.jsxs("div",{className:ot.success,children:[n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:n.jsx(d.TextStructure.DivWrapper,{className:ot["text-structure-modifier"],children:n.jsx("p",{children:e.successMessage})})}),n.jsx(d.Button,{size:"large",onClick:()=>r.push("/"),className:ot.button,children:e.returnButton})]})},Ey=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=ar();return n.jsx("div",{className:ot.error,children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{className:ot["text-structure-modifier"],children:n.jsxs("p",{children:[e.errorMessage,r]})})})})},Iy=({children:e,className:t,ICONS:r,FORM_CONFIGS:s})=>{const{submitForm:a,status:o}=ar();return n.jsx("form",{onSubmit:a,className:d.helpers.classNameConcat(ot.formContainer,t),children:o==="success"?n.jsx(Ny,{ICONS:r,FORM_CONFIGS:s}):n.jsxs(n.Fragment,{children:[e,o==="error"&&n.jsx(Ey,{ICONS:r,FORM_CONFIGS:s})]})})},Ry=e=>{const{children:t,className:r}=e;return n.jsx(Id,{...e,children:n.jsx(Iy,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Mt={Root:Ry,FieldGroup:Cy,FieldWrapper:wy},Ty="_button_1e35m_39",yt={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Ty,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Ay({content:e,sections:t,FORM_CONFIGS:r,ICONS:s,postFn:a,POPUP_SUBMITTED_STORAGE:o}){var l;const{isMobile:i}=ne(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:yt["banner-container"],children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(we.Image,{className:yt["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),n.jsxs(Mt.Root,{postFn:a,ICONS:s,FORM_CONFIGS:r,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:yt["form-root"],POPUP_SUBMITTED_STORAGE:o,children:[c.groups.map(u=>n.jsx(Mt.FieldGroup,{group:u,children:n.jsx(Mt.FieldWrapper,{fields:u.fields,className:yt["form-fied-wrapper"]})},u.groupLabel)),n.jsxs("div",{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),n.jsx("div",{className:yt["button-wrapper"],children:n.jsx("div",{className:yt["button-frame"],children:n.jsx(d.Button,{size:"large",type:"submit",className:yt.button,children:e.buttonLabel})})})]})]})]})})}const ky="_content_1jj9i_36",Oy="_trends_1jj9i_47",Ly="_modal_1jj9i_1",qe={"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:ky,trends:Oy,"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:Ly,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Rd=g.createContext({}),My=({children:e,term:t})=>{const[r,s]=g.useState([]),[a,o]=g.useState(!1);return g.useEffect(()=>{if(!t){s([]);return}(async()=>{o(!0);try{const c=await T.fetchProxy("/_v/proxy/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]),n.jsx(Rd.Provider,{value:g.useMemo(()=>({suggestedTerms:r,loading:a,setLoading:o}),[r,a]),children:e})},Dy=({children:e,...t})=>n.jsx(My,{...t,children:e}),Fy=()=>{const e=g.useContext(Rd);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},Hr=(e,t,r=24,s=1,a="release:desc")=>{const o=`/search?query=${t??""}&count=${r}&page=${s}${a?`&sort=${a.replace("_",":")}`:""}`;e.push(o)},Td=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:s,handleClose:a,setTerm:o,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,p]=g.useState(""),{suggestedTerms:f,loading:h,setLoading:_}=Fy(),{router:y}=ce(),x=g.useRef(null),v=b=>{p(b.target.value),clearTimeout(x.current),b.target.value.length>2&&(o(b.target.value),x.current=setTimeout(()=>{o(b.target.value),_(!1)},2e3))},C=b=>{b.key==="Enter"&&(m==null?void 0:m.length)>2&&(a(),Hr(y,m,l,1,c))},j=b=>{a(),Hr(y,b,l,1,c)};return g.useEffect(()=>{if(clearTimeout(x.current),m.length<=2||f.length>0){_(!1);return}return _(!0),x.current=setTimeout(()=>{Hr(y,m,l,1,c),_(!1),a()},2e3),()=>{clearTimeout(x.current)}},[m,f]),n.jsx(d.DropDown.AutoComplete,{className:qe["modal-auto-complete"],onKeyDown:C,onInputChange:v,placeholder:e,stopClickPropagation:!1,adornment:{end:h?n.jsx(d.Spinner,{size:"small"}):n.jsx(d.Button,{variant:"tertiary",size:"small",iconNameStart:i.search,onClick:()=>{j(m)},disabled:!(m.length>2)})},children:(f==null?void 0:f.length)>0&&n.jsx(n.Fragment,{children:(f==null?void 0:f.length)>0&&(m==null?void 0:m.length)>2?n.jsx(d.DropDown.AutoCompleteList,{className:qe["modal-auto-complete__dropdown"],seeAll:n.jsx("span",{onClick:()=>j(m),children:s+m}),children:f.map((b,w)=>n.jsx(d.DropDown.ListItemWithLink,{children:n.jsx(Oe,{href:`/search?query=${b.term}&count=${l}&page=1`,size:"x-small",title:b.term,disableUnderline:!0,disablePadding:!1,onClick:S=>{S.preventDefault(),a()},children:b.term})},`key-${b.term}-${w}`))}):!h&&(m==null?void 0:m.length)>3&&(f==null?void 0:f.length)===0&&n.jsxs(d.DropDown.AutoCompleteList,{className:qe["modal-search-empty"],children:[n.jsx(d.DropDown.NotResults,{description:r,title:t}),n.jsx(d.Button,{className:"all-terms",onClick:()=>{a(),y.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:n.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Td.displayName="SearchModal.AutoComplete";function zy({title:e,ICONS:t}){const{isMobile:r}=ne();return n.jsx(d.Modal.Header,{navigation:"top",className:qe["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Modal.Title,{navigation:"top",className:qe["search-modal__title"],title:e}),n.jsx(d.Button,{className:qe["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Ad=g.createContext({searches:[],isLoading:!1,error:null});let $r=null;const By=({children:e})=>{const[t,r]=g.useState([]),[s,a]=g.useState(!0),[o,i]=g.useState(null);return g.useEffect(()=>{(async()=>{try{if(a(!0),$r){r($r),a(!1);return}const l=await T.fetchProxy("/_v/proxy/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];$r=m,r(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{a(!1)}})()},[]),n.jsx(Ad.Provider,{value:g.useMemo(()=>({searches:t,isLoading:s,error:o}),[t,s,o]),children:e})},Uy=()=>{const e=g.useContext(Ad);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},qy=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:s,handleClose:a,ICONS:o,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=Uy(),{router:u}=ce(),m=Array.isArray(c)?c:[];return n.jsx(n.Fragment,{children:!l&&m.length>0?n.jsx(d.ComponentList.Structure,{className:qe.trends,title:e,children:n.jsxs("div",{className:qe["trends-content"],children:[n.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((p,f)=>n.jsx(d.ComponentList.ListItem,{className:qe["trends-item"],children:n.jsx(Oe,{href:`/search?query=${p.term}&count=${i}&page=1`,size:"x-small",adornments:{end:n.jsx(d.Icon,{name:o.arrow_right,size:"x-small"})},disableUnderline:!0,title:p.term,onClick:()=>a(),children:p.term})},`list-item-${f}`))}),n.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{a(),u.push(r)},adornment:{end:n.jsx(d.Icon,{name:o.arrow_right,size:"x-small"})},children:t})]})}):null})};function Hy({SectionZone:e}){var s;const[t,r]=g.useState(null);return g.useEffect(()=>{(async()=>{try{const o=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!o.ok)return;const i=await o.json();r(i)}catch(o){console.error("[CMS FETCH ERROR]",o)}})()},[]),n.jsx("div",{className:qe.content,children:t!==null&&n.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const kd=({className:e,trends:t,CONSTANTS:r,SectionZone:s})=>{const[a,o]=g.useState(""),{isMobile:i}=ne(),c=si(),{setValue:l}=$n(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:p,ITEMS_DEFAULT_SORT:f}=r;return n.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${qe.modal} ${qe["search-modal__modal"]} ${e??""}`,children:[n.jsx(zy,{title:u.HEADER.TITLE,ICONS:m}),n.jsxs(d.Modal.Body,{className:qe["modal-content-body"],children:[n.jsx(Dy,{term:a,children:n.jsx(Td,{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:o,ICONS:m,ITEMS_DEFAULT_SORT:f,ITEMS_PER_PAGE:p,SEARCH_MODAL:u})}),t?n.jsx(By,{children:n.jsx(qy,{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:p})}):null,n.jsx(Hy,{SectionZone:s})]})]})};kd.displayName="SearchModal";const We={"store--page-title":"_store--page-title_1rs1a_1","store--page-title--title":"_store--page-title--title_1rs1a_4","store--return-button":"_store--return-button_1rs1a_14","store--section":"_store--section_1rs1a_36","store--section--img":"_store--section--img_1rs1a_41","store--details":"_store--details_1rs1a_51","store--details--title":"_store--details--title_1rs1a_59","store--details--subtitle":"_store--details--subtitle_1rs1a_68","store--details--text":"_store--details--text_1rs1a_77","store--details--vendor":"_store--details--vendor_1rs1a_87","store--select":"_store--select_1rs1a_91","store--wrapper":"_store--wrapper_1rs1a_115"},Od=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:s,selectedStore:a}=Kn();return n.jsx(d.Card,{padding:"small",shadow:!0,className:We["store--wrapper"],children:a?n.jsxs(n.Fragment,{children:[n.jsx(rt.ReturnButton,{ICONS:t,children:e}),n.jsx(rt.Details,{ICONS:t,showVendor:r,store:s==null?void 0:s.find(o=>o.nome===a)})]}):n.jsx(rt.Select,{ICONS:t})})};Od.displayName="LPStores.Content";const Kt=({title:e,text:t,type:r,...s})=>n.jsx(d.TextStructure.DivWrapper,{...s,children:r==="title"?n.jsx("h4",{className:We["store--details--title"],children:e}):n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:We["store--details--subtitle"],children:e}),n.jsx("p",{className:We["store--details--text"],children:t})]})});Kt.displayName="LPStores.Details";const Ld=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{gap:0,children:n.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:We["store--details--vendor"],children:r.map((s,a)=>n.jsx("p",{className:"typography-style-body-sm",children:s.trim()},a))})})})]})};Ld.displayName="LPStores.Details";const Md=({store:e,showVendor:t,ICONS:r})=>n.jsxs("div",{className:We["store--details"],children:[n.jsx(Kt,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),n.jsx(Kt,{title:"Endereço",text:String(e.endereco)}),e.telefone&&n.jsx(Kt,{title:"Telefone",text:String(e.telefone)}),e.horario&&n.jsx(Kt,{title:"Horário de funcionamento",text:String(e.horario)}),t&&n.jsx(Ld,{ICONS:r,vendor:String(e.vendedoras)})]});Md.displayName="LPStores.Details";const Dd=({ICONS:e,arrowDownIcon:t=n.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=n.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:s,selectText:a,...o})=>n.jsx(d.DropDown.DefaultDropDown,{...o,"aria-placeholder":a,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:a,sizeVariant:"large",children:n.jsx(d.DropDown.DefaultDropDownList,{placeholder:a,supportText:a,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>n.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});Dd.displayName="LPStores.DropDown";const Fd=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=Kn(),s=()=>{typeof r=="function"&&r()};return n.jsxs("button",{"aria-label":String(e),className:We["store--return-button"],onClick:s,onKeyDown:s,children:[n.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};Fd.displayName="LPStores.ReturnButton";const zd=({children:e,data:t})=>n.jsx(ac,{data:t,children:e});zd.displayName="LPStores.Root";const Bd=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:s})=>{const{isMobile:a}=ne();return n.jsxs("section",{className:We["store--section"],children:[n.jsx(en,{src:a?s:r,alt:t,fill:!0,className:We["store--section--img"]}),e]})};Bd.displayName="LPStores.Section";const Ud=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:s,handleSelectStore:a}=Kn(),o=new Set(t.map(c=>c.cidade)),i=Array.from(o).filter(c=>typeof c=="string");return n.jsxs("div",{className:We["store--select"],children:[n.jsx(rt.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:i,defaultValue:s==null?void 0:s[0].cidade,ICONS:e}),n.jsx(rt.DropDown,{"data-selected-city":!!s,selectText:"Selecione a loja",handleSelectedValue:a,list:s?s==null?void 0:s.map(c=>String(c.nome)):[],ICONS:e},s==null?void 0:s[0].cidade)]})};Ud.displayName="LPStores.Select";const qd=({children:e})=>n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:We["store--page-title"],children:n.jsx("h2",{className:We["store--page-title--title"],children:e})})});qd.displayName="LPStores.Title";const rt={Content:Od,Details:Md,DropDown:Dd,ReturnButton:Fd,Root:zd,Section:Bd,Select:Ud,Title:qd};var Hd={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 $y(e,t,r){const s=t.window,a=Object.assign({},t);if(delete a.window,s){s.dataLayer=s.dataLayer||[],s.dataLayer.push({event:e,ecommerce:a});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:a})}function Vy(e,t,r){console.log(`%c[DT - ${r}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var $d=[["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 Wy(e,t,r){Vy({id:e,custom_data:t},"#00c851",r)}var Gy={DataLayer:$y,Dito:Wy};async function Ky(e,t){const r=Hd[e];r&&await Promise.allSettled(r.destinations.map(async s=>{try{await Gy[s](e.toLowerCase(),t,s)}catch(a){console.error(`[DT] Failed to send ${e} to ${s}:`,a)}}))}async function Xy(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 Yy(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Vd(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),r=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return r?r[1].replace("-","_"):null}async function Qy(e){const t=Vd(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const r=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!r.ok)throw new Error(`Erro na API: ${r.status}`);const s=await r.json();return(s==null?void 0:s[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function Wd(e,t){var r,s,a,o;const i=(s=(r=e==null?void 0:e.shippingData)==null?void 0:r.logisticsInfo)==null?void 0:s.find(l=>l.itemId===t.id),c=(a=i==null?void 0:i.slas)==null?void 0:a.find(l=>l.id===i.selectedSla);return(o=c==null?void 0:c.pickupStoreInfo)!=null&&o.friendlyName?`retirada em loja: ${c.pickupStoreInfo.friendlyName}`:c!=null&&c.name?`Receba em casa: ${c.name}`:null}async function Gd(e){var t,r;const s=await Xy(e.productId||e.productID||e.item_group_id);return s.length&&(r=(t=s[0].items.find(a=>a.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function ir(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function St(e){const t=[()=>{var r;return((r=e==null?void 0:e.productCategories)==null?void 0:r[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const r of t){const s=r();if(s!=null)return s}return null}function ln(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,s,a,o,i;return(i=(o=(a=(s=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:s.call(r,">"))==null?void 0:a[1])==null?void 0:o.trim)==null?void 0:i.call(o)},()=>e.item_category2];for(const r of t){const s=r();if(s!=null)return s}return null}function Kd(e){var t;const r=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(r)&&r.length?r.join(","):null}var Zy={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function va(e){if(!e)return null;const t=e.toLowerCase().trim();return Zy[t]||null}function at(e){var t;let r=[];if(Array.isArray(e)&&e.every(o=>typeof o=="string"))r=e;else if(Array.isArray(e))r=e.map(o=>{var i;return((i=o.additionalInfo)==null?void 0:i.brandName)||o.brand});else if(typeof e=="object"&&e!==null&&"brand"in e)r=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?va(e):null;const s=r.map(va).filter(o=>o!==null),a=[...new Set(s)].sort();return a.length>0?a.join("_"):null}function Jy(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return at(r)}function ex(e){var t;const{item:r}=e;return at(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function tx(e,t){if(e!=null&&e.brand)return at(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 Jy(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return ex(e);default:return null}}async function nx(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async s=>{var a,o,i;return{item_id:s.productId,item_category2:ln(s),item_category4:Kd(s),item_shipping_tier:Wd(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:at((a=s.additionalInfo)==null?void 0:a.brandName)||((o=s.additionalInfo)==null?void 0:o.brandName)||null,item_sku:await Gd(s)||s.id||null,item_name:s.name||s.id||null,item_category:St(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:ir(s)}})):[]}async function rx(e,t){var r,s,a;const{item:o,orderForm:i}=e;return[{index:0,quantity:1,item_id:o.productId||o.item_group_id||o.sku||null,item_category2:ln(o),item_category4:Kd(o),item_shipping_tier:t==="REMOVE_FROM_CART"?Wd(i,o):null,price:o.listPrice||parseFloat((o.price/100).toFixed(2))||0,item_ref:o.refId||o.item_ref||(o==null?void 0:o.additionalProperty.find(c=>c.name==="RefId").value)||null,item_brand:((r=o.additionalInfo)==null?void 0:r.brandName)||o.item_brand||o.brand.name||null,item_sku:o.sku||o.id||o.item_id||await Gd(o)||null,item_name:o.name||o.item_name||null,item_category:St(o)||null,item_variant:(o.skuName||o.item_variant||o.name).split(/[-/]/)[0].trim()||null,item_variant2:o.size||((s=o==null?void 0:o.itemAttributes)==null?void 0:s.size)||((a=(o.skuName||o.name).split(/[-/]/).pop())==null?void 0:a.trim())||null,discount:ir(o),item_list_name:St(o)||null,item_url:o.item_url||null}]}async function sx(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,s,a,o,i;return{price:((r=t==null?void 0:t.price)==null?void 0:r.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.referenceId[0].Value)||(t==null?void 0:t.additionalProperty.find(c=>c.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:at((a=t==null?void 0:t.brand)==null?void 0:a.name)||at(e.brand)||at(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)||((o=t==null?void 0:t.seo)==null?void 0:o.title)||null,item_category:St(t)||null,item_variant:((i=t==null?void 0:t.name)==null?void 0:i.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:ln(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||(t==null?void 0:t.id)||null,discount:ir(t)||null,item_list_name:(e==null?void 0:e.itemListName)||St(t)||null}})}async function ox(e){var t,r,s;const{item:a}=e;return[{price:e.value||0,quantity:1,item_ref:a.ref||a.additionalProperty.find(o=>o.name==="RefId").value||null,item_brand:at(a.brand.name)||at(e.brand)||null,item_name:a.productName||a.alternateName||null,item_category:St(a)||null,item_variant:((t=a==null?void 0:a.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:ln(a)||((s=(r=a==null?void 0:a.category)==null?void 0:r.split(">")[1])==null?void 0:s.trim())||null,item_id:(a==null?void 0:a.productID)||(a==null?void 0:a.productId)||a.item_group_id||null,discount:ir(a)||null,item_sku:(a==null?void 0:a.sku)||(a==null?void 0:a.productId)||null,item_url:a.url||a.item_url||null,seller_id:a.seller||null}]}async function ax(e){var t;if(!Yy(e==null?void 0:e.bannerUrl))return[];const s=await Qy(e==null?void 0:e.bannerUrl),a=s==null?void 0:s.items[0];return{price:(a==null?void 0:a.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:Vd(e==null?void 0:e.bannerUrl),item_brand:at(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:St(s)||null,item_variant:((t=a==null?void 0:a.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:ln(s)||null,item_id:(s==null?void 0:s.productId)||null,discount:(a==null?void 0:a.sellers[0].commertialOffer.ListPrice)-(a==null?void 0:a.sellers[0].commertialOffer.Price)||null}}function ix(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 nx(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return rx(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return sx(e);case"VIEW_ITEM":return ox(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return ax(e);default:return null}}function cx(e){var t,r,s;if(!e.orderForm)return null;const a=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],o=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!a.length||!o.length)return null;const i=a.find(p=>p==null?void 0:p.paymentSystem)||a[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=o.find(p=>String(p.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=$d.find(([p])=>u.includes(p));return m?m[1]:null}function lx(e){var t,r,s,a;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!o.length)return null;const i=((r=o[0])==null?void 0:r.payments)||[];if(!i.length)return null;const c=((a=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:a.toLowerCase())||"",l=$d.find(([u])=>c.includes(u));return l?l[1]:null}function ux(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return cx(e);case"PURCHASE":case"CUSTOM_PURCHASE":return lx(e);default:return null}}var dx={brand:tx,items:ix,payment_type:ux,user_info:async(e,t)=>{var r;const a=(r={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"},lojacrisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.crisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:r[e.platform||"store"];if(!a)return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null};try{const o=`${a}/_v/user-info`,i=await fetch(o,{method:"POST",body:JSON.stringify({email:e.userEmail})});return i.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await i.json()}catch{return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address: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(r=>r.productID||(r==null?void 0:r.id)):(e.orderForm.items||[]).map(r=>r.productId).join(","),currency:(e,t)=>{var r,s,a,o;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(r=e.item)==null?void 0:r.offers)==null?void 0:s.priceCurrency)||"BRL":((o=(a=e.orderForm)==null?void 0:a.storePreferencesData)==null?void 0:o.currencyCode)||null},value:(e,t)=>{var r;return e!=null&&e.value?e.value:e.item?e.item.price:((r=e.orderForm)==null?void 0:r.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var r,s;const o=(((r=e.orderForm)==null?void 0:r.totalizers)||((s=e.orderForm)==null?void 0:s.totals)||[]).find(i=>i.id==="Discounts");return o?Math.abs(o.value)/100:0},subtotal:(e,t)=>{var r,s;return(((r=e.orderForm)==null?void 0:r.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 r;if(e.couponMessage)return e.couponMessage;const s=((r=e.orderForm)==null?void 0:r.messages)||[];if(s.length===0)return null;const a=s.filter(o=>o.text.toLowerCase().includes("cupom"));return a.length===0?null:a.map(o=>o.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var r,s;return e.appliedCoupon||((s=(r=e==null?void 0:e.orderForm)==null?void 0:r.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 r;const s=e.orderForm;return s?(((r=s.shippingData)==null?void 0:r.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 r=e.orderForm;if(!r)return null;const s={};for(const o of r.shippingData.logisticsInfo){const i=r.items[o.itemIndex];if(i)for(const c of o.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(o=>({shipping:o.shipping,shipping_tier:o.shipping_tier,delivery_time:o.delivery_time,line_items:o.line_items.join(",")}))||null},shipping:(e,t)=>{var r,s,a;return((a=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:s.logisticsInfo)!=null?a:[]).reduce((i,c)=>{var l,u;const m=(l=c.slas)==null?void 0:l.find(p=>p.id===c.selectedSla);return i+((u=m==null?void 0:m.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var r,s,a,o;const c=((a=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:s.logisticsInfo)!=null?a:[]).find(f=>f.selectedSla);if(!c)return null;const l=(o=c.slas)==null?void 0:o.find(f=>f.id===c.selectedSla);if(!l)return null;const{deliveryChannel:u,name:m,pickupStoreInfo:p}=l;return u==="pickup-in-point"?`retirada em loja${p!=null&&p.friendlyName?`: ${p.friendlyName}`:""}`:u==="delivery"?`receba em casa${m?`: ${m}`:""}`:null},transaction_id:(e,t)=>{var r,s;return((s=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function mx(e={},t){const r=Hd[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async a=>{const o=dx[a];return typeof o!="function"?(console.error(`[DT] Missing paramGetter for param: ${a}`),[a,null]):[a,await o(e,t)]}))):void 0}async function px(e,t={}){try{const r=await mx(t,e);return await Ky(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}var ms={exports:{}},Xd={};(function(e){"use client";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,{PathParamsContext:function(){return o},PathnameContext:function(){return a},SearchParamsContext:function(){return s}});const r=g,s=(0,r.createContext)(null),a=(0,r.createContext)(null),o=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(s.displayName="SearchParamsContext",a.displayName="PathnameContext",o.displayName="PathParamsContext")})(Xd);var ps={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(s){return Array.isArray(s)?s[1]: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)})(ps,ps.exports);var fx=ps.exports,fs={exports:{}},hs={exports:{}},_s={exports:{}},gs={exports:{}},ys={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return o}});const r=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class s{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}const a=globalThis.AsyncLocalStorage;function o(){return a?new a:new 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)})(ys,ys.exports);var po=ys.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,po.createAsyncLocalStorage)();(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)})(gs,gs.exports);var hx=gs.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0});function r(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}r(t,{getExpectedRequestStore:function(){return a},requestAsyncStorage:function(){return s.requestAsyncStorage}});const s=hx;function a(o){const i=s.requestAsyncStorage.getStore();if(i)return i;throw new Error("`"+o+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}(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)})(_s,_s.exports);var _x=_s.exports,xs={exports:{}},vs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,po.createAsyncLocalStorage)();(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)})(vs,vs.exports);var gx=vs.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r.actionAsyncStorage}});const r=gx;(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)})(xs,xs.exports);var yx=xs.exports,bs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r;(function(s){s[s.SeeOther=303]="SeeOther",s[s.TemporaryRedirect=307]="TemporaryRedirect",s[s.PermanentRedirect=308]="PermanentRedirect"})(r||(r={})),(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)})(bs,bs.exports);var xx=bs.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(y,x){for(var v in x)Object.defineProperty(y,v,{enumerable:!0,get:x[v]})}r(t,{RedirectType:function(){return c},getRedirectError:function(){return l},getRedirectStatusCodeFromError:function(){return _},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return f},isRedirectError:function(){return p},permanentRedirect:function(){return m},redirect:function(){return u}});const s=_x,a=yx,o=xx,i="NEXT_REDIRECT";var c;(function(y){y.push="push",y.replace="replace"})(c||(c={}));function l(y,x,v){v===void 0&&(v=o.RedirectStatusCode.TemporaryRedirect);const C=new Error(i);C.digest=i+";"+x+";"+y+";"+v+";";const j=s.requestAsyncStorage.getStore();return j&&(C.mutableCookies=j.mutableCookies),C}function u(y,x){x===void 0&&(x="replace");const v=a.actionAsyncStorage.getStore();throw l(y,x,v!=null&&v.isAction?o.RedirectStatusCode.SeeOther:o.RedirectStatusCode.TemporaryRedirect)}function m(y,x){x===void 0&&(x="replace");const v=a.actionAsyncStorage.getStore();throw l(y,x,v!=null&&v.isAction?o.RedirectStatusCode.SeeOther:o.RedirectStatusCode.PermanentRedirect)}function p(y){if(typeof y!="object"||y===null||!("digest"in y)||typeof y.digest!="string")return!1;const[x,v,C,j]=y.digest.split(";",4),b=Number(j);return x===i&&(v==="replace"||v==="push")&&typeof C=="string"&&!isNaN(b)&&b in o.RedirectStatusCode}function f(y){return p(y)?y.digest.split(";",3)[2]:null}function h(y){if(!p(y))throw new Error("Not a redirect error");return y.digest.split(";",2)[1]}function _(y){if(!p(y))throw new Error("Not a redirect error");return Number(y.digest.split(";",4)[3])}(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)})(hs,hs.exports);var vx=hs.exports,js={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}r(t,{isNotFoundError:function(){return o},notFound:function(){return a}});const s="NEXT_NOT_FOUND";function a(){const i=new Error(s);throw i.digest=s,i}function o(i){return typeof i!="object"||i===null||!("digest"in i)?!1:i.digest===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)})(js,js.exports);var bx=js.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}r(t,{ReadonlyURLSearchParams:function(){return i},RedirectType:function(){return s.RedirectType},notFound:function(){return a.notFound},permanentRedirect:function(){return s.permanentRedirect},redirect:function(){return s.redirect}});const s=vx,a=bx;class o extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class i extends URLSearchParams{append(){throw new o}delete(){throw new o}set(){throw new o}sort(){throw new 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)})(fs,fs.exports);var jx=fs.exports,Yd={};(function(e){"use client";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,{ServerInsertedHTMLContext:function(){return a},useServerInsertedHTML:function(){return o}});const s=jt._(g),a=s.default.createContext(null);function o(i){const c=(0,s.useContext)(a);c&&c(i)}})(Yd);var In={exports:{}},Vr={},ba;function Cx(){return ba||(ba=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(o,i){for(var c in i)Object.defineProperty(o,c,{enumerable:!0,get:i[c]})}t(e,{BailoutToCSRError:function(){return s},isBailoutToCSRError:function(){return a}});const r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class s extends Error{constructor(i){super("Bail out to client-side rendering: "+i),this.reason=i,this.digest=r}}function a(o){return typeof o!="object"||o===null||!("digest"in o)?!1:o.digest===r}}(Vr)),Vr}var Rn={exports:{}},Tn={exports:{}},ja;function Sx(){return ja||(ja=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,po.createAsyncLocalStorage)();(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)}(Tn,Tn.exports)),Tn.exports}var Ca;function Px(){return Ca||(Ca=1,function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});const r=Sx();(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 Sa;function wx(){return Sa||(Sa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return a}});const r=Cx(),s=Px();function a(o){const i=s.staticGenerationAsyncStorage.getStore();if(!(i!=null&&i.forceStatic)&&i!=null&&i.isStaticGeneration)throw new r.BailoutToCSRError(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)}(In,In.exports)),In.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(v,C){for(var j in C)Object.defineProperty(v,j,{enumerable:!0,get:C[j]})}r(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return h},usePathname:function(){return p},useRouter:function(){return f},useSearchParams:function(){return m},useSelectedLayoutSegment:function(){return x},useSelectedLayoutSegments:function(){return y},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});const s=g,a=Rc(),o=Xd,i=fx,c=Nc(),l=jx,u=Yd;function m(){const v=(0,s.useContext)(o.SearchParamsContext),C=(0,s.useMemo)(()=>v?new l.ReadonlyURLSearchParams(v):null,[v]);if(typeof window>"u"){const{bailoutToClientRendering:j}=wx();j("useSearchParams()")}return C}function p(){return(0,s.useContext)(o.PathnameContext)}function f(){const v=(0,s.useContext)(a.AppRouterContext);if(v===null)throw new Error("invariant expected app router to be mounted");return v}function h(){return(0,s.useContext)(o.PathParamsContext)}function _(v,C,j,b){j===void 0&&(j=!0),b===void 0&&(b=[]);let w;if(j)w=v[1][C];else{const R=v[1];var S;w=(S=R.children)!=null?S:Object.values(R)[0]}if(!w)return b;const P=w[0],N=(0,i.getSegmentValue)(P);return!N||N.startsWith(c.PAGE_SEGMENT_KEY)?b:(b.push(N),_(w,C,!1,b))}function y(v){v===void 0&&(v="children");const C=(0,s.useContext)(a.LayoutRouterContext);return C?_(C.tree,v):null}function x(v){v===void 0&&(v="children");const C=y(v);if(!C||C.length===0)return null;const j=v==="children"?C[0]:C[C.length-1];return j===c.DEFAULT_SEGMENT_KEY?null: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)})(ms,ms.exports);var Nx=ms.exports,Pa=Nx;function Ex({accountName:e}){const{user:t}=Bt(),r=Pa.usePathname(),s=Pa.useSearchParams(),a=(t==null?void 0:t.sub)||(t==null?void 0:t.email),o=t==null?void 0:t.userId;return g.useEffect(()=>{a&&o?px("CUSTOM_USER_INFO",{userId:o,userEmail:a,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[r,s,a,o]),null}const Ix="_active_gk7mu_380",Rx="_banner_gk7mu_655",Tx="_container_gk7mu_689",Ax="_slugs_gk7mu_703",kx="_root_gk7mu_785",Ox="_otContainer_gk7mu_797",xt={active:Ix,banner:Rx,container:Tx,slugs:Ax,"content-page-modifier":"_content-page-modifier_gk7mu_741",root:kx,otContainer:Ox};function Lx({title:e,srcImages:t,children:r,className:s,...a}){const{isMobile:o}=ne(),i=o?t.mobile:t.desktop;return n.jsxs("div",{...a,className:d.helpers.classNameConcat(xt.banner,s),children:[n.jsx(we.Image,{src:i,alt:e,fill:!0}),r||n.jsx("h1",{children:e})]})}const Cs=({children:e,className:t})=>n.jsx("div",{className:d.helpers.classNameConcat(xt.container,t),children:e});Cs.displayName="Politicas.Container";const Mx=({oneTrust:e})=>{const t=()=>{window.OneTrust&&window.OneTrust.NoticeApi&&window.OneTrust.NoticeApi.Initialized&&window.OneTrust.NoticeApi.Initialized.then(function(){window.OneTrust.NoticeApi.LoadNotices([e.policyScript])})};return g.useEffect(()=>{window.OneTrust&&t()},[]),n.jsxs(n.Fragment,{children:[n.jsx(uo,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),n.jsx("div",{className:xt.otContainer,children:n.jsx("div",{id:"otnotice-container",children:n.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},wa={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Qd=e=>{const{nextimage:t}=ce();return n.jsx(Xe,{name:e.name,children:e.data.banners.map((r,s)=>n.jsx("div",{className:wa["card-image-wrapper"],children:n.jsx("div",{className:wa["card-image-container"],children:n.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},s))})},Dx="_embedLiveContainer_1ss0l_2",Fx="_embedLivePlayer_1ss0l_7",Na={embedLiveContainer:Dx,embedLivePlayer:Fx},Zd=({data:e,name:t})=>n.jsx(Xe,{name:t,children:n.jsx("div",{className:Na.embedLiveContainer,children:n.jsx("div",{className:Na.embedLivePlayer,children:e.banner.videosrc?n.jsx(we.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):n.jsxs("div",{children:[n.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),n.jsx(uo,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),Ss={"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 zx(e,t){const{mediatorRef:r}=ne();g.useEffect(()=>r.current.subscribe(e,t),[e,t])}const Ea=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:s,totalPages:a,position:o,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,p]=g.useState("default");return zx("herobanner:change_controllers_variant",f=>{l&&p(f.includes("white")?"inverse":"default")}),n.jsxs(d.Carousel.Controller,{className:Ss["carousel-controllers-modifier"],position:o??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[n.jsxs(d.Carousel.Arrows,{className:Ss["carrousel-arrows-display-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:n.jsx(d.Icon,{name:u.arrow_left})},mode:m}),n.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:n.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),n.jsx(d.Carousel.Bullets,{page:s,total:a,onBulletClick:r,mode:m})]})},Bx=({children:e,data:t,banner:r,...s})=>{const{mediatorRef:a}=ne();return t.data.first?n.jsx(Zn,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{a.current.publish("header:change_variant",r.headerVariant)},...s,children:e}):n.jsx(n.Fragment,{children:e})},Jd=e=>{const{initialize:t,pagination:r,controller:s,itemsStyles:a}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),o=g.useRef(void 0),i=g.useMemo(()=>td(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=g.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(o.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,r.totalPages]),l=g.useCallback(m=>{clearInterval(o.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:p=>l(()=>s==null?void 0:s.navigateTo(p)),currentPage:r.currentPage,totalPages:r.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[r.currentPage,r.totalPages,i.position,e.data.config.hideControllers,l,s]);return g.useEffect(()=>(c(),()=>clearInterval(o.current)),[c]),n.jsx(Xe,{name:e.name,children:n.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(Ss["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"&&r.totalPages>1?n.jsx(Ea,{ICONS:e.ICONS,...u,isFirst:e.data.first}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((m,p)=>n.jsx(d.Carousel.Item,{style:a,children:n.jsx(Bx,{data:e,banner:m,children:n.jsx(cn,{name:"Banner Carousel",ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:m,index:p,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&p===0&&{priority:!0}})})},`hero-banner-item-${p}`))}),i.shouldRender==="bottom"&&r.totalPages>1?n.jsx(Ea,{ICONS:e.ICONS,...u}):n.jsx(n.Fragment,{})]})})},Rt={"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"},em=({data:e,name:t,CONSTANTS:r})=>{var m;const{isMobile:s}=ne(),a=e.config.size??"medium",o=e.config.disableCarouselMobile??!1,{initialize:i,pagination:c,controller:l,itemsStyles:u}=d.Carousel.useCarousel({itemsPerPage:s?e==null?void 0:e.config.slidesPerViewMobile:(m=e==null?void 0:e.config)==null?void 0:m.slidesPerView,gap:s?e.config.gapMobile:e.config.gap,direction:s&&o?"column":"row"});return n.jsx(Xe,{name:t,children:n.jsx(d.Utils.Column,{style:{width:a==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:n.jsxs(d.Carousel.Root,{innerRef:p=>{i(p)},className:d.helpers.classNameConcat(Rt["carousel-modifier"],"common-section"),children:[a==="medium"?n.jsxs(d.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&n.jsx(d.TextStructure.DivWrapper,{className:Rt["carousel-title-modifier"],children:n.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&n.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Rt["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?Rt["title-on"]:void 0),children:n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]})})]}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e.bennefit.map((p,f)=>n.jsx(d.Carousel.Item,{className:Rt["card-modifier"],style:u,children:n.jsx(d.Card,{stroke:!0,padding:"small",children:n.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[a==="medium"?"top":"start"]:n.jsx(d.Icon,{name:p.icon,size:a==="medium"?"medium":"small"})},children:n.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[n.jsx("h3",{className:"typography-style-body-md",children:p.title}),p.subtitle&&p.subtitle.length?n.jsx("p",{className:"typography-style-body-xs",children:p.subtitle}):n.jsx(n.Fragment,{})]})})})},`bennefit=${f}`))}),!s&&c.totalPages>1?n.jsxs(d.Carousel.Controller,{className:Rt["row-controller-modifier"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]}),n.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:p=>l==null?void 0:l.navigateTo(p)})]}):n.jsx(n.Fragment,{})]})})})},tm=({data:{componentIndex:e,...t},name:r,CONSTANTS:s})=>n.jsx(Xe,{name:r,children:n.jsx(mo,{...t,CONSTANTS:s})}),nm=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:s,name:a})=>n.jsx(Xe,{name:a,children:n.jsx("div",{className:d.helpers.classNameConcat(cs.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:n.jsx(nd,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),Ia={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},rm=({data:e,id:t,ICONS:r,className:s,name:a})=>{var c;const[o,i]=g.useState([]);return n.jsx(Xe,{name:a,children:n.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):n.jsx(n.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>n.jsxs(d.Accordion.Wrapper,{className:Ia["accordion-modifier"],children:[n.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:n.jsx(d.Icon,{name:r.arrow_down}),closeIndicator:n.jsx(d.Icon,{name:r.arrow_up}),startOpen:o.includes(u),onClick:()=>i(m=>m.includes(u)?m.filter(p=>p!==u):[...m,u]),children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?n.jsx("h2",{children:l.subtitle}):n.jsx(n.Fragment,{})]})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:Ia["accordion-body-modifier"],children:n.jsx(Je.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:Un,editorState:l.text?Bn(JSON.parse(l.text)):Je.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${o.includes(u)}`))]})})},sm=async e=>{const{type:t}=e,r=t==="collectionSearch"?"/_v/proxy/search/product":"/_v/proxy/search/crosselling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await T.fetchProxy(r,{method:"POST",headers:{"Content-Type":"application/json"},body:s}).then(o=>o.json()).then(o=>t==="collectionSearch"?o.data.products:o.products)).filter(o=>!!o.node.availability.status)},Ux="_shelf__container_bi04n_10",om={shelf__container:Ux},qx=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:s})=>{const[a,o]=g.useState([]),{isMobile:i}=ne(),{ref:c,inView:l}=ka.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=ae();return g.useEffect(()=>{if(!e)return;function m(){var p,f;sm({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((p=e==null?void 0:e.params)==null?void 0:p.count)??12,sort:((f=e==null?void 0:e.params)==null?void 0:f.sort)??r.ITEMS_DEFAULT_SORT}}).then(h=>{o(h)})}m()},[e]),g.useEffect(()=>{!l||a.length===0||u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:a},customData:{item_list_name:t??"Você também pode gostar"}}})},[l,a]),a.length===0?null:n.jsx("div",{ref:c,className:om.shelf__container,children:n.jsx(Jt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(a)&&a.map(({node:m},p)=>{const{availability:{status:f}}=m;return f?n.jsx(Jt.Card,{item:m,isMobile:i,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},m.id):null})})})},Hx=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[s,a]=g.useState([]),{isMobile:o}=ne(),{ref:i,inView:c}=ka.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=ae(),u=g.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return g.useEffect(()=>{if(!e)return;function m(){var p;sm({type:"recommendationSearch",facets:u,params:{count:((p=e==null?void 0:e.params)==null?void 0:p.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(f=>a(f))}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"?n.jsx(el,{products:s,innerRef:i,inView:c,CONSTANTS:r}):n.jsx("div",{ref:i,className:om.shelf__container,children:n.jsx(Jt.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(s)&&s.map(({node:m},p)=>{const{availability:{status:f}}=m;return f?n.jsx(Jt.Card,{item:m,isMobile:o,size:"medium",index:p,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},m.id):null})})})},am=({data:e,name:t,CONSTANTS:r})=>{const{productId:s}=ec();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((a,o)=>n.jsx(Xe,{name:t,children:n.jsx(Hx,{title:a.title,recommendationSearch:{type:a.product_group_option,productId:s,params:{count:a.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${o}`)}))},im=({data:e,CONSTANTS:t,searchModal:r,name:s})=>{var o;const a=(o=e==null?void 0:e.productLists)==null?void 0:o.filter(i=>!!i.collectionId||!!i.search_base_name);return!a||a.length===0?null:a.map((i,c)=>{const l=i.collectionId?{term:"",facets:[{key:"productclusterids",value:`${i.collectionId}`}]}:{term:i.search_base_name,facets:[]};return n.jsx(Xe,{name:s,children:n.jsx(qx,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:r,CONSTANTS:t},`shelf=${c}`)})})},$x="_popup_5taxs_9",Vx="_popup__overlay_5taxs_19",Wx="_popup__modal_5taxs_27",Ue={popup:$x,popup__overlay:Vx,popup__modal:Wx,"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"},Gx=e=>n.jsx("div",{className:Ue["popup__modal--success"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{className:Ue["text-structure-modifier"],children:[n.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),n.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),Kx=e=>{const{title:t,description:r,groups:s,ICONS:a}=e,{formErrors:o,submitForm:i,success:c}=ar(),[l,u]=g.useState(!1);return n.jsx("form",{onSubmit:i,className:Ue.formContainer,children:n.jsxs("div",{className:Ue["popup__modal--form"],children:[n.jsxs(d.TextStructure.DivWrapper,{className:Ue["popup__modal--header"],children:[n.jsx("strong",{className:"typography-style-body-md-strong",children:t}),n.jsx("p",{className:"typography-style-body-xs",children:r})]}),c?n.jsx(Gx,{...e}):n.jsxs(n.Fragment,{children:[s.map(m=>n.jsx(Mt.FieldGroup,{group:m,children:n.jsx(Mt.FieldWrapper,{fields:m.fields})},m.groupLabel)),n.jsx(d.Checkbox,{className:Ue["popup__modal--checkbox"],adornment:n.jsx(d.Icon,{name:a.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)}),n.jsxs("div",{children:[!l&&n.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:n.jsxs("p",{className:"typography-style-body-caption",children:[n.jsx(d.Icon,{size:"small",name:a.alert_circle}),np]})}),n.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:sp}),o.length?n.jsx(d.TextStructure.DivWrapper,{className:Ue["popup__modal--status"],children:n.jsx("p",{className:d.helpers.classNameConcat(Ue.formSubmitWarning,"typography-style-body-xs"),children:rp})}):null]})]})]})})},cm=({data:e,name:t,CONSTANTS:r})=>{const[s,a]=g.useState(!1),o=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,i=()=>{a(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return g.useEffect(()=>{setTimeout(()=>!o&&a(!0),2e3)},[]),e.active&&s?n.jsx(Xe,{name:t,children:n.jsxs("div",{className:Ue.popup,children:[n.jsx("div",{onClick:i,className:Ue.popup__overlay}),n.jsxs("div",{className:Ue.popup__modal,children:[n.jsx(d.Button,{onClick:i,variant:"tertiary",className:Ue["popup__modal--close"],children:n.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),n.jsx("div",{children:n.jsx(we.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),n.jsx(Id,{...e,children:n.jsx(Kx,{...e,ICONS:r.ICONS})})]})]})}):null},Xx={"Image Grid":Qd,"Embed Live":Zd,"Banner Carousel":Jd,Banner:io,"Bennefits Bar":em,newsletter:tm,TextContent:nm,TextAccordion:rm,"Product Carousel":im,"PDP Product Carousel":am,"Popup Modal":cm},lm=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((s,a)=>{const o=Xx[s.name],i={...(r==null?void 0:r[s.name])??{}};return t&&a===0&&(s.data.first=!0),s.data.componentIndex=a,s.name==="TextAccordion"&&(i.id=`text-accordion-${a}`),o?n.jsx(o,{name:s.name,data:s.data,...i},`section-zone-component-${a}`):null});async function Yx({slug:e,pageData:t,tabsData:r,oneTrust:s}){var c,l,u,m;const o=(r?[...r].sort((p,f)=>p.config.tabConfig.order-f.config.tabConfig.order):[]).map(p=>({slug:p.config.seo.slug||es(p.config.tabConfig.title),title:p.config.tabConfig.title})),i=r==null?void 0:r.find(p=>p.config.seo.slug===`/${decodeURIComponent(e)}`);return i&&(i.id=es(i.config.seo.slug||"")),n.jsxs("div",{className:xt.root,children:[n.jsx(Cs,{children:n.jsx(Lx,{title:(c=t==null?void 0:t.config.banners)==null?void 0:c.altImageBackgroud,srcImages:{desktop:(l=t==null?void 0:t.config.banners)==null?void 0:l.imageBackgroudDesk,mobile:(m=(u=t==null?void 0:t.config)==null?void 0:u.banners)==null?void 0:m.imageBackgroudMobile}})}),n.jsxs(Cs,{children:[n.jsx("div",{className:xt.slugs,children:o.map(p=>n.jsx(Oe,{href:p.slug?`/politicas/${p.slug.replace(/^\/+/,"")}`:"#",className:p.slug===(i==null?void 0:i.id)?xt.active:"",title:p.title,scroll:!1,children:p.title},p.slug.replace(/^\/+/,"")))}),n.jsx("div",{className:xt["content-page-modifier"],children:e==="privacidade-e-seguranca"?n.jsx(Mx,{oneTrust:s}):n.jsx(lm,{data:(i==null?void 0:i.sections)??[]})})]})]})}const it={"banner-wrapper":"_banner-wrapper_jrphb_5","banner-image":"_banner-image_jrphb_15","banner-desktop":"_banner-desktop_jrphb_21","banner-mobile":"_banner-mobile_jrphb_24","text-wrapper":"_text-wrapper_jrphb_37","custom-row":"_custom-row_jrphb_53","text-area":"_text-area_jrphb_58","text-wrapper-modifier":"_text-wrapper-modifier_jrphb_68","text-area-modifier":"_text-area-modifier_jrphb_77"},um=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:r}=ce();return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:it["banner-wrapper"],children:[n.jsxs(d.Banner.ImageWrapper,{className:it["banner-image"],children:[n.jsx(we.Image,{className:it["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),n.jsx(we.Image,{className:it["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),n.jsx(d.Banner.Slot,{className:d.helpers.classNameConcat(it["text-wrapper"],it["text-wrapper-modifier"]),margin:107,children:n.jsxs(d.TextStructure.Root,{layoutProps:{textRow:{className:it["custom-row"]}},children:[n.jsxs(d.TextStructure.DivWrapper,{className:d.helpers.classNameConcat(it["text-area"],it["text-area-modifier"]),children:[n.jsx("h1",{className:"typography-style-display-strong",children:e.title}),n.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),n.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),n.jsx(d.Button,{onClick:()=>r.push("/"),children:t})]})})]})})};um.displayName="ErrorTemplate";const Qx={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},Zx=g.createContext(Qx);function Jx(){return g.useContext(Zx)}function Wr(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const s=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null}function Gr(){if(window){localStorage.getItem("cleverapp")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("atendimento")),localStorage.getItem("atendimento")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("televendas"));const{hostname:e,origin:t}=window.location;document.cookie=`checkout.vtex.com=;Domain=.${e};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,document.cookie=`checkout.vtex.com=;Domain=${e.replace("www","")};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,window.location.replace(`${t}`)}}const ev="_container_df1ql_11",Kr={"action-button":"_action-button_df1ql_1",container:ev,"container-icon":"_container-icon_df1ql_31"};function tv({icon:e,text:t,onClick:r,isActive:s=!1}){const a=o=>{o.preventDefault(),s&&r()};return n.jsxs("div",{className:d.helpers.classNameConcat(Kr["action-button"],s?"":"disable"),onClick:o=>a(o),children:[n.jsx("div",{className:d.helpers.classNameConcat(Kr["container-icon"],s?"":"disable"),children:n.jsx("img",{src:e,alt:"icon"})}),n.jsxs("div",{className:d.helpers.classNameConcat(Kr.container,s?"":"disable"),children:[n.jsx("span",{children:t}),n.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const nv="_container_k11me_1",rv="_header_k11me_18",sv="_body_k11me_45",Ht={container:nv,header:rv,body:sv,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function ov(e,t=!1,r){const{base:s,orderformId:a}=e,o=r==null?void 0:r.split("codigo: ")[1],i=localStorage.getItem("maiscarrinho"),c={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(r??"")}`,cp:o?`&utmi_cp=${o}`:"",source:`&utm_source=${i}`};return t?`${s}/checkout/?orderFormId=${a}${c.source}${c.campaign}${c.cp}${c.medium}#/cart`:`${s}/checkout/?orderFormId=${a}${c.source}${c.campaign}${c.cp}${c.medium}#/payment`}function av(e){const t=`https://mais-carrinho-dkwr66gouq-uc.a.run.app/url-shortner/${encodeURIComponent(e)}`;return fetch(t).then(r=>r.json()).then(r=>r.url.shortLink).catch(()=>e)}function Ra({mode:e,config:t,newCart:r}){const[s,a]=g.useState(!1),[o,i]=g.useState(""),c=ov(t,e==="cart",t.sellerCode),{useClipboard:l}=Zt.hooks,[,u]=l();function m(){a(!0);const p=document.createElement("textArea");p.readOnly=!0,p.contentEditable="true",p.value=o,document.body.appendChild(p),p.select(),u(p.value),document.body.removeChild(p),setTimeout(()=>{a(!1)},3e3)}return g.useEffect(()=>{i(""),i("Gerando link..."),av(c).then(p=>i(p)).catch(()=>i("Algo deu errado, tente novamente mais tarde"))},[c]),n.jsxs("div",{className:Ht.container,children:[n.jsxs("div",{className:Ht.header,children:[n.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),n.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),n.jsxs("div",{className:Ht.body,children:[n.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
|
|
19
|
-
compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),n.jsxs("form",{children:[n.jsx("input",{type:"text",disabled:!0,value:
|
|
11
|
+
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in ce&&(0,t.warnOnce)('Image with src "'+v+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!C&&!L){const X=A({config:Q,src:v,width:K||400,quality:Ce||75});let D;try{D=new URL(X)}catch{}(X===v||D&&D.pathname===v&&!D.search)&&(0,t.warnOnce)('Image with src "'+v+`" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.
|
|
12
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}H&&(0,t.warnOnce)('Image with src "'+v+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[X,D]of Object.entries({layout:Z,objectFit:V,objectPosition:ee,lazyBoundary:ie,lazyRoot:_e}))D&&(0,t.warnOnce)('Image with src "'+v+'" has legacy prop "'+X+`". Did you forget to run the codemod?
|
|
13
|
+
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!u&&window.PerformanceObserver){u=new PerformanceObserver(X=>{for(const q of X.getEntries()){var D;const oe=(q==null||(D=q.element)==null?void 0:D.src)||"",je=l.get(oe);je&&!je.priority&&je.placeholder==="empty"&&!je.src.startsWith("data:")&&!je.src.startsWith("blob:")&&(0,t.warnOnce)('Image with src "'+je.src+`" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.
|
|
14
|
+
Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{u.observe({type:"largest-contentful-paint",buffered:!0})}catch(X){console.error(X)}}}const He=Object.assign(T?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:V,objectPosition:ee}:{},z?{}:{color:"transparent"},I),Re=!ne&&F!=="empty"?F==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:K,heightInt:Y,blurWidth:Ne,blurHeight:ze,blurDataURL:B||"",objectFit:He.objectFit})+'")':'url("'+F+'")':null;let U=Re?{backgroundSize:He.objectFit||"cover",backgroundPosition:He.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Re}:{};process.env.NODE_ENV==="development"&&U.backgroundImage&&F==="blur"&&B!=null&&B.startsWith("/")&&(U.backgroundImage='url("'+B+'")');const ye=p({config:Q,src:v,unoptimized:C,width:K,quality:Ce,sizes:b,loader:A});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let X;try{X=new URL(ye.src)}catch{X=new URL(ye.src,window.location.href)}l.set(X.href,{src:v,priority:j,placeholder:F})}return{props:{...ce,loading:Ie?"lazy":x,fetchPriority:$,width:K,height:Y,decoding:te,className:S,style:{...He,...U},sizes:ye.sizes,srcSet:ye.srcSet,src:O||ye.src},meta:{unoptimized:C,priority:j,placeholder:F,fill:T}}}})(La);var zo={exports:{}},$n={exports:{}},Ys={},Gi;function rv(){return Gi||(Gi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});const t=y,r=typeof window>"u",s=r?()=>{}:t.useLayoutEffect,o=r?()=>{}:t.useEffect;function a(i){const{headManager:c,reduceComponentsToState:l}=i;function u(){if(c&&c.mountedInstances){const f=t.Children.toArray(Array.from(c.mountedInstances).filter(Boolean));c.updateHead(l(f,i))}}if(r){var m;c==null||(m=c.mountedInstances)==null||m.add(i.children),u()}return s(()=>{var f;return c==null||(f=c.mountedInstances)==null||f.add(i.children),()=>{var p;c==null||(p=c.mountedInstances)==null||p.delete(i.children)}}),s(()=>(c&&(c._pendingUpdate=u),()=>{c&&(c._pendingUpdate=u)})),o(()=>(c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null),()=>{c&&c._pendingUpdate&&(c._pendingUpdate(),c._pendingUpdate=null)})),null}}(Ys)),Ys}var Zs={},Ki;function nv(){return Ki||(Ki=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return s}});const s=Ge._(y).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="AmpStateContext")}(Zs)),Zs}var Js={},Qi;function zf(){return Qi||(Qi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return s}});const s=Ge._(y).default.createContext({});process.env.NODE_ENV!=="production"&&(s.displayName="HeadManagerContext")}(Js)),Js}var eo={},Xi;function sv(){return Xi||(Xi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(r){let{ampFirst:s=!1,hybrid:o=!1,hasQuery:a=!1}=r===void 0?{}:r;return s||o&&a}}(eo)),eo}var Yi;function ov(){return Yi||(Yi=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(j,x){for(var S in x)Object.defineProperty(j,S,{enumerable:!0,get:x[S]})}r(t,{default:function(){return C},defaultHead:function(){return p}});const s=Ge,o=gr,a=n,i=o._(y),c=s._(rv()),l=nv(),u=zf(),m=sv(),f=xs;function p(j){j===void 0&&(j=!1);const x=[(0,a.jsx)("meta",{charSet:"utf-8"})];return j||x.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),x}function h(j,x){return typeof x=="string"||typeof x=="number"?j:x.type===i.default.Fragment?j.concat(i.default.Children.toArray(x.props.children).reduce((S,P)=>typeof P=="string"||typeof P=="number"?S:S.concat(P),[])):j.concat(x)}const _=["name","httpEquiv","charSet","itemProp"];function g(){const j=new Set,x=new Set,S=new Set,P={};return w=>{let N=!0,T=!1;if(w.key&&typeof w.key!="number"&&w.key.indexOf("$")>0){T=!0;const I=w.key.slice(w.key.indexOf("$")+1);j.has(I)?N=!1:j.add(I)}switch(w.type){case"title":case"base":x.has(w.type)?N=!1:x.add(w.type);break;case"meta":for(let I=0,O=_.length;I<O;I++){const M=_[I];if(w.props.hasOwnProperty(M))if(M==="charSet")S.has(M)?N=!1:S.add(M);else{const H=w.props[M],F=P[M]||new Set;(M!=="name"||!T)&&F.has(H)?N=!1:(F.add(H),P[M]=F)}}break}return N}}function v(j,x){const{inAmpMode:S}=x;return j.reduce(h,[]).reverse().concat(p(S).reverse()).filter(g()).reverse().map((P,w)=>{const N=P.key||w;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!S&&P.type==="link"&&P.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(T=>P.props.href.startsWith(T))){const T={...P.props||{}};return T["data-href"]=T.href,T.href=void 0,T["data-optimized-fonts"]=!0,i.default.cloneElement(P,T)}if(process.env.NODE_ENV==="development")if(P.type==="script"&&P.props.type!=="application/ld+json"){const T=P.props.src?'<script> tag with src="'+P.props.src+'"':"inline <script>";(0,f.warnOnce)("Do not add <script> tags using next/head (see "+T+`). Use next/script instead.
|
|
15
|
+
See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else P.type==="link"&&P.props.rel==="stylesheet"&&(0,f.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+P.props.href+`"). Use Document instead.
|
|
16
|
+
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return i.default.cloneElement(P,{key:N})})}function b(j){let{children:x}=j;const S=(0,i.useContext)(l.AmpStateContext),P=(0,i.useContext)(u.HeadManagerContext);return(0,a.jsx)(c.default,{reduceComponentsToState:v,headManager:P,inAmpMode:(0,m.isInAmpMode)(S),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 to={},Zi;function av(){return Zi||(Zi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Ge._(y),s=bs,o=r.default.createContext(s.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(to)),to}var ro={},no={},so={exports:{}},Ji;function Bf(){return Ji||(Ji=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,f,p=!1){return f&&(f.windows===null||f.windows===void 0)&&(f={...f,windows:l()}),c(m,f,p)}Object.assign(u,c),o.exports=u},154:o=>{const a="\\\\/",i=`[^${a}]`,c="\\.",l="\\+",u="\\?",m="\\/",f="(?=.)",p="[^/]",h=`(?:${m}|$)`,_=`(?:^|${m})`,g=`${c}{1,2}${h}`,v=`(?!${c})`,b=`(?!${_}${g})`,C=`(?!${c}{0,1}${h})`,j=`(?!${g})`,x=`[^.${m}]`,S=`${p}*?`,w={DOT_LITERAL:c,PLUS_LITERAL:l,QMARK_LITERAL:u,SLASH_LITERAL:m,ONE_CHAR:f,QMARK:p,END_ANCHOR:h,DOTS_SLASH:g,NO_DOT:v,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:j,QMARK_NO_DOT:x,STAR:S,START_ANCHOR:_,SEP:"/"},N={...w,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:"\\"},T={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:T,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(I){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${I.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(I){return I===!0?N:w}}},697:(o,a,i)=>{const c=i(154),l=i(96),{MAX_LENGTH:u,POSIX_REGEX_SOURCE:m,REGEX_NON_SPECIAL_CHARS:f,REGEX_SPECIAL_CHARS_BACKREF:p,REPLACEMENTS:h}=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(S=>l.escapeRegex(S)).join("..")}return j},g=(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=h[b]||b;const j={...C},x=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u;let S=b.length;if(S>x)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${x}`);const P={type:"bos",value:"",output:j.prepend||""},w=[P],N=j.capture?"":"?:",T=c.globChars(j.windows),I=c.extglobChars(T),{DOT_LITERAL:O,PLUS_LITERAL:M,SLASH_LITERAL:H,ONE_CHAR:F,DOTS_SLASH:B,NO_DOT:$,NO_DOT_SLASH:te,NO_DOTS_SLASH:Z,QMARK:V,QMARK_NO_DOT:ee,STAR:ie,START_ANCHOR:_e}=T,ce=W=>`(${N}(?:(?!${_e}${W.dot?B:O}).)*?)`,pe=j.dot?"":$,z=j.dot?V:ee;let ne=j.bash===!0?ce(j):ie;j.capture&&(ne=`(${ne})`),typeof j.noext=="boolean"&&(j.noextglob=j.noext);const R={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:w};b=l.removePrefix(b,R),S=b.length;const Q=[],ue=[],be=[];let A=P,L;const qe=()=>R.index===S-1,K=R.peek=(W=1)=>b[R.index+W],Y=R.advance=()=>b[++R.index]||"",Ne=()=>b.slice(R.index+1),ze=(W="",X=0)=>{R.consumed+=W,R.index+=X},Ie=W=>{R.output+=W.output!=null?W.output:W.value,ze(W.value)},Ce=()=>{let W=1;for(;K()==="!"&&(K(2)!=="("||K(3)==="?");)Y(),R.start++,W++;return W%2===0?!1:(R.negated=!0,R.start++,!0)},He=W=>{R[W]++,be.push(W)},Re=W=>{R[W]--,be.pop()},U=W=>{if(A.type==="globstar"){const X=R.braces>0&&(W.type==="comma"||W.type==="brace"),D=W.extglob===!0||Q.length&&(W.type==="pipe"||W.type==="paren");W.type!=="slash"&&W.type!=="paren"&&!X&&!D&&(R.output=R.output.slice(0,-A.output.length),A.type="star",A.value="*",A.output=ne,R.output+=A.output)}if(Q.length&&W.type!=="paren"&&(Q[Q.length-1].inner+=W.value),(W.value||W.output)&&Ie(W),A&&A.type==="text"&&W.type==="text"){A.output=(A.output||A.value)+W.value,A.value+=W.value;return}W.prev=A,w.push(W),A=W},ye=(W,X)=>{const D={...I[X],conditions:1,inner:""};D.prev=A,D.parens=R.parens,D.output=R.output;const q=(j.capture?"(":"")+D.open;He("parens"),U({type:W,value:X,output:R.output?"":F}),U({type:"paren",extglob:!0,value:Y(),output:q}),Q.push(D)},Se=W=>{let X=W.close+(j.capture?")":""),D;if(W.type==="negate"){let q=ne;if(W.inner&&W.inner.length>1&&W.inner.includes("/")&&(q=ce(j)),(q!==ne||qe()||/^\)+$/.test(Ne()))&&(X=W.close=`)$))${q}`),W.inner.includes("*")&&(D=Ne())&&/^\.[^\\/.]+$/.test(D)){const oe=v(D,{...C,fastpaths:!1}).output;X=W.close=`)${oe})${q})`}W.prev.type==="bos"&&(R.negatedExtglob=!0)}U({type:"paren",extglob:!0,value:L,output:X}),Re("parens")};if(j.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(b)){let W=!1,X=b.replace(p,(D,q,oe,je,Le,ws)=>je==="\\"?(W=!0,D):je==="?"?q?q+je+(Le?V.repeat(Le.length):""):ws===0?z+(Le?V.repeat(Le.length):""):V.repeat(oe.length):je==="."?O.repeat(oe.length):je==="*"?q?q+je+(Le?ne:""):ne:q?D:`\\${D}`);return W===!0&&(j.unescape===!0?X=X.replace(/\\/g,""):X=X.replace(/\\+/g,D=>D.length%2===0?"\\\\":D?"\\":"")),X===b&&j.contains===!0?(R.output=b,R):(R.output=l.wrapOutput(X,R,C),R)}for(;!qe();){if(L=Y(),L==="\0")continue;if(L==="\\"){const D=K();if(D==="/"&&j.bash!==!0||D==="."||D===";")continue;if(!D){L+="\\",U({type:"text",value:L});continue}const q=/^\\+/.exec(Ne());let oe=0;if(q&&q[0].length>2&&(oe=q[0].length,R.index+=oe,oe%2!==0&&(L+="\\")),j.unescape===!0?L=Y():L+=Y(),R.brackets===0){U({type:"text",value:L});continue}}if(R.brackets>0&&(L!=="]"||A.value==="["||A.value==="[^")){if(j.posix!==!1&&L===":"){const D=A.value.slice(1);if(D.includes("[")&&(A.posix=!0,D.includes(":"))){const q=A.value.lastIndexOf("["),oe=A.value.slice(0,q),je=A.value.slice(q+2),Le=m[je];if(Le){A.value=oe+Le,R.backtrack=!0,Y(),!P.output&&w.indexOf(A)===1&&(P.output=F);continue}}}(L==="["&&K()!==":"||L==="-"&&K()==="]")&&(L=`\\${L}`),L==="]"&&(A.value==="["||A.value==="[^")&&(L=`\\${L}`),j.posix===!0&&L==="!"&&A.value==="["&&(L="^"),A.value+=L,Ie({value:L});continue}if(R.quotes===1&&L!=='"'){L=l.escapeRegex(L),A.value+=L,Ie({value:L});continue}if(L==='"'){R.quotes=R.quotes===1?0:1,j.keepQuotes===!0&&U({type:"text",value:L});continue}if(L==="("){He("parens"),U({type:"paren",value:L});continue}if(L===")"){if(R.parens===0&&j.strictBrackets===!0)throw new SyntaxError(g("opening","("));const D=Q[Q.length-1];if(D&&R.parens===D.parens+1){Se(Q.pop());continue}U({type:"paren",value:L,output:R.parens?")":"\\)"}),Re("parens");continue}if(L==="["){if(j.nobracket===!0||!Ne().includes("]")){if(j.nobracket!==!0&&j.strictBrackets===!0)throw new SyntaxError(g("closing","]"));L=`\\${L}`}else He("brackets");U({type:"bracket",value:L});continue}if(L==="]"){if(j.nobracket===!0||A&&A.type==="bracket"&&A.value.length===1){U({type:"text",value:L,output:`\\${L}`});continue}if(R.brackets===0){if(j.strictBrackets===!0)throw new SyntaxError(g("opening","["));U({type:"text",value:L,output:`\\${L}`});continue}Re("brackets");const D=A.value.slice(1);if(A.posix!==!0&&D[0]==="^"&&!D.includes("/")&&(L=`/${L}`),A.value+=L,Ie({value:L}),j.literalBrackets===!1||l.hasRegexChars(D))continue;const q=l.escapeRegex(A.value);if(R.output=R.output.slice(0,-A.value.length),j.literalBrackets===!0){R.output+=q,A.value=q;continue}A.value=`(${N}${q}|${A.value})`,R.output+=A.value;continue}if(L==="{"&&j.nobrace!==!0){He("braces");const D={type:"brace",value:L,output:"(",outputIndex:R.output.length,tokensIndex:R.tokens.length};ue.push(D),U(D);continue}if(L==="}"){const D=ue[ue.length-1];if(j.nobrace===!0||!D){U({type:"text",value:L,output:L});continue}let q=")";if(D.dots===!0){const oe=w.slice(),je=[];for(let Le=oe.length-1;Le>=0&&(w.pop(),oe[Le].type!=="brace");Le--)oe[Le].type!=="dots"&&je.unshift(oe[Le].value);q=_(je,j),R.backtrack=!0}if(D.comma!==!0&&D.dots!==!0){const oe=R.output.slice(0,D.outputIndex),je=R.tokens.slice(D.tokensIndex);D.value=D.output="\\{",L=q="\\}",R.output=oe;for(const Le of je)R.output+=Le.output||Le.value}U({type:"brace",value:L,output:q}),Re("braces"),ue.pop();continue}if(L==="|"){Q.length>0&&Q[Q.length-1].conditions++,U({type:"text",value:L});continue}if(L===","){let D=L;const q=ue[ue.length-1];q&&be[be.length-1]==="braces"&&(q.comma=!0,D="|"),U({type:"comma",value:L,output:D});continue}if(L==="/"){if(A.type==="dot"&&R.index===R.start+1){R.start=R.index+1,R.consumed="",R.output="",w.pop(),A=P;continue}U({type:"slash",value:L,output:H});continue}if(L==="."){if(R.braces>0&&A.type==="dot"){A.value==="."&&(A.output=O);const D=ue[ue.length-1];A.type="dots",A.output+=L,A.value+=L,D.dots=!0;continue}if(R.braces+R.parens===0&&A.type!=="bos"&&A.type!=="slash"){U({type:"text",value:L,output:O});continue}U({type:"dot",value:L,output:O});continue}if(L==="?"){if(!(A&&A.value==="(")&&j.noextglob!==!0&&K()==="("&&K(2)!=="?"){ye("qmark",L);continue}if(A&&A.type==="paren"){const q=K();let oe=L;(A.value==="("&&!/[!=<:]/.test(q)||q==="<"&&!/<([!=]|\w+>)/.test(Ne()))&&(oe=`\\${L}`),U({type:"text",value:L,output:oe});continue}if(j.dot!==!0&&(A.type==="slash"||A.type==="bos")){U({type:"qmark",value:L,output:ee});continue}U({type:"qmark",value:L,output:V});continue}if(L==="!"){if(j.noextglob!==!0&&K()==="("&&(K(2)!=="?"||!/[!=<:]/.test(K(3)))){ye("negate",L);continue}if(j.nonegate!==!0&&R.index===0){Ce();continue}}if(L==="+"){if(j.noextglob!==!0&&K()==="("&&K(2)!=="?"){ye("plus",L);continue}if(A&&A.value==="("||j.regex===!1){U({type:"plus",value:L,output:M});continue}if(A&&(A.type==="bracket"||A.type==="paren"||A.type==="brace")||R.parens>0){U({type:"plus",value:L});continue}U({type:"plus",value:M});continue}if(L==="@"){if(j.noextglob!==!0&&K()==="("&&K(2)!=="?"){U({type:"at",extglob:!0,value:L,output:""});continue}U({type:"text",value:L});continue}if(L!=="*"){(L==="$"||L==="^")&&(L=`\\${L}`);const D=f.exec(Ne());D&&(L+=D[0],R.index+=D[0].length),U({type:"text",value:L});continue}if(A&&(A.type==="globstar"||A.star===!0)){A.type="star",A.star=!0,A.value+=L,A.output=ne,R.backtrack=!0,R.globstar=!0,ze(L);continue}let W=Ne();if(j.noextglob!==!0&&/^\([^?]/.test(W)){ye("star",L);continue}if(A.type==="star"){if(j.noglobstar===!0){ze(L);continue}const D=A.prev,q=D.prev,oe=D.type==="slash"||D.type==="bos",je=q&&(q.type==="star"||q.type==="globstar");if(j.bash===!0&&(!oe||W[0]&&W[0]!=="/")){U({type:"star",value:L,output:""});continue}const Le=R.braces>0&&(D.type==="comma"||D.type==="brace"),ws=Q.length&&(D.type==="pipe"||D.type==="paren");if(!oe&&D.type!=="paren"&&!Le&&!ws){U({type:"star",value:L,output:""});continue}for(;W.slice(0,3)==="/**";){const In=b[R.index+4];if(In&&In!=="/")break;W=W.slice(3),ze("/**",3)}if(D.type==="bos"&&qe()){A.type="globstar",A.value+=L,A.output=ce(j),R.output=A.output,R.globstar=!0,ze(L);continue}if(D.type==="slash"&&D.prev.type!=="bos"&&!je&&qe()){R.output=R.output.slice(0,-(D.output+A.output).length),D.output=`(?:${D.output}`,A.type="globstar",A.output=ce(j)+(j.strictSlashes?")":"|$)"),A.value+=L,R.globstar=!0,R.output+=D.output+A.output,ze(L);continue}if(D.type==="slash"&&D.prev.type!=="bos"&&W[0]==="/"){const In=W[1]!==void 0?"|$":"";R.output=R.output.slice(0,-(D.output+A.output).length),D.output=`(?:${D.output}`,A.type="globstar",A.output=`${ce(j)}${H}|${H}${In})`,A.value+=L,R.output+=D.output+A.output,R.globstar=!0,ze(L+Y()),U({type:"slash",value:"/",output:""});continue}if(D.type==="bos"&&W[0]==="/"){A.type="globstar",A.value+=L,A.output=`(?:^|${H}|${ce(j)}${H})`,R.output=A.output,R.globstar=!0,ze(L+Y()),U({type:"slash",value:"/",output:""});continue}R.output=R.output.slice(0,-A.output.length),A.type="globstar",A.output=ce(j),A.value+=L,R.output+=A.output,R.globstar=!0,ze(L);continue}const X={type:"star",value:L,output:ne};if(j.bash===!0){X.output=".*?",(A.type==="bos"||A.type==="slash")&&(X.output=pe+X.output),U(X);continue}if(A&&(A.type==="bracket"||A.type==="paren")&&j.regex===!0){X.output=L,U(X);continue}(R.index===R.start||A.type==="slash"||A.type==="dot")&&(A.type==="dot"?(R.output+=te,A.output+=te):j.dot===!0?(R.output+=Z,A.output+=Z):(R.output+=pe,A.output+=pe),K()!=="*"&&(R.output+=F,A.output+=F)),U(X)}for(;R.brackets>0;){if(j.strictBrackets===!0)throw new SyntaxError(g("closing","]"));R.output=l.escapeLast(R.output,"["),Re("brackets")}for(;R.parens>0;){if(j.strictBrackets===!0)throw new SyntaxError(g("closing",")"));R.output=l.escapeLast(R.output,"("),Re("parens")}for(;R.braces>0;){if(j.strictBrackets===!0)throw new SyntaxError(g("closing","}"));R.output=l.escapeLast(R.output,"{"),Re("braces")}if(j.strictSlashes!==!0&&(A.type==="star"||A.type==="bracket")&&U({type:"maybe_slash",value:"",output:`${H}?`}),R.backtrack===!0){R.output="";for(const W of R.tokens)R.output+=W.output!=null?W.output:W.value,W.suffix&&(R.output+=W.suffix)}return R};v.fastpaths=(b,C)=>{const j={...C},x=typeof j.maxLength=="number"?Math.min(u,j.maxLength):u,S=b.length;if(S>x)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${x}`);b=h[b]||b;const{DOT_LITERAL:P,SLASH_LITERAL:w,ONE_CHAR:N,DOTS_SLASH:T,NO_DOT:I,NO_DOTS:O,NO_DOTS_SLASH:M,STAR:H,START_ANCHOR:F}=c.globChars(j.windows),B=j.dot?O:I,$=j.dot?M:I,te=j.capture?"":"?:",Z={negated:!1,prefix:""};let V=j.bash===!0?".*?":H;j.capture&&(V=`(${V})`);const ee=pe=>pe.noglobstar===!0?V:`(${te}(?:(?!${F}${pe.dot?T:P}).)*?)`,ie=pe=>{switch(pe){case"*":return`${B}${N}${V}`;case".*":return`${P}${N}${V}`;case"*.*":return`${B}${V}${P}${N}${V}`;case"*/*":return`${B}${V}${w}${N}${$}${V}`;case"**":return B+ee(j);case"**/*":return`(?:${B}${ee(j)}${w})?${$}${N}${V}`;case"**/*.*":return`(?:${B}${ee(j)}${w})?${$}${V}${P}${N}${V}`;case"**/.*":return`(?:${B}${ee(j)}${w})?${P}${N}${V}`;default:{const z=/^(.*?)\.(\w+)$/.exec(pe);if(!z)return;const ne=ie(z[1]);return ne?ne+P+z[2]:void 0}}},_e=l.removePrefix(b,Z);let ce=ie(_e);return ce&&j.strictSlashes!==!0&&(ce+=`${w}?`),ce},o.exports=v},510:(o,a,i)=>{const c=i(716),l=i(697),u=i(96),m=i(154),f=h=>h&&typeof h=="object"&&!Array.isArray(h),p=(h,_,g=!1)=>{if(Array.isArray(h)){const w=h.map(T=>p(T,_,g));return T=>{for(const I of w){const O=I(T);if(O)return O}return!1}}const v=f(h)&&h.tokens&&h.input;if(h===""||typeof h!="string"&&!v)throw new TypeError("Expected pattern to be a non-empty string");const b=_||{},C=b.windows,j=v?p.compileRe(h,_):p.makeRe(h,_,!1,!0),x=j.state;delete j.state;let S=()=>!1;if(b.ignore){const w={..._,ignore:null,onMatch:null,onResult:null};S=p(b.ignore,w,g)}const P=(w,N=!1)=>{const{isMatch:T,match:I,output:O}=p.test(w,j,_,{glob:h,posix:C}),M={glob:h,state:x,regex:j,posix:C,input:w,output:O,match:I,isMatch:T};return typeof b.onResult=="function"&&b.onResult(M),T===!1?(M.isMatch=!1,N?M:!1):S(w)?(typeof b.onIgnore=="function"&&b.onIgnore(M),M.isMatch=!1,N?M:!1):(typeof b.onMatch=="function"&&b.onMatch(M),N?M:!0)};return g&&(P.state=x),P};p.test=(h,_,g,{glob:v,posix:b}={})=>{if(typeof h!="string")throw new TypeError("Expected input to be a string");if(h==="")return{isMatch:!1,output:""};const C=g||{},j=C.format||(b?u.toPosixSlashes:null);let x=h===v,S=x&&j?j(h):h;return x===!1&&(S=j?j(h):h,x=S===v),(x===!1||C.capture===!0)&&(C.matchBase===!0||C.basename===!0?x=p.matchBase(h,_,g,b):x=_.exec(S)),{isMatch:!!x,match:x,output:S}},p.matchBase=(h,_,g)=>(_ instanceof RegExp?_:p.makeRe(_,g)).test(u.basename(h)),p.isMatch=(h,_,g)=>p(_,g)(h),p.parse=(h,_)=>Array.isArray(h)?h.map(g=>p.parse(g,_)):l(h,{..._,fastpaths:!1}),p.scan=(h,_)=>c(h,_),p.compileRe=(h,_,g=!1,v=!1)=>{if(g===!0)return h.output;const b=_||{},C=b.contains?"":"^",j=b.contains?"":"$";let x=`${C}(?:${h.output})${j}`;h&&h.negated===!0&&(x=`^(?!${x}).*$`);const S=p.toRegex(x,_);return v===!0&&(S.state=h),S},p.makeRe=(h,_={},g=!1,v=!1)=>{if(!h||typeof h!="string")throw new TypeError("Expected a non-empty string");let b={negated:!1,fastpaths:!0};return _.fastpaths!==!1&&(h[0]==="."||h[0]==="*")&&(b.output=l.fastpaths(h,_)),b.output||(b=l(h,_)),p.compileRe(b,_,g,v)},p.toRegex=(h,_)=>{try{const g=_||{};return new RegExp(h,g.flags||(g.nocase?"i":""))}catch(g){if(_&&_.debug===!0)throw g;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:f,CHAR_DOT:p,CHAR_EXCLAMATION_MARK:h,CHAR_FORWARD_SLASH:_,CHAR_LEFT_CURLY_BRACE:g,CHAR_LEFT_PARENTHESES:v,CHAR_LEFT_SQUARE_BRACKET:b,CHAR_PLUS:C,CHAR_QUESTION_MARK:j,CHAR_RIGHT_CURLY_BRACE:x,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:P}=i(154),w=I=>I===_||I===m,N=I=>{I.isPrefix!==!0&&(I.depth=I.isGlobstar?1/0:1)},T=(I,O)=>{const M=O||{},H=I.length-1,F=M.parts===!0||M.scanToEnd===!0,B=[],$=[],te=[];let Z=I,V=-1,ee=0,ie=0,_e=!1,ce=!1,pe=!1,z=!1,ne=!1,R=!1,Q=!1,ue=!1,be=!1,A=!1,L=0,qe,K,Y={value:"",depth:0,isGlob:!1};const Ne=()=>V>=H,ze=()=>Z.charCodeAt(V+1),Ie=()=>(qe=K,Z.charCodeAt(++V));for(;V<H;){K=Ie();let ye;if(K===m){Q=Y.backslashes=!0,K=Ie(),K===g&&(R=!0);continue}if(R===!0||K===g){for(L++;Ne()!==!0&&(K=Ie());){if(K===m){Q=Y.backslashes=!0,Ie();continue}if(K===g){L++;continue}if(R!==!0&&K===p&&(K=Ie())===p){if(_e=Y.isBrace=!0,pe=Y.isGlob=!0,A=!0,F===!0)continue;break}if(R!==!0&&K===f){if(_e=Y.isBrace=!0,pe=Y.isGlob=!0,A=!0,F===!0)continue;break}if(K===x&&(L--,L===0)){R=!1,_e=Y.isBrace=!0,A=!0;break}}if(F===!0)continue;break}if(K===_){if(B.push(V),$.push(Y),Y={value:"",depth:0,isGlob:!1},A===!0)continue;if(qe===p&&V===ee+1){ee+=2;continue}ie=V+1;continue}if(M.noext!==!0&&(K===C||K===u||K===l||K===j||K===h)===!0&&ze()===v){if(pe=Y.isGlob=!0,z=Y.isExtglob=!0,A=!0,K===h&&V===ee&&(be=!0),F===!0){for(;Ne()!==!0&&(K=Ie());){if(K===m){Q=Y.backslashes=!0,K=Ie();continue}if(K===S){pe=Y.isGlob=!0,A=!0;break}}continue}break}if(K===l){if(qe===l&&(ne=Y.isGlobstar=!0),pe=Y.isGlob=!0,A=!0,F===!0)continue;break}if(K===j){if(pe=Y.isGlob=!0,A=!0,F===!0)continue;break}if(K===b){for(;Ne()!==!0&&(ye=Ie());){if(ye===m){Q=Y.backslashes=!0,Ie();continue}if(ye===P){ce=Y.isBracket=!0,pe=Y.isGlob=!0,A=!0;break}}if(F===!0)continue;break}if(M.nonegate!==!0&&K===h&&V===ee){ue=Y.negated=!0,ee++;continue}if(M.noparen!==!0&&K===v){if(pe=Y.isGlob=!0,F===!0){for(;Ne()!==!0&&(K=Ie());){if(K===v){Q=Y.backslashes=!0,K=Ie();continue}if(K===S){A=!0;break}}continue}break}if(pe===!0){if(A=!0,F===!0)continue;break}}M.noext===!0&&(z=!1,pe=!1);let Ce=Z,He="",Re="";ee>0&&(He=Z.slice(0,ee),Z=Z.slice(ee),ie-=ee),Ce&&pe===!0&&ie>0?(Ce=Z.slice(0,ie),Re=Z.slice(ie)):pe===!0?(Ce="",Re=Z):Ce=Z,Ce&&Ce!==""&&Ce!=="/"&&Ce!==Z&&w(Ce.charCodeAt(Ce.length-1))&&(Ce=Ce.slice(0,-1)),M.unescape===!0&&(Re&&(Re=c.removeBackslashes(Re)),Ce&&Q===!0&&(Ce=c.removeBackslashes(Ce)));const U={prefix:He,input:I,start:ee,base:Ce,glob:Re,isBrace:_e,isBracket:ce,isGlob:pe,isExtglob:z,isGlobstar:ne,negated:ue,negatedExtglob:be};if(M.tokens===!0&&(U.maxDepth=0,w(K)||$.push(Y),U.tokens=$),M.parts===!0||M.tokens===!0){let ye;for(let Se=0;Se<B.length;Se++){const W=ye?ye+1:ee,X=B[Se],D=I.slice(W,X);M.tokens&&(Se===0&&ee!==0?($[Se].isPrefix=!0,$[Se].value=He):$[Se].value=D,N($[Se]),U.maxDepth+=$[Se].depth),(Se!==0||D!=="")&&te.push(D),ye=X}if(ye&&ye+1<I.length){const Se=I.slice(ye+1);te.push(Se),M.tokens&&($[$.length-1].value=Se,N($[$.length-1]),U.maxDepth+=$[$.length-1].depth)}U.slashes=B,U.parts=te}return U};o.exports=T},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=f=>f!==null&&typeof f=="object"&&!Array.isArray(f),a.hasRegexChars=f=>u.test(f),a.isRegexChar=f=>f.length===1&&a.hasRegexChars(f),a.escapeRegex=f=>f.replace(m,"\\$1"),a.toPosixSlashes=f=>f.replace(c,"/"),a.removeBackslashes=f=>f.replace(l,p=>p==="\\"?"":p),a.escapeLast=(f,p,h)=>{const _=f.lastIndexOf(p,h);return _===-1?f:f[_-1]==="\\"?a.escapeLast(f,p,_-1):`${f.slice(0,_)}\\${f.slice(_)}`},a.removePrefix=(f,p={})=>{let h=f;return h.startsWith("./")&&(h=h.slice(2),p.prefix="./"),h},a.wrapOutput=(f,p={},h={})=>{const _=h.contains?"":"^",g=h.contains?"":"$";let v=`${_}(?:${f})${g}`;return p.negated===!0&&(v=`(?:^(?!${v}).*$)`),v},a.basename=(f,{windows:p}={})=>{const h=f.split(p?/[\\/]/:"/"),_=h[h.length-1];return _===""?h[h.length-2]:_}}},t={};function r(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,r),c=!1}finally{c&&delete t[o]}return i.exports}typeof r<"u"&&(r.ab=__dirname+"/");var s=r(170);so.exports=s})()),so.exports}var ec;function iv(){return ec||(ec=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 r=Bf();function s(a,i){if(a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,r.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))}}(no)),no}var oo={},tc;function cv(){return tc||(tc=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 r=Bf();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
|
+
`+JSON.stringify(a));if(!(0,r.makeRe)(a.hostname).test(i.hostname)||a.search!==void 0&&a.search!==i.search)return!1;var c;return!!(0,r.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))}}(oo)),oo}var rc;function Uf(){return rc||(rc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});const t=75;function r(o){let{config:a,src:i,width:c,quality:l}=o;var u;if(process.env.NODE_ENV!=="production"){const f=[];if(i||f.push("src"),c||f.push("width"),f.length>0)throw new Error("Next Image Optimization requires "+f.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}=iv();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(h){throw console.error(h),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:h}=cv();if(!h(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((f,p)=>Math.abs(p-t)<Math.abs(f-t)?p:f))||t;return a.path+"?url="+encodeURIComponent(i)+"&w="+c+"&q="+m+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const s=r}(ro)),ro}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return j}});const r=Ge,s=gr,o=n,a=s._(y),i=r._(oa),c=r._(ov()),l=La,u=bs,m=av(),f=xs,p=Lu(),h=r._(Uf()),_=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function g(x,S,P,w,N,T,I){const O=x==null?void 0:x.src;if(!x||x["data-loaded-src"]===O)return;x["data-loaded-src"]=O,("decode"in x?x.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!x.parentElement||!x.isConnected)){if(S!=="empty"&&N(!0),P!=null&&P.current){const H=new Event("load");Object.defineProperty(H,"target",{writable:!1,value:x});let F=!1,B=!1;P.current({...H,nativeEvent:H,currentTarget:x,target:x,isDefaultPrevented:()=>F,isPropagationStopped:()=>B,persist:()=>{},preventDefault:()=>{F=!0,H.preventDefault()},stopPropagation:()=>{B=!0,H.stopPropagation()}})}if(w!=null&&w.current&&w.current(x),process.env.NODE_ENV!=="production"){const H=new URL(O,"http://n").searchParams.get("url")||O;if(x.getAttribute("data-nimg")==="fill"){if(!T&&(!I||I==="100vw")&&x.getBoundingClientRect().width/window.innerWidth<.6&&(I==="100vw"?(0,f.warnOnce)('Image with src "'+H+'" 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,f.warnOnce)('Image with src "'+H+'" 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:$}=window.getComputedStyle(x.parentElement),te=["absolute","fixed","relative"];te.includes($)||(0,f.warnOnce)('Image with src "'+H+'" has "fill" and parent element with invalid "position". Provided "'+$+'" should be one of '+te.map(String).join(",")+".")}x.height===0&&(0,f.warnOnce)('Image with src "'+H+'" 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 F=x.height.toString()!==x.getAttribute("height"),B=x.width.toString()!==x.getAttribute("width");(F&&!B||!F&&B)&&(0,f.warnOnce)('Image with src "'+H+`" 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,S)=>{let{src:P,srcSet:w,sizes:N,height:T,width:I,decoding:O,className:M,style:H,fetchPriority:F,placeholder:B,loading:$,unoptimized:te,fill:Z,onLoadRef:V,onLoadingCompleteRef:ee,setBlurComplete:ie,setShowAltText:_e,sizesInput:ce,onLoad:pe,onError:z,...ne}=x;return(0,o.jsx)("img",{...ne,...v(F),loading:$,width:I,height:T,decoding:O,"data-nimg":Z?"fill":"1",className:M,style:H,sizes:N,srcSet:w,src:P,ref:(0,a.useCallback)(R=>{S&&(typeof S=="function"?S(R):typeof S=="object"&&(S.current=R)),R&&(z&&(R.src=R.src),process.env.NODE_ENV!=="production"&&(P||console.error('Image is missing required "src" property:',R),R.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.')),R.complete&&g(R,B,V,ee,ie,te,ce))},[P,B,V,ee,ie,z,te,ce,S]),onLoad:R=>{const Q=R.currentTarget;g(Q,B,V,ee,ie,te,ce)},onError:R=>{_e(!0),B!=="empty"&&ie(!0),z&&z(R)}})});function C(x){let{isAppRouter:S,imgAttributes:P}=x;const w={as:"image",imageSrcSet:P.srcSet,imageSizes:P.sizes,crossOrigin:P.crossOrigin,referrerPolicy:P.referrerPolicy,...v(P.fetchPriority)};return S&&i.default.preload?(i.default.preload(P.src,w),null):(0,o.jsx)(c.default,{children:(0,o.jsx)("link",{rel:"preload",href:P.srcSet?void 0:P.src,...w},"__nimg-"+P.src+P.srcSet+P.sizes)})}const j=(0,a.forwardRef)((x,S)=>{const w=!(0,a.useContext)(p.RouterContext),N=(0,a.useContext)(m.ImageConfigContext),T=(0,a.useMemo)(()=>{var ee;const ie=_||N||u.imageConfigDefault,_e=[...ie.deviceSizes,...ie.imageSizes].sort((z,ne)=>z-ne),ce=ie.deviceSizes.sort((z,ne)=>z-ne),pe=(ee=ie.qualities)==null?void 0:ee.sort((z,ne)=>z-ne);return{...ie,allSizes:_e,deviceSizes:ce,qualities:pe}},[N]),{onLoad:I,onLoadingComplete:O}=x,M=(0,a.useRef)(I);(0,a.useEffect)(()=>{M.current=I},[I]);const H=(0,a.useRef)(O);(0,a.useEffect)(()=>{H.current=O},[O]);const[F,B]=(0,a.useState)(!1),[$,te]=(0,a.useState)(!1),{props:Z,meta:V}=(0,l.getImgProps)(x,{defaultLoader:h.default,imgConf:T,blurComplete:F,showAltText:$});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{...Z,unoptimized:V.unoptimized,placeholder:V.placeholder,fill:V.fill,onLoadRef:M,onLoadingCompleteRef:H,setBlurComplete:B,setShowAltText:te,sizesInput:x.sizes,ref:S}),V.priority?(0,o.jsx)(C,{isAppRouter:w,imgAttributes:Z}):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)})(zo,zo.exports);var lv=zo.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 r=Ge,s=La,o=lv,a=r._(Uf());function i(l){const{props:u}=(0,s.getImgProps)(l,{defaultLoader:a.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[m,f]of Object.entries(u))f===void 0&&delete u[m];return{props:u}}const c=o.Image})(Df);var uv=Df;const un=k.getDefaultExportFromCjs(uv),dv=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,s=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?n.jsxs(Je,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:ge["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(un,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]}):n.jsxs("div",{className:ge["support-item"],children:[e.image&&n.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?n.jsx(un,{alt:s,src:`/assets/${s}.svg`,width:20,height:20}):n.jsx(d.Icon,{size:"small",name:s})]})},fv=({content:e,CONSTANTS:t})=>n.jsx("div",{className:ge["support-container"],children:e==null?void 0:e.map((r,s)=>n.jsxs("div",{"data-device":r.device,className:ge["support-section"],children:[n.jsxs("div",{className:ge["support-text"],children:[r.title&&n.jsx("h3",{children:r.title}),r.description&&n.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&n.jsx("div",{className:ge["support-items"],"data-gap":r.gap,children:r.items.map((o,a)=>n.jsx(dv,{item:o,CONSTANTS:t},`footer-support-item-${a}`))})]},`footer-support-${s}`))}),mv=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:s,columnAlignContent:o,columnAlignItems:a,textAlignContent:i,textAlignItems:c,children:l})=>n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:s,alignItems:s},columnWrapper:{alignContent:o,alignItems:a}},children:n.jsxs(d.TextStructure.DivWrapper,{alignContent:i,alignItems:c,className:ge.footer__column,children:[n.jsxs("div",{className:t?ge.footer__columnTitleIcon:ge.footer__columnTitle,children:[n.jsx(d.Icon,{name:`${t}`,size:"small"}),e&&n.jsx("div",{children:e})]}),n.jsx("div",{className:ge.footer__columnContent,style:{maxWidth:`${r}px`},children:l})]})}),pv=({name:e,nameIcon:t,maxWidth:r,children:s,ICONS:o,...a})=>n.jsxs(d.Accordion.Wrapper,{className:ge.accordionWrapper,title:"accordion-wrapper",...a,children:[n.jsx(d.Accordion.Header,{id:(a==null?void 0:a.id)??"",className:ge.accordionHeader,closeIndicator:n.jsx(d.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:n.jsx(d.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:t?ge.accordionTextWrapper:"",children:[n.jsx(d.Icon,{name:`${t}`,size:"medium"}),n.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:ge.footer__columnContent,style:{maxWidth:`${r}px`},children:s})})})]}),ao=e=>{const{isMobile:t}=se();return t?n.jsx(pv,{...e}):n.jsx(mv,{...e})},Vn=({type:e,children:t,className:r,collumnName:s,collumnNameIcon:o,icons:a,iconLink:i,iconSize:c,link:l,paymentDisclaimer:u,paymentTitle:m,rowAlignContent:f,columnAlignContent:p,columnAlignItems:h,textAlignContent:_,textAlignItems:g,...v})=>{let b;const{handleSelectContent:C}=le(),{nextimage:j}=me();switch(e){case"menu":b=n.jsx(Je,{className:ge.footer__itemLink,href:l??"#",prefetch:!1,children:n.jsx("span",{onClick:()=>{C({content:`footer:${s}:${t}`})},children:t})});break;case"payment":b=n.jsxs("div",{className:d.helpers.classNameConcat(ge.payment,ge.footer__itemSmallText),...v,children:[u,n.jsxs("div",{className:d.helpers.classNameConcat(ge.footer__iconContainer,ge.footer__iconListSubHeader),children:[m,n.jsx("div",{className:ge.footer__iconList,children:a==null?void 0:a.map((x,S)=>n.jsx(j,{alt:x,src:`/assets/${x}.svg`,width:c??20,height:c??20},S))})]})]});break;case"social-media":b=n.jsx("div",{className:ge.footer__iconContainer,...v,children:n.jsx("div",{className:ge.footer__iconList,children:i==null?void 0:i.map((x,S)=>n.jsx(Je,{prefetch:!1,href:x.link??"#",target:"_blank",children:n.jsx(d.Icon,{size:"medium",name:x.icon,onClick:()=>C({content:`footer:redes-sociais:${x.icon}`})})},S))})});break;default:b=n.jsx("div",{className:r,...v,children:t})}return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:f,alignItems:f},columnWrapper:{alignContent:p,alignItems:h}},...v,children:n.jsx(d.TextStructure.DivWrapper,{alignContent:_,alignItems:g,className:d.helpers.classNameConcat(ge.footer__item,r),children:b})})},hv=({className:e,text:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(ge.footer__legalInformation,e),children:n.jsx("span",{children:t})}),qf=()=>{const{nextimage:e}=me();return n.jsx("div",{className:ge["footer--stamps"],children:n.jsx(e,{alt:"Empresa B",className:ge["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};qf.displayName="Footer.Stamps";const Hf=({children:e,legalTextSlot:t,adornment:r,className:s,...o})=>{const{isMobile:a}=se(),i=y.Children.toArray(e).filter(Boolean),c=i.length;return n.jsxs("div",{className:ge.footer__main,children:[(r==null?void 0:r.top)&&n.jsx("div",{className:ge.footer__top,children:r==null?void 0:r.top}),c>0&&n.jsx("div",{...o,className:d.helpers.classNameConcat(ge.footer__wrapper,s),children:i.map((l,u)=>n.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${a?1:"fit-content"})`},children:l},u))}),(r==null?void 0:r.bottom)&&n.jsx("div",{className:ge.footer__bottom,children:r.bottom}),t&&n.jsx("div",{className:ge.footer__legalText,children:t})]})};Hf.displayName="Footer.Wrapper";const $f=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:s,adornment:o,LEGAL_INFORMATION_TEXT:a,ICONS:i,className:c,hasFooterStamps:l})=>{var u;return n.jsxs(Hf,{className:c,adornment:o,legalTextSlot:n.jsx(hv,{text:a}),children:[Array.isArray(e.column)&&e.column.map((m,f)=>n.jsx(ao,{id:`${f}column-menu`,name:m.name,nameIcon:m.nameIcon,ICONS:i,children:m.items.map((p,h)=>n.jsx(Vn,{type:"menu",link:p.link,collumnName:m.name,collumnNameIcon:m.nameIcon,children:p.text},h))},f)),t&&((u=t.acceptedFlags)==null?void 0:u.length)>0&&n.jsx(ao,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:i,children:n.jsx(Vn,{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})}),n.jsxs(ao,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:i,children:[r!=null&&r.subTitle?n.jsx(Vn,{children:r==null?void 0:r.subTitle}):null,n.jsx(Vn,{type:"social-media",iconSize:24,iconLink:s}),l&&n.jsx(qf,{})]})]})};$f.displayName="Footer";const _v=Object.freeze(Object.defineProperty({__proto__:null,Footer:$f,FooterSupport:fv},Symbol.toStringTag,{value:"Module"})),gv="_header_9xxjk_57",yv="_actions_9xxjk_131",vv="_breadcrumb_9xxjk_142",xv="_credits_9xxjk_157",bv="_pdplinks_9xxjk_185",jv="_similars_9xxjk_212",Cv="_sizes_9xxjk_251",Sv="_measurementTable_9xxjk_267",Pv="_measurementHead_9xxjk_280",wv="_measurementRows_9xxjk_285",Ev="_measurementRowsTitle_9xxjk_302",Nv="_measurementRowsText_9xxjk_314",Iv="_measurementImage_9xxjk_325",Rv="_measurementImageContainer_9xxjk_328",Tv="_measurementContent_9xxjk_337",Av="_measurementTitle_9xxjk_341",kv="_measurementClose_9xxjk_352",Ov="_productref_9xxjk_417",Lv="_slideOut_9xxjk_1",Mv="_slideIn_9xxjk_1",Dv="_content_9xxjk_397",Fv="_pdp_9xxjk_185",zv="_divider_9xxjk_575",J={"bottom-navigation":"_bottom-navigation_9xxjk_1","bottom-navigation__credits-modifier":"_bottom-navigation__credits-modifier_9xxjk_18","bottom-navigation__header":"_bottom-navigation__header_9xxjk_21","bottom-navigation__header-content":"_bottom-navigation__header-content_9xxjk_26","golden-tag-content":"_golden-tag-content_9xxjk_45","bottom-navigation__price-and-promo":"_bottom-navigation__price-and-promo_9xxjk_48",header:gv,"golden-tag":"_golden-tag_9xxjk_45","golden-tag-video":"_golden-tag-video_9xxjk_86","golden-tag-content-text":"_golden-tag-content-text_9xxjk_105",actions:yv,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:vv,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:xv,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:bv,"links-wrapper":"_links-wrapper_9xxjk_195",similars:jv,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:Cv,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:Sv,measurementHead:Pv,measurementRows:wv,measurementRowsTitle:Ev,measurementRowsText:Nv,measurementImage:Iv,measurementImageContainer:Rv,measurementContent:Tv,measurementTitle:Av,measurementClose:kv,"tabs-root-modifier":"_tabs-root-modifier_9xxjk_358","tabs-list-modifier":"_tabs-list-modifier_9xxjk_376","tabs-item-modifier":"_tabs-item-modifier_9xxjk_393","content-wrapper":"_content-wrapper_9xxjk_397",productref:Ov,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:Lv,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:Mv,content:Dv,pdp:Fv,"pdp-main":"_pdp-main_9xxjk_496","pdp-main__gallery-wrapper":"_pdp-main__gallery-wrapper_9xxjk_501","pdp-main__info":"_pdp-main__info_9xxjk_518","pdp-main__info-main-content":"_pdp-main__info-main-content_9xxjk_533","pdp-main__info-subsection":"_pdp-main__info-subsection_9xxjk_533","subsection-product-info":"_subsection-product-info_9xxjk_544","subsection-similars":"_subsection-similars_9xxjk_547","subsection-sizes":"_subsection-sizes_9xxjk_550","subsection-actions":"_subsection-actions_9xxjk_553","pdp-main__info-secondary-content":"_pdp-main__info-secondary-content_9xxjk_557","sections-title":"_sections-title_9xxjk_563",divider:zv,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},Bv=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:s}=se(),{router:o}=me(),a=()=>{t&&o.push(t)},i=y.useRef(null);return n.jsx(d.ToggleStyle.Wrapper,{size:s?"medium":"small",style:{...r,border:`${i.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:a,active:i.current===t,children:e})},Vf=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:s}=Qe(),o=[{productId:e,slug:"",textureImage:(s==null?void 0:s.imageUrl)??"",textureAlt:(s==null?void 0:s.imageText)??""},...t];return n.jsx("div",{children:o.map((a,i)=>a.textureImage?n.jsxs(Bv,{link:a.slug?a.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[n.jsx(d.ToggleStyle.DisabledAdornment,{}),n.jsx(d.ToggleStyle.Texture,{children:n.jsx(Oe.Image,{alt:a.textureAlt,src:a.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${i}`):null)})},Uv=({children:e,productId:t,PDP_INFO:r,TEXTURE_IMAGE:s,TOGGLE_STYLE_MODIFIER:o})=>{const{items:a,loadSimilars:i}=Na(t,{filterTexture:s});return y.useEffect(()=>{i()},[i]),n.jsxs("div",{className:J.similars,children:[n.jsxs("div",{className:J["similars-info"],children:[n.jsx("span",{className:J["sections-title"],children:r.product.color_title}),e]}),n.jsx(Vf,{productId:t,similars:a,TOGGLE_STYLE_MODIFIER:o})]})},qv=()=>{const{colorName:e}=Qe();return n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:e.length===0?"":J["accessibility-info"],children:n.jsx("p",{children:e})})})},js=({className:e,titleId:t})=>{var o,a,i;const{productName:r,tag:s}=Qe();return n.jsxs("div",{className:d.helpers.classNameConcat(J.header,e),children:[s!=null&&s.commercial?n.jsx(d.Tag,{size:"small",title:(o=s.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(a=s.commercial)!=null&&a.icon?n.jsx(d.Icon,{name:s.commercial.icon}):null},children:(i=s.commercial)==null?void 0:i.value}):null,n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h1",{id:t,children:r})})})]})};js.displayName="PDP.PDPHeader";const Ma=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:s}=Qe(),{count:o,value:a}=s,i=k.formatPriceToCurrency(r??0,!0),c=k.formatPriceToCurrency(t??0,!0),l=k.formatPriceToCurrency(a??0);return n.jsx(d.ProductInfo.Root,{size:"small",layout:e,children:n.jsxs(d.ProductInfo.Wrapper,{layout:e,size:"small",className:J["price-wrapper"],children:[n.jsx(d.ProductInfo.ValuesWrapper,{children:t!==r?n.jsxs(n.Fragment,{children:[n.jsx(d.ProductInfo.Price,{label:"originalPrice",value:i.toString(),size:"small"}),n.jsx(d.ProductInfo.Price,{label:"discountPrice",value:c.toString(),size:"small"})]}):n.jsx(d.ProductInfo.Price,{label:"defaultPrice",value:c.toString(),size:"small"})}),o&&o>1&&a?n.jsx(d.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${l}`,size:"small"}):null]})})},Bo=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})=>{const o=vn(),{productId:a,productData:i,price:c,listPrice:l,thumbImage:u,isKit:m}=Qe(),{isMobile:f}=se(),{addToCart:p}=we(),{sendDataLayerEvent:h}=le(),_=!m&&(!o.sku||!o.available),g=()=>{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}),h({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...i,price:c,listPrice:l}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return n.jsx(d.Button,{className:J["add-to-cart"],size:f?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:g,children:o.sku&&o.available?`${s.add_to_cart}`:`${s.select_size}`})},Hv=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=se(),s=vn(),{sizesContainerRef:o}=Mc(),{structureRef:a}=Ee();return s.sku&&s.available?n.jsx(Bo,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):n.jsx(d.Button,{className:J["add-to-cart"],size:r?(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})},Wn=({value:e,label:t,suppressHydrationWarning:r=!1},s)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},a=s==="compact"?o:{...o,label:t};return n.jsx(d.Timer.Digit,{...a})},as=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:s,...o})=>{const[a,i]=y.useState(ou(new ho.TZDate(Date.now(),s),new ho.TZDate(e,s))),[c,l]=y.useState(!1);if(y.useEffect(()=>{l(!0);const h=setInterval(()=>{i(_=>_<=0?(clearInterval(h),0):_-1e3)},1e3);return()=>clearInterval(h)},[]),!c||a<=0)return n.jsx(n.Fragment,{});const u=Jr(a,"days"),m=Jr(a,"hours"),f=Jr(a,"minutes"),p=Jr(a);return n.jsxs(d.Timer.Root,{...o,children:[u?n.jsxs(n.Fragment,{children:[Wn({value:u,label:"dias"},r),n.jsx(d.Timer.Separator,{})]}):null,Wn({value:m,label:"horas"},r),n.jsx(d.Timer.Separator,{}),Wn({value:f,label:"min"},r),n.jsx(d.Timer.Separator,{}),Wn({value:p,label:"segs",suppressHydrationWarning:!0},r)]})},Da=({TIME_ZONE:e})=>{const{tag:t}=Qe(),r=t==null?void 0:t.flagGoldenPdp,s=y.useMemo(()=>{var o;if((o=r==null?void 0:r.tagImage)!=null&&o.includes("player.vimeo")){const a=r.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`${r.tagImage.split("?")[0]}?${l}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?n.jsxs("div",{className:J["golden-tag"],style:(r==null?void 0:r.backgroundSelect)==="color"?{backgroundColor:r==null?void 0:r.backgroundColor}:(r==null?void 0:r.backgroundSelect)==="image"?{backgroundImage:`url(${r==null?void 0:r.tagImage})`}:void 0,children:[(r==null?void 0:r.backgroundSelect)==="video"&&n.jsx("div",{className:J["golden-tag-video"],children:n.jsx(Oe.Video,{src:s,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),n.jsxs("div",{className:J["golden-tag-content"],children:[n.jsx("span",{className:J["golden-tag-content-text"],style:{color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}),(r==null?void 0:r.countDownEndDate)&&n.jsx(as,{mode:r==null?void 0:r.timerMode,size:"x-small",type:"compact",dateEnd:new Date((r==null?void 0:r.countDownEndDate)??""),TIME_ZONE:e})]})]}):null};Da.displayName="PDP.GoldenTag";const $v=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:s})=>{const{isMobile:o}=se();return o?n.jsxs(d.Card,{className:J["bottom-navigation"],shadow:!0,style:{zIndex:s.pdp_bottom_navigation},children:[n.jsxs("div",{className:J["bottom-navigation__header"],children:[n.jsx(Da,{TIME_ZONE:r}),n.jsxs("div",{className:J["bottom-navigation__header-content"],children:[n.jsx(js,{}),n.jsx(Ma,{layout:"name-vertical"})]})]}),n.jsx(Hv,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},Vv=({children:e,setShowBottomNavigation:t})=>{const r=y.useRef(null),s=ia(r),o=y.useRef(s);return y.useEffect(()=>{var i;const{top:a}=((i=r.current)==null?void 0:i.getBoundingClientRect())??{top:0};o.current!==s&&a>0&&(t(!s),o.current=s)},[s]),n.jsx("div",{ref:r,style:{width:"100%"},children:e})},Wv=({ICONS:e})=>{const{isMobile:t}=se(),{price:r,listPrice:s,productData:o,productId:a}=Qe(),{sendDataLayerEvent:i}=le(),c=Wr(),{toggleProduct:l}=jr();return n.jsx(d.Button,{adornment:{start:n.jsx(d.Icon,{name:e[c.includes(a)?"favorite_true":"favorite_false"],size:"medium"})},className:J["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:r,listPrice:s}}})}})},Wf=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s,ICONS:o,TIME_ZONE:a,Z_INDEX_WAR:i})=>{const{isMobile:c}=se(),[l,u]=y.useState(!0);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:J.actions,children:[c?n.jsx(Vv,{setShowBottomNavigation:u,children:n.jsx(Bo,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s})}):n.jsx(Bo,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:s}),e&&n.jsx(Wv,{ICONS:o})]}),c&&l&&n.jsx($v,{addToCartBtnSize:r,BUY_BUTTON_LABELS:s,Z_INDEX_WAR:i,TIME_ZONE:a})]})},Gf=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:s,productName:o}=Qe(),a=i=>i.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return n.jsx(d.BreadCrumb.DivWrapper,{className:d.helpers.classNameConcat(J.breadcrumb,[t==="mobile"?J["breadcrumbs-mobile"]:J["breadcrumbs-desktop"],e]),children:n.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 n.jsx(d.BreadCrumb.Item,{adornment:{end:n.jsx(d.Icon,{name:r.arrow_right})},role:"listitem",children:n.jsx(Je,{href:`/${l}`,children:i})},`pdp-breadcrumb-${l}-${c}`)}),n.jsx(d.BreadCrumb.Item,{role:"listitem",className:d.helpers.classNameConcat(J["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};Gf.displayName="PDP.BreadCrumb";const Kf=({className:e})=>{var s;const{tag:t}=Qe(),r=t==null?void 0:t.flagPdp;return r&&((s=r==null?void 0:r.value)!=null&&s.length)?n.jsx(d.Tag,{className:d.helpers.classNameConcat(J.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?n.jsx(d.Icon,{name:r==null?void 0:r.icon,style:{color:r==null?void 0:r.iconColor}}):null},style:{background:r==null?void 0:r.tagColor,color:r==null?void 0:r.textColor},children:r==null?void 0:r.value}):n.jsx(n.Fragment,{})};Kf.displayName="PDPCredits";const Gv=()=>{const{descriptionContent:e,productReference:t}=Qe(),[r,s]=y.useState("description");return n.jsxs(d.Tabs.Root,{className:J["tabs-root-modifier"],children:[n.jsx(d.Tabs.TabList,{className:J["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:a})=>n.jsx(d.Tabs.Item,{label:o,value:a,activeTab:r,onTabChange:s,size:"large",className:`${J["tabs-item-modifier"]} ${r===a?J["tabs-item-active"]:""}`},a))}),n.jsxs("div",{className:J["content-wrapper"],children:[r==="description"?n.jsx("div",{children:n.jsxs("span",{className:J.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:a})=>r===o?n.jsx(d.Tabs.Panel,{className:`${J["tabs-panel"]} ${r===o?J["tabs-panel-enter"]:J["tabs-panel-exit"]}`,children:n.jsx("div",{className:J.content,dangerouslySetInnerHTML:{__html:a}})},o):null)]})]})},Kv=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:s})=>{const o=vn(),{isMobile:a}=se();return n.jsxs(n.Fragment,{children:[a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null,n.jsx(ff,{skuId:o.available?o.sku:"",size:a?r.inputSize.mobile:r.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:s.modal,currency:e}}),a?n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},nc=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:s})=>{const o=k.resizingImg(e.imageUrl,s.pdp),{nextimage:a}=me();return n.jsx(a,{src:o,alt:e.imageLabel,objectFit:"contain",...s.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},Qv=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:s}=le(),o=y.useRef(!1);return n.jsx(Oe.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:r})},Qf=({images:e,video:t,handleZoom:r,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 n.jsxs(d.Carousel.Root,{innerRef:f=>{a(f)},className:J["gallery-carousel-modifier"],children:[n.jsx(d.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:n.jsx(d.Carousel.Bullets,{page:i.currentPage,total:e.length,onBulletClick:f=>c==null?void 0:c.navigateTo(f)})}),n.jsxs(d.Carousel.Body,{children:[n.jsx(d.Carousel.Item,{style:l,children:n.jsx(nc,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&n.jsx(d.Carousel.Item,{style:l,children:n.jsx(Qv,{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((f,p)=>p===0?null:n.jsx(d.Carousel.Item,{style:l,children:n.jsx(nc,{image:f,index:p,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${p}`))]})]})};Qf.displayName="PDP.Carousel";const Xv="_thumbs_1954e_65",Yv="_selected_1954e_92",Zv="_carousel_1954e_164",Jv="_bullets_1954e_201",ke={"image-zoom-wrapper-desktop":"_image-zoom-wrapper-desktop_1954e_1","button-close-container":"_button-close-container_1954e_10","button-close":"_button-close_1954e_10","main-image-container":"_main-image-container_1954e_22","image-desktop":"_image-desktop_1954e_52",thumbs:Xv,selected:Yv,"image-zoom-wrapper-mobile":"_image-zoom-wrapper-mobile_1954e_117","image-mobile":"_image-mobile_1954e_147","image-zoom--image":"_image-zoom--image_1954e_161",carousel:Zv,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:Jv,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},sc=({onClose:e,ICONS:t})=>n.jsx("div",{className:`${ke["button-close-container"]}`,children:n.jsx(d.Button,{iconNameStart:t.close,iconSize:"medium",className:`${ke["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),ex=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:ke["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),Xf=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:a}=me();let i=null;const c=y.useRef(null),{initialize:l,controller:u,pagination:m,itemsStyles:f}=d.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),p=_=>{u==null||u.navigateTo(_)},h=()=>{r(!0)};return y.useEffect(()=>{t(m.currentPage)},[m.currentPage,t]),n.jsxs(d.Carousel.Root,{innerRef:_=>{_&&!i&&(i=_,l(i))},className:ke.carousel,children:[n.jsxs(d.Carousel.Controller,{className:ke["carousel-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),className:ke["arrow-left"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),className:ke["arrow-right"],adornment:{start:n.jsx(d.Icon,{name:s.arrow_right})}})]}),n.jsx(d.Carousel.Body,{children:Array.isArray(e)&&e.map((_,g)=>n.jsx(d.Carousel.Item,{style:f,children:n.jsx(a,{...o.image_zoom.mobile,...g===0&&{priority:!0,loading:"eager"},ref:c,className:ke.imageMobile,src:_.imageUrl,alt:_.imageText,quality:100,...g===0&&{onLoad:h}})},g))}),n.jsx(d.Carousel.Bullets,{className:ke.bullets,page:m.currentPage,total:m.totalPages,onBulletClick:p})]})};Xf.displayName="ImageZoom.Mobile.Carousel";const Yf=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{$c();const{nextimage:s}=me();return n.jsx("div",{className:ke["image-zoom--image"],ref:e,children:n.jsx(s,{...r.image_zoom.mobile,alt:t.imageText,className:ke["image-zoom--image--img"],quality:100,src:t.imageUrl})})};Yf.displayName="ImageZoom.ImageZoom";const Zf=({loaded:e=!1})=>n.jsx("div",{className:ke["zoom-popup"],"data-loaded":e,children:n.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[n.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"}),n.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"}),n.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"})]})});Zf.displayName="ImageZoom.ZoomPopup";const Jf=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=y.useState(!1),[i,c]=y.useState(0),{containerRef:l,imgRef:u,scale:m}=Vc({defaultScale:1,maxScale:3});return n.jsxs("div",{...s,className:ke["image-mobile"],"data-disable-carrousel-pan":m>1,children:[n.jsx(Zf,{loaded:o}),n.jsx(Xf,{images:e,setCurrent:c,setFirstImgLoaded:a,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),n.jsx("div",{className:ke["image-zoom--mobile"],ref:l,children:n.jsx(Yf,{imgRef:u,image:e[i],PRODUCT_IMAGE_DIMENSIONS:r})})]})};Jf.displayName="ImageZoom.ImageMobile";const tx=({children:e,Z_INDEX_WAR:t,...r})=>n.jsx("div",{...r,className:ke["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),rx="_modal_1u87b_1",Pt={modal:rx,"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 nx({headerTitle:e,isMobile:t,ICONS:r}){return n.jsx(d.Modal.Header,{navigation:"top",className:Pt["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:t,children:[n.jsx("div",{className:Pt["modal-header__title"],children:n.jsx(d.Modal.Title,{navigation:"top",className:Pt["quick-shop__title"],title:e})}),n.jsx(d.Button,{className:Pt["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const em=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})=>{const{sizes:c,productId:l,handleViewItemEvent:u}=Qe(),m=y.useMemo(()=>c!=null&&c.length?Zu({items:c,getLabel:x=>x.value,PLP_SIZE_ORDER:t}):[],[c]),{sizesContainerRef:f}=Mc(),{isMobile:p}=se(),h=vn(),_=ul(),{setValue:g}=il(),{setValue:v}=fa(),b=y.useRef({}),[C,j]=y.useState(null);return n.jsxs("div",{ref:f,className:d.helpers.classNameConcat(J.sizes,"PDP_sizes"),children:[n.jsx("span",{className:J["sections-title"],children:e.product.size_title}),n.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}),n.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)),h.sku!==x.sku&&(g({...h,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:h.sku===x.sku,children:[n.jsx(d.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),n.jsx(d.ToggleSize.Text,{children:x==null?void 0:x.value})]},`sizes-${x.sku}-${x.value}`)))}),n.jsx(ja,{open:_,setVisible:v,sku:C,setSku:j,skus:Object.values(b.current),ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:a,Z_INDEX_WAR:i})]})},en=({children:e,className:t,type:r})=>n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main__info-subsection"],[J[`subsection-${r}`],t]),children:e}),tm=({children:e,className:t})=>{const{structureRef:r,tipbarRef:s}=Ee(),o=y.useMemo(()=>{var c,l;const a=((c=r.current)==null?void 0:c.clientHeight)||0,i=((l=s.current)==null?void 0:l.clientHeight)||0;return a+i},[r,s]);return n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},rm=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=Qe(),{items:s,loadSimilars:o}=Na(r,{filterTexture:e});return y.useEffect(()=>{o()},[o]),n.jsxs("div",{className:J.similars,children:[n.jsx("span",{className:J["sections-title"],children:"Cor"}),n.jsx(Vf,{productId:r,similars:s,TOGGLE_STYLE_MODIFIER:t})]})};rm.displayName="PDP.Info.Similars";const sx=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,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:f})=>n.jsx(d.Modal.Body,{className:Pt["modal-product-body"],children:n.jsxs(tm,{className:Pt["pdp-main__info-modifier"],children:[n.jsxs(en,{type:"product-info",children:[n.jsx(js,{}),n.jsx(Ma,{})]}),n.jsx(en,{type:"similars",children:n.jsx(rm,{TEXTURE_IMAGE:l,TOGGLE_STYLE_MODIFIER:m})}),n.jsx(en,{type:"sizes",children:n.jsx(em,{ICONS:r,NEWSLETTER_CONFIGS:s,NOTIFY_INFO:o,PDP_INFO:a,PLP_SIZE_ORDER:i,PRODUCT_CARD_TEXTS:c,Z_INDEX_WAR:f})}),n.jsx(en,{type:"actions",children:n.jsx(Wf,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:u,Z_INDEX_WAR:f})})]})});function ox({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...s}){const[o,a]=y.useState(!1),i=()=>a(c=>!c);return n.jsxs("div",{className:Pt["quick-shop"],children:[n.jsx(d.Button,{onClick:i,size:"x-large",className:Pt["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),n.jsxs(d.Modal.Root,{isOpen:o,setIsOpen:a,className:`${Pt.modal} ${Pt["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[n.jsx(nx,{headerTitle:t.title,ICONS:r}),n.jsx(sx,{callBackProductAdded:e,ICONS:r,...s})]})]})}const ax=({image:e})=>n.jsx(un,{src:k.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:ke.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),ix=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...s})=>{const[o,a]=y.useState(!1),{nextimage:i}=me();return n.jsx("div",{...s,className:ke["main-image-container"],children:n.jsxs("div",{className:ke["image-desktop"],children:[!o&&n.jsx(ax,{image:e==null?void 0:e[t]}),n.jsx(i,{src:k.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:ke.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{a(!0)}})]})})},cx=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:s}=me();return n.jsx("div",{className:ke.thumbs,children:e.map((o,a)=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(a),onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&t(a)},className:a===r?ke.selected:"",children:n.jsx(s,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},a))})},nm=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:a,...i})=>{const{isMobile:c}=se(),[l,u]=y.useState(t),m=f=>{u(f)};return c?n.jsxs(tx,{Z_INDEX_WAR:a,children:[n.jsx(sc,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(Jf,{images:e,ICONS:s,PRODUCT_IMAGE_DIMENSIONS:o})]}):n.jsxs(ex,{Z_INDEX_WAR:a,children:[n.jsx(sc,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:s}),n.jsx(ix,{images:e,selectedImageIndex:l,onThumbnailClick:m,PRODUCT_IMAGE_DIMENSIONS:o},e[l].imageId??`${e[l].imageText}-${l}`),n.jsx(cx,{images:e,selectedImageIndex:l,onThumbnailClick:m}),n.jsx(ox,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:s,Z_INDEX_WAR:a,...i})]})};nm.displayName="ImageZoom";const lx=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:s,productName:o}=Qe(),[a,i]=y.useState({show:!1,initialIndex:0});y.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 n.jsxs(n.Fragment,{children:[n.jsx(Qf,{images:e,video:s,handleZoom:c,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),a.show&&n.jsx(nm,{images:e,initialSelectedImageIndex:a.initialIndex,setShowImageZoom:i,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},sm=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:s}=Qe(),o=y.useMemo(()=>{const a=s.filter(i=>!e.includes(i.imageLabel));return a.length>0?a:s},[]);return n.jsx(lx,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};sm.displayName="PDP.Gallery";const ux=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:s})=>{const{allSizesAvailable:o,productId:a}=Qe(),{setValue:i}=fa(),{sendDataLayerEvent:c}=le();return n.jsx("div",{className:d.helpers.classNameConcat(J.links,e),id:"pdp-container","data-product-id":a,children:n.jsxs("div",{className:J["links-wrapper"],children:[!o&&n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>i(!0),underline:!0,children:s.links_and_stepper.size_out_of_stock}),n.jsx(d.Button,{adornment:t?{start:n.jsx(d.Icon,{name:r.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}),n.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})]})})},dx=({children:e})=>n.jsx("div",{className:J["pdp-main__info-main-content"],children:e}),fx=({head:e,className:t})=>n.jsx("thead",{className:t,children:n.jsx("tr",{children:e.map((r,s)=>n.jsx("th",{children:r},`head-title-${s}`))})}),mx=({rows:e,className:t})=>n.jsx("tbody",{className:t,children:e.map((r,s)=>n.jsx("tr",{children:r.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(a=>`${a.text}
|
|
18
|
+
`):o).map((o,a)=>n.jsx("td",{children:o},`cell-content-${a}`))},`row-content-${s}`))}),px="_tableContainer_1yxy2_1",hx={tableContainer:px},_x=({children:e,className:t=""})=>n.jsx("table",{className:`${hx.tableContainer} ${t}`,children:e}),Zn={Head:fx,Rows:mx,Root:_x},gx=({title:e,text:t})=>n.jsxs("p",{className:J.measurementRowsText,children:[n.jsx("h1",{className:J.measurementRowsTitle,children:e}),t]}),yx=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const s=ml(),{setValue:o}=pl();return n.jsx(d.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:s,className:J.measurementModal,children:n.jsx(d.Modal.Body,{children:n.jsxs("div",{className:J.measurementContainer,children:[n.jsx("h1",{className:J.measurementTitle,children:t.title}),n.jsxs("div",{className:J.measurementContent,children:[n.jsx("div",{className:J.measurementImageContainer,children:n.jsx(un,{width:264,height:402,alt:"",className:J.measurementImage,src:t.bannerImage})}),n.jsxs(Zn.Root,{className:J.measurementTable,children:[n.jsx(Zn.Head,{className:J.measurementHead,head:t.head}),n.jsx(Zn.Rows,{className:J.measurementRows,rows:t.rows.map((a,i)=>[n.jsx(gx,{title:t.descriptions[i].title,text:t.descriptions[i].text},i),...a])})]})]}),n.jsx(d.Button,{onClick:()=>o(!1),className:J.measurementClose,variant:"tertiary",children:n.jsx(d.Icon,{name:e.close})})]})})},"minicart")},vx=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main__gallery-wrapper"],t),...r,children:e}),xx=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(J.pdp,t),...r,children:e}),bx=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main"],t),...r,children:e}),jx=({children:e,className:t,...r})=>n.jsx("div",{className:d.helpers.classNameConcat(J["pdp-main__info-secondary-content"],t),...r,children:e}),Cx={gallery:vx,pdp:xx,main:bx,secondary:jx},Sx=({className:e,...t})=>n.jsx(d.Utils.Divider,{...t,className:d.helpers.classNameConcat(J.divider,e)}),Px=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:qv,Actions:Wf,BreadCrumb:Gf,Credits:Kf,DescriptionsTabs:Gv,Divider:Sx,Freight:Kv,Gallery:sm,GoldenTag:Da,Header:js,Links:ux,MainContent:dx,MainInfo:tm,PDPSimilars:Uv,Price:Ma,ProductMeasurements:yx,Sizes:em,SubSectionWrapper:en,containers:Cx},Symbol.toStringTag,{value:"Module"})),om=(e,t)=>{const[r,s]=jf({items:e}),[o,a]=t.split(":").map(Number);return isNaN(o)||isNaN(a)?[r,s]:[r<o?r:o,s>a?s:a]},am=y.createContext({}),im=({children:e,fetch:t,queryKey:r,options:s})=>{const{data:o,isLoading:a,isFetched:i,refetch:c,isRefetching:l,error:u}=Gh({queryKey:r,queryFn:async()=>{const m=await t();if(!m.ok)throw new Error("[ROOT QUERY PROVIDER ERROR]: NOT LOAD!");return m.json()},...s});return n.jsx(am.Provider,{value:y.useMemo(()=>({data:o,refetch:c,isLoading:a,isFetched:i,isRefetching:l,isError:!!u}),[o,c,a,i,l,u]),children:e})},cm=()=>{const e=y.useContext(am);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},lm=y.createContext({}),wx=({children:e})=>{const{router:t}=me(),{constants:{PLP_SORT_DEFAULT:r}}=Me(),{reset:s}=Xt(),{searchParams:o}=Fe(),{data:a,isLoading:i,...c}=cm(),l=y.useCallback((_,g)=>{if(g){if(_.key.toLocaleLowerCase()==="price"){const v=g.getAll("facets");g.delete("facets"),v.forEach(b=>{const[C]=b.split("/");C!==_.key&&g.append("facets",b)})}g.set("page","1"),s(),g.append("facets",`${_.key}/${_.value}`),t.push(`?${g.toString()}`)}},[t,s]),u=y.useCallback(()=>{const _=new URLSearchParams;_.set("sort",r),_.set("page","1"),s(),t.push(`?${_.toString()}`)},[t,s,r]),m=y.useCallback((_,g)=>{if(!g||!g.has&&!g.has("facets"))return;const v=g.getAll("facets");g.delete("facets"),g.set("page","1"),v.forEach(b=>{const[C,j]=b.split("/");(C!==_.key||j!==_.value)&&g.append("facets",b)}),s(),t.push(`?${g.toString()}`)},[t,s]),f=y.useCallback(_=>{const g=o?new URLSearchParams(o):new URLSearchParams;for(const[,v]of g.entries()){const[b,C]=v.split("/");if(b===_.key&&C===_.value)return m(_,g)}return l(_,g)},[l,m,o]),p=y.useCallback(_=>{const g=o?new URLSearchParams(o):new URLSearchParams;g.set("sort",_.replace("_",":")),t.push(`?${g.toString()}`)},[t,o]),h=a&&"data"in a?a.data:null;return n.jsx(lm.Provider,{value:{...c,breadcrumb:(h==null?void 0:h.breadcrumb)??[],deleteAllFacets:u,facets:(h==null?void 0:h.facets)??[],isLoading:i,selectedFacets:k.getFacetsActiveSearchParams(o),onToggleFacet:f,onSort:p},children:e})},um=({children:e,enabled:t,...r})=>{const{state:s}=Fe(),o=i=>i==="productclusterids"||i.startsWith("category-"),a=s.facets.filter(({key:i})=>o(i));return n.jsx(im,{fetch:()=>k.fetchProxy("/_v/proxy/search/facets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,facets:a})}),queryKey:["facets",s.base,s.term],options:{enabled:t??!0,gcTime:1e3*60*30,refetchOnWindowFocus:!1,placeholderData:gh,staleTime:1e3*60*30},children:n.jsx(wx,{...r,children:e})})},Fa=()=>{const e=y.useContext(lm);if(e===void 0)throw new Error("use QueryFacetsContext must be used within a QueryFacetsProvider");return e},Ex=()=>{var S;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a},openFilters:i,setOpenFilters:c}=Me(),[l,u]=y.useState("10000:0"),{isMobile:m}=se(),{sendDataLayerEvent:f}=le(),{state:p}=Fe(),{breadcrumb:h,deleteAllFacets:_,facets:g,isLoading:v,onToggleFacet:b}=Fa(),C=y.useRef(""),j={isLast:!0,href:(S=p.term)!=null&&S.length?`/${p.term}`:"",name:p.term},x=k.filterNonRootFacets(p.facets,p==null?void 0:p.base);return y.useEffect(()=>{const P=g.find(({key:w})=>w==="price");if(P){const[w,N]=om(P.values,l??"10000:0");u(`${w}:${N}`)}},[g,l,u]),y.useEffect(()=>{if(!x.length)return;const P=JSON.stringify(x);C.current!==P&&(C.current=P,f({functionKey:"filterEvent",data:{commonData:{selectedFacets:x}}}))},[x]),n.jsxs(pr.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:h.length?h:[j],deleteAllFacets:_,filters:{facets:k.filterNonCategorySelected(g,p==null?void 0:p.base),selected:x},isMobile:m??!1,isLoading:v??!1,isOpen:i,price:l,onToggleFacet:b,setIsOpen:c,target:document.body,children:[n.jsx(pr.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),n.jsx(pr.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},dm=()=>typeof document>"u"?null:n.jsx(Ex,{});dm.displayName="Filters";const Nx=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{y.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])},fm=y.createContext({}),Ix=({callback:e,children:t})=>{const{data:r,isLoading:s,...o}=cm(),a=r&&"data"in r?r.data:null;return y.useEffect(()=>{a&&typeof e=="function"&&e({...a})},[a]),n.jsx(fm.Provider,{value:{...o,isLoading:s,products:(a==null?void 0:a.products)??[],pagination:(a==null?void 0:a.pagination)??Kh,total:(a==null?void 0:a.pagination.count)??0},children:t})},za=({callback:e,children:t,forceUpdate:r,options:s,state:o,queryKey:a})=>n.jsx(im,{fetch:()=>k.fetchProxy("/_v/proxy/search/product",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...o,forceUpdate:r})}),queryKey:a,options:s,children:n.jsx(Ix,{callback:e,children:t})}),Pn=()=>{const e=y.useContext(fm);if(e===void 0)throw new Error("useQueryProductsContext must be used within a QueryProductsProvider");return e},Ba=({total:e=0})=>{const{constants:{SEARCH_TOTAL_PORTAL_ID:t}}=Me();if(typeof window>"u")return null;const r=document.getElementById(t);return r?oa.createPortal(n.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};Ba.displayName="PDC.Grid.NavigationTotal";const Rx=()=>{const{isMobile:e}=se(),{constants:t,mainSeller:r}=Me(),{isLoading:s,products:o,pagination:{count:a}}=Pn(),{ICONS:i,PLP_GRID_SCROLL_BACK:c,PLP_NOT_RESULT:l}=t;return Nx({productCount:(o==null?void 0:o.length)??0,PLP_GRID_SCROLL_BACK:c}),o?n.jsxs(n.Fragment,{children:[n.jsx(yt.Products,{...t,isMobile:e??!1,items:o,StoreConfig_MainSellerId:r}),!o.length&&!s&&n.jsx(yt.Empty,{ICONS:i,PLP_NOT_RESULT:l}),n.jsx(Ba,{total:a})]}):null},mm=({infinite:e=!1})=>e?n.jsx(yt.InfiniteScroller,{}):n.jsx(Rx,{});mm.displayName="Grid";const Sr=e=>({centro:"center",esquerda:"start",direita:"end"})[e],pm=({children:e,contentState:t,entityKey:r})=>{const{url:s}=t.getEntity(r).getData();return s?n.jsx(Je,{href:s,children:e}):e},Tx=(e,t,r)=>{e.findEntityRanges(s=>{const o=s.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},is=e=>{const t=new vt.CompositeDecorator([{strategy:Tx,component:pm}]),r=vt.convertFromRaw(e);return vt.EditorState.createWithContent(r,t)},Ax=e=>vt.convertFromRaw(e),cs=vt.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),oc="superior-direita",Gn="dentro-inferior-centro",kx="inferior-direita",io="dentro-inferior-esquerda",hm=e=>({position:e===Gn||e===io?"absolute":"default",shouldRender:[oc,Gn,io].includes(e)?"top":"bottom",alignItems:[Gn].includes(e)?"center":[oc,kx].includes(e)?"flex-end":"flex-start",left:e===io?"16px":e===Gn?"45%":"unset"}),Ox=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:is,EXTENDED_BLOCK_RENDER_MAP:cs,GET_CONTENT_STATE:Ax,controllersPositionsAdapter:hm},Symbol.toStringTag,{value:"Module"})),Lx=({expanded:e,content:t})=>n.jsxs("details",{open:e,children:[t.textStructureReduced?n.jsx("summary",{onClick:r=>r.preventDefault(),children:n.jsx(vt.Editor,{editorKey:"draft-editor-1",blockRenderMap:cs,editorState:t!=null&&t.textStructureReduced?is(JSON.parse(t.textStructureReduced)):vt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{}),t.showTextStructureExpander&&t.textStructure?n.jsx(n.Fragment,{children:n.jsx(vt.Editor,{editorKey:"draft-editor-1",blockRenderMap:cs,editorState:t.textStructure?is(JSON.parse(t.textStructure)):vt.EditorState.createEmpty(),onChange:()=>null,readOnly:!0})}):n.jsx(n.Fragment,{})]}),Mx="_textContentWrapper_176ht_5",Dx="_textContentSection_176ht_13",Uo={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:Mx,textContentSection:Dx},_m=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var a;const[s,o]=y.useState(!1);return n.jsx(d.TextStructure.Root,{layoutProps:{textRow:{alignContent:Sr(e.textStructureAlignment),alignItems:Sr(e.textStructureAlignment)},columnWrapper:{alignContent:Sr(e.textStructureAlignment),alignItems:Sr(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?n.jsx(d.Button,{variant:"tertiary",adornment:{end:n.jsx(d.Icon,{name:s?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(i=>!i),size:"small",children:s?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):n.jsx(n.Fragment,{})},children:n.jsxs(d.Utils.Column,{className:Uo.textContentWrapper,style:{alignItems:Sr(e.textStructureAlignment)},children:[n.jsx(d.TextStructure.DivWrapper,{style:{textAlign:Sr(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?n.jsx(Lx,{content:e,expanded:s}):n.jsx(n.Fragment,{})}),e.textStructureButtonLabel?n.jsx(Ke,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Uo["link-modifier"],adornments:(a=e.textStructureButtonIcon)!=null&&a.length&&e.enableIcon?{end:n.jsx(d.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):n.jsx(n.Fragment,{})]})})},Fx=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],ac=e=>({centro:"center",esquerda:"start",direita:"end"})[e],ic={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},cc=({data:e,videoUrl:t,priority:r,videoRef:s,ICONS:o,TEXTCONTENT_EXPANDED:a,TIME_ZONE:i,className:c,...l})=>{const{video:u,image:m,imageHref:f,imageOpacity:p,altImage:h,backgroundColor:_,position:g,contentAlignment:v,showTimer:b,contentOrder:C,timerMode:j,timerEnd:x,timerInit:S,textStructure:P,textStructureReduced:w}=e.banner,N=(f==null?void 0:f.trim())||(m==null?void 0:m.trim())||null,{nextimage:T}=me();return n.jsxs(d.Banner.Container,{...l,children:[n.jsxs(d.Banner.ImageWrapper,{className:ic["banner-image-wrapper-modifier"],style:p?{background:_}:void 0,children:[u&&n.jsx(Oe.Video,{videoRef:s,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),N&&!(u!=null&&u.length)&&n.jsx(T,{src:N,width:"1920",height:"1080",alt:h??m??"",...r?{priority:r}:{},style:p?{opacity:"0"}:void 0}),!m&&!(u!=null&&u.length)&&n.jsx("div",{style:{background:_}})]}),b||w||P?n.jsx(d.Banner.Slot,{...Fx(g??"centro"),className:d.helpers.classNameConcat(ic["content-modifier"],c),style:{textAlign:ac(v)},children:n.jsxs(d.Utils.Column,{gap:"16px",alignItems:ac(v),children:[b&&C==="timer-first"&&n.jsx(as,{mode:j??"default",size:"small",dateEnd:x?new Date(x):new Date,dateInit:S?new Date(S):new Date,TIME_ZONE:i}),n.jsx(_m,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:a}),b&&C!=="timer-first"&&n.jsx(as,{mode:j??"default",size:"small",dateEnd:x?new Date(x):new Date,dateInit:S?new Date(S):new Date,TIME_ZONE:i})]})}):n.jsx(n.Fragment,{})]})};class ft extends y.Component{constructor(){super(...arguments);Jt(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,s){if(process.env.NODE_ENV!=="production"){if(this.props.debugger)debugger;console.groupCollapsed("Error Boundary CMS",this.props.name),console.log("Error:",(r==null?void 0:r.message)??r),console.log("Error Info:",s),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:s,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:s}}const wn=({data:e,className:t,priority:r,creative:s,name:o,...a})=>{const{handleSelectPromotionEvent:i,currentLocalRef:c}=le(),{banner:{promotion_name:l},index:u,componentIndex:m}=e,f=typeof u=="number"?`:${u+1}`:"",p={creative_name:s,creative_slot:`${s}-${c.current}:${m+1}${f}`,promotion_id:e.banner.href,promotion_name:l},h=y.useRef(null),_=y.useMemo(()=>{var v;if((v=e.banner.video)!=null&&v.includes("player.vimeo")){const b=e.banner.video.split("?")[1],C=b==null?void 0:b.split("&"),j=C==null?void 0:C.filter(S=>S.includes("loc")||S.includes("signature")||S.includes("user_id")),x=j==null?void 0:j.join("&");return`${e.banner.video.split("?")[0]}?${x}`}return e.banner.video},[e]),g=()=>{var v;(v=h.current)!=null&&v.paused&&h.current.play()};return n.jsx(ft,{name:o,children:n.jsx(_s,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...p,index:u}}}},observerOptions:{delay:100,..._&&{threshold:.1}},..._&&{callBackWhenVisible:g},children:e.banner.href?n.jsx(Je,{href:e.banner.href,onClick:()=>{i({updatePromotionRef:!0,promotion:p,index:u})},children:n.jsx(cc,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...a})}):n.jsx(cc,{data:e,videoUrl:_,priority:r,videoRef:h,className:t,...a})})})},Ua=e=>n.jsx(ft,{name:e.name,children:n.jsx(wn,{...e})}),gm=({columns:e,gap:t,className:r})=>{const{isMobile:s}=se(),{banners:o}=Cn(),{constants:{ICONS:a,PRODUCT_CARD_IMAGE_ASPECT_RATIO:i,TEXTCONTENT_EXPANDED:c,TIME_ZONE:l}}=Me();return Array.isArray(o)?o.map((u,m)=>y.createElement(rt.Banner,{...u,columns:u.columns,gap:t,isMobile:s??!1,key:`${u.position_grid}-${m}`,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:i},n.jsx(wn,{name:"Banner Carousel",data:{banner:u,componentIndex:m},creative:"banner_grid",ICONS:a,TEXTCONTENT_EXPANDED:c,TIME_ZONE:l,className:r}))):null};gm.displayName="PDC.InfiniteScroller.Banners";const ym=({page:e,...t})=>{var i;const{rootRef:r}=Ee(),{gap:s,updateParamPage:o}=Yt(),{element:a}=us({callback:()=>o(e.page),options:{threshold:0}});return n.jsx("div",{...t,id:`pdc-scroll-infinite-${e==null?void 0:e.page}`,className:We["pdc--infinite--loader"],"data-page":e.page,ref:a,style:{top:(Number(((i=r==null?void 0:r.current)==null?void 0:i.offsetHeight)??0)+s*2)*-1}})};ym.displayName="PDC.Page.Anchor";const vm=e=>{var s;const{gap:t}=Yt(),{rootRef:r}=Ee();return n.jsx("div",{...e,className:We["pdc--infinite--card--anchor-pdp"],style:{top:(Number(((s=r==null?void 0:r.current)==null?void 0:s.offsetHeight)??0)+t*2)*-1}})};vm.displayName="PDC.Page.AnchorPDP";const xm=({first:e,gap:t,empty:r=!1,isMobile:s=!1,item:o,index:a,order:i,page:c,showVideo:l=!1})=>{const{handleNotify:u}=Yt(),{getAvailableProductTag:m}=Ot(),{constants:f,mainSeller:p}=Me(),{load:h}=Xt(),_=m(o==null?void 0:o.cluster.highlights);if(r)return;const{BUY_BUTTON_LABELS:g,MAIN_IMAGE:v,PLP_GRID_SCROLL_BACK:b,PLP_INFINITE_SCROLL:C,PLP_PRODUCT_SIMILAR_DELAY:j,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:x,PLP_SIZE_ORDER:S,PRODUCT_CARD_IMAGE_ASPECT_RATIO:P,PRODUCT_CARD_TEXTS:w,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:N,PRODUCT_IMAGE_DIMENSIONS:T,SECOND_IMAGE:I,TEXTURE_IMAGE:O,Z_INDEX_WAR:M,ICONS:H}=f;return n.jsxs(rt.Card,{"data-skeleton":o.id==="skeleton",className:We["pdc--infinite--card--disabled"],gap:t,isMobile:s??!1,item:o,order:i,tag:_,index:a,setSkuSelected:u,showVideo:l,CONSTANTS:{BUY_BUTTON_LABELS:g,MAIN_IMAGE:v,PLP_GRID_SCROLL_BACK:b,PLP_INFINITE_SCROLL:C,PLP_PRODUCT_SIMILAR_DELAY:j,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:x,PLP_SIZE_ORDER:S,PRODUCT_CARD_IMAGE_ASPECT_RATIO:P,PRODUCT_CARD_TEXTS:w,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:N,PRODUCT_IMAGE_DIMENSIONS:T,SECOND_IMAGE:I,StoreConfig_MainSellerId:p,TEXTURE_IMAGE:O,Z_INDEX_WAR:M,ICONS:H},children:[n.jsx(sn.AnchorPDP,{}),e&&c&&n.jsx(sn.Anchor,{page:c}),h&&c&&!(c!=null&&c.loading)?n.jsx(sn.Loader,{page:c}):null]})};xm.displayName="PDC.Page.Card";const bm=({type:e="default",page:t,...r})=>{const{updateProducts:s}=Xt(),{element:o}=us({callback:()=>{t.loading||s(t.page)},onEnterViewportOnce:!0,options:{threshold:[.2,.5]}});return n.jsx("div",{...r,className:We[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:o})};bm.displayName="PDC.Page.Loader";const jm=({nextPage:e=!1,page:t,total:r,...s})=>{const{addNewPage:o}=Yt(),{element:a}=us({callback:()=>{o(t,r,e)},onEnterViewportOnce:!0,options:{threshold:[.1,.5]}});return e===!0&&t.loading===!0?n.jsx("div",{...s,className:We["pdc--infinite--next-page--card"],"data-next-page":!0,ref:a}):null};jm.displayName="PDC.Page.NextPage";const sn={Anchor:ym,AnchorPDP:vm,Card:xm,Loader:bm,NextPage:jm},zx=({page:e})=>{const{isMobile:t}=se(),{gap:r,columns:s}=Yt(),{isLoading:o,pagination:a,products:i}=Pn(),{load:c,products:l,trimPages:u,setLoad:m}=Xt(),{constants:{ICONS:f,PLP_NOT_RESULT:p,ITEMS_PER_PAGE:h}}=Me(),{count:_,nextPage:g,total:v}=a,b=(e.page-1)*24;y.useEffect(()=>{o||m(!0)},[o,m]),y.useEffect(()=>{!o&&i.length===0&&e.loading&&e.page>v&&e.page>1&&u(v)},[o,e,i,v,u]);const C=e.page===v?_-h*(e.page-1):h,j=i.length>0?i:Array.from({length:C},()=>Ll()),x=Fl(j.map(P=>P.node),s),S=c&&e.page===1&&!o&&a.total===0;return n.jsxs(n.Fragment,{children:[e.page===1&&n.jsx(Ba,{total:(a==null?void 0:a.count)??0}),S&&n.jsx(yt.Empty,{ICONS:f,PLP_NOT_RESULT:p}),Array.isArray(j)?j.map((P,w)=>{const N=l[b+w]+1;return n.jsx(sn.Card,{empty:e.loading&&e.page===1&&!o&&!i.length,first:w===0,gap:r,index:w,item:P.node,isMobile:t??!1,order:N,page:e,showVideo:x.indexOf(w)!==-1},N)}):null,c&&!o&&g&&i.length>0&&n.jsx(sn.NextPage,{page:e,nextPage:g,total:v})]})},Cm=({page:e})=>{const{state:t}=Fe(),{sendDataLayerEvent:r}=le(),s=y.useCallback(o=>{r({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o.products}}})},[r,t==null?void 0:t.query]);return n.jsx(za,{callback:s,state:{...t,page:e==null?void 0:e.page},queryKey:[String(e==null?void 0:e.page),t.sort,JSON.stringify(Object.entries(t.facets??{}).sort())],options:{enabled:e.loading,gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},children:n.jsx(zx,{page:e})})};Cm.displayName="PDC.Page";const Bx=()=>{var j;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:a},openFilters:i,setOpenFilters:c}=Me(),[l,u]=y.useState("10000:0"),{isMobile:m}=se(),{state:f}=Fe(),{breadcrumb:p,deleteAllFacets:h,facets:_,isLoading:g,onToggleFacet:v}=Fa(),b={isLast:!0,href:(j=f.term)!=null&&j.length?`/${f.term}`:"",name:f.term},C=k.filterNonRootFacets(f.facets,f==null?void 0:f.base);return y.useEffect(()=>{const x=_.find(({key:S})=>S==="price");if(x){const[S,P]=om(x.values,l??"10000:0");u(`${S}:${P}`)}},[_,l,u]),n.jsxs(pr.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:p.length?p:[b],deleteAllFacets:h,filters:{facets:k.filterNonCategorySelected(_,f==null?void 0:f.base),selected:C},isMobile:m??!1,isLoading:g??!1,isOpen:i,price:l,onToggleFacet:v,setIsOpen:c,target:document.body,children:[n.jsx(pr.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),n.jsx(pr.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:s,PLP_SIZE_ORDER:a}})]})},Sm=({sort:e,...t})=>{const{load:r}=Xt();return n.jsxs(um,{...t,enabled:r,children:[n.jsx(yt.Navigation,{}),n.jsx(Bx,{})]})};Sm.displayName="PDC.INFINITE-SCROLLER.FILTERS";const Ux=({load:e,PLP_GRID_SCROLL_BACK:t})=>{const r=y.useRef(!1);y.useEffect(()=>{if(e&&!r.current){const s=sessionStorage.getItem(t.refer),o=sessionStorage.getItem(t.order);if(s==="true"){const a=document.querySelector(`[data-order="${o}"] > [class*="anchor-pdp"]`);a&&(a.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0),sessionStorage.setItem(t.refer,"false")}else{const a=document.querySelectorAll('[id*="pdc-scroll-infinite"]');if(a.length>0){const i=a[a.length-1];a.length>1&&i.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0}}}if(!e&&r.current){r.current=!1;const s=document.querySelector("body > main");s&&s.scrollIntoView({behavior:"instant",block:"start"})}},[e])},qx=e=>{const{constants:{PLP_GRID_SCROLL_BACK:t,ITEMS_PER_PAGE:r}}=Me(),{gap:s,columns:o}=Yt(),{load:a,pages:i}=Xt();return Ux({load:a,PLP_GRID_SCROLL_BACK:t}),n.jsx("div",{className:We["pdc--grid--content"],children:n.jsxs(rt.Root,{children:[Array.isArray(i)&&i.map(c=>n.jsx(Cm,{count:r,page:c},c.page)),n.jsx(gm,{columns:o,count:r,gap:s})]})})},Pm=e=>{const{state:t}=Fe(),{banners:r}=Cn(),{columns:s}=Yt(),{constants:{ITEMS_PER_PAGE:o,PLP_SORT_DEFAULT:a}}=Me(),{createPagesScroll:i}=Xt(),c=y.useRef(!1);return y.useEffect(()=>{if(c.current)return;const l=fs(r,50,s,o);i(t.page,l),c.current=!0},[]),n.jsxs(Jl,{banners:r,children:[n.jsx(Sm,{state:t,sort:a}),n.jsx(qx,{})]})};Pm.displayName="PDC.InfiniteScroller";const wm=()=>{const{state:e}=Fe(),{constants:{Z_INDEX_WAR:t},setOpenFilters:r}=Me(),{selectedFacets:s,onToggleFacet:o,onSort:a}=Fa(),i=k.filterNonRootFacets(s,e==null?void 0:e.base);return n.jsx(Qt.Root,{onSort:a,setOpenFilters:r,style:{zIndex:t.plp_navigation},children:n.jsx(Qt.Selected,{callback:o,selected:i})})};wm.displayName="Navigation";const qo=({currentPage:e,callback:t,type:r,...s})=>n.jsx(d.Button,{...s,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});qo.displayName="Arrow";const Ho=({active:e,prev:t,ellipses:r,page:s,selectedPage:o})=>n.jsxs(n.Fragment,{children:[r&&t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."}),e&&n.jsx(d.Pagination.Item,{isActive:!1,index:s,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(s)},children:s}),r&&!t&&n.jsx(d.Button,{size:"large",variant:"tertiary",children:"..."})]});Ho.displayName="PageEllipses";const Em=({children:e,endPage:t,page:r,total:s,selectedPage:o,ITEMS_PER_SECTION:a})=>n.jsxs(n.Fragment,{children:[n.jsx(Ho,{active:r>=a&&s>a,selectedPage:o,currentPage:r,prev:!1,ellipses:r>a&&s>a,page:1}),e,n.jsx(Ho,{active:s-r>1&&s!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<s-1,page:s})]});Em.displayName="Pagination.Layout";const Hx=(e,t,r)=>{const s=new URLSearchParams(r);return s.set(e,t),s.toString()},$x=(e,t)=>{const r=[];for(let s=e;s<=t;s++)r.push(s);return r},Vx=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:s})=>{const o=t>=s?s:t,a=Math.max(1,e===o?o-r+1:e-Math.floor(r/2)),i=Math.min(o,a+r-1);return{startPage:a,endPage:i,totalPages:o}},Nm=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:s})=>{const{router:o,pathname:a}=me();return Array.isArray(t)?t.map(i=>n.jsx(d.Pagination.Item,{isActive:e===i,index:i,variant:e===i?s.active:s.default,onClick:()=>o.push(`${a}?${Hx("page",i.toString(),r)}`),children:i},i)):null};Nm.displayName="Pages";const qa=({query:e,type:t="default",searchParams:r,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}=me(),{state:{page:f=1}}=Fe(),{pagination:{total:p}}=Pn(),{endPage:h,totalPages:_,startPage:g}=Vx({currentPage:f,total:p,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:i}),v=C=>{const j=C.toString(),x=new URLSearchParams(r.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 P=`${t==="search"?"/search":m}?${x.toString()}`;u.push(P)},b=C=>{v(C==="prev"?f-1:f+1)};return p?n.jsx("div",{...l,className:We["pdc--pagination"],children:n.jsx(d.Pagination.Wrapper,{adornment:{start:n.jsx(qo,{callback:b,currentPage:f,disabled:f<2,type:"left"}),end:n.jsx(qo,{callback:b,currentPage:f,disabled:f>=_,type:"right"})},children:n.jsx(Em,{endPage:h,page:f,selectedPage:v,total:p,ITEMS_PER_SECTION:o,children:n.jsx(Nm,{currentPage:f,pages:$x(g,h),searchParams:r,VARIANT_PAGINATION:c})})})}):null};qa.displayName="Pagination";const Im=({gap:e,isMobile:t,className:r})=>{const{state:s}=Fe(),{banners:o}=Cn(),{constants:a}=Me(),{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}=a,m=o.filter(f=>Bl(f.position_grid,s.page,(s==null?void 0:s.count)??1));return Array.isArray(m)?m.map((f,p)=>n.jsx(rt.Banner,{columns:f.columns,gap:e,isMobile:t,position_grid:f.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,children:n.jsx(wn,{name:"Banner Carousel",data:{banner:f,componentIndex:p},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r})},f.position_grid)):null};Im.displayName="PDC.Grid.Banners";const Rm=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,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:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:g,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{banners:x}=Cn(),{getAvailableProductTag:S}=Ot(),{state:P}=Fe(),[w,N]=y.useState(!1),[T,I]=y.useState(null),[O,M]=y.useState([]),H=y.useCallback((Z,V)=>{const ee=V?bn([V]):null;M(Z),I(ee!=null&&ee.length?ee[0]:null),N(!0)},[]),F=e?8:16,B=(P.page-1)*((P==null?void 0:P.count)??1),$=rt.helpers.createGridPosAndVideo(t,x,e?2:4,P.page),te=fs(x,P.page,e?2:4);return n.jsxs(n.Fragment,{children:[n.jsxs(rt.Root,{children:[Array.isArray(t)&&t.map((Z,V)=>{var ie;const ee=S(Z.node.cluster.highlights);return n.jsx(rt.Card,{gap:F,isMobile:e??!1,item:Z.node,order:te.products[B+V]+1,tag:ee,index:V,setSkuSelected:H,showVideo:(ie=$[V])==null?void 0:ie.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,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:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:g,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s}},Z.node.sku)}),t.length>0&&n.jsx(Im,{gap:F,isMobile:e??!1})]}),n.jsx(jn,{open:w,sku:T,skus:O,setSku:I,setVisible:N,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Rm.displayName="PDC.Products";const yt={Empty:Ia,Filters:dm,Grid:mm,InfiniteScroller:Pm,Spinner:Ra,Navigation:wm,Notification:jn,Pagination:qa,Products:Rm},Tm=({className:e})=>{const{constants:t}=Me(),{state:r,searchParams:s}=Fe(),{sendDataLayerEvent:o}=le(),a=y.useCallback(p=>{o({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:p.products}}})},[o]),{ITEMS_DEFAULT_SORT:i,ITEMS_PER_SECTION:c,ITEMS_PER_PAGE:l,PLP_INFINITE_SCROLL:u,SEARCH_PAGE_ITEM_THRESHOLD:m,VARIANT_PAGINATION:f}=t;return n.jsx("div",{className:d.helpers.classNameConcat(We.pdc,e),children:u===!0?n.jsx("div",{className:We["pdc--grid"],children:n.jsx(yt.Grid,{infinite:!0})}):n.jsxs(n.Fragment,{children:[n.jsxs(um,{state:r,children:[n.jsx(yt.Navigation,{}),n.jsx(yt.Filters,{})]}),n.jsxs(za,{callback:a,state:r,queryKey:["products",String(r==null?void 0:r.page),r.sort,JSON.stringify(Object.entries(r.facets??{}).sort())],options:{gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},children:[n.jsx("div",{className:We["pdc--grid"],children:n.jsx("div",{className:We["pdc--grid--content"],children:n.jsx(yt.Grid,{})})}),n.jsx(yt.Pagination,{searchParams:s,ITEMS_DEFAULT_SORT:i,ITEMS_PER_SECTION:c,ITEMS_PER_PAGE:l,SEARCH_PAGE_ITEM_THRESHOLD:m,VARIANT_PAGINATION:f})]})]})})};Tm.displayName="Templates.PDC";const Am=y.createContext({}),Wx=({children:e,...t})=>n.jsx(Am.Provider,{value:t,children:e}),Cs=()=>{const e=y.useContext(Am);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},Gx="_grid_e75z7_21",Kx="_navigation_e75z7_44",Qx="_spinner_e75z7_70",Xx="_sort_e75z7_76",Kt={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:Gx,"grid-header":"_grid-header_e75z7_37",navigation:Kx,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:Qx,sort:Xx,"search-result":"_search-result_e75z7_91"},km=({term:e})=>{const{router:t}=me(),{SEARCH_RESULT:r,ICONS:s}=Cs(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return n.jsxs("div",{className:Kt["rearch-result--empty"],children:[n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("div",{className:k.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),n.jsx("div",{className:k.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),n.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),n.jsx(d.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:n.jsx(d.Icon,{name:s.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};km.displayName="RearchResult.Empty";const Yx=e=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:k.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),n.jsx("div",{className:k.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),n.jsx(d.Spinner,{className:Kt.spinner})]}),Zx=(e,t,r)=>n.jsxs(n.Fragment,{children:[n.jsx("div",{className:k.responsive["responsive-desktop-flex"],children:n.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),n.jsx("div",{className:k.responsive["responsive-mobile-flex"],children:n.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),n.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),Om=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:s}=Cs();return n.jsx(d.TextStructure.DivWrapper,{children:e?Yx(s):Zx(t,s,r)})};Om.displayName="Search.Loading";const Jx=({term:e})=>{const[t,r]=y.useState(!1),{router:s}=me(),{searchParams:o}=Fe(),{ITEMS_DEFAULT_SORT:a,ITEMS_PER_PAGE:i,ICONS:c}=Cs(),l=u=>{k.navigateToSearchPage(s,e,i,1,u??a)};return n.jsx("div",{className:Kt.sort,children:n.jsx(vs,{handleSelectValue:u=>l(u??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:c})})},eb=({query:e})=>{const{isLoading:t,products:r,pagination:s}=Pn();return n.jsxs("div",{className:Kt["grid-header"],children:[n.jsxs("div",{className:Kt.navigation,children:[!t&&(r!=null&&r.length)?n.jsx(Jx,{term:e}):null,n.jsx(d.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?n.jsx("div",{className:Kt["result-disclaimer"],children:n.jsx(Om,{term:e,isLoading:t,quantity:s.count})}):null]})},Lm=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,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:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:g,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j})=>{const{getAvailableProductTag:x}=Ot(),{state:S}=Fe(),[P,w]=y.useState(!1),[N,T]=y.useState(null),[I,O]=y.useState([]),M=y.useCallback(($,te)=>{const Z=te?bn([te]):null;O($),T(Z!=null&&Z.length?Z[0]:null),w(!0)},[]),H=e?8:16,F=(S.page-1)*((S==null?void 0:S.count)??1),B=rt.helpers.createGridPosAndVideo(t,[],e?2:4,S.page);return n.jsxs(n.Fragment,{children:[n.jsx(rt.Root,{children:Array.isArray(t)&&t.map(($,te)=>{var V,ee;const Z=x($.node.cluster.highlights);return n.jsx(rt.Card,{gap:H,isMobile:e??!1,item:$.node,order:F+(((V=B[te])==null?void 0:V.position)??0),tag:Z,index:te,setSkuSelected:M,showVideo:(ee=B[te])==null?void 0:ee.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,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:f,PRODUCT_CARD_IMAGE_ASPECT_RATIO:p,PRODUCT_CARD_TEXTS:h,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:_,PRODUCT_IMAGE_DIMENSIONS:g,SECOND_IMAGE:v,StoreConfig_MainSellerId:b,TEXTURE_IMAGE:C,Z_INDEX_WAR:j,ICONS:s}},$.node.sku)})}),n.jsx(jn,{open:P,sku:N,skus:I,setSku:T,setVisible:w,ICONS:s,NEWSLETTER_CONFIGS:a,NOTIFY_INFO:i,PRODUCT_CARD_TEXTS:h,Z_INDEX_WAR:j})]})};Lm.displayName="PDC.Products";const Mm=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:s,pagination:o}=Pn(),{searchParams:a}=Fe(),i=Cs(),c=y.useMemo(()=>!r&&s.length>0&&o.count>0,[r,s.length,o.count]);return n.jsxs("div",{className:Kt.grid,children:[c&&n.jsx(eb,{query:t}),!r&&(s!=null&&s.length)?n.jsx(Lm,{...i,isMobile:e??!1,items:s}):null,(s==null?void 0:s.length)===0&&!r?n.jsx(km,{term:t}):null,c&&n.jsx(qa,{searchParams:a,...i})]})};Mm.displayName="SearchResultContent";const tb=({className:e})=>{const{state:t}=Fe(),{sendDataLayerEvent:r}=le(),{isMobile:s}=se(),o=y.useCallback(a=>{var i;r({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t==null?void 0:t.query,search_found:((i=a==null?void 0:a.products)==null?void 0:i.length)>0}}})},[r,t==null?void 0:t.query]);return n.jsx(za,{callback:a=>o(a),forceUpdate:!1,queryKey:["search",t.query,t.term??"",String(t.page),t.sort],options:{gcTime:1e3*60*30,staleTime:1e3*60*5,refetchOnWindowFocus:!1},state:t,children:n.jsx("div",{className:d.helpers.classNameConcat(Kt["search-result"],e),children:n.jsx(Mm,{currentPage:t.page,isMobile:s??!1,query:t.term??""})})})},rb=new Rl,Dm=({className:e,searchParams:t,CONSTANTS:r})=>{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 n.jsx(Al,{client:rb,children:n.jsx(Wx,{...r,children:n.jsx(_a,{state:{sort:c,query:o,base:"",facets:[],term:o,page:i,count:a},searchParams:s,children:n.jsx(tb,{className:e})})})})};Dm.displayName="Search";const nb=({page:e,data:t})=>{const{pathname:r}=me(),s=y.useRef(null),{sendDataLayerEvent:o,currentLocalRef:a,itemListRef:i,promotionEventRef:c}=le();return y.useEffect(()=>{const l=ql("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}}}),xa("login_event","",{expires:m})}},[]),y.useEffect(()=>{if(s.current===r)return;s.current=r;let l={};switch(e){case"PDP":{const m=t,f={};if(!m){l={page_category:"pdp"};break}m.items.forEach(({itemId:p,sellers:h})=>f[p]=h[0].commertialOffer.AvailableQuantity),l={page_category:"pdp",seller_ids:m.items.map(({sellers:p})=>p[0].sellerId).join(),skuStocks:f,product_reference_id:m.productReference};break}case"PDC":{const{page_category:m,page_departament:f,id:p,name:h}=Uc(),_=h,g=p;l={page_category:"lista_produtos",...f&&{page_departament:f}},i.current={item_list_name:r==="/search"?"busca":_??void 0,item_list_id:r==="/search"?void 0:g??void 0},f&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:m,page_departament:f}}});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})},[r]),null};var $o={exports:{}},Kn={exports:{}},lc;function sb(){return lc||(lc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var m in u)Object.defineProperty(l,m,{enumerable:!0,get:u[m]})}r(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 f=document.createElement(u);for(const _ in m){if(!m.hasOwnProperty(_)||_==="children"||_==="dangerouslySetInnerHTML"||m[_]===void 0)continue;const g=s[_]||_.toLowerCase();u==="script"&&(g==="async"||g==="defer"||g==="noModule")?f[g]=!!m[_]:f.setAttribute(g,m[_])}const{children:p,dangerouslySetInnerHTML:h}=m;return h?f.innerHTML=h.__html||"":p&&(f.textContent=typeof p=="string"?p:Array.isArray(p)?p.join(""):""),f}function a(l,u){if(l instanceof HTMLElement&&u instanceof HTMLElement){const m=u.getAttribute("nonce");if(m&&!l.getAttribute("nonce")){const f=u.cloneNode(!0);return f.setAttribute("nonce",""),f.nonce=m,m===l.nonce&&l.isEqualNode(f)}}return l.isEqualNode(u)}let i;process.env.__NEXT_STRICT_NEXT_HEAD?i=(l,u)=>{const m=document.querySelector("head");if(!m)return;const f=m.querySelectorAll('meta[name="next-head"]')||[],p=[];if(l==="meta"){const g=m.querySelector("meta[charset]");g&&p.push(g)}for(let g=0;g<f.length;g++){var h;const b=f[g].nextSibling;(b==null||(h=b.tagName)==null?void 0:h.toLowerCase())===l&&p.push(b)}const _=u.map(o).filter(g=>{for(let v=0,b=p.length;v<b;v++){const C=p[v];if(a(C,g))return p.splice(v,1),!1}return!0});p.forEach(g=>{var v;const b=g.previousSibling;if(b&&b.getAttribute("name")==="next-head"){var C;(C=g.parentNode)==null||C.removeChild(b)}(v=g.parentNode)==null||v.removeChild(g)}),_.forEach(g=>{var v;const b=document.createElement("meta");b.name="next-head",b.content="1",((v=g.tagName)==null?void 0:v.toLowerCase())==="meta"&&g.getAttribute("charset")||m.appendChild(b),m.appendChild(g)})}:i=(l,u)=>{const m=document.getElementsByTagName("head")[0],f=m.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!f){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const p=Number(f.content),h=[];for(let v=0,b=f.previousElementSibling;v<p;v++,b=(b==null?void 0:b.previousElementSibling)||null){var _;(b==null||(_=b.tagName)==null?void 0:_.toLowerCase())===l&&h.push(b)}const g=u.map(o).filter(v=>{for(let b=0,C=h.length;b<C;b++){const j=h[b];if(a(j,v))return h.splice(b,1),!1}return!0});h.forEach(v=>{var b;return(b=v.parentNode)==null?void 0:b.removeChild(v)}),g.forEach(v=>m.insertBefore(v,f)),f.content=(p-h.length+g.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 h=u[p.type]||[];h.push(p),u[p.type]=h});const m=u.title?u.title[0]:null;let f="";if(m){const{children:p}=m.props;f=typeof p=="string"?p:Array.isArray(p)?p.join(""):""}f!==document.title&&(document.title=f),["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)}(Kn,Kn.exports)),Kn.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(P,w){for(var N in w)Object.defineProperty(P,N,{enumerable:!0,get:w[N]})}r(t,{default:function(){return S},handleClientScriptLoad:function(){return v},initScriptLoader:function(){return j}});const s=Ge,o=gr,a=n,i=s._(oa),c=o._(y),l=zf(),u=sb(),m=Du(),f=new Map,p=new Set,h=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],_=P=>{if(i.default.preinit){P.forEach(w=>{i.default.preinit(w,{as:"style"})});return}if(typeof window<"u"){let w=document.head;P.forEach(N=>{let T=document.createElement("link");T.type="text/css",T.rel="stylesheet",T.href=N,w.appendChild(T)})}},g=P=>{const{src:w,id:N,onLoad:T=()=>{},onReady:I=null,dangerouslySetInnerHTML:O,children:M="",strategy:H="afterInteractive",onError:F,stylesheets:B}=P,$=N||w;if($&&p.has($))return;if(f.has(w)){p.add($),f.get(w).then(T,F);return}const te=()=>{I&&I(),p.add($)},Z=document.createElement("script"),V=new Promise((ee,ie)=>{Z.addEventListener("load",function(_e){ee(),T&&T.call(this,_e),te()}),Z.addEventListener("error",function(_e){ie(_e)})}).catch(function(ee){F&&F(ee)});O?(Z.innerHTML=O.__html||"",te()):M?(Z.textContent=typeof M=="string"?M:Array.isArray(M)?M.join(""):"",te()):w&&(Z.src=w,f.set(w,V));for(const[ee,ie]of Object.entries(P)){if(ie===void 0||h.includes(ee))continue;const _e=u.DOMAttributeNames[ee]||ee.toLowerCase();Z.setAttribute(_e,ie)}H==="worker"&&Z.setAttribute("type","text/partytown"),Z.setAttribute("data-nscript",H),B&&_(B),document.body.appendChild(Z)};function v(P){const{strategy:w="afterInteractive"}=P;w==="lazyOnload"?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>g(P))}):g(P)}function b(P){document.readyState==="complete"?(0,m.requestIdleCallback)(()=>g(P)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>g(P))})}function C(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(w=>{const N=w.id||w.getAttribute("src");p.add(N)})}function j(P){P.forEach(v),C()}function x(P){const{id:w,src:N="",onLoad:T=()=>{},onReady:I=null,strategy:O="afterInteractive",onError:M,stylesheets:H,...F}=P,{updateScripts:B,scripts:$,getIsSsr:te,appDir:Z,nonce:V}=(0,c.useContext)(l.HeadManagerContext),ee=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const _e=w||N;ee.current||(I&&_e&&p.has(_e)&&I(),ee.current=!0)},[I,w,N]);const ie=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{ie.current||(O==="afterInteractive"?g(P):O==="lazyOnload"&&b(P),ie.current=!0)},[P,O]),(O==="beforeInteractive"||O==="worker")&&(B?($[O]=($[O]||[]).concat([{id:w,src:N,onLoad:T,onReady:I,onError:M,...F}]),B($)):te&&te()?p.add(w||N):te&&!te()&&g(P)),Z){if(H&&H.forEach(_e=>{i.default.preinit(_e,{as:"style"})}),O==="beforeInteractive")return N?(i.default.preload(N,F.integrity?{as:"script",integrity:F.integrity,nonce:V,crossOrigin:F.crossOrigin}:{as:"script",nonce:V,crossOrigin:F.crossOrigin}),(0,a.jsx)("script",{nonce:V,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([N,{...F,id:w}])+")"}})):(F.dangerouslySetInnerHTML&&(F.children=F.dangerouslySetInnerHTML.__html,delete F.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:V,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...F,id:w}])+")"}}));O==="afterInteractive"&&N&&i.default.preload(N,F.integrity?{as:"script",integrity:F.integrity,nonce:V,crossOrigin:F.crossOrigin}:{as:"script",nonce:V,crossOrigin:F.crossOrigin})}return null}Object.defineProperty(x,"__nextScript",{value:!0});const S=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)})($o,$o.exports);var ob=$o.exports,ab=ob;const Ha=k.getDefaultExportFromCjs(ab),ib=({children:e,ONE_TRUST:t})=>n.jsxs(n.Fragment,{children:[n.jsx(Ha,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),cb=Od(()=>Promise.resolve(ib),{ssr:!1}),lb="_lgpd_vffd3_82",ub="_success_vffd3_248",db="_error_vffd3_312",Pe={"newsletter-root":"_newsletter-root_vffd3_1","has-border-top":"_has-border-top_vffd3_9","has-border-bottom":"_has-border-bottom_vffd3_12","newsletter-container":"_newsletter-container_vffd3_20","content-text":"_content-text_vffd3_35","form-wrapper":"_form-wrapper_vffd3_39","newsletter-container-banner":"_newsletter-container-banner_vffd3_64",lgpd:lb,"textfield-structure-modifier":"_textfield-structure-modifier_vffd3_190","input-wrapper-modifier":"_input-wrapper-modifier_vffd3_196","submit-btn":"_submit-btn_vffd3_200","loading-spinner":"_loading-spinner_vffd3_211","terms-and-conditions-checkbox":"_terms-and-conditions-checkbox_vffd3_217","terms-and-conditions-unchecked":"_terms-and-conditions-unchecked_vffd3_230","terms-and-conditions-checked":"_terms-and-conditions-checked_vffd3_244",success:ub,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:db,"newsletter-wrapper":"_newsletter-wrapper_vffd3_332","banner-container":"_banner-container_vffd3_345","newsletter-provider-wrapper":"_newsletter-provider-wrapper_vffd3_358","newsletter-root-banner":"_newsletter-root-banner_vffd3_371","banner-background":"_banner-background_vffd3_392","newsletter-provider-wrapper-background":"_newsletter-provider-wrapper-background_vffd3_401"},Fm=({invalid_message:e,master_data_field:t,placeholder:r,required:s=!1,CONSTANTS:o})=>{const{isMobile:a}=se(),{inputsStatus:i,setInputsStatus:c,setFormStatus:l,variant:u}=Ca();return n.jsx(d.TextField.Structure,{className:`${Pe["textfield-structure-modifier"]} ${u}`,input:n.jsx(d.TextField.Input,{mode:"simple",label:r,sizeVariant:a?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${Pe["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"?n.jsx("div",{className:u==="horizontal"?Pe["support-text-modifier"]:"",children:n.jsx(d.TextField.SupportText,{text:i[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};Fm.displayName="Newsletter.Input";const zm=({formStatus:e,fields:t,CONSTANTS:r})=>n.jsxs(n.Fragment,{children:[Array.isArray(t)&&t.map((s,o)=>n.jsx(Fm,{invalid_message:s.invalid_message,master_data_field:s.master_data_field,placeholder:s.placeholder,required:s.required,type:s.type,CONSTANTS:r},`nt-field-${s.master_data_field}-${o}`)),e==="error"&&n.jsx("div",{className:Pe.error,children:n.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});zm.displayName="Newsletter.FormFields";const Bm=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:s}=se();return n.jsxs(d.Button,{...r,className:Pe["submit-btn"],disabled:e==="success",size:s?"medium":"large",children:[n.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&n.jsx(d.Spinner,{className:Pe["loading-spinner"],size:"small"})]})};Bm.displayName="Newsletter.SubmitButton";const Um=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:s})=>{const o=a=>{a.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return n.jsxs(n.Fragment,{children:[n.jsx(d.Checkbox,{adornment:n.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:Pe["terms-and-conditions-checkbox"]}),t==="unchecked"&&n.jsx("div",{className:Pe["terms-and-conditions-unchecked"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:s.ICONS.alert_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{children:s.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};Um.displayName="Newsletter.Terms";const qm=({title:e,description:t,CONSTANTS:r})=>n.jsx("div",{className:Pe.success,children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{className:Pe["text-structure-modifier"],children:[n.jsxs("div",{className:Pe["success-title"],children:[n.jsx(d.Icon,{name:r.ICONS.check_circle,size:"medium"}),n.jsx("h3",{children:e})]}),n.jsx("p",{children:t})]})})});qm.displayName="Newsletter.Success";const Hm=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:s,lgpdLinkLable:o,lgpdLink:a,variant:i,CONSTANTS:c})=>{const{checkboxRef:l,fields:u,formStatus:m,hasTermsAndConditions:f,handleClickToSubmit:p,handleSubmit:h,setFormStatus:_}=Ca();return n.jsx(n.Fragment,{children:m==="success"?n.jsx(qm,{description:c.NEWSLETTER_CONFIGS.messages.success_description,title:c.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:c}):n.jsxs(n.Fragment,{children:[n.jsxs("form",{className:Pe["form-wrapper"],onSubmit:g=>h(g,e,t),children:[n.jsx(zm,{formStatus:m,fields:u,CONSTANTS:c}),f&&n.jsx(Um,{checkboxRef:l,formStatus:m,setFormStatus:_,CONSTANTS:c}),n.jsx(Bm,{formStatus:m,type:"submit",variant:"primary",onClick:p,CONSTANTS:c})]}),(r||i==="vertical")&&n.jsxs("div",{className:Pe.lgpd,children:[s&&n.jsx("p",{children:s}),o&&n.jsx(Ke,{href:a,children:o})]})]})})};Hm.displayName="Newsletter.Form";const fb=["horizontal","vertical"],$a=({className:e,description:t,formPayloadOptionals:r,fields:s,masterDataEntity:o,masterDataEmailField:a,masterDataNameField:i,banner:c,altBanner:l,bannerBackground:u,termsDescription:m,lgpdLinkLable:f,lgpdLink:p,title:h,variant:_,borderTop:g,borderBottom:v,CONSTANTS:b,actionName:C="cadastrou-newsletter",originName:j="",...x})=>{if(!a||!i)return null;const S=d.helpers.ValidateProp({fieldTypes:fb,property:_,fallback:"horizontal"});return n.jsxs("div",{className:c?u?Pe["banner-background"]:Pe["newsletter-wrapper"]:"",children:[c&&n.jsx(d.Banner.Container,{className:Pe["banner-container"],children:n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Oe.Image,{src:c,alt:l,width:"1920",height:"500"})})}),n.jsx("div",{className:c?Pe["newsletter-provider-wrapper"+(u?"-background":"")]:"",children:n.jsx(uu,{dito:{actionName:C,originName:j},fields:s,masterDataEmailField:a,masterDataNameField:i,variant:S,CONSTANTS:b,children:n.jsx("div",{...x,className:d.helpers.classNameConcat(Pe["newsletter-root"+(c||S==="vertical"?"-banner":"")],[g&&Pe["has-border-top"],v&&Pe["has-border-bottom"],e].filter(Boolean)),"data-variant":S,children:n.jsxs("div",{className:c||S==="vertical"?Pe["newsletter-container-banner"]:Pe["newsletter-container"],children:[n.jsxs("div",{className:Pe["content-text"],children:[n.jsx("h2",{children:h}),n.jsx("p",{children:t}),!c&&S==="horizontal"&&n.jsxs("div",{className:Pe.lgpd,children:[n.jsx("p",{children:m}),f&&n.jsx(Ke,{target:"_blank",href:p,children:f})]})]}),n.jsx(Hm,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:b,banner:c,lgpdLink:p,lgpdLinkLable:f,termsDescription:m,variant:S})]})})})})]})};$a.displayName="Newsletter";const $m=({children:e,...t})=>n.jsx("div",{...t,children:e});$m.displayName="CallToAction";const mb="_wrapper_aejhu_1",pb="_body_aejhu_8",ls={wrapper:mb,body:pb,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},hb=({children:e,className:t,...r})=>n.jsx("div",{...r,className:d.helpers.classNameConcat(ls.wrapper,t),children:e}),_b=({data:e,ICONS:t})=>{const[r,s]=y.useState(null),o=i=>{s(c=>c===i?null:i)},{router:a}=me();return n.jsx("div",{className:d.helpers.classNameConcat(ls.body),children:Array.isArray(e)&&(e==null?void 0:e.map((i,c)=>{var f;const l=r===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 n.jsx("div",{children:i.type==="button"?n.jsxs(n.Fragment,{children:[n.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}),n.jsx(d.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):n.jsxs(d.Accordion.Wrapper,{className:d.helpers.classNameConcat(ls["accordion-modifier"]),children:[n.jsx(d.Accordion.Header,{id:`${c}-${i.title}`,closeIndicator:l?n.jsx(d.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:l?void 0:n.jsx(d.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(i.id),children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:"typography-style-body-sm",children:i.title})})})}),n.jsx(d.Accordion.Body,{title:"accordion-body",children:n.jsx(d.TextStructure.Root,{children:l&&n.jsxs(d.TextStructure.DivWrapper,{children:[i.subtitle?n.jsx("h3",{className:"typography-style-body-md",children:i.subtitle}):n.jsx(n.Fragment,{}),n.jsx("p",{className:"typography-style-caption",children:i.description}),i.buttonLabel&&i.buttonHref?n.jsx(Ke,{href:i.buttonHref??"#",mode:i.buttonMode??"default",size:i.buttonSize??"medium",adornments:(f=i.buttonIcon)!=null&&f.length?{end:n.jsx(d.Icon,{name:t[i.buttonIcon]??i.buttonIcon})}:void 0,children:i.buttonLabel}):n.jsx(n.Fragment,{})]})})})]})},i.id)}))})},gb=({className:e,data:t,ICONS:r,...s})=>{const[o,a]=y.useState(!1),[i,c]=y.useState(null);y.useEffect(()=>{!o&&!i&&t&&c(t)},[o,i]);const l=y.useCallback(()=>{a(u=>!u)},[]);return i?n.jsxs(hb,{...s,className:e,children:[n.jsx("div",{className:ls["wrapper-body"],hidden:!o,children:o&&n.jsx(_b,{data:i.content,ICONS:r})}),n.jsx($m,{children:n.jsx("div",{onClick:l,children:o?n.jsx(d.Button,{iconNameEnd:r.close,size:(i==null?void 0:i.helpButtonSize)??"x-large"}):n.jsx(d.Button,{iconNameStart:(i==null?void 0:i.iconLabel)??r.help,size:(i==null?void 0:i.helpButtonSize)??"x-large",children:i==null?void 0:i.label})})})]}):n.jsx(n.Fragment,{})},yb="_formContainer_zwlly_1",vb="_formFieldGroup_zwlly_6",xb="_formFieldGroupName_zwlly_10",bb="_formFieldWrapper_zwlly_20",jb="_formFieldInput_zwlly_30",Cb="_success_zwlly_73",Sb="_button_zwlly_110",Pb="_error_zwlly_114",Et={formContainer:yb,formFieldGroup:vb,formFieldGroupName:xb,formFieldWrapper:bb,formFieldInput:jb,success:Cb,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:Sb,error:Pb},wb=({group:e,children:t,className:r})=>n.jsx(n.Fragment,{children:n.jsxs("div",{className:d.helpers.classNameConcat(Et.formFieldGroup,r),children:[n.jsx("h1",{className:Et.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)}),Vm=y.createContext({});function Wm({children:e,groups:t,masterDataEntity:r,postFn:s,actionName:o="",originName:a="",POPUP_SUBMITTED_STORAGE:i}){const[c,l]=y.useState(!1),[u,m]=y.useState({}),[f,p]=y.useState([]),[h,_]=y.useState("idle"),[g,v]=y.useState(""),b=({target:{name:j,value:x}})=>{m({...u,[j]:x})},C=j=>{j.preventDefault(),s({body:{masterDataEntity:r,payload:u}}).then(async({Message:x})=>{if(x){const P=x.match(/'(.*?[^\\])'/g)||[];var S="-";for(const w of P){const N=w.substring(1,w.length-1),I=t.flatMap(O=>O.fields).find(({name:O})=>O===N);v(N),I&&(S=I.name)}return _("error"),p([S])}if(u.email){const P=await iu(u.email||""),w=new Date().toISOString();cu([{user_id:P,timestamp:w,type:"IDENTIFY",traits:{id:P,created_at:w,name:u.name,email:u.email,phone:u==null?void 0:u.phone}},{action:o,timestamp:w,type:"TRACK",user_id:P,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 n.jsx(Vm.Provider,{value:{formErrors:f,handleInputChange:b,submitForm:C,formData:u,status:h,fieldMessage:g,success:c,setSuccess:l},children:e})}function Ss(){return y.useContext(Vm)}const Eb=({fields:e,className:t})=>{const{formData:r,handleInputChange:s,formErrors:o}=Ss();return n.jsx("div",{className:d.helpers.classNameConcat(Et.formFieldWrapper,t),children:e.map(({label:a,name:i,required:c,width:l="medium"})=>n.jsx(d.TextField.Input,{label:`${a}${c?"*":""}`,title:i,value:r[i]||"",name:i,sizeVariant:"large",onChange:s,required:c,feedback:o.includes(i)?"error":"none",className:Et.formFieldInput,"data-inputsize":l},i))})},Nb=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=me();return n.jsxs("div",{className:Et.success,children:[n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.check_circle,size:"medium"})},children:n.jsx(d.TextStructure.DivWrapper,{className:Et["text-structure-modifier"],children:n.jsx("p",{children:e.successMessage})})}),n.jsx(d.Button,{size:"large",onClick:()=>r.push("/"),className:Et.button,children:e.returnButton})]})},Ib=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=Ss();return n.jsx("div",{className:Et.error,children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:t.delete_circle,size:"small"})},children:n.jsx(d.TextStructure.DivWrapper,{className:Et["text-structure-modifier"],children:n.jsxs("p",{children:[e.errorMessage,r]})})})})},Rb=({children:e,className:t,ICONS:r,FORM_CONFIGS:s})=>{const{submitForm:o,status:a}=Ss();return n.jsx("form",{onSubmit:o,className:d.helpers.classNameConcat(Et.formContainer,t),children:a==="success"?n.jsx(Nb,{ICONS:r,FORM_CONFIGS:s}):n.jsxs(n.Fragment,{children:[e,a==="error"&&n.jsx(Ib,{ICONS:r,FORM_CONFIGS:s})]})})},Tb=e=>{const{children:t,className:r}=e;return n.jsx(Wm,{...e,children:n.jsx(Rb,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Tr={Root:Tb,FieldGroup:wb,FieldWrapper:Eb},Ab="_button_1e35m_39",er={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Ab,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function kb({content:e,sections:t,FORM_CONFIGS:r,ICONS:s,postFn:o,POPUP_SUBMITTED_STORAGE:a}){var l;const{isMobile:i}=se(),c=((l=t.find(({name:u})=>u==="Form"))==null?void 0:l.data)||{};return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:er["banner-container"],children:[n.jsx(d.Banner.ImageWrapper,{children:n.jsx(Oe.Image,{className:er["banner-background"],src:i?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),n.jsxs(Tr.Root,{postFn:o,ICONS:s,FORM_CONFIGS:r,groups:c.groups||[],masterDataEntity:c.masterDataEntity||"",className:er["form-root"],POPUP_SUBMITTED_STORAGE:a,children:[c.groups.map(u=>n.jsx(Tr.FieldGroup,{group:u,children:n.jsx(Tr.FieldWrapper,{fields:u.fields,className:er["form-fied-wrapper"]})},u.groupLabel)),n.jsxs("div",{children:[n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),n.jsx("div",{className:er["button-wrapper"],children:n.jsx("div",{className:er["button-frame"],children:n.jsx(d.Button,{size:"large",type:"submit",className:er.button,children:e.buttonLabel})})})]})]})]})})}const Ob="_content_1jj9i_36",Lb="_trends_1jj9i_47",Mb="_modal_1jj9i_1",nt={"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:Ob,trends:Lb,"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:Mb,"search-modal__modal":"_search-modal__modal_1jj9i_100"},Gm=y.createContext({}),Db=({children:e,term:t})=>{const[r,s]=y.useState([]),[o,a]=y.useState(!1);return y.useEffect(()=>{if(!t){s([]);return}(async()=>{a(!0);try{const c=await k.fetchProxy("/_v/proxy/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]),n.jsx(Gm.Provider,{value:y.useMemo(()=>({suggestedTerms:r,loading:o,setLoading:a}),[r,o]),children:e})},Fb=({children:e,...t})=>n.jsx(Db,{...t,children:e}),zb=()=>{const e=y.useContext(Gm);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},co=(e,t,r=24,s=1,o="release:desc")=>{const a=`/search?query=${t??""}&count=${r}&page=${s}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(a)},Km=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:s,handleClose:o,setTerm:a,ICONS:i,ITEMS_DEFAULT_SORT:c,ITEMS_PER_PAGE:l,SEARCH_MODAL:u})=>{const[m,f]=y.useState(""),{suggestedTerms:p,loading:h,setLoading:_}=zb(),{router:g}=me(),v=y.useRef(null),b=x=>{f(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(),co(g,m,l,1,c))},j=x=>{o(),co(g,x,l,1,c)};return y.useEffect(()=>{if(clearTimeout(v.current),m.length<=2||p.length>0){_(!1);return}return _(!0),v.current=setTimeout(()=>{co(g,m,l,1,c),_(!1),o()},2e3),()=>{clearTimeout(v.current)}},[m,p]),n.jsx(d.DropDown.AutoComplete,{className:nt["modal-auto-complete"],onKeyDown:C,onInputChange:b,placeholder:e,stopClickPropagation:!1,adornment:{end:h?n.jsx(d.Spinner,{size:"small"}):n.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&&n.jsx(n.Fragment,{children:(p==null?void 0:p.length)>0&&(m==null?void 0:m.length)>2?n.jsx(d.DropDown.AutoCompleteList,{className:nt["modal-auto-complete__dropdown"],seeAll:n.jsx("span",{onClick:()=>j(m),children:s+m}),children:p.map((x,S)=>n.jsx(d.DropDown.ListItemWithLink,{children:n.jsx(Ke,{href:`/search?query=${x.term}&count=${l}&page=1`,size:"x-small",title:x.term,disableUnderline:!0,disablePadding:!1,onClick:P=>{P.preventDefault(),o()},children:x.term})},`key-${x.term}-${S}`))}):!h&&(m==null?void 0:m.length)>3&&(p==null?void 0:p.length)===0&&n.jsxs(d.DropDown.AutoCompleteList,{className:nt["modal-search-empty"],children:[n.jsx(d.DropDown.NotResults,{description:r,title:t}),n.jsx(d.Button,{className:"all-terms",onClick:()=>{o(),g.push(u.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:u.EMPTY.ALL_TERMS_LABEL,adornment:{end:n.jsx(d.Icon,{name:i.arrow_right,size:"medium"})},children:u.EMPTY.ALL_TERMS_LABEL})]})})})};Km.displayName="SearchModal.AutoComplete";function Bb({title:e,ICONS:t}){const{isMobile:r}=se();return n.jsx(d.Modal.Header,{navigation:"top",className:nt["modal-header"],children:n.jsxs(d.Modal.Controls,{navigation:"top",isMobile:!!r,children:[n.jsx(d.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),n.jsx(d.Modal.Title,{navigation:"top",className:nt["search-modal__title"],title:e}),n.jsx(d.Button,{className:nt["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const Qm=y.createContext({searches:[],isLoading:!1,error:null});let lo=null;const Ub=({children:e})=>{const[t,r]=y.useState([]),[s,o]=y.useState(!0),[a,i]=y.useState(null);return y.useEffect(()=>{(async()=>{try{if(o(!0),lo){r(lo),o(!1);return}const l=await k.fetchProxy("/_v/proxy/search/topSearch");if(!l.ok)throw new Error(`Erro ao buscar os dados: ${l.status}`);const m=(await l.json()).data.searches||[];lo=m,r(m)}catch(l){i(l instanceof Error?l.message:"Erro desconhecido")}finally{o(!1)}})()},[]),n.jsx(Qm.Provider,{value:y.useMemo(()=>({searches:t,isLoading:s,error:a}),[t,s,a]),children:e})},qb=()=>{const e=y.useContext(Qm);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},Hb=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:s,handleClose:o,ICONS:a,ITEMS_PER_PAGE:i})=>{const{searches:c,isLoading:l}=qb(),{router:u}=me(),m=Array.isArray(c)?c:[];return n.jsx(n.Fragment,{children:!l&&m.length>0?n.jsx(d.ComponentList.Structure,{className:nt.trends,title:e,children:n.jsxs("div",{className:nt["trends-content"],children:[n.jsx(d.ComponentList.List,{columns:1,children:m.slice(0,s).map((f,p)=>n.jsx(d.ComponentList.ListItem,{className:nt["trends-item"],children:n.jsx(Ke,{href:`/search?query=${f.term}&count=${i}&page=1`,size:"x-small",adornments:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},disableUnderline:!0,title:f.term,onClick:()=>o(),children:f.term})},`list-item-${p}`))}),n.jsx(d.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),u.push(r)},adornment:{end:n.jsx(d.Icon,{name:a.arrow_right,size:"x-small"})},children:t})]})}):null})};function $b({SectionZone:e}){var s;const[t,r]=y.useState(null);return y.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();r(i)}catch(a){console.error("[CMS FETCH ERROR]",a)}})()},[]),n.jsx("div",{className:nt.content,children:t!==null&&n.jsx(e,{data:((s=t[0])==null?void 0:s.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const Xm=({className:e,trends:t,CONSTANTS:r,SectionZone:s})=>{const[o,a]=y.useState(""),{isMobile:i}=se(),c=sl(),{setValue:l}=ds(),{SEARCH_MODAL:u,ICONS:m,ITEMS_PER_PAGE:f,ITEMS_DEFAULT_SORT:p}=r;return n.jsxs(d.Modal.Root,{isMobile:i??!1,variant:i?"sideBottom":"sideRight",isOpen:c,setIsOpen:l,className:`${nt.modal} ${nt["search-modal__modal"]} ${e??""}`,children:[n.jsx(Bb,{title:u.HEADER.TITLE,ICONS:m}),n.jsxs(d.Modal.Body,{className:nt["modal-content-body"],children:[n.jsx(Fb,{term:o,children:n.jsx(Km,{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:f,SEARCH_MODAL:u})}),t?n.jsx(Ub,{children:n.jsx(Hb,{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:f})}):null,n.jsx($b,{SectionZone:s})]})]})};Xm.displayName="SearchModal";const ut={"store--page-title":"_store--page-title_1rs1a_1","store--page-title--title":"_store--page-title--title_1rs1a_4","store--return-button":"_store--return-button_1rs1a_14","store--section":"_store--section_1rs1a_36","store--section--img":"_store--section--img_1rs1a_41","store--details":"_store--details_1rs1a_51","store--details--title":"_store--details--title_1rs1a_59","store--details--subtitle":"_store--details--subtitle_1rs1a_68","store--details--text":"_store--details--text_1rs1a_77","store--details--vendor":"_store--details--vendor_1rs1a_87","store--select":"_store--select_1rs1a_91","store--wrapper":"_store--wrapper_1rs1a_115"},Ym=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:s,selectedStore:o}=ms();return n.jsx(d.Card,{padding:"small",shadow:!0,className:ut["store--wrapper"],children:o?n.jsxs(n.Fragment,{children:[n.jsx(wt.ReturnButton,{ICONS:t,children:e}),n.jsx(wt.Details,{ICONS:t,showVendor:r,store:s==null?void 0:s.find(a=>a.nome===o)})]}):n.jsx(wt.Select,{ICONS:t})})};Ym.displayName="LPStores.Content";const tn=({title:e,text:t,type:r,...s})=>n.jsx(d.TextStructure.DivWrapper,{...s,children:r==="title"?n.jsx("h4",{className:ut["store--details--title"],children:e}):n.jsxs(n.Fragment,{children:[n.jsx("h5",{className:ut["store--details--subtitle"],children:e}),n.jsx("p",{className:ut["store--details--text"],children:t})]})});tn.displayName="LPStores.Details";const Zm=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return n.jsxs(d.Accordion.Wrapper,{style:{width:"100%"},children:[n.jsx(d.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:n.jsx(d.Icon,{name:t.arrow_up,size:"small"}),openIndicator:n.jsx(d.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{gap:0,children:n.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:ut["store--details--vendor"],children:r.map((s,o)=>n.jsx("p",{className:"typography-style-body-sm",children:s.trim()},o))})})})]})};Zm.displayName="LPStores.Details";const Jm=({store:e,showVendor:t,ICONS:r})=>n.jsxs("div",{className:ut["store--details"],children:[n.jsx(tn,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),n.jsx(tn,{title:"Endereço",text:String(e.endereco)}),e.telefone&&n.jsx(tn,{title:"Telefone",text:String(e.telefone)}),e.horario&&n.jsx(tn,{title:"Horário de funcionamento",text:String(e.horario)}),t&&n.jsx(Zm,{ICONS:r,vendor:String(e.vendedoras)})]});Jm.displayName="LPStores.Details";const ep=({ICONS:e,arrowDownIcon:t=n.jsx(d.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=n.jsx(d.Icon,{name:e.arrow_up,size:"small"}),list:s,selectText:o,...a})=>n.jsx(d.DropDown.DefaultDropDown,{...a,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:o,sizeVariant:"large",children:n.jsx(d.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(s)&&(s==null?void 0:s.map(i=>n.jsx(d.DropDown.ListItem,{value:i,children:i},i.replace(/\s/g,""))))})});ep.displayName="LPStores.DropDown";const tp=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=ms(),s=()=>{typeof r=="function"&&r()};return n.jsxs("button",{"aria-label":String(e),className:ut["store--return-button"],onClick:s,onKeyDown:s,children:[n.jsx(d.Icon,{name:t.arrow_left,size:"small"}),e]})};tp.displayName="LPStores.ReturnButton";const rp=({children:e,data:t})=>n.jsx(fu,{data:t,children:e});rp.displayName="LPStores.Root";const np=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:s})=>{const{isMobile:o}=se();return n.jsxs("section",{className:ut["store--section"],children:[n.jsx(un,{src:o?s:r,alt:t,fill:!0,className:ut["store--section--img"]}),e]})};np.displayName="LPStores.Section";const sp=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:s,handleSelectStore:o}=ms(),a=new Set(t.map(c=>c.cidade)),i=Array.from(a).filter(c=>typeof c=="string");return n.jsxs("div",{className:ut["store--select"],children:[n.jsx(wt.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:i,defaultValue:s==null?void 0:s[0].cidade,ICONS:e}),n.jsx(wt.DropDown,{"data-selected-city":!!s,selectText:"Selecione a loja",handleSelectedValue:o,list:s?s==null?void 0:s.map(c=>String(c.nome)):[],ICONS:e},s==null?void 0:s[0].cidade)]})};sp.displayName="LPStores.Select";const op=({children:e})=>n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:ut["store--page-title"],children:n.jsx("h2",{className:ut["store--page-title--title"],children:e})})});op.displayName="LPStores.Title";const wt={Content:Ym,Details:Jm,DropDown:ep,ReturnButton:tp,Root:rp,Section:np,Select:sp,Title:op};var ap={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 Vb(e,t,r){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 Wb(e,t,r){console.log(`%c[DT - ${r}] EVENTO DISPARADO:%c `,`background: ${t}; color: white; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,"color: #fff;",e||"")}var ip=[["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 Gb(e,t,r){Wb({id:e,custom_data:t},"#00c851",r)}var Kb={DataLayer:Vb,Dito:Gb};async function Qb(e,t){const r=ap[e];r&&await Promise.allSettled(r.destinations.map(async s=>{try{await Kb[s](e.toLowerCase(),t,s)}catch(o){console.error(`[DT] Failed to send ${e} to ${s}:`,o)}}))}async function Xb(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 Yb(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function cp(e){if(!e)return null;const t=(()=>{try{return new URL(e,location.origin).pathname}catch{return e.split("?")[0]}})(),r=decodeURIComponent(t).match(/(\d+-\d+)(?=\/p|$)/);return r?r[1].replace("-","_"):null}async function Zb(e){const t=cp(e);if(!t)return console.error("Não foi possível extrair o RefId da URL"),null;try{const r=await fetch(`/api/catalog_system/pub/products/search?fq=alternateIds_RefId:${t}`);if(!r.ok)throw new Error(`Erro na API: ${r.status}`);const s=await r.json();return(s==null?void 0:s[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function lp(e,t){var r,s,o,a;const i=(s=(r=e==null?void 0:e.shippingData)==null?void 0:r.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 up(e){var t,r;const s=await Xb(e.productId||e.productID||e.item_group_id);return s.length&&(r=(t=s[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function Ps(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function vr(e){const t=[()=>{var r;return((r=e==null?void 0:e.productCategories)==null?void 0:r[39])==="BAZAR"?"Sale":"Coleção"},()=>e.item_category||e.category,()=>e.categories[0]];for(const r of t){const s=r();if(s!=null)return s}return null}function En(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,s,o,a,i;return(i=(a=(o=(s=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:s.call(r,">"))==null?void 0:o[1])==null?void 0:a.trim)==null?void 0:i.call(a)},()=>e.item_category2];for(const r of t){const s=r();if(s!=null)return s}return null}function dp(e){var t;const r=((t=e==null?void 0:e.additionalInfo)==null?void 0:t.tags)||(e==null?void 0:e.tags);return Array.isArray(r)&&r.length?r.join(","):null}var Jb={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function uc(e){if(!e)return null;const t=e.toLowerCase().trim();return Jb[t]||null}function Nt(e){var t;let r=[];if(Array.isArray(e)&&e.every(a=>typeof a=="string"))r=e;else if(Array.isArray(e))r=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)r=[((t=e.additionalInfo)==null?void 0:t.brandName)||e.brand];else return typeof e=="string"?uc(e):null;const s=r.map(uc).filter(a=>a!==null),o=[...new Set(s)].sort();return o.length>0?o.join("_"):null}function ej(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return Nt(r)}function tj(e){var t;const{item:r}=e;return Nt(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function rj(e,t){if(e!=null&&e.brand)return Nt(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 ej(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return tj(e);default:return null}}async function nj(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async s=>{var o,a,i;return{item_id:s.productId,item_category2:En(s),item_category4:dp(s),item_shipping_tier:lp(e.orderForm,s),price:parseFloat((s.price/100).toFixed(2))||0,quantity:s.quantity||1,item_ref:s.refId||null,item_brand:Nt((o=s.additionalInfo)==null?void 0:o.brandName)||((a=s.additionalInfo)==null?void 0:a.brandName)||null,item_sku:await up(s)||s.id||null,item_name:s.name||s.id||null,item_category:vr(s)||null,item_variant:s.skuName.split(/[-/]/)[0].trim(),item_variant2:((i=s.skuName.split(/[-/]/).pop())==null?void 0:i.trim())||"",discount:Ps(s)}})):[]}async function sj(e,t){var r,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:En(a),item_category4:dp(a),item_shipping_tier:t==="REMOVE_FROM_CART"?lp(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:((r=a.additionalInfo)==null?void 0:r.brandName)||a.item_brand||a.brand.name||null,item_sku:a.sku||a.id||a.item_id||await up(a)||null,item_name:a.name||a.item_name||null,item_category:vr(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:Ps(a),item_list_name:vr(a)||null,item_url:a.item_url||null}]}async function oj(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,s,o,a,i;return{price:((r=t==null?void 0:t.price)==null?void 0:r.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.referenceId[0].Value)||(t==null?void 0:t.additionalProperty.find(c=>c.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:Nt((o=t==null?void 0:t.brand)==null?void 0:o.name)||Nt(e.brand)||Nt(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)||((a=t==null?void 0:t.seo)==null?void 0:a.title)||null,item_category:vr(t)||null,item_variant:((i=t==null?void 0:t.name)==null?void 0:i.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:En(t)||null,item_id:(t==null?void 0:t.productID)||(t==null?void 0:t.productId)||(t==null?void 0:t.item_id)||(t==null?void 0:t.id)||null,discount:Ps(t)||null,item_list_name:(e==null?void 0:e.itemListName)||vr(t)||null}})}async function aj(e){var t,r,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:Nt(o.brand.name)||Nt(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:vr(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:En(o)||((s=(r=o==null?void 0:o.category)==null?void 0:r.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:Ps(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 ij(e){var t;if(!Yb(e==null?void 0:e.bannerUrl))return[];const s=await Zb(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:cp(e==null?void 0:e.bannerUrl),item_brand:Nt(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:vr(s)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:En(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 cj(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 nj(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return sj(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return oj(e);case"VIEW_ITEM":return aj(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return ij(e);default:return null}}function lj(e){var t,r,s;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],a=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!o.length||!a.length)return null;const i=o.find(f=>f==null?void 0:f.paymentSystem)||o[0],c=String((i==null?void 0:i.paymentSystem)||"").trim();if(!c)return null;const l=a.find(f=>String(f.id)===c),u=((s=l==null?void 0:l.name)==null?void 0:s.toLowerCase())||"",m=ip.find(([f])=>u.includes(f));return m?m[1]:null}function uj(e){var t,r,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=((r=a[0])==null?void 0:r.payments)||[];if(!i.length)return null;const c=((o=(s=i[0])==null?void 0:s.paymentSystemName)==null?void 0:o.toLowerCase())||"",l=ip.find(([u])=>c.includes(u));return l?l[1]:null}function dj(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return lj(e);case"PURCHASE":case"CUSTOM_PURCHASE":return uj(e);default:return null}}var fj={brand:rj,items:cj,payment_type:dj,user_info:async(e,t)=>{var r;const o=(r={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"},lojacrisbarros:{store:"https://lojacrisbarros.myvtex.com",checkout:"https://secure.crisbarros.com.br"},lojaoffpremium:{store:"https://lojaoffpremium.myvtex.com",checkout:"https://secure.lojaoffpremium.com.br"}}[e.account||"https://www.animale.com.br"])==null?void 0:r[e.platform||"store"];if(!o)return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null};try{const a=`${o}/_v/user-info`,i=await fetch(a,{method:"POST",body:JSON.stringify({email:e.userEmail})});return i.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await i.json()}catch{return{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address: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(r=>r.productID||(r==null?void 0:r.id)):(e.orderForm.items||[]).map(r=>r.productId).join(","),currency:(e,t)=>{var r,s,o,a;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((s=(r=e.item)==null?void 0:r.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 r;return e!=null&&e.value?e.value:e.item?e.item.price:((r=e.orderForm)==null?void 0:r.value)!=null?e.orderForm.value/100:null},total_discount:(e,t)=>{var r,s;const a=(((r=e.orderForm)==null?void 0:r.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 r,s;return(((r=e.orderForm)==null?void 0:r.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 r;if(e.couponMessage)return e.couponMessage;const s=((r=e.orderForm)==null?void 0:r.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 r,s;return e.appliedCoupon||((s=(r=e==null?void 0:e.orderForm)==null?void 0:r.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 r;const s=e.orderForm;return s?(((r=s.shippingData)==null?void 0:r.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 r=e.orderForm;if(!r)return null;const s={};for(const a of r.shippingData.logisticsInfo){const i=r.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 r,s,o;return((o=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:s.logisticsInfo)!=null?o:[]).reduce((i,c)=>{var l,u;const m=(l=c.slas)==null?void 0:l.find(f=>f.id===c.selectedSla);return i+((u=m==null?void 0:m.price)!=null?u:0)},0)},shipping_tier:(e,t)=>{var r,s,o,a;const c=((o=(s=(r=e==null?void 0:e.orderForm)==null?void 0:r.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:f}=l;return u==="pickup-in-point"?`retirada em loja${f!=null&&f.friendlyName?`: ${f.friendlyName}`:""}`:u==="delivery"?`receba em casa${m?`: ${m}`:""}`:null},transaction_id:(e,t)=>{var r,s;return((s=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:s.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function mj(e={},t){const r=ap[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async o=>{const a=fj[o];return typeof a!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await a(e,t)]}))):void 0}async function pj(e,t={}){try{const r=await mj(t,e);return await Qb(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}var Vo={exports:{}},fp={};(function(e){"use client";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,{PathParamsContext:function(){return a},PathnameContext:function(){return o},SearchParamsContext:function(){return s}});const r=y,s=(0,r.createContext)(null),o=(0,r.createContext)(null),a=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(s.displayName="SearchParamsContext",o.displayName="PathnameContext",a.displayName="PathParamsContext")})(fp);var Wo={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(s){return Array.isArray(s)?s[1]: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)})(Wo,Wo.exports);var hj=Wo.exports,Go={exports:{}},Ko={exports:{}},Qo={exports:{}},Xo={exports:{}},Yo={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return a}});const r=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class s{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}const o=globalThis.AsyncLocalStorage;function a(){return o?new o:new 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)})(Yo,Yo.exports);var Va=Yo.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,Va.createAsyncLocalStorage)();(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)})(Xo,Xo.exports);var _j=Xo.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0});function r(a,i){for(var c in i)Object.defineProperty(a,c,{enumerable:!0,get:i[c]})}r(t,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return s.requestAsyncStorage}});const s=_j;function o(a){const i=s.requestAsyncStorage.getStore();if(i)return i;throw new Error("`"+a+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}(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)})(Qo,Qo.exports);var gj=Qo.exports,Zo={exports:{}},Jo={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,Va.createAsyncLocalStorage)();(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)})(Jo,Jo.exports);var yj=Jo.exports;(function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r.actionAsyncStorage}});const r=yj;(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)})(Zo,Zo.exports);var vj=Zo.exports,ea={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r;(function(s){s[s.SeeOther=303]="SeeOther",s[s.TemporaryRedirect=307]="TemporaryRedirect",s[s.PermanentRedirect=308]="PermanentRedirect"})(r||(r={})),(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)})(ea,ea.exports);var xj=ea.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(g,v){for(var b in v)Object.defineProperty(g,b,{enumerable:!0,get:v[b]})}r(t,{RedirectType:function(){return c},getRedirectError:function(){return l},getRedirectStatusCodeFromError:function(){return _},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return p},isRedirectError:function(){return f},permanentRedirect:function(){return m},redirect:function(){return u}});const s=gj,o=vj,a=xj,i="NEXT_REDIRECT";var c;(function(g){g.push="push",g.replace="replace"})(c||(c={}));function l(g,v,b){b===void 0&&(b=a.RedirectStatusCode.TemporaryRedirect);const C=new Error(i);C.digest=i+";"+v+";"+g+";"+b+";";const j=s.requestAsyncStorage.getStore();return j&&(C.mutableCookies=j.mutableCookies),C}function u(g,v){v===void 0&&(v="replace");const b=o.actionAsyncStorage.getStore();throw l(g,v,b!=null&&b.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function m(g,v){v===void 0&&(v="replace");const b=o.actionAsyncStorage.getStore();throw l(g,v,b!=null&&b.isAction?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function f(g){if(typeof g!="object"||g===null||!("digest"in g)||typeof g.digest!="string")return!1;const[v,b,C,j]=g.digest.split(";",4),x=Number(j);return v===i&&(b==="replace"||b==="push")&&typeof C=="string"&&!isNaN(x)&&x in a.RedirectStatusCode}function p(g){return f(g)?g.digest.split(";",3)[2]:null}function h(g){if(!f(g))throw new Error("Not a redirect error");return g.digest.split(";",2)[1]}function _(g){if(!f(g))throw new Error("Not a redirect error");return Number(g.digest.split(";",4)[3])}(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)})(Ko,Ko.exports);var bj=Ko.exports,ta={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(i,c){for(var l in c)Object.defineProperty(i,l,{enumerable:!0,get:c[l]})}r(t,{isNotFoundError:function(){return a},notFound:function(){return o}});const s="NEXT_NOT_FOUND";function o(){const i=new Error(s);throw i.digest=s,i}function a(i){return typeof i!="object"||i===null||!("digest"in i)?!1:i.digest===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)})(ta,ta.exports);var jj=ta.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}r(t,{ReadonlyURLSearchParams:function(){return i},RedirectType:function(){return s.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return s.permanentRedirect},redirect:function(){return s.redirect}});const s=bj,o=jj;class a extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class i extends URLSearchParams{append(){throw new a}delete(){throw new a}set(){throw new a}sort(){throw new 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)})(Go,Go.exports);var Cj=Go.exports,mp={};(function(e){"use client";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,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return a}});const s=gr._(y),o=s.default.createContext(null);function a(i){const c=(0,s.useContext)(o);c&&c(i)}})(mp);var Qn={exports:{}},uo={},dc;function Sj(){return dc||(dc=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,{BailoutToCSRError:function(){return s},isBailoutToCSRError:function(){return o}});const r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class s extends Error{constructor(i){super("Bail out to client-side rendering: "+i),this.reason=i,this.digest=r}}function o(a){return typeof a!="object"||a===null||!("digest"in a)?!1:a.digest===r}}(uo)),uo}var Xn={exports:{}},Yn={exports:{}},fc;function Pj(){return fc||(fc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return s}});const s=(0,Va.createAsyncLocalStorage)();(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)}(Yn,Yn.exports)),Yn.exports}var mc;function wj(){return mc||(mc=1,function(e,t){"TURBOPACK { transition: next-shared }";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});const r=Pj();(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}var pc;function Ej(){return pc||(pc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const r=Sj(),s=wj();function o(a){const i=s.staticGenerationAsyncStorage.getStore();if(!(i!=null&&i.forceStatic)&&i!=null&&i.isStaticGeneration)throw new r.BailoutToCSRError(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)}(Qn,Qn.exports)),Qn.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(b,C){for(var j in C)Object.defineProperty(b,j,{enumerable:!0,get:C[j]})}r(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return h},usePathname:function(){return f},useRouter:function(){return p},useSearchParams:function(){return m},useSelectedLayoutSegment:function(){return v},useSelectedLayoutSegments:function(){return g},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});const s=y,o=Mu(),a=fp,i=hj,c=ku(),l=Cj,u=mp;function m(){const b=(0,s.useContext)(a.SearchParamsContext),C=(0,s.useMemo)(()=>b?new l.ReadonlyURLSearchParams(b):null,[b]);if(typeof window>"u"){const{bailoutToClientRendering:j}=Ej();j("useSearchParams()")}return C}function f(){return(0,s.useContext)(a.PathnameContext)}function p(){const b=(0,s.useContext)(o.AppRouterContext);if(b===null)throw new Error("invariant expected app router to be mounted");return b}function h(){return(0,s.useContext)(a.PathParamsContext)}function _(b,C,j,x){j===void 0&&(j=!0),x===void 0&&(x=[]);let S;if(j)S=b[1][C];else{const T=b[1];var P;S=(P=T.children)!=null?P:Object.values(T)[0]}if(!S)return x;const w=S[0],N=(0,i.getSegmentValue)(w);return!N||N.startsWith(c.PAGE_SEGMENT_KEY)?x:(x.push(N),_(S,C,!1,x))}function g(b){b===void 0&&(b="children");const C=(0,s.useContext)(o.LayoutRouterContext);return C?_(C.tree,b):null}function v(b){b===void 0&&(b="children");const C=g(b);if(!C||C.length===0)return null;const j=b==="children"?C[0]:C[C.length-1];return j===c.DEFAULT_SEGMENT_KEY?null: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)})(Vo,Vo.exports);var Nj=Vo.exports,hc=Nj;function Ij({accountName:e}){const{user:t}=Gr(),r=hc.usePathname(),s=hc.useSearchParams(),o=(t==null?void 0:t.sub)||(t==null?void 0:t.email),a=t==null?void 0:t.userId;return y.useEffect(()=>{o&&a?pj("CUSTOM_USER_INFO",{userId:a,userEmail:o,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[r,s,o,a]),null}const Rj="_active_gk7mu_380",Tj="_banner_gk7mu_655",Aj="_container_gk7mu_689",kj="_slugs_gk7mu_703",Oj="_root_gk7mu_785",Lj="_otContainer_gk7mu_797",rr={active:Rj,banner:Tj,container:Aj,slugs:kj,"content-page-modifier":"_content-page-modifier_gk7mu_741",root:Oj,otContainer:Lj};function Mj({title:e,srcImages:t,children:r,className:s,...o}){const{isMobile:a}=se(),i=a?t.mobile:t.desktop;return n.jsxs("div",{...o,className:d.helpers.classNameConcat(rr.banner,s),children:[n.jsx(Oe.Image,{src:i,alt:e,fill:!0}),r||n.jsx("h1",{children:e})]})}const ra=({children:e,className:t})=>n.jsx("div",{className:d.helpers.classNameConcat(rr.container,t),children:e});ra.displayName="Politicas.Container";const Dj=({oneTrust:e})=>{const t=()=>{window.OneTrust&&window.OneTrust.NoticeApi&&window.OneTrust.NoticeApi.Initialized&&window.OneTrust.NoticeApi.Initialized.then(function(){window.OneTrust.NoticeApi.LoadNotices([e.policyScript])})};return y.useEffect(()=>{window.OneTrust&&t()},[]),n.jsxs(n.Fragment,{children:[n.jsx(Ha,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),n.jsx("div",{className:rr.otContainer,children:n.jsx("div",{id:"otnotice-container",children:n.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},_c={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},pp=e=>{const{nextimage:t}=me();return n.jsx(ft,{name:e.name,children:e.data.banners.map((r,s)=>n.jsx("div",{className:_c["card-image-wrapper"],children:n.jsx("div",{className:_c["card-image-container"],children:n.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},s))})},Fj="_embedLiveContainer_1ss0l_2",zj="_embedLivePlayer_1ss0l_7",gc={embedLiveContainer:Fj,embedLivePlayer:zj},hp=({data:e,name:t})=>n.jsx(ft,{name:t,children:n.jsx("div",{className:gc.embedLiveContainer,children:n.jsx("div",{className:gc.embedLivePlayer,children:e.banner.videosrc?n.jsx(Oe.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):n.jsxs("div",{children:[n.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),n.jsx(Ha,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),na={"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 Bj(e,t){const{mediatorRef:r}=se();y.useEffect(()=>r.current.subscribe(e,t),[e,t])}const yc=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:s,totalPages:o,position:a,hideControllers:i,left:c,isFirst:l,ICONS:u})=>{const[m,f]=y.useState("default");return Bj("herobanner:change_controllers_variant",p=>{l&&f(p.includes("white")?"inverse":"default")}),n.jsxs(d.Carousel.Controller,{className:na["carousel-controllers-modifier"],position:a??"absolute","data-hide-controllers":i,bottom:"16px",top:"unset",left:c,children:[n.jsxs(d.Carousel.Arrows,{className:na["carrousel-arrows-display-controller"],children:[n.jsx(d.Button,{variant:"tertiary",onClick:e,adornment:{start:n.jsx(d.Icon,{name:u.arrow_left})},mode:m}),n.jsx(d.Button,{variant:"tertiary",onClick:t,adornment:{start:n.jsx(d.Icon,{name:u.arrow_right})},mode:m})]}),n.jsx(d.Carousel.Bullets,{page:s,total:o,onBulletClick:r,mode:m})]})},Uj=({children:e,data:t,banner:r,...s})=>{const{mediatorRef:o}=se();return t.data.first?n.jsx(_s,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...s,children:e}):n.jsx(n.Fragment,{children:e})},_p=e=>{const{initialize:t,pagination:r,controller:s,itemsStyles:o}=d.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),a=y.useRef(void 0),i=y.useMemo(()=>hm(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),c=y.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(a.current=setInterval(()=>{s==null||s.nextPage()},e.data.config.slideDuration*1e3))},[s,e.data.config.slideDuration,r.totalPages]),l=y.useCallback(m=>{clearInterval(a.current),c(),m()},[c]),u=y.useMemo(()=>{var m;return{nextOnClick:()=>l(()=>s==null?void 0:s.nextPage()),prevOnClick:()=>l(()=>s==null?void 0:s.prevPage()),onBulletClick:f=>l(()=>s==null?void 0:s.navigateTo(f)),currentPage:r.currentPage,totalPages:r.totalPages,position:i.position,hideControllers:((m=e.data.config)==null?void 0:m.hideControllers)??!1,left:i.left}},[r.currentPage,r.totalPages,i.position,e.data.config.hideControllers,l,s]);return y.useEffect(()=>(c(),()=>clearInterval(a.current)),[c]),n.jsx(ft,{name:e.name,children:n.jsxs(d.Carousel.Root,{innerRef:m=>{t(m)},className:d.helpers.classNameConcat(na["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"&&r.totalPages>1?n.jsx(yc,{ICONS:e.ICONS,...u,isFirst:e.data.first}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e==null?void 0:e.data.banners.map((m,f)=>n.jsx(d.Carousel.Item,{style:o,children:n.jsx(Uj,{data:e,banner:m,children:n.jsx(wn,{name:"Banner Carousel",ICONS:e.ICONS,TEXTCONTENT_EXPANDED:e.TEXTCONTENT_EXPANDED,TIME_ZONE:e.TIME_ZONE,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,className:e.className,data:{banner:m,index:f,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&f===0&&{priority:!0}})})},`hero-banner-item-${f}`))}),i.shouldRender==="bottom"&&r.totalPages>1?n.jsx(yc,{ICONS:e.ICONS,...u}):n.jsx(n.Fragment,{})]})})},Pr={"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"},gp=({data:e,name:t,CONSTANTS:r})=>{var m;const{isMobile:s}=se(),o=e.config.size??"medium",a=e.config.disableCarouselMobile??!1,{initialize:i,pagination:c,controller:l,itemsStyles:u}=d.Carousel.useCarousel({itemsPerPage:s?e==null?void 0:e.config.slidesPerViewMobile:(m=e==null?void 0:e.config)==null?void 0:m.slidesPerView,gap:s?e.config.gapMobile:e.config.gap,direction:s&&a?"column":"row"});return n.jsx(ft,{name:t,children:n.jsx(d.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:n.jsxs(d.Carousel.Root,{innerRef:f=>{i(f)},className:d.helpers.classNameConcat(Pr["carousel-modifier"],"common-section"),children:[o==="medium"?n.jsxs(d.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&n.jsx(d.TextStructure.DivWrapper,{className:Pr["carousel-title-modifier"],children:n.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),s&&c.totalPages>1&&n.jsx(d.Carousel.Controller,{className:d.helpers.classNameConcat(Pr["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?Pr["title-on"]:void 0),children:n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]})})]}):n.jsx(n.Fragment,{}),n.jsx(d.Carousel.Body,{children:e.bennefit.map((f,p)=>n.jsx(d.Carousel.Item,{className:Pr["card-modifier"],style:u,children:n.jsx(d.Card,{stroke:!0,padding:"small",children:n.jsx(d.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:n.jsx(d.Icon,{name:f.icon,size:o==="medium"?"medium":"small"})},children:n.jsxs(d.TextStructure.DivWrapper,{alignItems:"start",children:[n.jsx("h3",{className:"typography-style-body-md",children:f.title}),f.subtitle&&f.subtitle.length?n.jsx("p",{className:"typography-style-body-xs",children:f.subtitle}):n.jsx(n.Fragment,{})]})})})},`bennefit=${p}`))}),!s&&c.totalPages>1?n.jsxs(d.Carousel.Controller,{className:Pr["row-controller-modifier"],children:[n.jsxs(d.Carousel.Arrows,{children:[n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_left})}}),n.jsx(d.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:n.jsx(d.Icon,{name:r.ICONS.arrow_right})}})]}),n.jsx(d.Carousel.Bullets,{page:c.currentPage,total:c.totalPages,onBulletClick:f=>l==null?void 0:l.navigateTo(f)})]}):n.jsx(n.Fragment,{})]})})})},yp=({data:{componentIndex:e,...t},name:r,CONSTANTS:s})=>n.jsx(ft,{name:r,children:n.jsx($a,{...t,CONSTANTS:s})}),vp=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:s,name:o})=>n.jsx(ft,{name:o,children:n.jsx("div",{className:d.helpers.classNameConcat(Uo.textContentSection,s??""),style:e.borderTop?{borderTop:"none"}:void 0,children:n.jsx(_m,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),vc={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},xp=({data:e,id:t,ICONS:r,className:s,name:o})=>{var c;const[a,i]=y.useState([]);return n.jsx(ft,{name:o,children:n.jsxs(d.Utils.Column,{gap:"var(--gap-vertical-sm)",className:s??"",children:[e.titleAccordion?n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{children:n.jsx("h2",{className:d.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):n.jsx(n.Fragment,{}),(c=e.accordions)==null?void 0:c.map((l,u)=>n.jsxs(d.Accordion.Wrapper,{className:vc["accordion-modifier"],children:[n.jsx(d.Accordion.Header,{id:`${t}-text-accordion-${u}`,openIndicator:n.jsx(d.Icon,{name:r.arrow_down}),closeIndicator:n.jsx(d.Icon,{name:r.arrow_up}),startOpen:a.includes(u),onClick:()=>i(m=>m.includes(u)?m.filter(f=>f!==u):[...m,u]),children:n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{children:[n.jsx("h3",{className:"typography-style-body-md-strong",children:l.title}),l.subtitle&&l.subtitle.length?n.jsx("h2",{children:l.subtitle}):n.jsx(n.Fragment,{})]})})}),n.jsx(d.Accordion.Body,{children:n.jsx(d.TextStructure.Root,{children:n.jsx(d.TextStructure.DivWrapper,{className:vc["accordion-body-modifier"],children:n.jsx(vt.Editor,{editorKey:`${t}-editor-${u}`,blockRenderMap:cs,editorState:l.text?is(JSON.parse(l.text)):vt.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${u}-${a.includes(u)}`))]})})},bp=async e=>{const{type:t}=e,r=t==="collectionSearch"?"/_v/proxy/search/product":"/_v/proxy/search/crosselling",s=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await k.fetchProxy(r,{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)},qj="_shelf__container_bi04n_10",jp={shelf__container:qj},Hj=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:s})=>{const[o,a]=y.useState([]),{isMobile:i}=se(),{ref:c,inView:l}=kc.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=le();return y.useEffect(()=>{if(!e)return;function m(){var f,p;bp({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:((p=e==null?void 0:e.params)==null?void 0:p.sort)??r.ITEMS_DEFAULT_SORT}}).then(h=>{a(h)})}m()},[e]),y.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:n.jsx("div",{ref:c,className:jp.shelf__container,children:n.jsx(ln.Shelf,{title:t??"Você também pode gostar",itemsPerPage:s?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(o)&&o.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?n.jsx(ln.Card,{item:m,isMobile:i,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},m.id):null})})})},$j=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[s,o]=y.useState([]),{isMobile:a}=se(),{ref:i,inView:c}=kc.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:l}=le(),u=y.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return y.useEffect(()=>{if(!e)return;function m(){var f;bp({type:"recommendationSearch",facets:u,params:{count:((f=e==null?void 0:e.params)==null?void 0:f.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(p=>o(p))}m()},[u,e]),y.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"?n.jsx(ad,{products:s,innerRef:i,inView:c,CONSTANTS:r}):n.jsx("div",{ref:i,className:jp.shelf__container,children:n.jsx(ln.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(s)&&s.map(({node:m},f)=>{const{availability:{status:p}}=m;return p?n.jsx(ln.Card,{item:m,isMobile:a,size:"medium",index:f,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},m.id):null})})})},Cp=({data:e,name:t,CONSTANTS:r})=>{const{productId:s}=su();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,a)=>n.jsx(ft,{name:t,children:n.jsx($j,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:s,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${a}`)}))},Sp=({data:e,CONSTANTS:t,searchModal:r,name:s})=>{var a;const o=(a=e==null?void 0:e.productLists)==null?void 0:a.filter(i=>!!i.collectionId||!!i.search_base_name);return!o||o.length===0?null:o.map((i,c)=>{const l=i.collectionId?{term:"",facets:[{key:"productclusterids",value:`${i.collectionId}`}]}:{term:i.search_base_name,facets:[]};return n.jsx(ft,{name:s,children:n.jsx(Hj,{title:i.title,collectionSearch:{params:{count:i.number_of_items,sort:i.sort},...l},searchModal:r,CONSTANTS:t},`shelf=${c}`)})})},Vj="_popup_5taxs_9",Wj="_popup__overlay_5taxs_19",Gj="_popup__modal_5taxs_27",tt={popup:Vj,popup__overlay:Wj,popup__modal:Gj,"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"},Kj=e=>n.jsx("div",{className:tt["popup__modal--success"],children:n.jsx(d.TextStructure.Root,{adornment:{start:n.jsx(d.Icon,{name:e.ICONS.check_circle,size:"large"})},children:n.jsxs(d.TextStructure.DivWrapper,{className:tt["text-structure-modifier"],children:[n.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),n.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),Qj=e=>{const{title:t,description:r,groups:s,ICONS:o}=e,{formErrors:a,submitForm:i,success:c}=Ss(),[l,u]=y.useState(!1);return n.jsx("form",{onSubmit:i,className:tt.formContainer,children:n.jsxs("div",{className:tt["popup__modal--form"],children:[n.jsxs(d.TextStructure.DivWrapper,{className:tt["popup__modal--header"],children:[n.jsx("strong",{className:"typography-style-body-md-strong",children:t}),n.jsx("p",{className:"typography-style-body-xs",children:r})]}),c?n.jsx(Kj,{...e}):n.jsxs(n.Fragment,{children:[s.map(m=>n.jsx(Tr.FieldGroup,{group:m,children:n.jsx(Tr.FieldWrapper,{fields:m.fields})},m.groupLabel)),n.jsx(d.Checkbox,{className:tt["popup__modal--checkbox"],adornment:n.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)}),n.jsxs("div",{children:[!l&&n.jsx(d.TextStructure.DivWrapper,{className:tt["popup__modal--status"],children:n.jsxs("p",{className:"typography-style-body-caption",children:[n.jsx(d.Icon,{size:"small",name:o.alert_circle}),e_]})}),n.jsx(d.Button,{disabled:!l,size:"medium",type:"submit",children:r_}),a.length?n.jsx(d.TextStructure.DivWrapper,{className:tt["popup__modal--status"],children:n.jsx("p",{className:d.helpers.classNameConcat(tt.formSubmitWarning,"typography-style-body-xs"),children:t_})}):null]})]})]})})},Pp=({data:e,name:t,CONSTANTS:r})=>{const[s,o]=y.useState(!1),a=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,i=()=>{o(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return y.useEffect(()=>{setTimeout(()=>!a&&o(!0),2e3)},[]),e.active&&s?n.jsx(ft,{name:t,children:n.jsxs("div",{className:tt.popup,children:[n.jsx("div",{onClick:i,className:tt.popup__overlay}),n.jsxs("div",{className:tt.popup__modal,children:[n.jsx(d.Button,{onClick:i,variant:"tertiary",className:tt["popup__modal--close"],children:n.jsx(d.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),n.jsx("div",{children:n.jsx(Oe.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),n.jsx(Wm,{...e,children:n.jsx(Qj,{...e,ICONS:r.ICONS})})]})]})}):null},Xj={"Image Grid":pp,"Embed Live":hp,"Banner Carousel":_p,Banner:Ua,"Bennefits Bar":gp,newsletter:yp,TextContent:vp,TextAccordion:xp,"Product Carousel":Sp,"PDP Product Carousel":Cp,"Popup Modal":Pp},wp=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((s,o)=>{const a=Xj[s.name],i={...(r==null?void 0:r[s.name])??{}};return t&&o===0&&(s.data.first=!0),s.data.componentIndex=o,s.name==="TextAccordion"&&(i.id=`text-accordion-${o}`),a?n.jsx(a,{name:s.name,data:s.data,...i},`section-zone-component-${o}`):null});async function Yj({slug:e,pageData:t,tabsData:r,oneTrust:s}){var c,l,u,m;const a=(r?[...r].sort((f,p)=>f.config.tabConfig.order-p.config.tabConfig.order):[]).map(f=>({slug:f.config.seo.slug||ko(f.config.tabConfig.title),title:f.config.tabConfig.title})),i=r==null?void 0:r.find(f=>f.config.seo.slug===`/${decodeURIComponent(e)}`);return i&&(i.id=ko(i.config.seo.slug||"")),n.jsxs("div",{className:rr.root,children:[n.jsx(ra,{children:n.jsx(Mj,{title:(c=t==null?void 0:t.config.banners)==null?void 0:c.altImageBackgroud,srcImages:{desktop:(l=t==null?void 0:t.config.banners)==null?void 0:l.imageBackgroudDesk,mobile:(m=(u=t==null?void 0:t.config)==null?void 0:u.banners)==null?void 0:m.imageBackgroudMobile}})}),n.jsxs(ra,{children:[n.jsx("div",{className:rr.slugs,children:a.map(f=>n.jsx(Ke,{href:f.slug?`/politicas/${f.slug.replace(/^\/+/,"")}`:"#",className:f.slug===(i==null?void 0:i.id)?rr.active:"",title:f.title,scroll:!1,children:f.title},f.slug.replace(/^\/+/,"")))}),n.jsx("div",{className:rr["content-page-modifier"],children:e==="privacidade-e-seguranca"?n.jsx(Dj,{oneTrust:s}):n.jsx(wp,{data:(i==null?void 0:i.sections)??[]})})]})]})}const It={"banner-wrapper":"_banner-wrapper_jrphb_5","banner-image":"_banner-image_jrphb_15","banner-desktop":"_banner-desktop_jrphb_21","banner-mobile":"_banner-mobile_jrphb_24","text-wrapper":"_text-wrapper_jrphb_37","custom-row":"_custom-row_jrphb_53","text-area":"_text-area_jrphb_58","text-wrapper-modifier":"_text-wrapper-modifier_jrphb_68","text-area-modifier":"_text-area-modifier_jrphb_77"},Ep=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:r}=me();return n.jsx("div",{children:n.jsxs(d.Banner.Container,{className:It["banner-wrapper"],children:[n.jsxs(d.Banner.ImageWrapper,{className:It["banner-image"],children:[n.jsx(Oe.Image,{className:It["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),n.jsx(Oe.Image,{className:It["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),n.jsx(d.Banner.Slot,{className:d.helpers.classNameConcat(It["text-wrapper"],It["text-wrapper-modifier"]),margin:107,children:n.jsxs(d.TextStructure.Root,{layoutProps:{textRow:{className:It["custom-row"]}},children:[n.jsxs(d.TextStructure.DivWrapper,{className:d.helpers.classNameConcat(It["text-area"],It["text-area-modifier"]),children:[n.jsx("h1",{className:"typography-style-display-strong",children:e.title}),n.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),n.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),n.jsx(d.Button,{onClick:()=>r.push("/"),children:t})]})})]})})};Ep.displayName="ErrorTemplate";const Zj={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},Jj=y.createContext(Zj);function eC(){return y.useContext(Jj)}function fo(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const s=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null}function mo(){if(window){localStorage.getItem("cleverapp")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("atendimento")),localStorage.getItem("atendimento")&&(localStorage.removeItem("vendedora"),localStorage.removeItem("televendas"));const{hostname:e,origin:t}=window.location;document.cookie=`checkout.vtex.com=;Domain=.${e};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,document.cookie=`checkout.vtex.com=;Domain=${e.replace("www","")};path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT`,window.location.replace(`${t}`)}}const tC="_container_df1ql_11",po={"action-button":"_action-button_df1ql_1",container:tC,"container-icon":"_container-icon_df1ql_31"};function rC({icon:e,text:t,onClick:r,isActive:s=!1}){const o=a=>{a.preventDefault(),s&&r()};return n.jsxs("div",{className:d.helpers.classNameConcat(po["action-button"],s?"":"disable"),onClick:a=>o(a),children:[n.jsx("div",{className:d.helpers.classNameConcat(po["container-icon"],s?"":"disable"),children:n.jsx("img",{src:e,alt:"icon"})}),n.jsxs("div",{className:d.helpers.classNameConcat(po.container,s?"":"disable"),children:[n.jsx("span",{children:t}),n.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const nC="_container_k11me_1",sC="_header_k11me_18",oC="_body_k11me_45",Qr={container:nC,header:sC,body:oC,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function aC(e,t=!1,r){const{base:s,orderformId:o}=e,a=r==null?void 0:r.split("codigo: ")[1],i=localStorage.getItem("maiscarrinho"),c={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(r??"")}`,cp:a?`&utmi_cp=${a}`:"",source:`&utm_source=${i}`};return t?`${s}/checkout/?orderFormId=${o}${c.source}${c.campaign}${c.cp}${c.medium}#/cart`:`${s}/checkout/?orderFormId=${o}${c.source}${c.campaign}${c.cp}${c.medium}#/payment`}function iC(e){const t=`https://mais-carrinho-dkwr66gouq-uc.a.run.app/url-shortner/${encodeURIComponent(e)}`;return fetch(t).then(r=>r.json()).then(r=>r.url.shortLink).catch(()=>e)}function xc({mode:e,config:t,newCart:r}){const[s,o]=y.useState(!1),[a,i]=y.useState(""),c=aC(t,e==="cart",t.sellerCode),{useClipboard:l}=ss.hooks,[,u]=l();function m(){o(!0);const f=document.createElement("textArea");f.readOnly=!0,f.contentEditable="true",f.value=a,document.body.appendChild(f),f.select(),u(f.value),document.body.removeChild(f),setTimeout(()=>{o(!1)},3e3)}return y.useEffect(()=>{i(""),i("Gerando link..."),iC(c).then(f=>i(f)).catch(()=>i("Algo deu errado, tente novamente mais tarde"))},[c]),n.jsxs("div",{className:Qr.container,children:[n.jsxs("div",{className:Qr.header,children:[n.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),n.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),n.jsxs("div",{className:Qr.body,children:[n.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
|
|
19
|
+
compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),n.jsxs("form",{children:[n.jsx("input",{type:"text",disabled:!0,value:a}),n.jsxs("div",{className:d.helpers.classNameConcat(Qr["copy-cart-button"],a?"active":""),children:[n.jsx("img",{src:"/images/Feedback_copiado/ico_share.png",alt:"share",className:"share",onClick:()=>a&&m()}),s&&n.jsx("div",{className:"share-input-copy-feedback",children:"Link Copiado"})]})]}),n.jsx("button",{className:Qr["reset-orderform-button"],onClick:()=>{_t.set(es,{}),r()},children:"Novo Atendimento"})]})]})}const cC="_container_jla2u_1",lC="_header_jla2u_24",uC="_body_jla2u_56",Xr={container:cC,header:lC,"header-open":"_header-open_jla2u_29","close-btn":"_close-btn_jla2u_48",body:uC};var mt=(e=>(e.base="base",e.shareCart="shareCart",e.sharePayment="sharePayment",e))(mt||{});const bc=({text:e,isActive:t,onClick:r,icon:s,iconDisabled:o})=>n.jsx(rC,{icon:t?s:o,text:t?e:"Preencha a sacola para compartilhar",onClick:r,isActive:t}),dC=({config:e,isshowing:t})=>{var P,w,N;const[r,s]=y.useState(!1),[o,a]=y.useState(""),{addCouponSeller:i,cartStore:c}=we(),[l,u]=y.useState(t??!1),{setOrderformId:m,update:f,isValidSharedCart:p,setConfiguration:h,setCodVendedora:_}=eC(),[g,v]=y.useState(mt.base),b=y.useMemo(()=>c,[c]),{marketingData:C}=ss.stores.cart.useGetCartStoreState();y.useEffect(()=>{fo("cleverapp")==="true"&&(localStorage.setItem("maiscarrinho","cleverapp"),window.location.replace("/")),fo("televendas")==="true"&&(localStorage.setItem("maiscarrinho","televendas"),window.location.replace("/")),fo("vendedora")==="true"&&(localStorage.setItem("maiscarrinho","vendedora"),mo())},[]),y.useEffect(()=>{var T,I,O,M,H;(T=b==null?void 0:b.openTextField)!=null&&T.value&&a(((I=b==null?void 0:b.openTextField)==null?void 0:I.value)??""),(O=b.openTextField)!=null&&O.value&&(_(String((M=b.openTextField)==null?void 0:M.value).split("codigo")[1]),i(String((H=b.openTextField)==null?void 0:H.value),"seller")),m(b.id),localStorage.getItem("maiscarrinho")&&u(!0)},[b.id,(P=b.openTextField)==null?void 0:P.value,_,m,i]);const j=()=>{h(e),v(mt.base),s(!r),m(b.id),setTimeout(()=>{p()&&f(b.id)},300)},{id:x}=ss.stores.cart.useGetCartStoreState(),S=T=>{k.postMediaData({apiUrl:"/api/marketingData",body:{orderFormId:x,coupon:C==null?void 0:C.coupon,utmiCampaign:"codigodavendedora",utmSource:"widget",utmMedium:T===mt.sharePayment?"linkvendedor":"carrinho_compartilhado"}}),v(T)};return n.jsx(n.Fragment,{children:l&&n.jsxs("div",{className:d.helpers.classNameConcat(Xr.container,r?"open":""),children:[n.jsx("div",{className:d.helpers.classNameConcat(Xr.header,r?"open":""),onClick:j,children:r?n.jsxs("div",{className:Xr["header-open"],children:[n.jsx("div",{className:Xr["close-btn"],children:n.jsx("img",{src:"/images/Widget_open/close_grey_24x24.png",alt:"close",width:30,height:30})}),n.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"close",width:30,height:30}),n.jsx("span",{className:"text",children:"Vendedor"})]}):n.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"logo",width:30,height:30})}),r&&n.jsx("div",{className:Xr.body,children:n.jsxs(n.Fragment,{children:[g===mt.base&&n.jsxs(n.Fragment,{children:[n.jsx(bc,{icon:"/images/Modal_compartilhar_sacola/ico_sacola_big.png",iconDisabled:"/images/Widget_open/ico_sacola_disabled.png",text:"Compartilhar a Sacola",onClick:()=>S(mt.shareCart),isActive:b.items.length>0&&!!((w=b==null?void 0:b.openTextField)!=null&&w.value)}),n.jsx(bc,{icon:"/images/Modal_compartilhar_editavel/ico_form_big.png",iconDisabled:"/images/Widget_open_disabled/ico_form_disabled.png",text:"Compartilhar link para pagamento",onClick:()=>S(mt.sharePayment),isActive:b.items.length>0&&!!((N=b.openTextField)!=null&&N.value)})]}),g===mt.shareCart&&n.jsx(xc,{mode:"cart",config:{...e,sellerCode:o,orderformId:b.id},newCart:()=>{mo(),v(mt.base)}}),g===mt.sharePayment&&n.jsx(xc,{mode:"payment",config:{...e,sellerCode:o,orderformId:b.id},newCart:()=>{mo(),v(mt.base)}})]})})]})})},pr={teamComponents:{AddToCart:Pa,BackToTop:O_,HelpButton:gb,BuyPackage:ad,Filter:{...kt,helpers:Cf},..._v,FreightCalculation:ff,Header:df,Link:Ke,Media:Oe,PLPNavigation:Qt,ProductCard:ve,ProductList:rt,ProductVariationList:xt,Sort:vs,UserMenu:gs,Newsletter:$a,Form:Tr,Table:Zn},template:{minicart:Ye,pdc:Tm,pdc_composites:yt,pdp:Px,searchResult:Dm,wishList:Vu,LPCadastro:kb,SearchModal:Xm,LPStores:wt,tracker:Ij,Politicas:Yj,ErrorTemplate:Ep,WidgetVendedora:dC},utils:{EventCollector:nb,ExternalScripts:cb,LinkOrNotLink:Sn,ObserverWrapper:_s,SnackBarComponent:Rr,DraftJsLinkWrapper:pm}},fC=(e,t)=>{const r=e.map(o=>`'${o.source}'`).join(`,
|
|
20
20
|
`);return`
|
|
21
21
|
import type { NextRequest } from 'next/server'
|
|
22
22
|
import { NextResponse } from 'next/server'
|
|
@@ -56,4 +56,4 @@ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-comp
|
|
|
56
56
|
${r}
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
|
-
`},mv=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:dv},Symbol.toStringTag,{value:"Module"})),pv={helpers:mv},fv={Banner:io},dm=g.createContext({}),hv=({data:e,children:t,...r})=>{var _,y,x,v,C,j,b,w,S,P,N,R,k;const[s,a]=g.useState(!0),{initialize:o,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:(v=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:v.showCarouselArrows,hasCloseBtn:(j=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:j.hasCloseBtn,backgroundColor:(w=(b=e==null?void 0:e.staticConfig)==null?void 0:b.staticConfig)==null?void 0:w.backgroundColor,textColorVariant:(P=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:P.textColorVariant,content:((R=(N=e==null?void 0:e.content)==null?void 0:N.content)==null?void 0:R.items)??[]},u=(k=l.content)==null?void 0:k.filter(O=>!O.countDownEndDate||new Date(O.countDownEndDate)>new Date),m=u.length>1,p={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},f=()=>{a(!1)},h=d.helpers.ValidateProp({fieldTypes:Ot.Mode,property:l.textColorVariant,fallback:"default"});return n.jsx(dm.Provider,{value:{isOpen:s,setIsOpen:a,hasCarousel:m,backgroundStyle:p,handleCloseTipbar:f,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:o,controller:i,itemsStyles:c},...r},children:t})},ut=()=>g.useContext(dm),_v=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=ut();return n.jsx(zn,{dateEnd:new Date(e),TIME_ZONE:r,...t})},gv="_tipbar_bt3p0_1",yv="_tipbar__carousel_bt3p0_15",un={tipbar:gv,tipbar__carousel:yv,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},xv=({coupon:e,feedbackTitle:t,feedbackDescription:r,...s})=>{const{CONSTANTS:a}=ut(),{addCouponSeller:o,cartStore:i}=ve(),[c,l]=g.useState({status:!1,showSnackBar:!1}),[u,m]=g.useState(!1),[p,f]=g.useState(!1),h=async()=>{if(!i.items.length){f(!0);return}(await o(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return g.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},a.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),g.useEffect(()=>{u&&setTimeout(()=>{m(!1)},a.TIPBAR_CONFIGS.snackbar_timeout)},[u]),g.useEffect(()=>{p&&setTimeout(()=>{f(!1)},a.TIPBAR_CONFIGS.snackbar_timeout)},[p]),n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:un["tipbar-item__coupon"],children:c.status?`${a.TIPBAR_CONFIGS.coupon_applied_message}`:`${a.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||r)&&n.jsx(Lt,{title:t,subtitle:r,Z_INDEX_WAR:a.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&n.jsx(Lt,{title:a.TIPBAR_CONFIGS.coupon_error_title,subtitle:a.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:a.Z_INDEX_WAR},`error-coupon-${e}`),p&&n.jsx(Lt,{title:a.TIPBAR_CONFIGS.coupon_cart_empty_title,subtitle:a.TIPBAR_CONFIGS.coupon_cart_empty_message,Z_INDEX_WAR:a.Z_INDEX_WAR},`error-cart-empty-${e}`)]})},vv=({title:e,description:t,style:r,mode:s,className:a})=>n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{mode:s,className:a,children:[e&&n.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&n.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),bv=({coupon:e,...t})=>{const{CONSTANTS:r}=ut();return n.jsx(d.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},jv=({staticZone:e,type:t,className:r,description:s,title:a})=>{const{mode:o}=ut();if(t==="countdown")return n.jsx(_v,{dateEnd:e.countDownEndDate,size:"x-small",mode:o});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Ot.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Ot.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?n.jsx(xv,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Ot.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?n.jsx(bv,{coupon:e.coupon,mode:i}):null}return n.jsx(vv,{title:a,description:s,mode:o,className:r})},Aa=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=ut();return n.jsx(d.Button,{title:"fechar tipbar",className:un["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:n.jsx(d.Icon,{name:r.ICONS.close})}})},Cv=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:s})=>{const{carouselProps:a,CONSTANTS:o}=ut(),i=g.useRef(null),c=(u,m)=>{var p,f;u.stopPropagation(),u.preventDefault(),m==="prev"?(p=a.controller)==null||p.prevPage():(f=a.controller)==null||f.nextPage(),i.current&&(clearInterval(i.current),l())},l=g.useCallback(()=>{if(s&&a.controller){const u=setInterval(()=>{var m;(m=a.controller)==null||m.nextPage()},s);i.current=u}},[s,a]);return g.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),n.jsxs(d.Carousel.Root,{innerRef:u=>{a.initialize(u)},className:un.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:n.jsx(d.Icon,{name:o.ICONS.arrow_left})}}),n.jsx(d.Carousel.Body,{children:e}),r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:n.jsx(d.Icon,{name:o.ICONS.arrow_right})}})]})},Sv=({children:e,className:t})=>{const{hasCarousel:r,mode:s,hasCloseBtn:a,backgroundStyle:o,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=ut(),u=r&&i;return n.jsx("div",{style:o,"data-hasclosebtn":a,className:d.helpers.classNameConcat(un.tipbar,t),children:r?n.jsxs(n.Fragment,{children:[n.jsx(Cv,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),a&&n.jsx(Aa,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):n.jsxs(n.Fragment,{children:[e,a&&n.jsx(Aa,{handleCloseTipbar:l,mode:s})]})})},Pv=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:s,carouselProps:a}=ut(),o=n.jsx("div",{...r,className:un["tipbar-item"],children:e});return s?n.jsx(d.Carousel.Item,{style:a.itemsStyles,children:o}):o},mm=({className:e})=>{const{isOpen:t,slices:r}=ut();return r.length&&t?n.jsx(Sv,{children:r.map((s,a)=>{var o;return n.jsx(n.Fragment,{children:n.jsx(an,{href:s.link,children:n.jsx(Pv,{highlightFirstSection:s.highlightFirstSection,"data-justifyhighlightedsection":s.horizontalAlignHighlightedSection?s.horizontalAlignHighlightedSection:"center",children:s&&((o=s==null?void 0:s.items)!=null&&o.length)?s.items.map((i,c)=>n.jsx(jv,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${a}`)})}):null};mm.displayName="TipBar.Root";const Ps=({className:e,...t})=>n.jsx(hv,{...t,children:n.jsx(mm,{className:e})});Ps.displayName="TipBar";const wv=({CONSTANTS:e,data:t})=>{const{pathname:r}=ce(),{tipbarRef:s}=Ne(),a=c=>{const l=t==null?void 0:t.find(u=>{var m,p,f,h,_;return((p=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:p.deviceType)===c&&((_=(h=(f=u.staticConfig)==null?void 0:f.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(r))});return l||(t==null?void 0:t.find(u=>{var m,p,f,h,_,y;return((p=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:p.deviceType)===c&&(!((h=(f=u.staticConfig)==null?void 0:f.staticConfig)!=null&&h.paths)||((y=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:y.paths.length)===0)}))},o=a("desktop"),i=a("mobile");return n.jsxs("div",{ref:s,className:T.responsive["responsive-flex"],children:[i&&n.jsx("div",{className:T.responsive["responsive-mobile-flex"],children:n.jsx(Ps,{data:i,CONSTANTS:e})}),o&&n.jsx("div",{className:T.responsive["responsive-desktop-flex"],children:n.jsx(Ps,{data:o,CONSTANTS:e})})]})},Nv=({SectionZone:e,name:t,previewId:r})=>{const[s,a]=g.useState();return g.useEffect(()=>{s||T.fetchContentType("search",{name:t,previewId:r}).then(o=>{o!=null&&o.data&&Array.isArray(o.data)&&a(o.data[0])})},[]),n.jsx(e,{data:s??[]})},Ev=e=>{const t=Tv(Rv(e));return Iv(t)},Iv=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},Rv=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let s=t[r==null?void 0:r.cidade];s===void 0&&(s=t[r==null?void 0:r.cidade]=[]),s.push(r)}return t},{}),Tv=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,a)=>s.localeCompare(a)),r={};for(const s of t)r[s]=e[s];return r},Av=({content:e,data:t,showVendor:r,ICONS:s,entity:a,LPLOJAS_TEMPLATE_RETURN_BUTTON:o})=>{const[i,c]=g.useState([]);return g.useEffect(()=>{(async()=>{try{const u=await fetch("/api/master-data/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({masterDataEntity:a,searchFields:{_fields:"_all"},headers:{"REST-Range":"resources=0-1000"}})});if(!u.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${u.status}`);const m=await u.json();c(Ev(m))}catch(u){console.error(u)}})()},[a]),!Array.isArray(t)||!t.length?null:n.jsxs(rt.Root,{data:i,children:[n.jsx(rt.Title,{children:e.titlePage}),n.jsx(rt.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:n.jsx(rt.Content,{showVendor:r,ICONS:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:o})})]})},kv=({data:e,children:t,SectionZone:r,responsive:s,COMMON_PAGE_COLUMN_GAP:a})=>{var p,f;const o=((p=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="mobile")[0])==null?void 0:p.sections)||[],i=((f=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="desktop")[0])==null?void 0:f.sections)||[],c=o.slice(0,1),l=o.slice(1,o.length),u=i.slice(0,1),m=i.slice(1,i.length);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-mobile-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:a,children:[t,n.jsx(r,{data:l??[]})]})]}),n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-desktop-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:u??[]}),n.jsxs(d.Utils.Column,{gap:a,children:[t,n.jsx(r,{data:m??[]})]})]})]})},Ov={Banner:fv,BannerSection:cn,BennefitsBarSection:em,SingleBannerSection:io,TextContentSection:nm,BannerCarousel:Jd,TextAccordionSection:rm,TipbarScreening:wv,ImageGrid:Qd,SearchPageScreening:T.SearchPageScreening,SearchContent:Nv,NewsletterSection:tm,PDPProductCarousel:am,ProductCarousel:im,EmbedLive:Zd,PopupModalSection:cm,SectionZone:lm,LPStoresClientWrapper:Av,WishlistScreening:kv},Lv={Components:Ov,helpers:Og};exports.configureFetchProxy=T.configureFetchProxy;exports.fetchProxy=T.fetchProxy;exports.proxyCartAPI=T.proxyCartAPI;exports.cms=Lv;exports.contexts=Zt;exports.data=Gs;exports.layout=Ln;exports.scripts=pv;
|
|
59
|
+
`},mC=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:fC},Symbol.toStringTag,{value:"Module"})),pC={helpers:mC},hC={Banner:Ua},Np=y.createContext({}),_C=({data:e,children:t,...r})=>{var _,g,v,b,C,j,x,S,P,w,N,T,I;const[s,o]=y.useState(!0),{initialize:a,controller:i,itemsStyles:c}=d.Carousel.useCarousel({gap:0,itemsPerPage:1}),l={slideTranstionTimer:(g=(_=e==null?void 0:e.staticConfig)==null?void 0:_.staticConfig)==null?void 0:g.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:(S=(x=e==null?void 0:e.staticConfig)==null?void 0:x.staticConfig)==null?void 0:S.backgroundColor,textColorVariant:(w=(P=e==null?void 0:e.staticConfig)==null?void 0:P.staticConfig)==null?void 0:w.textColorVariant,content:((T=(N=e==null?void 0:e.content)==null?void 0:N.content)==null?void 0:T.items)??[]},u=(I=l.content)==null?void 0:I.filter(O=>!O.countDownEndDate||new Date(O.countDownEndDate)>new Date),m=u.length>1,f={...l.backgroundColor?{backgroundColor:l.backgroundColor}:{}},p=()=>{o(!1)},h=d.helpers.ValidateProp({fieldTypes:Ir.Mode,property:l.textColorVariant,fallback:"default"});return n.jsx(Np.Provider,{value:{isOpen:s,setIsOpen:o,hasCarousel:m,backgroundStyle:f,handleCloseTipbar:p,mode:h,slideTranstionTimer:l.slideTranstionTimer,showCarouselArrows:l.showCarouselArrows,hasCloseBtn:l.hasCloseBtn,slices:u,carouselProps:{initialize:a,controller:i,itemsStyles:c},...r},children:t})},Lt=()=>y.useContext(Np),gC=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=Lt();return n.jsx(as,{dateEnd:new Date(e),TIME_ZONE:r,...t})},yC="_tipbar_bt3p0_1",vC="_tipbar__carousel_bt3p0_15",Nn={tipbar:yC,tipbar__carousel:vC,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},xC=({coupon:e,feedbackTitle:t,feedbackDescription:r,...s})=>{const{CONSTANTS:o}=Lt(),{addCouponSeller:a,cartStore:i}=we(),[c,l]=y.useState({status:!1,showSnackBar:!1}),[u,m]=y.useState(!1),[f,p]=y.useState(!1),h=async()=>{if(!i.items.length){p(!0);return}(await a(e,"coupon")).code===200?l({status:!0,showSnackBar:!0}):m(!0)};return y.useEffect(()=>{c.showSnackBar&&setTimeout(()=>{l(_=>({..._,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[c.showSnackBar]),y.useEffect(()=>{u&&setTimeout(()=>{m(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[u]),y.useEffect(()=>{f&&setTimeout(()=>{p(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[f]),n.jsxs(n.Fragment,{children:[n.jsx(d.Button,{...s,onClick:h,disabled:c.status,className:Nn["tipbar-item__coupon"],children:c.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),c.showSnackBar&&(t||r)&&n.jsx(Rr,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),u&&n.jsx(Rr,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),f&&n.jsx(Rr,{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}`)]})},bC=({title:e,description:t,style:r,mode:s,className:o})=>n.jsx(d.TextStructure.Root,{children:n.jsxs(d.TextStructure.DivWrapper,{mode:s,className:o,children:[e&&n.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&n.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),jC=({coupon:e,...t})=>{const{CONSTANTS:r}=Lt();return n.jsx(d.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},CC=({staticZone:e,type:t,className:r,description:s,title:o})=>{const{mode:a}=Lt();if(t==="countdown")return n.jsx(gC,{dateEnd:e.countDownEndDate,size:"x-small",mode:a});if(t==="coupon"){const i=d.helpers.ValidateProp({fieldTypes:Ir.Mode,property:e.couponButtonMode,fallback:"default"}),c=d.helpers.ValidateProp({fieldTypes:Ir.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?n.jsx(xC,{coupon:e.coupon,mode:i,variant:c,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const i=d.helpers.ValidateProp({fieldTypes:Ir.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?n.jsx(jC,{coupon:e.coupon,mode:i}):null}return n.jsx(bC,{title:o,description:s,mode:a,className:r})},jc=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=Lt();return n.jsx(d.Button,{title:"fechar tipbar",className:Nn["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:n.jsx(d.Icon,{name:r.ICONS.close})}})},SC=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:s})=>{const{carouselProps:o,CONSTANTS:a}=Lt(),i=y.useRef(null),c=(u,m)=>{var f,p;u.stopPropagation(),u.preventDefault(),m==="prev"?(f=o.controller)==null||f.prevPage():(p=o.controller)==null||p.nextPage(),i.current&&(clearInterval(i.current),l())},l=y.useCallback(()=>{if(s&&o.controller){const u=setInterval(()=>{var m;(m=o.controller)==null||m.nextPage()},s);i.current=u}},[s,o]);return y.useEffect(()=>(l(),()=>{i.current&&clearInterval(i.current)}),[s,l]),n.jsxs(d.Carousel.Root,{innerRef:u=>{o.initialize(u)},className:Nn.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"prev"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_left})}}),n.jsx(d.Carousel.Body,{children:e}),r&&n.jsx(d.Button,{variant:"tertiary",mode:t,onClick:u=>c(u,"next"),adornment:{start:n.jsx(d.Icon,{name:a.ICONS.arrow_right})}})]})},PC=({children:e,className:t})=>{const{hasCarousel:r,mode:s,hasCloseBtn:o,backgroundStyle:a,showCarouselArrows:i,slideTranstionTimer:c,handleCloseTipbar:l}=Lt(),u=r&&i;return n.jsx("div",{style:a,"data-hasclosebtn":o,className:d.helpers.classNameConcat(Nn.tipbar,t),children:r?n.jsxs(n.Fragment,{children:[n.jsx(SC,{mode:s,showCarouselArrows:u,slideTranstionTimer:c,children:e}),o&&n.jsx(jc,{handleCloseTipbar:l,showCarouselArrows:u,mode:s})]}):n.jsxs(n.Fragment,{children:[e,o&&n.jsx(jc,{handleCloseTipbar:l,mode:s})]})})},wC=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:s,carouselProps:o}=Lt(),a=n.jsx("div",{...r,className:Nn["tipbar-item"],children:e});return s?n.jsx(d.Carousel.Item,{style:o.itemsStyles,children:a}):a},Ip=({className:e})=>{const{isOpen:t,slices:r}=Lt();return r.length&&t?n.jsx(PC,{children:r.map((s,o)=>{var a;return n.jsx(n.Fragment,{children:n.jsx(Sn,{href:s.link,children:n.jsx(wC,{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)=>n.jsx(CC,{staticZone:s,type:i.type,title:i.title,description:i.description,className:e},`tipbar-slice-field-${c}`)):null})})},`tipbar-slice-${o}`)})}):null};Ip.displayName="TipBar.Root";const sa=({className:e,...t})=>n.jsx(_C,{...t,children:n.jsx(Ip,{className:e})});sa.displayName="TipBar";const EC=({CONSTANTS:e,data:t})=>{const{pathname:r}=me(),{tipbarRef:s}=Ee(),o=c=>{const l=t==null?void 0:t.find(u=>{var m,f,p,h,_;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&((_=(h=(p=u.staticConfig)==null?void 0:p.staticConfig)==null?void 0:h.paths)==null?void 0:_.includes(r))});return l||(t==null?void 0:t.find(u=>{var m,f,p,h,_,g;return((f=(m=u.staticConfig)==null?void 0:m.staticConfig)==null?void 0:f.deviceType)===c&&(!((h=(p=u.staticConfig)==null?void 0:p.staticConfig)!=null&&h.paths)||((g=(_=u.staticConfig)==null?void 0:_.staticConfig)==null?void 0:g.paths.length)===0)}))},a=o("desktop"),i=o("mobile");return n.jsxs("div",{ref:s,className:k.responsive["responsive-flex"],children:[i&&n.jsx("div",{className:k.responsive["responsive-mobile-flex"],children:n.jsx(sa,{data:i,CONSTANTS:e})}),a&&n.jsx("div",{className:k.responsive["responsive-desktop-flex"],children:n.jsx(sa,{data:a,CONSTANTS:e})})]})},NC=({SectionZone:e,name:t,previewId:r})=>{const[s,o]=y.useState();return y.useEffect(()=>{s||k.fetchContentType("search",{name:t,previewId:r}).then(a=>{a!=null&&a.data&&Array.isArray(a.data)&&o(a.data[0])})},[]),n.jsx(e,{data:s??[]})},IC=e=>{const t=AC(TC(e));return RC(t)},RC=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},TC=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let s=t[r==null?void 0:r.cidade];s===void 0&&(s=t[r==null?void 0:r.cidade]=[]),s.push(r)}return t},{}),AC=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((s,o)=>s.localeCompare(o)),r={};for(const s of t)r[s]=e[s];return r},kC=({content:e,data:t,showVendor:r,ICONS:s,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})=>{const[i,c]=y.useState([]);return y.useEffect(()=>{(async()=>{try{const u=await fetch("/api/master-data/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({masterDataEntity:o,searchFields:{_fields:"_all"},headers:{"REST-Range":"resources=0-1000"}})});if(!u.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${u.status}`);const m=await u.json();c(IC(m))}catch(u){console.error(u)}})()},[o]),!Array.isArray(t)||!t.length?null:n.jsxs(wt.Root,{data:i,children:[n.jsx(wt.Title,{children:e.titlePage}),n.jsx(wt.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:n.jsx(wt.Content,{showVendor:r,ICONS:s,LPLOJAS_TEMPLATE_RETURN_BUTTON:a})})]})},OC=({data:e,children:t,SectionZone:r,responsive:s,COMMON_PAGE_COLUMN_GAP:o})=>{var f,p;const a=((f=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="mobile")[0])==null?void 0:f.sections)||[],i=((p=e==null?void 0:e.filter(h=>h.config.responsive.deviceType==="desktop")[0])==null?void 0:p.sections)||[],c=a.slice(0,1),l=a.slice(1,a.length),u=i.slice(0,1),m=i.slice(1,i.length);return n.jsxs(n.Fragment,{children:[n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-mobile-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:c??[]}),n.jsxs(d.Utils.Column,{gap:o,children:[t,n.jsx(r,{data:l??[]})]})]}),n.jsxs(d.Utils.Column,{className:d.helpers.classNameConcat(s["responsive-desktop-flex"],"utils-column-modifier"),children:[n.jsx(r,{data:u??[]}),n.jsxs(d.Utils.Column,{gap:o,children:[t,n.jsx(r,{data:m??[]})]})]})]})},LC={Banner:hC,BannerSection:wn,BennefitsBarSection:gp,SingleBannerSection:Ua,TextContentSection:vp,BannerCarousel:_p,TextAccordionSection:xp,TipbarScreening:EC,ImageGrid:pp,SearchPageScreening:k.SearchPageScreening,SearchContent:NC,NewsletterSection:yp,PDPProductCarousel:Cp,ProductCarousel:Sp,EmbedLive:hp,PopupModalSection:Pp,SectionZone:wp,LPStoresClientWrapper:kC,WishlistScreening:OC},MC={Components:LC,helpers:Ox};exports.configureFetchProxy=k.configureFetchProxy;exports.fetchProxy=k.fetchProxy;exports.proxyCartAPI=k.proxyCartAPI;exports.cms=MC;exports.contexts=ss;exports.data=Sa;exports.layout=pr;exports.scripts=pC;
|