@soma-vertical-web/multi-lib 1.0.41 → 1.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var jy=Object.defineProperty;var Ql=e=>{throw TypeError(e)};var Sy=(e,t,r)=>t in e?jy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qr=(e,t,r)=>Sy(e,typeof t!="symbol"?t+"":t,r),ki=(e,t,r)=>t.has(e)||Ql("Cannot "+r);var k=(e,t,r)=>(ki(e,t,"read from private field"),r?r.call(e):t.get(e)),ye=(e,t,r)=>t.has(e)?Ql("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ue=(e,t,r,n)=>(ki(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Re=(e,t,r)=>(ki(e,t,"access private method"),r);var so=(e,t,r,n)=>({set _(o){ue(e,t,o,r)},get _(){return k(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),j=require("react"),U=require("./index-DsX1pAV4.js"),hr=require("js-cookie"),er=require("idb-keyval"),xn=require("zustand"),p=require("@soma-vertical-web/core-components"),Fn=require("axios"),Ca=require("@date-fns/tz");require("jose");const zn=require("@soma-vertical-web/foundations"),fc=require("react-dom"),dn=require("draft-js"),Hd=require("react-intersection-observer");function Cy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const $t=Cy(j),pc=j.createContext({}),wy=({data:e,children:t})=>s.jsx(pc.Provider,{value:{tags:e==null?void 0:e.config},children:t}),Cr=()=>{const{tags:e}=j.useContext(pc),t=j.useCallback(r=>{var l,u,d,h;const n=(u=(l=e==null?void 0:e.commercial)==null?void 0:l.items)==null?void 0:u.find(m=>{var _;return(_=r??[])==null?void 0:_.find(g=>g.id===m.key)}),o=(h=(d=e==null?void 0:e.institucional)==null?void 0:d.items)==null?void 0:h.find(m=>{var _;return(_=r??[])==null?void 0:_.find(g=>g.id===m.key)}),i=e==null?void 0:e.flagPdp,c=(r==null?void 0:r.find(m=>{var _;return m.id===((_=e==null?void 0:e.flagGoldenPdp)==null?void 0:_.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:n,institucional:o,flagPdp:i,flagGoldenPdp:c}},[e]);return{tags:e,getAvailableProductTag:t}},$d=({gridScrollBack:e})=>{j.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},Wd=j.createContext({}),Ey=({children:e,gridScrollBack:t})=>{const r=j.useRef(null);return $d({gridScrollBack:t}),s.jsx(Wd.Provider,{value:{sizesContainerRef:r},children:e})},Vd=()=>{const e=j.useContext(Wd);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},Or=({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})},st={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeId:"",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:r,commonData:n,customData:o,promotionInfo:i,itemList:c,outsideEcommerceData:l}=e,{availableSizes:u,sizes:d,price:h}=n,m={...r==="view_item"?{currency:st.configs.currency,value:h,grade_disponivel:u??(d?Gd(d):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:h,currency:st.configs.currency}:{}},_=oo({data:n,customData:{...o,...c,...i},configs:st.configs});Or({event:r,data:{...l,ecommerce:{...c,...m,items:[_]}}}),typeof t=="function"&&t(_,m)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:n,outsideEcommerceData:o,customData:i}=e;if(t.length===0)return;const c=t.map(({node:l},u)=>oo({data:{...l},customData:{...r,index:u,...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n},configs:st.configs}));Or({event:"view_item_list",data:{...o,ecommerce:{...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n,items:c}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:n,supportData:{selectedSkus:o,price:i},promotionInfo:c,itemList:l,outsideEcommerceData:u}=e;let d=0;const h=r.map(m=>{var x,S,w,I,P,C,N,T,O;const _=o==null?void 0:o.find(M=>(m.productId??m.id)===M.productId);let g={...c,...l};if(_){const M=Qd(),z=Yd(M,_);z&&(g={...g,...z}),t==="add_to_cart"&&(c||l)&&wa({persistedData:M,type:"add",sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku),newData:{promotionInfo:c,itemList:l}}),t==="remove_from_cart"&&wa({persistedData:M,type:"remove",sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku)})}d+=m.price??((w=(S=(x=_==null?void 0:_.offers)==null?void 0:x.offers)==null?void 0:S[0])==null?void 0:w.price)??0;const v=(_==null?void 0:_.size)??U.getColorAndSizeFromSkuName((_==null?void 0:_.skuName)??(_==null?void 0:_.name)??((I=m.itemOffered)==null?void 0:I.skuName),st.configs.NAME_SPLIT_SYMBOL).size;return oo({data:m,customData:{...n,...g??{...c,...l},item_sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku)??((P=m.itemOffered)==null?void 0:P.sku),quantity:(n==null?void 0:n.quantity)??m.quantity??1,item_variant2:v,seller_id:(_==null?void 0:_.sellerId)??(_==null?void 0:_.seller)??((O=(T=(N=(C=_==null?void 0:_.offers)==null?void 0:C.offers)==null?void 0:N[0])==null?void 0:T.seller)==null?void 0:O.identifier)??m.seller},configs:st.configs})});Or({event:t,data:{...u,ecommerce:{value:i??d,currency:st.configs.currency,items:h}}})},filterEvent:e=>{var c;const{commonData:t,customData:r,outsideEcommerceData:n}=e,o={},i={};Array.isArray(t==null?void 0:t.selectedFacets)&&((c=t==null?void 0:t.selectedFacets)!=null&&c.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:l,value:u})=>{var m;const d=((m=st.configs.PLP_FILTERS.find(_=>_.key===l))==null?void 0:m.eventLabel)??l,h=(o==null?void 0:o[d])||[];d==="price_range"&&u.replace(":","-"),o[d]=[...h,u]}),Object.keys(o).forEach(l=>i[l]=o[l].join(", "))),Or({event:"filter",data:{...n,...i,...r}})},viewCartEvent:e=>{var h,m,_,g,v,x,S,w,I,P;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:n}=t;if(!n)return;const o=window.localStorage.getItem("persistedCartEventsData"),i=o?JSON.parse(o):{},c=n.items.map(C=>{const{promotionInfo:N,itemList:T}=i[C.id]??{};return oo({data:{...C,price:C.price/100,listPrice:C.listPrice/100},customData:{...N,...T,item_sku:C.id??C.itemOffered.sku,quantity:C.quantity??1},configs:st.configs})}),l=(((h=n.totalizers.find(C=>C.name==="Total dos Itens"))==null?void 0:h.value)??0)/100,u=(((m=n.totalizers.find(C=>C.name==="Total dos Descontos"))==null?void 0:m.value)??0)/100,d=((_=n.marketingData)==null?void 0:_.utmiCampaign)===st.configs.VENDOR_CODE?(g=n.marketingData)==null?void 0:g.utmCampaign:(x=String((v=n.openTextField)==null?void 0:v.value))==null?void 0:x.split(" - ")[0];Or({event:"view_cart",data:{...r,ecommerce:{currency:st.configs.currency,value:l+u,total_discount:Math.abs(u),cep_preenchido:!!((w=(S=n.shippingData)==null?void 0:S.address)!=null&&w.postalCode),...d?{seller_coupon_name:d}:{},...((I=n.marketingData)==null?void 0:I.coupon)&&{sale_coupon_name:(P=n.marketingData)==null?void 0:P.coupon},subtotal:l,items:c}}})},readyEvents:e=>{const{event:t,readyData:r}=e;Or({event:t,data:{...r}})}},Gd=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),Py=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(st.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},oo=({data:e,customData:t,configs:r})=>({...Iy(e,r==null?void 0:r.MAIN_IMAGE),...Ny(e),...Ry(e),...Ty(e),...t}),Kd=()=>{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("_"))??[]:[]},Qd=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Yd=(e,t)=>e==null?void 0:e[t],wa=({persistedData:e,type:t,sku:r,newData:n})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:n}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:n}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Iy=(e,t="1")=>{var i,c,l,u,d,h,m,_,g,v,x;const r=e.productReference??e.gtin??e.productRefId,n=e.image??((c=(i=e.items)==null?void 0:i[0])==null?void 0:c.images)??((l=e.itemOffered)==null?void 0:l.image),o=n==null?void 0:n.find(S=>S.alternateName===t||S.imageLabel===t||S.keywords===t);return{item_id:e.productId??((u=e.isVariantOf)==null?void 0:u.productGroupID)??((d=e.isVariationOf)==null?void 0:d.productGroupID)??((m=(h=e.itemOffered)==null?void 0:h.isVariationOf)==null?void 0:m.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??U.splitNameAndSizeFromFullName((_=e.itemOffered)==null?void 0:_.name,st.configs.NAME_SPLIT_SYMBOL).name,item_brand:((g=e.brand)==null?void 0:g.brandName)??((v=e.brand)==null?void 0:v.name)??e.brand??((x=e.itemOffered)==null?void 0:x.brand.name),item_url:`${st.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},Yl=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,Ny=e=>{var d,h;const{categories:t,categoriesIds:r}=e,n=t??((d=e.itemOffered)==null?void 0:d.categories),o=r??((h=e.itemOffered)==null?void 0:h.categoriesIds),i=Yl(n),c=Yl(o),l=i.slice(1,-1).split("/"),u=c.slice(1,-1).split("/");return{item_category:l[0].toLowerCase().includes(st.configs.categoryOff)?"Bazar":"Coleção",...l[1]&&{item_category2:l[1]},...l.length>2&&{item_category3:l[l.length-1]},item_category_id:u[u.length-1],...u.length>1&&{item_parent_category_id:u[u.length-2]}}},Ry=e=>{var o,i,c,l,u,d;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((l=(c=(i=e.isVariantOf)==null?void 0:i.hasVariant)==null?void 0:c[0])==null?void 0:l.name)??((d=(u=e.items)==null?void 0:u[0])==null?void 0:d.name),{color:r,size:n}=U.getColorAndSizeFromSkuName(t,st.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:n}}},Ty=e=>{var u,d;const{price:t,listPrice:r,installments:n}=e,o=t??((u=e.offers)==null?void 0:u.lowPrice)??0,i=r??((d=e.offers)==null?void 0:d.highPrice)??0,c=i?i-o:0,l=c%1===0?c:Number(c.toFixed(2));return{...t&&{price:o??i},...i&&{list_price:i,discount:l},...n&&{installments:n==null?void 0:n.count,installment_value:n==null?void 0:n.value},item_currency:st.configs.currency}},Xd=()=>{const[e,t]=Kd(),[r,n]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&n?n:"",page_departament:o,id:t,name:e}},Oy=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:st,findDataInPersistedData:Yd,getAvailablesSizes:Gd,getCategories:Py,getPageCategoryAndDepartmentFromSlug:Xd,getPersistedData:Qd,getProductListInfoFromHead:Kd,pushDatalayer:Or,updatePersistedData:wa},Symbol.toStringTag,{value:"Module"})),Pt={ping:"is-ping",session:"is-session",anonymous:"is-anonymous"},Mi=[{name:Pt.session,duration:1/1440*30},{name:Pt.anonymous,duration:365}],Jd=({storeId:e,storeUrl:t})=>{const r=/\.[\w|\-+\.\w+\.\w]+/,[n]=(t==null?void 0:t.match(r))||[],o=(l,u)=>{const d={session:hr.get(Pt==null?void 0:Pt.session),anonymous:hr.get(Pt==null?void 0:Pt.anonymous),url:window.location.href,agent:window.navigator.userAgent,type:l,...u};return fetch(`https://sp.vtex.com/event-api/v1/${e}/event`,{body:JSON.stringify(d),method:"POST",headers:{"Content-Type":"application/json"}})},i=()=>{hr.get(Pt==null?void 0:Pt.ping)||(hr.set(Pt==null?void 0:Pt.ping,"1",{domain:process.env.NODE_ENV==="development"?"localhost":n,expires:1/1440*1}),o("session.ping"))};return{sendSearchEvent:o,sessionGenerator:()=>{i(),Mi==null||Mi.forEach(({name:l,duration:u})=>{var h;if(hr.get(l)||!("randomUUID"in window.crypto))return;const d=(h=window==null?void 0:window.crypto)==null?void 0:h.randomUUID().replace(/\-/g,"");hr.set(l,d,{path:"/",domain:process.env.NODE_ENV==="development"?"localhost":n,expires:u})})}}},Zd=j.createContext({}),Ay=({children:e,evtFunctionsConfigs:t})=>{const r=j.useRef({}),n=j.useRef(null),o=j.useRef(null),i=j.useRef({}),{sendSearchEvent:c,sessionGenerator:l}=Jd(t),u=j.useRef({trigger:!1,index:0}),d=({functionKey:_,data:g,callBack:v,timeout:x=100})=>{window.dataLayer||(window.dataLayer=[]),st.configs=t;try{typeof st[_]=="function"&&setTimeout(()=>{var S;g.promotionInfo=r.current,(S=o.current)!=null&&S.item_list_name&&(g.itemList=o.current),st[_](g,v)},x)}catch(S){Or({event:"error_event",data:{error_message:(S==null?void 0:S.message)??S}})}},h=({content:_})=>{d({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:_.replace("::",":")}}})},m=({updatePromotionRef:_,promotion:g,index:v})=>{_&&(r.current={...g}),d({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...g,...v!==void 0&&{index:v}}}}})};return l(),s.jsx(Zd.Provider,{value:{sendSearchEvent:c,sendDataLayerEvent:d,triggerSelectItemEventRef:u,promotionEventRef:r,currentLocalRef:n,itemListRef:o,cartProductsFullDataRef:i,handleSelectContent:h,handleSelectPromotionEvent:m},children:e})},Ee=()=>j.useContext(Zd),ef=j.createContext({}),ky=({children:e,productData:t,isKit:r,PDP_INFO:n,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:i})=>{var Y,X;const{sendDataLayerEvent:c,triggerSelectItemEventRef:l}=Ee(),{productId:u,productName:d,items:h,items:[{images:m,Videos:_}],description:g,["Composição"]:v="",productReference:x,categories:[S]}=t,{getAvailableProductTag:w}=Cr(),I=w(Object.entries(t.clusterHighlights).map(Z=>({id:Z[0],name:Z[1]}))),P=S.slice(1,-1).split("/"),{installments:C,price:N,listPrice:T,sizes:O,allSizesAvailable:M}=U.getSkuInfos({items:h,NAME_SPLIT_SYMBOL:o}),z=U.getThumbImage({images:m,TEXTURE_IMAGE:i}),D=[{label:`${n.product.description}`,value:"description",content:g},{label:`${n.product.materiais}`,value:"composition",content:v}],B=((X=U.getColorAndSizeFromSkuName((Y=t.items)==null?void 0:Y[0].name,o))==null?void 0:X.color)??t["Cores Filtráveis"][0]??"",G=()=>({commonData:{...t,sizes:O,price:N,listPrice:T,installments:C},customData:{installments:C==null?void 0:C.count,installment_value:Number(C==null?void 0:C.value).toFixed(2)}}),J=({sku:Z,size:he})=>{const{commonData:fe,customData:ee}=G();c({functionKey:"productEvents",data:{event:"view_item",commonData:fe,customData:{...ee,...Z&&{item_sku:Z},...he&&{item_variant2:he}}}})};return j.useEffect(()=>{if(l.current.trigger){const{commonData:Z,customData:he}=G();c({functionKey:"productEvents",data:{event:"select_item",commonData:Z,customData:{...he,index:l.current.index}}}),l.current.trigger=!1}J({})},[]),s.jsx(ef.Provider,{value:{productData:t,productId:u,productName:d,productReference:x,tag:I,items:h,sizes:O,allSizesAvailable:M,installments:C,price:N,listPrice:T,thumbImage:z,images:m,video:_[0],descriptionContent:D,breadcrumbList:P,isKit:r,colorName:B,handleViewItemEvent:J},children:e})},Et=()=>{const e=j.useContext(ef);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},My=()=>{const[e,t]=j.useState(null);return[e,async n=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(n),t(n),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},tf=()=>{j.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)}},[])},Ly=typeof window>"u",Dy=(e,t)=>{const[r,n]=j.useState(()=>{if(Ly)return null;const i=localStorage.getItem(e);return i===null?t:JSON.parse(i||"{}")});return j.useEffect(()=>{const i=c=>{c.storageArea===localStorage&&c.key===e&&n(JSON.parse(c.newValue))};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[e,t]),[r,i=>{n(c=>{const l=typeof i=="function"?i(c):i;return localStorage.setItem(e,JSON.stringify(l)),l})}]};function hc(e,t,r){const[n,o]=j.useState(!1),{threshold:i}=r||{};return j.useEffect(()=>{if(!e.current)return()=>null;let c=null;const l=new IntersectionObserver(([u])=>{if(r!=null&&r.delay){c&&clearTimeout(c),c=setTimeout(()=>{o(u.isIntersecting),t&&u.isIntersecting&&l.unobserve(e.current)},r.delay);return}o(u.isIntersecting),t&&u.isIntersecting&&l.unobserve(e.current)},{threshold:i||1});return l.observe(e.current),()=>{l.disconnect()}},[e]),n}const $o=({callback:e,onEnterViewportOnce:t,options:r})=>{const n=j.useRef(null);return j.useEffect(()=>{const o=n.current;if(!o)return;const i=new IntersectionObserver(([c])=>{c.isIntersecting&&typeof e=="function"&&(e(),t&&(i.unobserve(o),i.disconnect()))},r);return i.observe(o),()=>{t&&i.unobserve(o),i.disconnect()}},[e,t,r]),{element:n}},rf=({defaultScale:e=1,maxScale:t=3})=>{const r=j.useRef(null),n=j.useRef(null),[o,i]=j.useState(e),c=j.useRef(0),l=j.useRef({x:0,y:0}),u=j.useRef({x:0,y:0}),d=()=>{if(!n.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const g=r.current.getBoundingClientRect(),v=n.current.children[0].getBoundingClientRect(),x=v.width,S=v.height,w=Math.min(0,(g.width-x)/2),I=Math.max(0,(x-g.width)/2),P=Math.min(0,(g.height-S)/2),C=Math.max(0,(S-g.height)/2);return{minX:w,maxX:I,minY:P,maxY:C}},h=(g,v,x)=>{if(n.current){const S=n.current.children[0];S&&requestAnimationFrame(()=>{S.style.transform=`translate(calc(-50% + ${g}px), calc(-50% + ${v}px)) scale(${x})`})}},m=j.useCallback(g=>{const{minX:v,maxX:x,minY:S,maxY:w}=d(),{x:I,y:P}=u.current,C=Math.max(v,Math.min(x,I)),N=Math.max(S,Math.min(w,P));if(g.touches.length>1){const T=g.touches[0],O=g.touches[1],M=T.pageX-O.pageX,z=T.pageY-O.pageY;c.current=Math.sqrt(M*M+z*z),l.current={x:(T.pageX+O.pageX)/2,y:(T.pageY+O.pageY)/2}}else g.touches.length===1&&(l.current={x:g.touches[0].pageX-C,y:g.touches[0].pageY-N})},[o,u]),_=j.useCallback(g=>{if(!n.current||!r.current)return;const{minX:v,maxX:x,minY:S,maxY:w}=d();if(g.touches.length>1){g.preventDefault();const I=g.touches[0],P=g.touches[1],C=I.pageX-P.pageX,N=I.pageY-P.pageY,T=Math.sqrt(C*C+N*N);if(!c.current){c.current=T;return}const O=T/c.current,M=Math.max(1,Math.min(t,o*O));if(o===M)return;i(M);const z=(I.pageX+P.pageX)/2,D=(I.pageY+P.pageY)/2;let B=z-l.current.x,G=D-l.current.y;B=Math.max(v,Math.min(x,B)),G=Math.max(S,Math.min(w,G)),u.current={x:B,y:G},c.current=T,h(B,G,M)}else if(g.touches.length===1){const I=g.touches[0].pageX,P=g.touches[0].pageY;let C=I-l.current.x,N=P-l.current.y;C=Math.max(v,Math.min(x,C)),N=Math.max(S,Math.min(w,N)),u.current={x:C,y:N},h(C,N,o)}},[t,o]);return j.useEffect(()=>(document.addEventListener("touchstart",m),document.addEventListener("touchmove",_,{passive:!1}),()=>{document.removeEventListener("touchstart",m),document.removeEventListener("touchmove",_)}),[_,m]),{containerRef:r,imgRef:n,scale:o}},Fy=()=>{const e=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/coupon",{body:{orderFormId:g,coupon:v}}),t=async(g,v,x={},S)=>{if(S)if(v){const w=v.includes(" - ")?v.split(" - ")[0]:v,I=await U.proxyCartAPI("/_v/proxy/checkout/order-form/seller-code",{body:{orderFormId:g,sellerCode:w}});return I instanceof Object&&x.name in I&&I[x.status]===!0?U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:g,sellerCode:w,sellerName:I[x.name]}}).then(C=>({...C,openTextField:{...(C==null?void 0:C.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:w}})}else return U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:g,sellerCode:"",sellerName:""}})},r=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:g,marketingData:v}}),n=async(g,v,x)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/items",{body:{orderFormId:g,orderItems:U.addItemOrder(v,x)}}),o=async(g,v,x,S=!1)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/offerings",{body:{id:v,itemIndex:x,orderFormId:g,remove:S}}),i=async g=>U.proxyCartAPI("/_v/proxy/checkout/order-form/items/remove-all",{body:{orderFormId:g}}),c=async g=>U.proxyCartAPI("/_v/proxy/checkout/order-form",{body:{orderFormId:g??""}}),l=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/profile",{body:{orderFormId:g,email:v}}),u=async(g,v,x)=>{const S=U.removeQuantity(v,x);return U.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderItems:S.updateItems,orderFormId:g}})},d=async(g,v,x,S,w,I,P)=>{var T,O;const C=P?{startDateUtc:(T=I==null?void 0:I.deliveryWindow)==null?void 0:T.startDate,endDateUtc:(O=I==null?void 0:I.deliveryWindow)==null?void 0:O.endDate}:null,N={logisticsInfo:Array.from({length:S},(M,z)=>({itemIndex:z,selectedDeliveryChannel:(I==null?void 0:I.deliveryChannel)||null,selectedSla:(I==null?void 0:I.deliveryMethod)||null,deliveryWindow:C})),selectedAddresses:w,clearAddressIfPostalCodeNotFound:!0};return U.proxyCartAPI("/_v/proxy/checkout/order-form/shipping",{body:{...N,orderFormId:g,country:x,postalCode:v}})},h=async(g,v,x)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/shipping/update",{body:{orderFormId:g,options:v,selectedAddresses:x}}),m=async(g,v,x,S)=>{const w=U.updateQuantity(v,x,S);return U.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderFormId:g,orderItems:w}})};return{addCoupon:e,addItem:n,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:i,getOrderForm:c,insertProfileEmail:l,removeItem:u,shipping:d,shippingUpdate:h,updateItemQuantity:async(g,v,x,S,w)=>m(g,v,x,S).then(I=>I&&Array.isArray(I.items)?U.updateItemSellerExternal(I.items,x)?m(g,v,x,w):I:!1)}},Lo="soma::cart",_s="soma::options",hn=xn.create((e,t)=>{const r=Fy(),n=async(o,i,c)=>{e({loading:!0});const l=await U.updateOrderFormPromise(o);if(typeof l!="boolean"){e({...l});const u=await U.mergeOptionsPromise(er.get(_s),c);return er.set(_s,u),U.getValue(l,i).finally(()=>e({loading:!1,options:u}))}return U.promiseDefault};if(typeof window<"u"){const o=async i=>{if(i){const c=await er.get(_s).then(d=>U.findOptions(d,i.items));er.set(Lo,i),er.set(_s,c),e({...i,options:c});const l=new URLSearchParams(window.location.search),u=l.get("utm_campaign")||l.get("utmi_campaign")||"";u&&n(()=>r.addSellerCode(t().id,u.toUpperCase()),"openTextField")}};return er.get(Lo).then(i=>r.getOrderForm(i?i.id:"").then(o)),{...U.initialState,addCoupon:async i=>n(()=>r.addCoupon(t().id,i),"marketingData"),addItem:(i,c)=>{n(()=>r.addItem(t().id,t().items,i),"items",c)},addSellerCode:async(i,c)=>n(()=>r.addSellerCode(t().id,i,c,t().isOpen),"openTextField"),addMarketingData:async i=>n(()=>r.addMarketingData(t().id,i),"marketingData"),emptyCart:()=>{n(()=>r.emptyCart(t().id))},removeItem:async i=>{const c=await n(()=>r.removeItem(t().id,t().items,i),"items");return U.getRemoveId(i,c)},shipping:async(i,c="BR")=>n(()=>r.shipping(t().id,i??"",c,t().items.length,U.createNewAddress(i??"",null,c)),"shippingData"),shippingUpdate:async i=>n(()=>{var c;return r.shippingUpdate(t().id,i,(c=t().shippingData)==null?void 0:c.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(i,c,l)=>n(()=>r.giftItem(t().id,i,c,l),"items"),updateItemQuantity:async(i,c,l)=>{const{id:u,items:d}=t();return n(()=>{var h;return r.updateItemQuantity(u,d,i,c,((h=d.find(m=>m.id===i))==null?void 0:h.quantity)??1)},"items",l?[l]:void 0)},insertProfileEmail:async i=>n(()=>r.insertProfileEmail(t().id,i),"clientProfileData"),setIsOpen:i=>e({isOpen:i})}}return U.initialState}),zy=()=>hn(e=>e),nf=xn.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(n=>U.addNotification(n,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(n=>n.id!==t)}))}})),mc=()=>nf(e=>e.notifications),_c=()=>nf(e=>e.actions),qy=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:_s,KEY_INDEXED_STORE:Lo,useCartStore:hn,useGetCartStoreState:zy,useGetNotificationActions:_c,useGetNotificationsStore:mc},Symbol.toStringTag,{value:"Module"})),By=6e3,sf=j.createContext({}),of=({children:e,...t})=>{const{items:r}=hn(),[n,o]=j.useState([]),i=j.useRef(null),c=j.useMemo(()=>Array.isArray(n)&&n.length>0?n.map(l=>r.find(u=>u.id===l.id)).filter(l=>l!==void 0):[],[r,n]);return j.useEffect(()=>{n.length&&(clearTimeout(i.current??0),i.current=setTimeout(()=>{o([])},By))},[n]),s.jsx(sf.Provider,{value:j.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:c}),[t,o,c]),children:e})},ks=()=>{const e=j.useContext(sf);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class af{constructor(){Qr(this,"events",{});Qr(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(n=>n!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(n=>{this.prevData[t]=r,n(r)})}}const cf=j.createContext({}),Uy=({children:e,headerConfigs:t,pathname:r,storeId:n,...o})=>{U.configureFetchProxy(n);const[i,c]=j.useState(!0),[l,u]=j.useState(!1),d=r==="/",h=j.useRef(new af),m=v=>v?{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},_=m(d),g=j.useRef(_);return j.useEffect(()=>{var S;const v=((S=new URLSearchParams(window.location.search))==null?void 0:S.toString())??"";(v.includes("utm_")||v.includes("gclid"))&&(hr.get("lastMedias")||hr.set("lastMedias",`${v}`,{expires:1/24}));const x=()=>{const w=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,I=window.innerWidth<1024||!!w.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);l||u(!0),i!==I&&(c(I),u(!0))};return l||x(),window.addEventListener("resize",x,{passive:!0}),()=>window.removeEventListener("resize",x)},[i,l]),j.useEffect(()=>{const v=m(d);h.current.publish("header:change_variant",v.headerVariant),h.current.publish("header:change_position",v.position),g.current=v},[d]),s.jsx(cf.Provider,{value:{isMobile:i,mediatorRef:h,currentHeaderConfigsRef:g,deviceValidated:l,...o},children:s.jsx(of,{children:e})})},xe=()=>j.useContext(cf),lf=j.createContext({}),Hy=({children:e,...t})=>s.jsx(lf.Provider,{value:{...t},children:e}),Ae=()=>j.useContext(lf),bn=(e,t)=>xn.create(r=>{const n=()=>r({value:e});return t&&t instanceof Set&&t.add(n),{value:e,actions:{setValue:o=>r({value:o}),reset:n}}}),Cs={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Ms=new Set,$y=()=>{Ms.forEach(e=>{e()})},uf=xn.create((e,t)=>{const r=()=>e({value:Cs.category});return Ms.add(r),{value:Cs.category,actions:{reset:r,setValue:n=>e(()=>({value:n})),updateValue:n=>{t().value!==n&&e({value:n})}}}}),df=()=>uf(e=>e.value),Ls=()=>uf(e=>e.actions),ff=bn(Cs.menuMobileIsOpen,Ms),pf=()=>ff(e=>e.value),hf=()=>ff(e=>e.actions),mf=bn(Cs.searchModalIsOpen,Ms),_f=()=>mf(e=>e.value),Wo=()=>mf(e=>e.actions),gf=bn(Cs.userMenuIsOpen,Ms),gc=()=>gf(e=>e.value),yc=()=>gf(e=>e.actions),Wy=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:$y,useActionsHeaderCategory:Ls,useActionsMenuMobileIsOpen:hf,useActionsSearchModalIsOpen:Wo,useActionsUserMenuIsOpen:yc,useGetHeaderCategoryStore:df,useGetMenuMobileIsOpen:pf,useGetSearchModalIsOpen:_f,useGetUserMenuIsOpen:gc},Symbol.toStringTag,{value:"Module"})),es={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},rs=new Set,Vy=()=>{rs.forEach(e=>{e()})},yf=xn.create(e=>{const t=()=>e({value:es.selectedSkuInfo});return rs.add(t),{value:es.selectedSkuInfo,actions:{setValue:r=>e(n=>({value:{...n,...r}})),reset:t}}}),Ds=()=>yf(e=>e.value),vf=()=>yf(e=>e.actions),xf=bn(es.openLetMeKnow,rs),Gy=()=>xf(e=>e.value),Ky=()=>xf(e=>e.actions),bf=bn(es.showNotify,rs),jf=()=>bf(e=>e.value),vc=()=>bf(e=>e.actions),Sf=bn(es.showBottomNavigation,rs),Qy=()=>Sf(e=>e.value),Yy=()=>Sf(e=>e.actions),Cf=bn(es.openMeasurements,rs),wf=()=>Cf(e=>e.value),Ef=()=>Cf(e=>e.actions),Xy=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:Vy,useActionsPDPOpenLetMeKnow:Ky,useActionsPDPOpenMeasurements:Ef,useActionsPDPSelectedSkuInfo:vf,useActionsPDPShowBottomNavigation:Yy,useActionsPDPShowNotify:vc,useGetPDPOpenLetMeKnow:Gy,useGetPDPOpenMeasurements:wf,useGetPDPSelectedSkuInfo:Ds,useGetPDPShowBottomNavigation:Qy,useGetPDPShowNotify:jf},Symbol.toStringTag,{value:"Module"})),Xl={feedback:{active:!1,action:"add"},list:[]},xc=xn.create((e,t)=>({value:Xl,actions:{reset:()=>e({value:Xl}),setValue:n=>e(()=>({value:n})),toggleProduct:n=>e(o=>o.value.list.includes(n)?{value:{feedback:{active:!0,action:"remove"},list:o.value.list.filter(i=>i!==n)}}:{value:{feedback:{active:!0,action:"add"},list:[...o.value.list,n]}}),updateList:n=>e(o=>({value:{...o.value,list:n}})),resetFeedback:()=>e(n=>({value:{...n.value,feedback:{active:!1,action:""}}}))}})),ns=()=>xc(e=>e.value.list),bc=()=>xc(e=>e.value.feedback),jn=()=>xc(e=>e.actions),Jy=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:jn,useGetWishlistFeedbackStore:bc,useGetWishlistStore:ns},Symbol.toStringTag,{value:"Module"})),Pf=j.createContext({}),Zy=({children:e,headerData:t,...r})=>{var h,m;const n=j.useRef(null),o=j.useRef(null),i=j.useRef(null),c=j.useRef(null),l=j.useRef(null),{mediatorRef:u,currentHeaderConfigsRef:d}=xe();return(h=u.current)==null||h.subscribe("header:change_variant",_=>{var w,I,P;if(_&&d.current&&(d.current.bannerVariant=_),!n.current)return;const v=document.body.scrollTop>0,x=n.current.getAttribute("data-interactiveVariant"),S=v?x:_??((w=d.current)==null?void 0:w.bannerVariant)??"default";S!==((I=d.current)==null?void 0:I.headerVariant)&&(n.current.setAttribute("data-bottomdivider",String(v)),n.current.setAttribute("data-variant",String(S)),(P=u.current)==null||P.publish("herobanner:change_controllers_variant",S),d.current&&(d.current.headerVariant=S))}),(m=u.current)==null||m.subscribe("header:change_position",_=>{n.current&&(n.current.style.position=_)}),j.useEffect(()=>{const _=new AbortController,g=p.helpers.throttle(()=>{var x;return(x=u.current)==null?void 0:x.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",g,{passive:!0,signal:_.signal});const v=x=>{var w;(w=x.target.closest("a"))==null||w.blur()};return n.current&&(n.current.addEventListener("click",v,{signal:_.signal}),n.current.addEventListener("touchend",v,{signal:_.signal})),()=>{_.abort()}},[]),s.jsx(Pf.Provider,{value:{headerData:t,structureRef:o,rootRef:n,tipbarRef:i,userMenuMobileRef:c,userMenuDesktopRef:l,...r},children:e})},Ze=()=>j.useContext(Pf),If=j.createContext({}),Nf=({children:e,...t})=>s.jsx(If.Provider,{value:j.useMemo(()=>t,[t]),children:e}),jc=()=>{const e=j.useContext(If);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},ev=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},tv=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const n=t.getBoundingClientRect(),o=e.getBoundingClientRect(),i=e!=null&&e.parentElement?ev(e==null?void 0:e.parentElement):0;return{left:n.left+n.width/2-(o.width+i),top:n.top+n.height+r}},Rf=j.createContext({}),Tf=({children:e,delay:t=600,gap:r=20,...n})=>{const[o,i]=j.useState(!1),c=j.useRef(null),[l,u]=j.useState(!1),[d,h]=j.useState({left:0,top:0}),m=j.useCallback(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{i(!1),u(!1)},t))},[u,i,t]);return j.useEffect(()=>{if(typeof window>"u")return;const _=window.document.querySelector("#cart-button"),g=window.document.querySelector("#add-to-cart--tooltip");if(_&&g){const{left:v,top:x}=tv(g,_,r??0);h({left:v,top:x}),u(!1)}},[r,o]),s.jsx(Rf.Provider,{value:j.useMemo(()=>({...n,...d,handleClose:m,isLeaving:l,isOpen:o,setIsOpen:i,setIsLeaving:u}),[n,d,m,l,o,i,u]),children:e})},Sn=()=>{const e=j.useContext(Rf);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Of=j.createContext({}),rv=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:n,...o})=>{var _e,Ce,ge,we;const i=hn(),{setRecentlyAdded:c}=ks(),l=j.useRef(""),u=mc(),{addNotification:d,removeNotification:h}=_c(),[m,_]=j.useState(null),{addCoupon:g,addItem:v,addSellerCode:x,addMarketingData:S,emptyCart:w,isOpen:I,removeItem:P,shipping:C,shippingUpdate:N,toggleServiceToProduct:T,updateItemQuantity:O}=i;j.useEffect(()=>{(async()=>{var F,ce,je,Oe;if(!i.id||!((ce=(F=n==null?void 0:n.promotion)==null?void 0:F.promotionCart)!=null&&ce.idPromotion)||((Oe=(je=n==null?void 0:n.promotion)==null?void 0:je.promotionCart)==null?void 0:Oe.selectPromotion)==="Desativar")return;const oe=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:i.id,promotionId:n.promotion.promotionCart.idPromotion,web:(n==null?void 0:n.promotion.promotionCart.versionAPI)==="Original"})}).then(q=>q.json());_(oe)})()},[i.id,i.items.length,n==null?void 0:n.versionId,(Ce=(_e=n==null?void 0:n.promotion)==null?void 0:_e.promotionCart)==null?void 0:Ce.idPromotion,(we=(ge=n==null?void 0:n.promotion)==null?void 0:ge.promotionCart)==null?void 0:we.versionAPI]),j.useEffect(()=>{const V=hr.get("lastMedias");if(i.id&&V&&l.current!==V){l.current=V;const oe=new URLSearchParams(V),F=U.mountMarketingData(oe);S(F)}},[i,S]);const M=j.useCallback(async(V,oe)=>(oe==="coupon"?g(V):x(V,t??{})).then(ce=>{if(typeof ce!="boolean"&&ce instanceof Object){if(oe==="seller"&&"value"in ce){const{statusOk:je,value:Oe}=ce,q=String(Oe??"").split(" - ");return U.getCode((q==null?void 0:q[0])??"",V,!!je)}return U.getCode(String(ce.coupon),V,!0)}return U.getCode("","")}).catch(()=>Promise.resolve({code:400})),[g,x]),z=j.useCallback((V,oe,F)=>{const{id:ce}=V;O(ce,oe,F)},[O]),D=j.useCallback((V,oe,F=!1)=>{if(!V)return;const{id:ce}=V,je=U.findItemIndex(i.items,ce);if(je!==-1&&!F){const Oe=Number(i.items[je].quantity),q=i.items[je]?Oe+1:1;z(V,q,oe)}else v({id:ce,quantity:(V==null?void 0:V.quantity)??1,seller:V.seller});I||c(Oe=>[...Oe,V])},[v,z,i.items,I,c]),B=j.useCallback((V,oe)=>{if(!V||!Array.isArray(V))return;c(ce=>[...ce,...V]);const F=V.map(ce=>{const{id:je,quantity:Oe,seller:q}=ce,$=U.findItemIndex(i.items,je),Ie=U.getQuantity(Oe??1,$);return{id:je,quantity:Ie,seller:q}});v(F,oe)},[v,i.items,c]),G=j.useCallback(async(V,oe,F)=>V?P(V).then(()=>(d(oe??`${r}`,F),U.getCode(V,V))):Promise.resolve(U.getCode("","Product id required")),[d,P]),J=j.useCallback(()=>{i.items.length>0&&w()},[w,i.items]),Y=j.useCallback((V,oe="BRA")=>C(V,oe),[C]),X=j.useCallback(V=>{V&&N(V)},[N]),Z=j.useCallback(async(V,oe,F=!1)=>{const ce=i.items.findIndex(Oe=>Oe.uniqueId===V);return i.items[ce]&&ce>=0?T(oe,ce,F):!1},[i.items,T]),he=j.useCallback(async(V,oe)=>O(V,oe).then(F=>{if(Array.isArray(F)){const ce=F.find(je=>je.id===V);if(ce&&(ce==null?void 0:ce.quantity)<oe)return String(ce.quantity)}return!1}),[O]),fe=j.useCallback(async()=>{await S({...i.marketingData,coupon:""})},[S,i.marketingData]),ee=j.useCallback(async()=>{await S({...i.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[S,i.marketingData]),ie=j.useCallback(async()=>{await C("","BRA")},[C]);return s.jsx(Of.Provider,{value:j.useMemo(()=>({...o,data:n,addCouponSeller:M,addToCart:D,addItemsToCart:B,cartStore:i,notifications:u,clearCart:J,addNotification:d,isOpen:i.isOpen,removeNotification:h,removeToCart:G,setIsOpen:i.setIsOpen,shipping:Y,shippingUpdateOption:X,toggleGiftItemCart:Z,updateItemQuantity:he,removeCoupon:fe,removeSellerCode:ee,removeCEP:ie,promotionRules:m,setPromotionRules:_}),[o,n,M,D,B,u,J,d,i,h,G,Y,X,Z,he,fe,ee,ie,m,_]),children:e})},Xe=()=>{const e=j.useContext(Of);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Af=j.createContext({}),Sc=({children:e,state:t,collectionId:r,brand:n,searchParams:o})=>{const i=j.useMemo(()=>{var c;return r?[{key:"productclusterids",value:r.toString()}]:n?[{key:"brand",value:n}]:(c=t.base)!=null&&c.length?t.base.slice(1).split("/").map((l,u)=>({key:`category-${u+1}`,value:l})):[]},[t.base,r]);return s.jsx(Af.Provider,{value:j.useMemo(()=>({state:{...t,facets:[...i,...t.facets??[]]},searchParams:o}),[i,t,o]),children:e})},ft=()=>{const e=j.useContext(Af);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e};var Fs=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(){}},nv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ur,en,Ad,sv=(Ad=class{constructor(){ye(this,ur,nv);ye(this,en,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&k(this,en)&&e!==k(this,ur)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:k(this,ur),provider:e}),ue(this,ur,e),process.env.NODE_ENV!=="production"&&ue(this,en,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ue(this,en,!0),k(this,ur).setTimeout(e,t)}clearTimeout(e){k(this,ur).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ue(this,en,!0),k(this,ur).setInterval(e,t)}clearInterval(e){k(this,ur).clearInterval(e)}},ur=new WeakMap,en=new WeakMap,Ad),Jr=new sv;function ov(e){setTimeout(e,0)}var mn=typeof window>"u"||"Deno"in globalThis;function Rt(){}function iv(e,t){return typeof e=="function"?e(t):e}function Ea(e){return typeof e=="number"&&e>=0&&e!==1/0}function kf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ur(e,t){return typeof e=="function"?e(t):e}function Ht(e,t){return typeof e=="function"?e(t):e}function Jl(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:c,stale:l}=e;if(c){if(n){if(t.queryHash!==Cc(c,t.options))return!1}else if(!Es(t.queryKey,c))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function Zl(e,t){const{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(ws(t.options.mutationKey)!==ws(i))return!1}else if(!Es(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function Cc(e,t){return((t==null?void 0:t.queryKeyHashFn)||ws)(e)}function ws(e){return JSON.stringify(e,(t,r)=>Na(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function Es(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Es(e[r],t[r])):!1}var av=Object.prototype.hasOwnProperty;function Pa(e,t){if(e===t)return e;const r=eu(e)&&eu(t);if(!r&&!(Na(e)&&Na(t)))return t;const o=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),c=i.length,l=r?new Array(c):{};let u=0;for(let d=0;d<c;d++){const h=r?d:i[d],m=e[h],_=t[h];if(m===_){l[h]=m,(r?d<o:av.call(e,h))&&u++;continue}if(m===null||_===null||typeof m!="object"||typeof _!="object"){l[h]=_;continue}const g=Pa(m,_);l[h]=g,g===m&&u++}return o===c&&u===o?e:l}function Ia(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 eu(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Na(e){if(!tu(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!tu(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function tu(e){return Object.prototype.toString.call(e)==="[object Object]"}function cv(e){return new Promise(t=>{Jr.setTimeout(t,e)})}function Ra(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 Pa(e,t)}catch(n){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}]: ${n}`),n}return Pa(e,t)}return t}function lv(e){return e}function uv(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function dv(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Do=Symbol();function Mf(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Do&&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===Do?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Lf(e,t){return typeof e=="function"?e(...t):!!e}function fv(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var tn,Mr,Un,kd,pv=(kd=class extends Fs{constructor(){super();ye(this,tn);ye(this,Mr);ye(this,Un);ue(this,Un,t=>{if(!mn&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){k(this,Mr)||this.setEventListener(k(this,Un))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Mr))==null||t.call(this),ue(this,Mr,void 0))}setEventListener(t){var r;ue(this,Un,t),(r=k(this,Mr))==null||r.call(this),ue(this,Mr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){k(this,tn)!==t&&(ue(this,tn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof k(this,tn)=="boolean"?k(this,tn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},tn=new WeakMap,Mr=new WeakMap,Un=new WeakMap,kd),wc=new pv;function Ta(){let e,t;const r=new Promise((o,i)=>{e=o,t=i});r.status="pending",r.catch(()=>{});function n(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{n({status:"fulfilled",value:o}),e(o)},r.reject=o=>{n({status:"rejected",reason:o}),t(o)},r}var hv=ov;function mv(){let e=[],t=0,r=l=>{l()},n=l=>{l()},o=hv;const i=l=>{t?e.push(l):o(()=>{r(l)})},c=()=>{const l=e;e=[],l.length&&o(()=>{n(()=>{l.forEach(u=>{r(u)})})})};return{batch:l=>{let u;t++;try{u=l()}finally{t--,t||c()}return u},batchCalls:l=>(...u)=>{i(()=>{l(...u)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{o=l}}}var ht=mv(),Hn,Lr,$n,Md,_v=(Md=class extends Fs{constructor(){super();ye(this,Hn,!0);ye(this,Lr);ye(this,$n);ue(this,$n,t=>{if(!mn&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){k(this,Lr)||this.setEventListener(k(this,$n))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Lr))==null||t.call(this),ue(this,Lr,void 0))}setEventListener(t){var r;ue(this,$n,t),(r=k(this,Lr))==null||r.call(this),ue(this,Lr,t(this.setOnline.bind(this)))}setOnline(t){k(this,Hn)!==t&&(ue(this,Hn,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return k(this,Hn)}},Hn=new WeakMap,Lr=new WeakMap,$n=new WeakMap,Md),Fo=new _v;function gv(e){return Math.min(1e3*2**e,3e4)}function Df(e){return(e??"online")==="online"?Fo.isOnline():!0}var Oa=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ff(e){let t=!1,r=0,n;const o=Ta(),i=()=>o.status!=="pending",c=x=>{var S;if(!i()){const w=new Oa(x);_(w),(S=e.onCancel)==null||S.call(e,w)}},l=()=>{t=!0},u=()=>{t=!1},d=()=>wc.isFocused()&&(e.networkMode==="always"||Fo.isOnline())&&e.canRun(),h=()=>Df(e.networkMode)&&e.canRun(),m=x=>{i()||(n==null||n(),o.resolve(x))},_=x=>{i()||(n==null||n(),o.reject(x))},g=()=>new Promise(x=>{var S;n=w=>{(i()||d())&&x(w)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;n=void 0,i()||(x=e.onContinue)==null||x.call(e)}),v=()=>{if(i())return;let x;const S=r===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(w){x=Promise.reject(w)}Promise.resolve(x).then(m).catch(w=>{var T;if(i())return;const I=e.retry??(mn?0:3),P=e.retryDelay??gv,C=typeof P=="function"?P(r,w):P,N=I===!0||typeof I=="number"&&r<I||typeof I=="function"&&I(r,w);if(t||!N){_(w);return}r++,(T=e.onFail)==null||T.call(e,r,w),cv(C).then(()=>d()?void 0:g()).then(()=>{t?_(w):v()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(n==null||n(),o),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?v():g().then(v),o)}}var rn,Ld,zf=(Ld=class{constructor(){ye(this,rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ea(this.gcTime)&&ue(this,rn,Jr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mn?1/0:5*60*1e3))}clearGcTimeout(){k(this,rn)&&(Jr.clearTimeout(k(this,rn)),ue(this,rn,void 0))}},rn=new WeakMap,Ld),nn,Wn,Ut,sn,dt,Ns,on,Jt,br,Dd,yv=(Dd=class extends zf{constructor(t){super();ye(this,Jt);ye(this,nn);ye(this,Wn);ye(this,Ut);ye(this,sn);ye(this,dt);ye(this,Ns);ye(this,on);ue(this,on,!1),ue(this,Ns,t.defaultOptions),this.setOptions(t.options),this.observers=[],ue(this,sn,t.client),ue(this,Ut,k(this,sn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ue(this,nn,nu(this.options)),this.state=t.state??k(this,nn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,dt))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,Ns),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=nu(this.options);r.data!==void 0&&(this.setState(ru(r.data,r.dataUpdatedAt)),ue(this,nn,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Ut).remove(this)}setData(t,r){const n=Ra(this.state.data,t,this.options);return Re(this,Jt,br).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Re(this,Jt,br).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,o;const r=(n=k(this,dt))==null?void 0:n.promise;return(o=k(this,dt))==null||o.cancel(t),r?r.then(Rt).catch(Rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,nn))}isActive(){return this.observers.some(t=>Ht(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Do||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ur(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:!kf(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,dt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,dt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(k(this,dt)&&(k(this,on)?k(this,dt).cancel({revert:!0}):k(this,dt).cancelRetry()),this.scheduleGc()),k(this,Ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Re(this,Jt,br).call(this,{type:"invalidate"})}async fetch(t,r){var u,d,h,m,_,g,v,x,S,w,I,P;if(this.state.fetchStatus!=="idle"&&((u=k(this,dt))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(k(this,dt))return k(this,dt).continueRetry(),k(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(N=>N.options.queryFn);C&&this.setOptions(C.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 n=new AbortController,o=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(ue(this,on,!0),n.signal)})},i=()=>{const C=Mf(this.options,r),T=(()=>{const O={client:k(this,sn),queryKey:this.queryKey,meta:this.meta};return o(O),O})();return ue(this,on,!1),this.options.persister?this.options.persister(C,T,this):C(T)},l=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:k(this,sn),state:this.state,fetchFn:i};return o(C),C})();(d=this.options.behavior)==null||d.onFetch(l,this),ue(this,Wn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&Re(this,Jt,br).call(this,{type:"fetch",meta:(m=l.fetchOptions)==null?void 0:m.meta}),ue(this,dt,Ff({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:C=>{C instanceof Oa&&C.revert&&this.setState({...k(this,Wn),fetchStatus:"idle"}),n.abort()},onFail:(C,N)=>{Re(this,Jt,br).call(this,{type:"failed",failureCount:C,error:N})},onPause:()=>{Re(this,Jt,br).call(this,{type:"pause"})},onContinue:()=>{Re(this,Jt,br).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const C=await k(this,dt).start();if(C===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(C),(g=(_=k(this,Ut).config).onSuccess)==null||g.call(_,C,this),(x=(v=k(this,Ut).config).onSettled)==null||x.call(v,C,this.state.error,this),C}catch(C){if(C instanceof Oa){if(C.silent)return k(this,dt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Re(this,Jt,br).call(this,{type:"error",error:C}),(w=(S=k(this,Ut).config).onError)==null||w.call(S,C,this),(P=(I=k(this,Ut).config).onSettled)==null||P.call(I,this.state.data,C,this),C}finally{this.scheduleGc()}}},nn=new WeakMap,Wn=new WeakMap,Ut=new WeakMap,sn=new WeakMap,dt=new WeakMap,Ns=new WeakMap,on=new WeakMap,Jt=new WeakSet,br=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...qf(n.data,this.options),fetchMeta:t.meta??null};case"success":const o={...n,...ru(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ue(this,Wn,t.manual?o:void 0),o;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),ht.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),k(this,Ut).notify({query:this,type:"updated",action:t})})},Dd);function qf(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Df(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ru(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var It,Te,Rs,bt,an,Vn,jr,Dr,Ts,Gn,Kn,cn,ln,Fr,Qn,He,gs,Aa,ka,Ma,La,Da,Fa,za,Bf,Fd,vv=(Fd=class extends Fs{constructor(t,r){super();ye(this,He);ye(this,It);ye(this,Te);ye(this,Rs);ye(this,bt);ye(this,an);ye(this,Vn);ye(this,jr);ye(this,Dr);ye(this,Ts);ye(this,Gn);ye(this,Kn);ye(this,cn);ye(this,ln);ye(this,Fr);ye(this,Qn,new Set);this.options=r,ue(this,It,t),ue(this,Dr,null),ue(this,jr,Ta()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,Te).addObserver(this),su(k(this,Te),this.options)?Re(this,He,gs).call(this):this.updateResult(),Re(this,He,La).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qa(k(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qa(k(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Re(this,He,Da).call(this),Re(this,He,Fa).call(this),k(this,Te).removeObserver(this)}setOptions(t){const r=this.options,n=k(this,Te);if(this.options=k(this,It).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ht(this.options.enabled,k(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Re(this,He,za).call(this),k(this,Te).setOptions(this.options),r._defaulted&&!Ia(this.options,r)&&k(this,It).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,Te),observer:this});const o=this.hasListeners();o&&ou(k(this,Te),n,this.options,r)&&Re(this,He,gs).call(this),this.updateResult(),o&&(k(this,Te)!==n||Ht(this.options.enabled,k(this,Te))!==Ht(r.enabled,k(this,Te))||Ur(this.options.staleTime,k(this,Te))!==Ur(r.staleTime,k(this,Te)))&&Re(this,He,Aa).call(this);const i=Re(this,He,ka).call(this);o&&(k(this,Te)!==n||Ht(this.options.enabled,k(this,Te))!==Ht(r.enabled,k(this,Te))||i!==k(this,Fr))&&Re(this,He,Ma).call(this,i)}getOptimisticResult(t){const r=k(this,It).getQueryCache().build(k(this,It),t),n=this.createResult(r,t);return bv(this,n)&&(ue(this,bt,n),ue(this,Vn,this.options),ue(this,an,k(this,Te).state)),n}getCurrentResult(){return k(this,bt)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r==null||r(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,jr).status==="pending"&&k(this,jr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,o))})}trackProp(t){k(this,Qn).add(t)}getCurrentQuery(){return k(this,Te)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=k(this,It).defaultQueryOptions(t),n=k(this,It).getQueryCache().build(k(this,It),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Re(this,He,gs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,bt)))}createResult(t,r){var z;const n=k(this,Te),o=this.options,i=k(this,bt),c=k(this,an),l=k(this,Vn),d=t!==n?t.state:k(this,Rs),{state:h}=t;let m={...h},_=!1,g;if(r._optimisticResults){const D=this.hasListeners(),B=!D&&su(t,r),G=D&&ou(t,n,r,o);(B||G)&&(m={...m,...qf(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:v,errorUpdatedAt:x,status:S}=m;g=m.data;let w=!1;if(r.placeholderData!==void 0&&g===void 0&&S==="pending"){let D;i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(D=i.data,w=!0):D=typeof r.placeholderData=="function"?r.placeholderData((z=k(this,Kn))==null?void 0:z.state.data,k(this,Kn)):r.placeholderData,D!==void 0&&(S="success",g=Ra(i==null?void 0:i.data,D,r),_=!0)}if(r.select&&g!==void 0&&!w)if(i&&g===(c==null?void 0:c.data)&&r.select===k(this,Ts))g=k(this,Gn);else try{ue(this,Ts,r.select),g=r.select(g),g=Ra(i==null?void 0:i.data,g,r),ue(this,Gn,g),ue(this,Dr,null)}catch(D){ue(this,Dr,D)}k(this,Dr)&&(v=k(this,Dr),g=k(this,Gn),x=Date.now(),S="error");const I=m.fetchStatus==="fetching",P=S==="pending",C=S==="error",N=P&&I,T=g!==void 0,M={status:S,fetchStatus:m.fetchStatus,isPending:P,isSuccess:S==="success",isError:C,isInitialLoading:N,isLoading:N,data:g,dataUpdatedAt:m.dataUpdatedAt,error:v,errorUpdatedAt:x,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:I,isRefetching:I&&!P,isLoadingError:C&&!T,isPaused:m.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:C&&T,isStale:Ec(t,r),refetch:this.refetch,promise:k(this,jr),isEnabled:Ht(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=J=>{M.status==="error"?J.reject(M.error):M.data!==void 0&&J.resolve(M.data)},B=()=>{const J=ue(this,jr,M.promise=Ta());D(J)},G=k(this,jr);switch(G.status){case"pending":t.queryHash===n.queryHash&&D(G);break;case"fulfilled":(M.status==="error"||M.data!==G.value)&&B();break;case"rejected":(M.status!=="error"||M.error!==G.reason)&&B();break}}return M}updateResult(){const t=k(this,bt),r=this.createResult(k(this,Te),this.options);if(ue(this,an,k(this,Te).state),ue(this,Vn,this.options),k(this,an).data!==void 0&&ue(this,Kn,k(this,Te)),Ia(r,t))return;ue(this,bt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!k(this,Qn).size)return!0;const c=new Set(i??k(this,Qn));return this.options.throwOnError&&c.add("error"),Object.keys(k(this,bt)).some(l=>{const u=l;return k(this,bt)[u]!==t[u]&&c.has(u)})};Re(this,He,Bf).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Re(this,He,La).call(this)}},It=new WeakMap,Te=new WeakMap,Rs=new WeakMap,bt=new WeakMap,an=new WeakMap,Vn=new WeakMap,jr=new WeakMap,Dr=new WeakMap,Ts=new WeakMap,Gn=new WeakMap,Kn=new WeakMap,cn=new WeakMap,ln=new WeakMap,Fr=new WeakMap,Qn=new WeakMap,He=new WeakSet,gs=function(t){Re(this,He,za).call(this);let r=k(this,Te).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Rt)),r},Aa=function(){Re(this,He,Da).call(this);const t=Ur(this.options.staleTime,k(this,Te));if(mn||k(this,bt).isStale||!Ea(t))return;const n=kf(k(this,bt).dataUpdatedAt,t)+1;ue(this,cn,Jr.setTimeout(()=>{k(this,bt).isStale||this.updateResult()},n))},ka=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,Te)):this.options.refetchInterval)??!1},Ma=function(t){Re(this,He,Fa).call(this),ue(this,Fr,t),!(mn||Ht(this.options.enabled,k(this,Te))===!1||!Ea(k(this,Fr))||k(this,Fr)===0)&&ue(this,ln,Jr.setInterval(()=>{(this.options.refetchIntervalInBackground||wc.isFocused())&&Re(this,He,gs).call(this)},k(this,Fr)))},La=function(){Re(this,He,Aa).call(this),Re(this,He,Ma).call(this,Re(this,He,ka).call(this))},Da=function(){k(this,cn)&&(Jr.clearTimeout(k(this,cn)),ue(this,cn,void 0))},Fa=function(){k(this,ln)&&(Jr.clearInterval(k(this,ln)),ue(this,ln,void 0))},za=function(){const t=k(this,It).getQueryCache().build(k(this,It),this.options);if(t===k(this,Te))return;const r=k(this,Te);ue(this,Te,t),ue(this,Rs,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Bf=function(t){ht.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(k(this,bt))}),k(this,It).getQueryCache().notify({query:k(this,Te),type:"observerResultsUpdated"})})},Fd);function xv(e,t){return Ht(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function su(e,t){return xv(e,t)||e.state.data!==void 0&&qa(e,t,t.refetchOnMount)}function qa(e,t,r){if(Ht(t.enabled,e)!==!1&&Ur(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ec(e,t)}return!1}function ou(e,t,r,n){return(e!==t||Ht(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ec(e,r)}function Ec(e,t){return Ht(t.enabled,e)!==!1&&e.isStaleByTime(Ur(t.staleTime,e))}function bv(e,t){return!Ia(e.getCurrentResult(),t)}function iu(e){return{onFetch:(t,r)=>{var h,m,_,g,v;const n=t.options,o=(_=(m=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:_.direction,i=((g=t.state.data)==null?void 0:g.pages)||[],c=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const d=async()=>{let x=!1;const S=P=>{fv(P,()=>t.signal,()=>x=!0)},w=Mf(t.options,t.fetchOptions),I=async(P,C,N)=>{if(x)return Promise.reject();if(C==null&&P.pages.length)return Promise.resolve(P);const O=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:C,direction:N?"backward":"forward",meta:t.options.meta};return S(B),B})(),M=await w(O),{maxPages:z}=t.options,D=N?dv:uv;return{pages:D(P.pages,M,z),pageParams:D(P.pageParams,C,z)}};if(o&&i.length){const P=o==="backward",C=P?jv:au,N={pages:i,pageParams:c},T=C(n,N);l=await I(N,T,P)}else{const P=e??i.length;do{const C=u===0?c[0]??n.initialPageParam:au(n,l);if(u>0&&C==null)break;l=await I(l,C),u++}while(u<P)}return l};t.options.persister?t.fetchFn=()=>{var x,S;return(S=(x=t.options).persister)==null?void 0:S.call(x,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function au(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function jv(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Os,dr,jt,un,fr,Tr,zd,Sv=(zd=class extends zf{constructor(t){super();ye(this,fr);ye(this,Os);ye(this,dr);ye(this,jt);ye(this,un);ue(this,Os,t.client),this.mutationId=t.mutationId,ue(this,jt,t.mutationCache),ue(this,dr,[]),this.state=t.state||Cv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,dr).includes(t)||(k(this,dr).push(t),this.clearGcTimeout(),k(this,jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ue(this,dr,k(this,dr).filter(r=>r!==t)),this.scheduleGc(),k(this,jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,dr).length||(this.state.status==="pending"?this.scheduleGc():k(this,jt).remove(this))}continue(){var t;return((t=k(this,un))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,l,u,d,h,m,_,g,v,x,S,w,I,P,C,N,T,O,M,z;const r=()=>{Re(this,fr,Tr).call(this,{type:"continue"})},n={client:k(this,Os),meta:this.options.meta,mutationKey:this.options.mutationKey};ue(this,un,Ff({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(D,B)=>{Re(this,fr,Tr).call(this,{type:"failed",failureCount:D,error:B})},onPause:()=>{Re(this,fr,Tr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,jt).canRun(this)}));const o=this.state.status==="pending",i=!k(this,un).canStart();try{if(o)r();else{Re(this,fr,Tr).call(this,{type:"pending",variables:t,isPaused:i}),await((l=(c=k(this,jt).config).onMutate)==null?void 0:l.call(c,t,this,n));const B=await((d=(u=this.options).onMutate)==null?void 0:d.call(u,t,n));B!==this.state.context&&Re(this,fr,Tr).call(this,{type:"pending",context:B,variables:t,isPaused:i})}const D=await k(this,un).start();return await((m=(h=k(this,jt).config).onSuccess)==null?void 0:m.call(h,D,t,this.state.context,this,n)),await((g=(_=this.options).onSuccess)==null?void 0:g.call(_,D,t,this.state.context,n)),await((x=(v=k(this,jt).config).onSettled)==null?void 0:x.call(v,D,null,this.state.variables,this.state.context,this,n)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,D,null,t,this.state.context,n)),Re(this,fr,Tr).call(this,{type:"success",data:D}),D}catch(D){try{await((P=(I=k(this,jt).config).onError)==null?void 0:P.call(I,D,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((N=(C=this.options).onError)==null?void 0:N.call(C,D,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((O=(T=k(this,jt).config).onSettled)==null?void 0:O.call(T,void 0,D,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((z=(M=this.options).onSettled)==null?void 0:z.call(M,void 0,D,t,this.state.context,n))}catch(B){Promise.reject(B)}throw Re(this,fr,Tr).call(this,{type:"error",error:D}),D}finally{k(this,jt).runNext(this)}}},Os=new WeakMap,dr=new WeakMap,jt=new WeakMap,un=new WeakMap,fr=new WeakSet,Tr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ht.batch(()=>{k(this,dr).forEach(n=>{n.onMutationUpdate(t)}),k(this,jt).notify({mutation:this,type:"updated",action:t})})},zd);function Cv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sr,Zt,As,qd,wv=(qd=class extends Fs{constructor(t={}){super();ye(this,Sr);ye(this,Zt);ye(this,As);this.config=t,ue(this,Sr,new Set),ue(this,Zt,new Map),ue(this,As,0)}build(t,r,n){const o=new Sv({client:t,mutationCache:this,mutationId:++so(this,As)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){k(this,Sr).add(t);const r=io(t);if(typeof r=="string"){const n=k(this,Zt).get(r);n?n.push(t):k(this,Zt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,Sr).delete(t)){const r=io(t);if(typeof r=="string"){const n=k(this,Zt).get(r);if(n)if(n.length>1){const o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&k(this,Zt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=io(t);if(typeof r=="string"){const n=k(this,Zt).get(r),o=n==null?void 0:n.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var n;const r=io(t);if(typeof r=="string"){const o=(n=k(this,Zt).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{k(this,Sr).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,Sr).clear(),k(this,Zt).clear()})}getAll(){return Array.from(k(this,Sr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Zl(r,n))}findAll(t={}){return this.getAll().filter(r=>Zl(t,r))}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return ht.batch(()=>Promise.all(t.map(r=>r.continue().catch(Rt))))}},Sr=new WeakMap,Zt=new WeakMap,As=new WeakMap,qd);function io(e){var t;return(t=e.options.scope)==null?void 0:t.id}var pr,Bd,Ev=(Bd=class extends Fs{constructor(t={}){super();ye(this,pr);this.config=t,ue(this,pr,new Map)}build(t,r,n){const o=r.queryKey,i=r.queryHash??Cc(o,r);let c=this.get(i);return c||(c=new yv({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(c)),c}add(t){k(this,pr).has(t.queryHash)||(k(this,pr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=k(this,pr).get(t.queryHash);r&&(t.destroy(),r===t&&k(this,pr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,pr).get(t)}getAll(){return[...k(this,pr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Jl(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Jl(t,n)):r}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pr=new WeakMap,Bd),et,zr,qr,Yn,Xn,Br,Jn,Zn,Ud,Uf=(Ud=class{constructor(e={}){ye(this,et);ye(this,zr);ye(this,qr);ye(this,Yn);ye(this,Xn);ye(this,Br);ye(this,Jn);ye(this,Zn);ue(this,et,e.queryCache||new Ev),ue(this,zr,e.mutationCache||new wv),ue(this,qr,e.defaultOptions||{}),ue(this,Yn,new Map),ue(this,Xn,new Map),ue(this,Br,0)}mount(){so(this,Br)._++,k(this,Br)===1&&(ue(this,Jn,wc.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,et).onFocus())})),ue(this,Zn,Fo.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,et).onOnline())})))}unmount(){var e,t;so(this,Br)._--,k(this,Br)===0&&((e=k(this,Jn))==null||e.call(this),ue(this,Jn,void 0),(t=k(this,Zn))==null||t.call(this),ue(this,Zn,void 0))}isFetching(e){return k(this,et).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,zr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,et).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=k(this,et).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ur(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return k(this,et).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),o=k(this,et).get(n.queryHash),i=o==null?void 0:o.state.data,c=iv(t,i);if(c!==void 0)return k(this,et).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return ht.batch(()=>k(this,et).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,et).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=k(this,et);ht.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=k(this,et);return ht.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=ht.batch(()=>k(this,et).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Rt).catch(Rt)}invalidateQueries(e,t={}){return ht.batch(()=>(k(this,et).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},n=ht.batch(()=>k(this,et).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(Rt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Rt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=k(this,et).build(this,t);return r.isStaleByTime(Ur(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Rt).catch(Rt)}fetchInfiniteQuery(e){return e.behavior=iu(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Rt).catch(Rt)}ensureInfiniteQueryData(e){return e.behavior=iu(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Fo.isOnline()?k(this,zr).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,et)}getMutationCache(){return k(this,zr)}getDefaultOptions(){return k(this,qr)}setDefaultOptions(e){ue(this,qr,e)}setQueryDefaults(e,t){k(this,Yn).set(ws(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Yn).values()],r={};return t.forEach(n=>{Es(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){k(this,Xn).set(ws(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Xn).values()],r={};return t.forEach(n=>{Es(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,qr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Cc(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===Do&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,qr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,et).clear(),k(this,zr).clear()}},et=new WeakMap,zr=new WeakMap,qr=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,Br=new WeakMap,Jn=new WeakMap,Zn=new WeakMap,Ud),Hf=$t.createContext(void 0),Pv=e=>{const t=$t.useContext(Hf);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$f=({client:e,children:t})=>($t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(Hf.Provider,{value:e,children:t})),Wf=$t.createContext(!1),Iv=()=>$t.useContext(Wf);Wf.Provider;function Nv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Rv=$t.createContext(Nv()),Tv=()=>$t.useContext(Rv),Ov=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Lf(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Av=e=>{$t.useEffect(()=>{e.clearReset()},[e])},kv=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||Lf(r,[e.error,n])),Mv=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Lv=(e,t)=>e.isLoading&&e.isFetching&&!t,Dv=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,cu=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Fv(e,t,r){var _,g,v,x;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 n=Iv(),o=Tv(),i=Pv(),c=i.defaultQueryOptions(e);(g=(_=i.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||g.call(_,c);const l=i.getQueryCache().get(c.queryHash);process.env.NODE_ENV!=="production"&&(c.queryFn||console.error(`[${c.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`)),c._optimisticResults=n?"isRestoring":"optimistic",Mv(c),Ov(c,o,l),Av(o);const u=!i.getQueryCache().get(c.queryHash),[d]=$t.useState(()=>new t(i,c)),h=d.getOptimisticResult(c),m=!n&&e.subscribed!==!1;if($t.useSyncExternalStore($t.useCallback(S=>{const w=m?d.subscribe(ht.batchCalls(S)):Rt;return d.updateResult(),w},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),$t.useEffect(()=>{d.setOptions(c)},[c,d]),Dv(c,h))throw cu(c,d,o);if(kv({result:h,errorResetBoundary:o,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw h.error;if((x=(v=i.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||x.call(v,c,h),c.experimental_prefetchInRender&&!mn&&Lv(h,n)){const S=u?cu(c,d,o):l==null?void 0:l.promise;S==null||S.catch(Rt).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?h:d.trackResult(h)}function zv(e,t){return Fv(e,vv)}const ps={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"}},qv={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},Bv="Imagem do produto",lu=1,Uv="Marque a caixa para aceitar os termos de política de privacidade.",Hv="Algumas informações estão incorretas ou não foram preenchidas",$v="Enviar",Wv="ditoTrackedProfile",Vv=new Uf,Vf=j.createContext({}),Gv=({brand:e,constants:t,collectionId:r,children:n,itemsPerPage:o=24,pathname:i,searchParams:c,slug:l,...u})=>{const{PLP_SORT_DEFAULT:d}=t,h=j.useRef(""),[m,_]=j.useState(!1),g=(c==null?void 0:c.toString())??"",v=j.useMemo(()=>{const x=new URLSearchParams(g),S=x.get("query"),w=Number(x.get("page")??1),I=Number(x.get("count")??o),P=x.get("sort"),C=x.getAll("facets"),N=P??(r?"":d);return{base:S?"":i,count:I,facets:U.selectedFacets(C),page:w,sort:N,term:S??null}},[g,i,o,r,d]);return j.useEffect(()=>{h.current!==i&&(h.current=i,window.document.body.scrollTo(0,0))},[i]),s.jsx(Vf.Provider,{value:j.useMemo(()=>({...u,constants:t,openFilters:m,setOpenFilters:_}),[t,m,u]),children:s.jsx($f,{client:Vv,children:s.jsx(Sc,{brand:e,collectionId:r,state:v,searchParams:c??new URLSearchParams,children:n})})})},ut=()=>{const e=j.useContext(Vf);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},zo=(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,i)=>zo(o,t[i]));if(Array.isArray(t))return!1;const r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&zo(e[o],t[o]))},Kv=(e,t,r="page")=>Object.keys(t).some(n=>n===r?!1:!zo(t[n],e[n])),Qv=async e=>{const t=await U.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},Gf=()=>({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}}}),Kf=(e,t,r,n=24)=>{const o=new Set,i=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:i};const c=t*n*r;for(const l of e){let u=Number(l.position_grid),d=!1;for(;u<c;){const h=u%r;if(h+l.columns>r){u+=r-h;continue}if(!Array.from({length:l.columns}).some((g,v)=>o.has(u+v))){for(let g=0;g<l.columns;g++)o.add(u+g);i.push(u),d=!0;break}u++}d||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${l.position_grid}, cols=${l.columns}`)}return{taken:o,placedBanners:i}},Vo=(e,t,r,n=24)=>{const{placedBanners:o,taken:i}=Kf(e??[],t,r),c=[];let l=0;try{for(;c.length<t*n;)i.has(l)||c.push(l),l++;return{banners:o,products:c}}catch(u){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,u)}return{banners:[],products:c}},Ba=(e,t=!1)=>Array.from({length:e},(r,n)=>{const o=n+1;return{loading:t?!1:e===o,page:o}}),Yv=(e,t)=>[...e,{loading:!1,page:t}],Xv=(e=1,t=24)=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:t,total:e}),Jv=(e,t,r,n,o)=>{const i=o,c=(e.length-1)*o+i-1,l=r[c];return t.filter((u,d)=>{const h=n[d];return h<=l||o>i&&h>l})},Qf=(e,t)=>{const r=new Map;for(const o of e){const i=Math.floor(o/t);r.has(i)||r.set(i,[]),r.get(i).push(o)}const n=[];for(const[,o]of r){const i=o[Math.floor(Math.random()*o.length)];n.push(i)}return n},Yf=(e,t)=>{if(!e)return[];const r=e.map((n,o)=>n.video&&n.video!==""?o:null).filter(n=>n);return Qf(r,t)},Xf=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],Zv=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Xf,createPage:Yv,createPages:Ba,createPagination:Xv,createProduct:Gf,deepEqual:zo,fetchPage:Qv,getBanners:Kf,getPositions:Vo,getProductsWithVideo:Yf,getRandomVideoPerRow:Qf,getVisibleBanners:Jv,hasStateChangedExceptPage:Kv},Symbol.toStringTag,{value:"Module"})),ex=(e,t,r,n=0)=>{if(!e.length)return[];let o=0;const i=[];for(let c=0;c<e.length;c+=r){const l=e.slice(c,c+r),u=l.findIndex(d=>{var h;return(h=d.node)==null?void 0:h.video});for(let d=0;d<l.length;d++){const h=c+d,m=n+h,_=t.find(v=>v.position_grid===m+1),g=m+o+1;_&&(o+=_.columns),i.push({position:g,canPlayVideo:d===u})}}return i},Jf=(e,t,r)=>{const n=(t-1)*r,o=t*r;return e>=n&&e<=o},zs=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:U.disableSKU(r),size:U.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},tx=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:ex,getSkusNotify:zs,isPositionInCurrentPage:Jf},Symbol.toStringTag,{value:"Module"})),Zf=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>s.jsxs(s.Fragment,{children:[s.jsx(p.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(p.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),s.jsx(p.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Zf.displayName="Notify.Controls";const rr={"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 ep(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const n of r){const[o,i]=n.trim().split("=");if(o===e)return i}}function Pc(e,t,r={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let i=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const c in o)o[c]!==void 0&&(i+=`; ${c}`,c==="expires"?i+=`=${o[c].toUTCString()}`:typeof o[c]=="boolean"?i+=`; ${o[c]?"true":"false"}`:i+=`=${o[c]}`);window.document.cookie=i}const tp=j.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),rx=({children:e,AUTH_TOKEN_COOKIE:t})=>{var h;const{shipping:r,cartStore:n}=Xe(),[o,i]=j.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=j.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(m=>m.json()).then(m=>{const{userCredits:_,userId:g,sub:v,...x}=m,{wishlist:S,...w}=x;i({amount:_==null?void 0:_.amount,boxes:_==null?void 0:_.boxes,toExpire:_==null?void 0:_.toExpire,user:{...w,userId:g,sub:v??""},loading:!1,wishlist:(typeof S=="string"?S.split(",").filter(Boolean):S)??[]})})}catch(m){console.error("user info and my credits request",m),i({...o,loading:!1})}},[i]),l=j.useCallback(()=>{Pc(t),c()},[c]),u=j.useCallback(()=>o.boxes?o.boxes.reduce((m,_)=>_.gift_card_box.refid==="C1643"?(m.cashback+=_.amount,m):(m.credits+=_.amount,m),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),d=j.useCallback(async()=>{var m,_,g;if((m=o.user)!=null&&m.postalCode&&(n!=null&&n.id)&&!(n!=null&&n.loading)&&!((g=(_=n==null?void 0:n.shippingData)==null?void 0:_.address)!=null&&g.postalCode))try{await r(o.user.postalCode)}catch(v){console.error("Error auto-filling CEP:",v)}},[(h=o.user)==null?void 0:h.postalCode]);return j.useEffect(()=>{c()},[c]),j.useEffect(()=>{d()},[d]),s.jsx(tp.Provider,{value:j.useMemo(()=>({...o,getCurrentCredits:u,logout:l}),[o,u,l]),children:e})},ss=()=>{const e=j.useContext(tp);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},rp=({color:e,delay:t=3e3,sku:r,setStatus:n,setIsLoading:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c})=>{const l=j.useRef(null),[u,d]=j.useState(null),{sendDataLayerEvent:h}=Ee(),{user:m}=ss(),_=m!=null&&m.firstName?`${m==null?void 0:m.firstName} ${m==null?void 0:m.lastName}`:"";return s.jsx("div",{className:rr["notify--form"],children:s.jsxs("form",{action:"POST",onSubmit:async g=>{var S;g.preventDefault();const v=g.currentTarget,x=((S=v.querySelector("input"))==null?void 0:S.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:_,email:x,sku:r==null?void 0:r.skuID})}).then(w=>n(w.ok)).finally(()=>{o(!1),v.reset(),h({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.skuID,color:e}}}),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{var w;(w=document.body)==null||w.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),d(!0),n(null)},t)})},children:[s.jsx(p.TextField.Structure,{input:s.jsx(p.TextField.Input,{feedback:typeof u=="boolean"&&u?"error":"none",type:"email",label:c.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:g=>d(!g.target.validity.valid),required:!0}),supportText:typeof u=="boolean"&&u?s.jsx(p.TextField.SupportText,{text:i.messages.invalid_email,feedback:"error"}):s.jsx(s.Fragment,{})}),s.jsx(p.Button,{disabled:!(u===!1||!r)||!r,type:"submit",size:"large",children:c.button})]})})};rp.displayName="Notify.Form";const np=({isLoading:e=!1})=>s.jsx("div",{className:rr["notify--loading"],"data-loading":e,children:s.jsx(p.Spinner,{})});np.displayName="Notify.Loading";const Ic={"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"},sp=({children:e,...t})=>s.jsx("div",{...t,className:Ic["product-variation-list--list"],children:e});sp.displayName="ProductVariationList.List";const op=({fill:e="#1352C7",src:t="",type:r="size",text:n,...o})=>{const{nextimage:i}=Ae();return r==="size"?s.jsxs(p.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),s.jsx(p.ToggleSize.Text,{children:n})]}):s.jsxs(p.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[s.jsx(p.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?s.jsx(p.ToggleStyle.Color,{background:e,title:"color"}):s.jsx(p.ToggleStyle.Texture,{title:"texture",children:s.jsx(i,{alt:n??"image",height:40,src:t,width:40})})]})};op.displayName="ProductVariationList.Option";const ip=({children:e,...t})=>s.jsx("div",{className:Ic["product-variation-list"],...t,children:e});ip.displayName="ProductVariationList.Root";const ap=({children:e,title:t,...r})=>s.jsxs("div",{...r,className:Ic["product-variation-list--title"],children:[t?s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.SectionWrapper,{children:s.jsx("p",{children:t})})}):s.jsx(s.Fragment,{}),e]});ap.displayName="ProductVariationList.Title";const sr={List:sp,Option:op,Title:ap,Root:ip},nx=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(n=>e[n]===t[n])},cp=({children:e,label:t="",skus:r,sku:n,setSku:o})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:rr["notify--selector--header"],children:e}),s.jsxs(sr.Root,{className:rr["notify--selector"],children:[s.jsx(sr.Title,{title:t}),s.jsx(sr.List,{children:Array.isArray(r)&&r.map((i,c)=>{const l=nx(n,i);return s.jsx(sr.Option,{active:l,onClick:()=>o(l?null:i),text:String(i.size),type:"size"},c)})})]})]});cp.displayName="Notify.Selector";const uu=({type:e,icon:t,title:r,subtitle:n})=>s.jsx("div",{className:rr[`notify--status--${e}`],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t,size:"large"})},children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h2",{children:r}),s.jsx("h3",{children:n})]})})}),lp=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>s.jsxs("div",{className:rr["notify--status"],"data-status":e,children:[s.jsx(uu,{...r.success,icon:t.check_circle,type:"success"}),s.jsx(uu,{...r.error,icon:t.alert_circle,type:"error"})]});lp.displayName="Notify.Status";const Nc=({color:e,open:t,setVisible:r,skus:n,sku:o,setSku:i,ICONS:c,NEWSLETTER_CONFIGS:l,NOTIFY_INFO:u,PRODUCT_CARD_TEXTS:d,Z_INDEX_WAR:h})=>{const[m,_]=j.useState(!1),[g,v]=j.useState(null),{isMobile:x}=xe();return s.jsxs(p.Modal.Root,{isMobile:x??!1,isOpen:t,setIsOpen:r,variant:x?"sideBottom":"sideLeft",style:{zIndex:h.modal},className:rr["modal-modifier"],children:[s.jsx(p.Modal.Header,{navigation:"top",className:rr["notify--header-modifier"],children:s.jsx(Zf,{isMobile:x??!1,ICONS:c,NOTIFY_INFO:u})}),s.jsxs(p.Modal.Body,{className:rr["notify--modal--body"],children:[s.jsxs("div",{className:rr["notify--container"],children:[s.jsxs(cp,{label:u.selector_label,sku:o,skus:n,setSku:i,children:[s.jsx("p",{children:u.subtitle}),s.jsx("span",{children:u.description})]}),s.jsx(rp,{delay:4e3,sku:o,setStatus:v,setIsLoading:_,color:e,NEWSLETTER_CONFIGS:l,NOTIFY_INFO:u}),s.jsx(np,{isLoading:m}),s.jsx("div",{className:rr["notify--selector--header"],children:s.jsx("span",{children:u.legal})})]}),s.jsx(lp,{status:g,ICONS:c,PRODUCT_CARD_TEXTS:d})]})]})};Nc.displayName="Notify";const qs=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i,...c})=>{const l=zs(e??[]);return s.jsx(Nc,{...c,skus:l,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i})};qs.displayName="PDC.Notification";const Wr=xn.create(e=>({banners:[],load:!1,pages:[],products:[],createPagesScroll:(t,r)=>{e(n=>({...n,...r,pages:Ba(t)}))},trimPages:t=>{e(r=>r.pages.length?{...r,pages:r.pages.filter(n=>n.page<=t).map(n=>({...n,loading:!1}))}:r)},addPage:(t,r)=>{e(n=>n.pages.some(o=>o.page===t)?n:{...n,...r,pages:[...n.pages,{page:t,loading:!1}]})},reset:()=>e(()=>({pages:Ba(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)}})),up=j.createContext({}),dp=({banners:e,children:t})=>{const{router:r}=Ae(),{isMobile:n}=xe(),{searchParams:o}=ft(),{addPage:i}=Wr(),{constants:c}=ut(),[l,u]=j.useState(!1),[d,h]=j.useState(null),[m,_]=j.useState([]),g=n?8:16,v=n?2:4,{ITEMS_PER_PAGE:x,ICONS:S,NEWSLETTER_CONFIGS:w,NOTIFY_INFO:I,PRODUCT_CARD_TEXTS:P,Z_INDEX_WAR:C}=c,N=j.useCallback((M,z,D=!1)=>{const B=M.page+1;if(D===!0&&B<=z){const G=Vo(e,B,v,x);i(B,G)}},[i,e,v,x]),T=j.useCallback(M=>{const z=new URLSearchParams(o.toString()),D=Number(z.get("page")??1);M!==D&&(z.set("page",String(M)),r.replace(`?${z.toString()}`,{scroll:!1}))},[r,o]),O=j.useCallback((M,z)=>{const D=z?zs([z]):null;_(M),h(D!=null&&D.length?D[0]:null),u(!0)},[]);return s.jsxs(up.Provider,{value:j.useMemo(()=>({addNewPage:N,gap:g,columns:v,handleNotify:O,updateParamPage:T}),[N,O,g,v,T]),children:[t,s.jsx(qs,{open:l,sku:d,skus:m,setSku:h,setVisible:u,ICONS:S,NEWSLETTER_CONFIGS:w,NOTIFY_INFO:I,PRODUCT_CARD_TEXTS:P,Z_INDEX_WAR:C})]})},Vr=()=>{const e=j.useContext(up);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},fp=j.createContext({gridBanners:void 0,banners:[]}),sx=({children:e,data:t,device:r,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:i}=xe(),c=(t==null?void 0:t.sections.filter(m=>m.name!=="List Product Banners"))??[],l=c.slice(0,lu),u=c.slice(lu,c.length),d=t==null?void 0:t.sections.find(m=>m.name==="List Product Banners"),h=j.useMemo(()=>{var m,_;return((_=(m=d==null?void 0:d.data)==null?void 0:m.banners)==null?void 0:_.map(g=>({...g.banner,columns:g.bannerWidth,position_grid:g.bannerPosition})))??[]},[d]);return i&&r==="mobile"||!i&&r==="desktop"?s.jsxs(fp.Provider,{value:{gridBanners:d,banners:h},children:[s.jsx(n,{data:l??[]}),s.jsxs(p.Utils.Column,{gap:o,className:p.helpers.classNameConcat("utils-column-modifier"),children:[e,s.jsx(n,{data:u??[]})]})]}):s.jsx(s.Fragment,{})},Bs=()=>{const e=j.useContext(fp);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},pp=j.createContext({}),hp=({children:e,filters:t,...r})=>{var i;const{constants:{PLP_FILTERS:n}}=ut(),o=(i=t.facets)==null?void 0:i.filter(c=>n.find(l=>l.key===c.key));return s.jsx(pp.Provider,{value:j.useMemo(()=>({...r,filters:{...t,facets:o}}),[t,o,r]),children:e})},wr=()=>{const e=j.useContext(pp);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},mp=j.createContext({product:void 0}),ox=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:n,SectionZone:o})=>s.jsxs(mp.Provider,{value:{productId:r},children:[e,s.jsx(p.Utils.Column,{gap:n,className:p.helpers.classNameConcat("utils-column-modifier"),children:s.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),_p=()=>{const e=j.useContext(mp);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Ua=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function ix(e,t=1e3){let r=!1;return(...n)=>{r||(e(...n),r=!0,setTimeout(()=>{r=!1},t))}}function ax(e,t=1e3){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}const gp=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,ys=(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),cx=["name","email","phone","date","cpf","cep"],du={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}$/},yp=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!du[e])return!0;const n=t.trim();return du[e].test(n)},lx=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):Bv},ux=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:cx,debounce:ax,getAltTextFromUrl:lx,getAuthenticatedUser:U.getAuthenticatedUser,getCookie:ep,getDaysHoursMinutesSeconds:ys,getMilliSeconds:gp,removeAccentsAndReplaceSpaces:Ua,setCookie:Pc,throttle:ix,validateInput:yp},Symbol.toStringTag,{value:"Module"})),dx=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((n,o)=>(t[o.master_data_field]="none",{...n,[o.master_data_field]:o}),{}))??{},mountedInputsStatus:t}},fx=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:n,checkboxRef:o,setFormStatus:i})=>{let c=!1,l=!1;const u={...r};return n&&!o.current&&(i("unchecked"),c=!0),e.forEach((d,h)=>{var g;if(h==="terms-and-conditions")return;const m=(g=t[h])==null?void 0:g.required;if(m&&!d){u[h]="required",c=!0;return}yp({type:t[h].type,input:d,required:m})||(u[h]="error",l=!0),typeof d=="string"&&e.set(h,d.toString().trim())}),{hasEmptyFields:c,hasErrors:l,inputStatusToUpdate:u}};async function vp(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}const xp=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),bp=j.createContext({}),jp=({children:e,masterDataEmailField:t,fields:r,variant:n,dito:o,CONSTANTS:{MASTER_DATA_ENTITY:i,NEWSLETTER_CONFIGS:c}})=>{const{sendDataLayerEvent:l}=Ee(),u=c.hasTermsAndConditions,{mountedFields:d,mountedInputsStatus:h}=j.useMemo(()=>dx({fields:r}),[r]),m=j.useRef(!1),[_,g]=j.useState("idle"),[v,x]=j.useState(h),S=async({searchFields:O,entity:M})=>{const z=await Fn.post("/api/master-data/search",{body:{masterDataEntity:M,searchFields:O,headers:{"REST-Range":"resources=0-49"}}});return console.info(z),z.data},w=async({documentId:O,fieldsToBeUpdated:M,entity:z})=>(await Fn.post("/api/master-data/update",{dataEntityName:z,documentId:O,fieldsToBeUpdated:M})).status,I=j.useCallback(async({payload:O,response:M},z,D)=>{var X;const{email:B,...G}=O,[J]=await S({searchFields:{[z]:B},entity:D??i.newsletter}),Y=Array.isArray(J)?(X=J[0])==null?void 0:X.id:void 0;return J&&await w({documentId:Y,fieldsToBeUpdated:G,entity:D??i.newsletter})!==204?{...M,status:"error"}:{...M,status:"success"}},[]),P=j.useCallback(async({formData:O},M,z)=>{const D={status:"idle",inputsStatus:{}},B={};O.forEach((X,Z)=>{B[Z]=X});const G=await vp(B.email||""),J=new Date().toISOString(),Y=[{action:o==null?void 0:o.actionName,timestamp:J,type:"TRACK",user_id:G,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:B.email||z,nome:B.name,origem:o==null?void 0:o.originName}}}];G&&(Y.push({user_id:G,timestamp:J,type:"IDENTIFY",traits:{id:G,created_at:J,name:B.name,email:B.email||z,phone:B==null?void 0:B.phone}}),hr.set(Wv,G));try{const X=await Fn.post("/api/master-data",{body:{payload:B,masterDataEntity:M??i.newsletter}});xp(Y);const Z=X.data;return(Z==null?void 0:Z.Message)==="duplicated entry"?I({payload:B,response:D},z,M):Z!=null&&Z.Id?{...D,status:"success"}:{...D,status:"error"}}catch(X){return console.error("error",X),{...D,status:"error"}}},[I]),C=j.useCallback(async(O,M,z)=>{O.preventDefault();const D=new FormData(O.target);if(D.append("acceptedTerms",m.current?"true":"false"),m.current){const G=new Ca.TZDate(new Date,"America/Sao_Paulo").toISOString();D.append("termsAcceptedAt",G)}M&&Object.keys(M).forEach(G=>{D.append(G,M[G])});const B=await P({formData:D},z??"",t);B&&(g(B==null?void 0:B.status),x(B.inputsStatus),B.status==="success"&&l({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,P,g,x,l]),N=j.useCallback(O=>{const M=new FormData(O.currentTarget.parentElement),{hasEmptyFields:z,hasErrors:D,inputStatusToUpdate:B}=fx({formData:M,mountedFields:d,inputsStatus:v,hasTermsAndConditions:u,checkboxRef:m,setFormStatus:g});if(x(B),z||D){O.preventDefault();return}g("loading")},[d,v,u,m]),T=j.useCallback(()=>{g("idle"),x(h)},[h]);return s.jsx(bp.Provider,{value:j.useMemo(()=>({formStatus:_,handleSubmit:C,setFormStatus:g,inputsStatus:v,setInputsStatus:x,hasTermsAndConditions:u,handleClickToSubmit:N,checkboxRef:m,masterDataEmailField:t,fields:r,variant:n,resetNewsletter:T}),[_,C,g,v,x,N,u,m,t,r,n,T]),children:e})},Rc=()=>{const e=j.useContext(bp);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},Sp=j.createContext({}),Cp=({children:e,data:t})=>{const[r,n]=j.useState(),[o,i]=j.useState(),c=j.useCallback(d=>{const h=t.filter(m=>m.cidade===d);n(h)},[t]),l=j.useCallback(d=>{i(d)},[]),u=j.useCallback(()=>{i("")},[]);return s.jsx(Sp.Provider,{value:j.useMemo(()=>({clearSelectedStore:u,data:t,handleSelectCity:c,handleSelectStore:l,selectedCity:r,selectedStore:o}),[u,t,c,l,r,o]),children:e})},Go=()=>{const e=j.useContext(Sp);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},qo={contexts:{addToCart:{hook:Sn,provider:Tf},cart:{hook:Xe,provider:rv},cms:{FlagsAndTags:{context:pc,hook:Cr,provider:wy}},newsletter:{hook:Rc,provider:jp},events:{hook:Ee,provider:Ay},global:{hook:xe,provider:Uy,mediator:af},header:{hook:Ze,provider:Zy},menuMobile:{hook:jc,provider:Nf},next:{hook:Ae,provider:Hy},pdp:{provider:Ey},PDPContent:{provider:ox,hook:_p},plp:{provider:Gv,hook:ut},plpFilter:{hook:wr,provider:hp},PLPContent:{provider:sx,hook:Bs},plpInfinite:{provider:dp,hook:Vr},pdpdata:{provider:ky},searchSearch:{hook:ft,provider:Sc},session:{hook:ss,provider:rx},ui:{hook:ks,provider:of},lpStore:{hook:Go,provider:Cp}},hooks:{useBackPDC:$d,useClipboard:My,useDisableZoom:tf,useLocalStorage:Dy,useOnScreen:hc,useSentinel:$o,useTouchZoomPan:rf,useSessionManager:Jd},stores:{cart:qy,header:Wy,pdp:Xy,wishlist:Jy}},px={cart:U.cart,events:Oy,plp:Zv,product:U.productHelpers,utils:ux,search:U.search},Tc={helpers:px},qt={"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"},wp=({brand:e,className:t,name:r,...n})=>s.jsxs("div",{...n,className:p.helpers.classNameConcat(qt["add-to-cart--card--name"],t),children:[s.jsx(p.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:s.jsx("p",{className:"typography-style-body-md",children:r})})})]});wp.displayName="AddToCart.Card.Name";const Ep=({className:e,listPrice:t,price:r,quantity:n,productId:o,...i})=>{const c=U.formatPriceToCurrency(r/100),l=U.formatPriceToCurrency(t/100);return s.jsx("div",{...i,className:p.helpers.classNameConcat(qt["add-to-cart--card--price-quantity"],e),children:s.jsx(p.ProductInfo.Root,{size:"small",layout:"vertical",children:s.jsx(p.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:s.jsx(p.ProductInfo.ValuesWrapper,{children:r!==t?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:c,size:"small"},"price-list"),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:l,size:"small"},"price-low")]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:l,size:"small"},"price-low")})})})})};Ep.displayName="AddToCart.Card.PriceQuantity";const hx="_skeleton_12b79_1",mx={skeleton:hx},Pp=({style:e})=>s.jsx("div",{style:e,className:mx.skeleton}),_x="_image_1y08u_1",gx={image:_x},yx=({alt:e,className:t,objectFit:r,...n})=>{const{nextimage:o}=Ae();return s.jsx(o,{quality:90,...n,alt:e??"",className:p.helpers.classNameConcat(gx.image,t),"data-object-fit":r??"cover"})},vx=({videoRef:e,...t})=>s.jsx("video",{...t,ref:e,children:s.jsx("track",{kind:"captions"})}),at={Image:yx,Video:vx},Ip=({className:e,productGroupID:t,size:r,texture:n,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}}=Sn(),[l,u]=j.useState(n??"");return j.useEffect(()=>{l||U.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[t]})}).then(d=>d.json()).then(d=>{const h=d.data[0].items[0];if(h){const m=h.images.find(_=>i.includes(_.imageLabel));m!=null&&m.imageUrl?u(m.imageUrl):u(h.images[0].imageUrl)}}).catch(d=>{console.error(d)})},[l,t]),s.jsxs("div",{...o,className:p.helpers.classNameConcat(qt["add-to-cart--card--style-size"],e),children:[s.jsx(p.ToggleStyle.Wrapper,{size:"x-small",style:c,children:s.jsx(p.ToggleStyle.Texture,{children:l?s.jsx(at.Image,{alt:"",src:l??"",width:164,height:164,style:c}):s.jsx(Pp,{})})}),s.jsx(p.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&s.jsxs(p.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(p.ToggleSize.Text,{children:r})]})]})};Ip.displayName="AddToCart.Card.StyleSize";const{helpers:xx}=Tc,Np=({className:e,item:t,texture:r,...n})=>{const{itemOffered:{name:o,brand:i,skuName:c,isVariationOf:{productGroupID:l}},quantity:u,price:d,sellingPrice:h}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:m}}=Sn(),{size:_}=xx.product.getColorAndSizeFromSkuName(c??o,m);return s.jsxs("div",{...n,className:p.helpers.classNameConcat(qt["add-to-cart--card--content"],e),children:[s.jsx(wp,{brand:i.name,name:o}),s.jsx(Ep,{price:d,listPrice:h,quantity:u,productId:t.id}),s.jsx(Ip,{size:_,texture:r,productGroupID:l})]})};Np.displayName="AddToCart.Card.Content";const Rp=({image:e,thumbnail:t=!1})=>s.jsx(at.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Rp.displayName="AddToCart.Card";const Tp=({className:e,item:t,texture:r,thumbnail:n,...o})=>{const{itemOffered:{image:[i]}}=t,c=U.updatedResizedImg(i.url,{width:200,height:300});return s.jsxs("div",{...o,className:p.helpers.classNameConcat(qt["add-to-cart--card"],e),children:[s.jsx(Rp,{image:{alternateName:i.alternateName||"Produto",url:c||""},thumbnail:n}),!n&&s.jsx(Np,{item:t,texture:r})]})};Tp.displayName="AddToCart.Card";const Op=({className:e,children:t,title:r,...n})=>s.jsxs("div",{...n,className:p.helpers.classNameConcat(qt["add-to-cart--content"],e),children:[s.jsx("div",{className:qt["add-to-cart--content--title"],children:r&&s.jsx("h2",{children:r})}),t,s.jsx(fn.Footer,{})]});Op.displayName="AddToCart.Layout.Content";const Ap=({className:e,...t})=>{var g,v;const{isMobile:r,handleClose:n,CONSTANTS:{ADD_TO_CART:o}}=Sn(),{cartStore:{totalizers:i},setIsOpen:c}=Xe(),l=(g=i.find(x=>x.id==="Discounts"))==null?void 0:g.value,u=((v=i.find(x=>x.id==="Items"))==null?void 0:v.value)??0,d=i.find(x=>x.id==="Shipping"),m=(u-Math.abs(l??0)+((d==null?void 0:d.value)??0))/100,_=U.formatPriceToCurrency(m??0);return s.jsxs("div",{...t,className:p.helpers.classNameConcat(qt["add-to-cart--footer"],e),children:[s.jsxs("div",{className:qt["add-to-cart--footer--total"],children:[s.jsx("span",{children:"Subtotal:"}),s.jsx("span",{children:_})]}),s.jsx(p.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>c(!0),children:o.footer.bag}),r?s.jsx(p.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):s.jsx(p.Button,{onClick:()=>n(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Ap.displayName="AddToCart.Layout.Footer";const kp=({children:e,className:t,thumbnail:r=!1,...n})=>{const{cartStore:{options:o}}=Xe(),{recentlyAddedProducts:i}=ks(),c=i.length>3?4:i.length;return s.jsxs("div",{...n,className:qt["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(i)&&i.filter((l,u)=>u<c).map(l=>{var d;const u=(d=o==null?void 0:o.find(h=>h.id===l.itemOffered.isVariationOf.productGroupID))==null?void 0:d.texture;return s.jsx(fn.Card,{item:l,thumbnail:r,texture:u},l.itemOffered.sku)}),e]})};kp.displayName="AddToCart.Layout.Items";const Mp=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:n}=Sn(),{isMobile:o}=xe();return s.jsxs(p.Modal.Root,{"data-modal":"add-to-cart--modal",className:qt["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:n,variant:"sideBottom",style:{zIndex:t.modal},children:[s.jsx(p.Modal.Header,{navigation:"top",children:s.jsx(p.Modal.Controls,{navigation:"top",isMobile:!0})}),s.jsx(p.Modal.Body,{children:e})]})};Mp.displayName="AddToCart.Modal";const bx=({children:e})=>{const{count:t,handleClose:r,setIsOpen:n}=Sn(),o=j.useRef(t);return j.useEffect(()=>{t>o.current&&n(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,n]),s.jsx(s.Fragment,{children:e})},Lp=({children:e,component:t,CONSTANTS:r,...n})=>{const{recentlyAddedProducts:o}=ks(),{isMobile:i}=xe(),c=o.length>3?4:o.length;return s.jsx(Tf,{...n,count:c,isMobile:i,CONSTANTS:r,children:s.jsx(bx,{children:i?s.jsxs(s.Fragment,{children:[s.jsx(fn.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):s.jsx(fn.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};Lp.displayName="AddToCart.Root";const Dp=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:i,isLeaving:c,target:l,isOpen:u,top:d}=Sn();return s.jsx(p.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),id:"add-to-cart--tooltip",className:qt["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:c,isOpen:u,left:i,size:"medium",position:"top",top:d,children:s.jsx("div",{className:qt["add-to-cart--tooltip"],ref:l,children:e})})};Dp.displayName="AddToCart.Tooltip";const fn={Card:Tp,Content:Op,Footer:Ap,Items:kp,Modal:Mp,Root:Lp,Tooltip:Dp},Oc=({title:e,...t})=>{const{recentlyAddedProducts:r}=ks(),{isMobile:n}=xe(),o=r.length>3?4:r.length,i=r.length>(o??1),c=r.length>1;return s.jsx(fn.Root,{isMobile:n,count:r.length,component:s.jsx(fn.Content,{title:e,children:s.jsx(fn.Items,{thumbnail:c,children:i&&s.jsx(p.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};Oc.displayName="AddToCart";const fu={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},jx=({children:e,className:t,classNameButton:r,adornment:n,iconPosition:o,scrollToOptions:i,style:c,...l})=>{const u={top:(i==null?void 0:i.top)??0,left:(i==null?void 0:i.left)??0,behavior:(i==null?void 0:i.behavior)??"smooth"},h=o&&n?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},m=()=>{window&&window.document.body.scrollTo({...u})};return s.jsx(p.Card,{...l,shadow:!0,padding:"small",className:p.helpers.classNameConcat(fu["card-modifier"],t),style:{...c,padding:0},children:s.jsxs("button",{className:p.helpers.classNameConcat(fu["backtotop-btn"],r),onClick:m,style:{...h},"data-orientation":o,children:[n,e]})})},Sx="_container_1sy8s_16",kr={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:Sx,"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"},Cx=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const n=Object.values(e.products).length;return s.jsxs("div",{className:kr["add-itens-to-cart-container"],children:[s.jsxs("div",{className:kr["add-itens-to-cart-container-values"],children:[s.jsx("div",{className:kr["add-itens-to-cart-qty-products"],children:s.jsx("span",{children:n===0?r.BUY_PACKAGE.group_cart.select_all_product:`${n} ${n===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),s.jsx("div",{className:kr["add-itens-to-cart-total"],children:s.jsx("span",{children:U.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),s.jsx(p.Button,{onClick:t,className:kr["add-button"],size:"large",disabled:n===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},wx=e=>e.reduce((t,r)=>{var o;const n=t.find(i=>i.node.id===r.node.id);if(!n)return[...t,r];if((o=n==null?void 0:n.node.isVariantOf)!=null&&o.hasVariant){const i=n.node.isVariantOf.hasVariant,c=r.node.isVariantOf.hasVariant;i&&c&&(n.node.isVariantOf.hasVariant=[...i,...c])}return t},[]),Ex=({selectedProduct:e,productId:t,prevState:r,mainSellerId:n})=>{const{products:o,totalPrice:i}=r;try{if(!e){const{[t]:d,...h}=o;return{...r,totalPrice:i-d.price,products:h}}const c=U.getValidOffer(e.offers.offers,n);if(!c)return r;const l=c.seller.identifier,u=c.price;if(o[t]){const{price:d}=o[t];return o[t]={...o[t],price:u,id:e.sku,seller:l},{totalPrice:i+u-d,products:{...o}}}return{totalPrice:i+u,products:{...o,[t]:{id:e.sku,price:u,seller:l,productId:t}}}}catch(c){return console.error("Error handling SKU selection:",c),r}},Fp=j.createContext({}),Px=({children:e,item:t,index:r,shelfTitle:n,...o})=>{const[i,c]=j.useState(null),l=j.useRef(null),u=j.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:d,itemListRef:h}=Ee(),m=x=>{d({functionKey:"productEvents",data:{commonData:{...t,availableSizes:u.current.availableSkus,...u.current.priceInfo},customData:{index:r+1},event:x}})},_=()=>{m("add_to_wishlist")},g=()=>{d({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...u.current.priceInfo}]},supportData:{selectedSku:i,selectedSkus:[i]},customData:{index:r}}})},v=()=>{n&&(h.current={item_list_name:n}),m("select_item")};return s.jsx(Fp.Provider,{value:j.useMemo(()=>({...o,index:r,item:t,element:l,selectedSku:i,setSelectedSku:c,eventDataRef:u,sendAddToWishlistEvent:_,sendSelectItemEvent:v,sendAddToCartEvent:g}),[o,t,l,i]),children:e})},Kt=()=>{const e=j.useContext(Fp);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},mt={"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"},zp=({callback:e,children:t,className:r,data:n,isKit:o,...i})=>{const{item:{availability:{status:c},image:l}}=Kt();return c?s.jsxs("div",{...i,className:p.helpers.classNameConcat(mt["product-card--actions"],r),children:[s.jsxs(Ue.Wrapper,{type:"actions--group",children:[s.jsx(Ue.Price,{}),s.jsx("div",{className:mt["product-card--actions--selectors"],children:!o&&s.jsx(Ue.StyleSelector,{data:n,images:l,callback:e})})]}),t]}):null};zp.displayName="ProductCard.Actions";const qp=({className:e,isKit:t,...r})=>{const{addToCart:n}=Xe(),{isMobile:o=!1,selectedSku:i,outStock:c,item:l,sendAddToCartEvent:u,CONSTANTS:d}=Kt(),h=()=>{var g;if(!i)return;const _=U.getValidOffer(i.offers.offers,d.StoreConfig_MainSellerId);_&&n({id:i==null?void 0:i.sku,quantity:1,seller:_.seller.identifier},{id:l.id,texture:(g=l==null?void 0:l.image.find(v=>d.TEXTURE_IMAGE.includes(v.alternateName)))==null?void 0:g.url}),u()},m=i?d.BUY_BUTTON_LABELS.add_to_cart:d.BUY_BUTTON_LABELS.select_size;return s.jsx(p.Button,{...r,className:p.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!i&&!c,size:o?"medium":"large",variant:c?"secondary":"primary",onClick:c?r.onClick:h,children:c?"Avise-me quando chegar":m})};qp.displayName="ProductCard.Actions.BuyButton";const Ix={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},qn=({size:e,adornment:t,title:r,subtitle:n,supportChildren:o,className:i,Z_INDEX_WAR:c,...l})=>s.jsxs(p.SnackBar.Structure,{...l,size:e,className:p.helpers.classNameConcat(Ix["snackbar-modifier"],i),width:360,style:{zIndex:c.snackbar},children:[s.jsx(p.SnackBar.Content,{adornment:t,title:r,subtitle:n}),o&&s.jsx(p.SnackBar.Support,{children:o})]});qn.displayName="SnackBar";const bs={"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 Ha={exports:{}},Ct={};Ct._=Ct._interop_require_default=Nx;function Nx(e){return e&&e.__esModule?e:{default:e}}var ao={exports:{}},Li={},pu;function Bp(){return pu||(pu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{assign:function(){return i},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}});function r(c){const l={};return c.forEach((u,d)=>{typeof l[d]>"u"?l[d]=u:Array.isArray(l[d])?l[d].push(u):l[d]=[l[d],u]}),l}function n(c){return typeof c=="string"||typeof c=="number"&&!isNaN(c)||typeof c=="boolean"?String(c):""}function o(c){const l=new URLSearchParams;return Object.entries(c).forEach(u=>{let[d,h]=u;Array.isArray(h)?h.forEach(m=>l.append(d,n(m))):l.set(d,n(h))}),l}function i(c){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];return u.forEach(h=>{Array.from(h.keys()).forEach(m=>c.delete(m)),h.forEach((m,_)=>c.append(_,m))}),c}}(Li)),Li}var Di={},_n={};function Up(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Up=function(n){return n?r:t})(e)}_n._=_n._interop_require_wildcard=Rx;function Rx(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Up(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var c=o?Object.getOwnPropertyDescriptor(e,i):null;c&&(c.get||c.set)?Object.defineProperty(n,i,c):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}var hu;function Hp(){return hu||(hu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}t(e,{formatUrl:function(){return i},formatWithValidation:function(){return l},urlObjectKeys:function(){return c}});const n=_n._(Bp()),o=/https?|ftp|gopher|file/;function i(u){let{auth:d,hostname:h}=u,m=u.protocol||"",_=u.pathname||"",g=u.hash||"",v=u.query||"",x=!1;d=d?encodeURIComponent(d).replace(/%3A/i,":")+"@":"",u.host?x=d+u.host:h&&(x=d+(~h.indexOf(":")?"["+h+"]":h),u.port&&(x+=":"+u.port)),v&&typeof v=="object"&&(v=String(n.urlQueryToSearchParams(v)));let S=u.search||v&&"?"+v||"";return m&&!m.endsWith(":")&&(m+=":"),u.slashes||(!m||o.test(m))&&x!==!1?(x="//"+(x||""),_&&_[0]!=="/"&&(_="/"+_)):x||(x=""),g&&g[0]!=="#"&&(g="#"+g),S&&S[0]!=="?"&&(S="?"+S),_=_.replace(/[?#]/g,encodeURIComponent),S=S.replace("#","%23"),""+m+x+_+S+g}const c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(u){return process.env.NODE_ENV==="development"&&u!==null&&typeof u=="object"&&Object.keys(u).forEach(d=>{c.includes(d)||console.warn("Unknown key passed via urlObject into url.format: "+d)}),i(u)}}(Di)),Di}var Fi={},mu;function Tx(){return mu||(mu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,n){const o={};return Object.keys(r).forEach(i=>{n.includes(i)||(o[i]=r[i])}),o}}(Fi)),Fi}var zi={},_u;function Ko(){return _u||(_u=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,N){for(var T in N)Object.defineProperty(C,T,{enumerable:!0,get:N[T]})}t(e,{DecodeError:function(){return v},MiddlewareNotFoundError:function(){return I},MissingStaticPage:function(){return w},NormalizeError:function(){return x},PageNotFoundError:function(){return S},SP:function(){return _},ST:function(){return g},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return l},isAbsoluteUrl:function(){return i},isResSent:function(){return d},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return P}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(C){let N=!1,T;return function(){for(var O=arguments.length,M=new Array(O),z=0;z<O;z++)M[z]=arguments[z];return N||(N=!0,T=C(...M)),T}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=C=>o.test(C);function c(){const{protocol:C,hostname:N,port:T}=window.location;return C+"//"+N+(T?":"+T:"")}function l(){const{href:C}=window.location,N=c();return C.substring(N.length)}function u(C){return typeof C=="string"?C:C.displayName||C.name||"Unknown"}function d(C){return C.finished||C.headersSent}function h(C){const N=C.split("?");return N[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(N[1]?"?"+N.slice(1).join("?"):"")}async function m(C,N){if(process.env.NODE_ENV!=="production"){var T;if((T=C.prototype)!=null&&T.getInitialProps){const z='"'+u(C)+'.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(z)}}const O=N.res||N.ctx&&N.ctx.res;if(!C.getInitialProps)return N.ctx&&N.Component?{pageProps:await m(N.Component,N.ctx)}:{};const M=await C.getInitialProps(N);if(O&&d(O))return M;if(!M){const z='"'+u(C)+'.getInitialProps()" should resolve to an object. But found "'+M+'" instead.';throw new Error(z)}return process.env.NODE_ENV!=="production"&&Object.keys(M).length===0&&!N.ctx&&console.warn(""+u(C)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),M}const _=typeof performance<"u",g=_&&["mark","measure","getEntriesByName"].every(C=>typeof performance[C]=="function");class v extends Error{}class x extends Error{}class S extends Error{constructor(N){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+N}}class w extends Error{constructor(N,T){super(),this.message="Failed to load static file for page: "+N+" "+T}}class I extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function P(C){return JSON.stringify({message:C.message,stack:C.stack})}}(zi)),zi}var co={exports:{}},gu;function Qo(){return gu||(gu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=U.removeTrailingSlash,n=U.parsePath,o=i=>{if(!i.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return i;const{pathname:c,query:l,hash:u}=(0,n.parsePath)(i);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(c)?""+(0,r.removeTrailingSlash)(c)+l+u:c.endsWith("/")?""+c+l+u:c+"/"+l+u:""+(0,r.removeTrailingSlash)(c)+l+u};(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)}(co,co.exports)),co.exports}var qi={},lo={exports:{}},yu;function Ox(){return yu||(yu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=U.pathHasPrefix,n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i){return(0,r.pathHasPrefix)(i,n)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(lo,lo.exports)),lo.exports}var vu;function $p(){return vu||(vu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return n}});const t=Ko(),r=Ox();function n(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const i=(0,t.getLocationOrigin)(),c=new URL(o,i);return c.origin===i&&(0,r.hasBasePath)(c.pathname)}catch{return!1}}}(qi)),qi}var Bi={},Ui={},xu;function Ax(){return xu||(xu=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 i=[...this.children.keys()].sort();this.slugName!==null&&i.splice(i.indexOf("[]"),1),this.restSlugName!==null&&i.splice(i.indexOf("[...]"),1),this.optionalRestSlugName!==null&&i.splice(i.indexOf("[[...]]"),1);const c=i.map(l=>this.children.get(l)._smoosh(""+o+l+"/")).reduce((l,u)=>[...l,...u],[]);if(this.slugName!==null&&c.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const l=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 ("'+l+'" and "'+l+"[[..."+this.optionalRestSlugName+']]").');c.unshift(l)}return this.restSlugName!==null&&c.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&c.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),c}_insert(o,i,c){if(o.length===0){this.placeholder=!1;return}if(c)throw new Error("Catch-all must be the last part of the URL.");let l=o[0];if(l.startsWith("[")&&l.endsWith("]")){let h=function(m,_){if(m!==null&&m!==_)throw new Error("You cannot use different slug names for the same dynamic path ('"+m+"' !== '"+_+"').");i.forEach(g=>{if(g===_)throw new Error('You cannot have the same slug name "'+_+'" repeat within a single dynamic path');if(g.replace(/\W/g,"")===l.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+g+'" and "'+_+'" differ only by non-word symbols within a single dynamic path')}),i.push(_)},u=l.slice(1,-1),d=!1;if(u.startsWith("[")&&u.endsWith("]")&&(u=u.slice(1,-1),d=!0),u.startsWith("...")&&(u=u.substring(3),c=!0),u.startsWith("[")||u.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+u+"').");if(u.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+u+"').");if(c)if(d){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]+'" ).');h(this.optionalRestSlugName,u),this.optionalRestSlugName=u,l="[[...]]"}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]+'").');h(this.restSlugName,u),this.restSlugName=u,l="[...]"}else{if(d)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');h(this.slugName,u),this.slugName=u,l="[]"}}this.children.has(l)||this.children.set(l,new t),this.children.get(l)._insert(o.slice(1),i,c)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(n){const o=new t;return n.forEach(i=>o.insert(i)),o.smoosh()}}(Ui)),Ui}var Hi={},$i={},Wi={},Vi={},bu;function kx(){return bu||(bu=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}}(Vi)),Vi}var Ac={};(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,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return r}});function r(i){return i[0]==="("&&i.endsWith(")")}const n="__PAGE__",o="__DEFAULT__"})(Ac);var ju;function Mx(){return ju||(ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return i}});const r=kx(),n=Ac;function o(c){return(0,r.ensureLeadingSlash)(c.split("/").reduce((l,u,d,h)=>!u||(0,n.isGroupSegment)(u)||u[0]==="@"||(u==="page"||u==="route")&&d===h.length-1?l:l+"/"+u,""))}function i(c){return c.replace(/\.rsc($|\?)/,"$1")}}(Wi)),Wi}var Su;function Wp(){return Su||(Su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return n},extractInterceptionRouteInformation:function(){return i},isInterceptionRouteAppPath:function(){return o}});const r=Mx(),n=["(..)(..)","(.)","(..)","(...)"];function o(c){return c.split("/").find(l=>n.find(u=>l.startsWith(u)))!==void 0}function i(c){let l,u,d;for(const h of c.split("/"))if(u=n.find(m=>h.startsWith(m)),u){[l,d]=c.split(u,2);break}if(!l||!u||!d)throw new Error(`Invalid interception route: ${c}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(l=(0,r.normalizeAppPath)(l),u){case"(.)":l==="/"?d=`/${d}`:d=l+"/"+d;break;case"(..)":if(l==="/")throw new Error(`Invalid interception route: ${c}. Cannot use (..) marker at the root level, use (.) instead.`);d=l.split("/").slice(0,-1).concat(d).join("/");break;case"(...)":d="/"+d;break;case"(..)(..)":const h=l.split("/");if(h.length<=2)throw new Error(`Invalid interception route: ${c}. Cannot use (..)(..) marker at the root level or one level up.`);d=h.slice(0,-2).concat(d).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:l,interceptedRoute:d}}}($i)),$i}var Cu;function Lx(){return Cu||(Cu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return n}});const t=Wp(),r=/\/\[[^/]+?\](?=\/|$)/;function n(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(Hi)),Hi}var wu;function Dx(){return wu||(wu=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,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return n.isDynamicRoute}});const r=Ax(),n=Lx()}(Bi)),Bi}var Gi={},Ki={},Eu;function Fx(){return Eu||(Eu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=Ko();function r(n){let{re:o,groups:i}=n;return c=>{const l=o.exec(c);if(!l)return!1;const u=h=>{try{return decodeURIComponent(h)}catch{throw new t.DecodeError("failed to decode param")}},d={};return Object.keys(i).forEach(h=>{const m=i[h],_=l[m.pos];_!==void 0&&(d[h]=~_.indexOf("/")?_.split("/").map(g=>u(g)):m.repeat?[u(_)]:u(_))}),d}}}(Ki)),Ki}var Qi={},Yi={},Pu;function zx(){return Pu||(Pu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return n}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function n(o){return t.test(o)?o.replace(r,"\\$&"):o}}(Yi)),Yi}var Iu;function qx(){return Iu||(Iu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,x){for(var S in x)Object.defineProperty(v,S,{enumerable:!0,get:x[S]})}t(e,{getNamedMiddlewareRegex:function(){return g},getNamedRouteRegex:function(){return _},getRouteRegex:function(){return u},parseParameter:function(){return c}});const r=U.constants,n=Wp(),o=zx(),i=U.removeTrailingSlash;function c(v){const x=v.startsWith("[")&&v.endsWith("]");x&&(v=v.slice(1,-1));const S=v.startsWith("...");return S&&(v=v.slice(3)),{key:v,repeat:S,optional:x}}function l(v){const x=(0,i.removeTrailingSlash)(v).slice(1).split("/"),S={};let w=1;return{parameterizedRoute:x.map(I=>{const P=n.INTERCEPTION_ROUTE_MARKERS.find(N=>I.startsWith(N)),C=I.match(/\[((?:\[.*\])|.+)\]/);if(P&&C){const{key:N,optional:T,repeat:O}=c(C[1]);return S[N]={pos:w++,repeat:O,optional:T},"/"+(0,o.escapeStringRegexp)(P)+"([^/]+?)"}else if(C){const{key:N,repeat:T,optional:O}=c(C[1]);return S[N]={pos:w++,repeat:T,optional:O},T?O?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(I)}).join(""),groups:S}}function u(v){const{parameterizedRoute:x,groups:S}=l(v);return{re:new RegExp("^"+x+"(?:/)?$"),groups:S}}function d(){let v=0;return()=>{let x="",S=++v;for(;S>0;)x+=String.fromCharCode(97+(S-1)%26),S=Math.floor((S-1)/26);return x}}function h(v){let{interceptionMarker:x,getSafeRouteKey:S,segment:w,routeKeys:I,keyPrefix:P}=v;const{key:C,optional:N,repeat:T}=c(w);let O=C.replace(/\W/g,"");P&&(O=""+P+O);let M=!1;(O.length===0||O.length>30)&&(M=!0),isNaN(parseInt(O.slice(0,1)))||(M=!0),M&&(O=S()),P?I[O]=""+P+C:I[O]=C;const z=x?(0,o.escapeStringRegexp)(x):"";return T?N?"(?:/"+z+"(?<"+O+">.+?))?":"/"+z+"(?<"+O+">.+?)":"/"+z+"(?<"+O+">[^/]+?)"}function m(v,x){const S=(0,i.removeTrailingSlash)(v).slice(1).split("/"),w=d(),I={};return{namedParameterizedRoute:S.map(P=>{const C=n.INTERCEPTION_ROUTE_MARKERS.some(T=>P.startsWith(T)),N=P.match(/\[((?:\[.*\])|.+)\]/);if(C&&N){const[T]=P.split(N[0]);return h({getSafeRouteKey:w,interceptionMarker:T,segment:N[1],routeKeys:I,keyPrefix:x?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return N?h({getSafeRouteKey:w,segment:N[1],routeKeys:I,keyPrefix:x?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(P)}).join(""),routeKeys:I}}function _(v,x){const S=m(v,x);return{...u(v),namedRegex:"^"+S.namedParameterizedRoute+"(?:/)?$",routeKeys:S.routeKeys}}function g(v,x){const{parameterizedRoute:S}=l(v),{catchAll:w=!0}=x;if(S==="/")return{namedRegex:"^/"+(w?".*":"")+"$"};const{namedParameterizedRoute:I}=m(v,!1);let P=w?"(?:(/.*)?)":"";return{namedRegex:"^"+I+P+"$"}}}(Qi)),Qi}var Nu;function Bx(){return Nu||(Nu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return n}});const t=Fx(),r=qx();function n(o,i,c){let l="";const u=(0,r.getRouteRegex)(o),d=u.groups,h=(i!==o?(0,t.getRouteMatcher)(u)(i):"")||c;l=o;const m=Object.keys(d);return m.every(_=>{let g=h[_]||"";const{repeat:v,optional:x}=d[_];let S="["+(v?"...":"")+_+"]";return x&&(S=(g?"":"/")+"["+S+"]"),v&&!Array.isArray(g)&&(g=[g]),(x||_ in h)&&(l=l.replace(S,v?g.map(w=>encodeURIComponent(w)).join("/"):encodeURIComponent(g))||"/")})||(l=""),{params:m,result:l}}}(Gi)),Gi}var Ru;function Ux(){return Ru||(Ru=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return h}});const r=Bp(),n=Hp(),o=Tx(),i=Ko(),c=Qo(),l=$p(),u=Dx(),d=Bx();function h(m,_,g){let v,x=typeof _=="string"?_:(0,n.formatWithValidation)(_);const S=x.match(/^[a-zA-Z]{1,}:\/\//),w=S?x.slice(S[0].length):x;if((w.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+x+"' passed to next/router in page: '"+m.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const P=(0,i.normalizeRepeatedSlashes)(w);x=(S?S[0]:"")+P}if(!(0,l.isLocalURL)(x))return g?[x]:x;try{v=new URL(x.startsWith("#")?m.asPath:m.pathname,"http://n")}catch{v=new URL("/","http://n")}try{const P=new URL(x,v);P.pathname=(0,c.normalizePathTrailingSlash)(P.pathname);let C="";if((0,u.isDynamicRoute)(P.pathname)&&P.searchParams&&g){const T=(0,r.searchParamsToUrlQuery)(P.searchParams),{result:O,params:M}=(0,d.interpolateAs)(P.pathname,P.pathname,T);O&&(C=(0,n.formatWithValidation)({pathname:O,hash:P.hash,query:(0,o.omit)(T,M)}))}const N=P.origin===v.origin?P.href.slice(P.origin.length):P.href;return g?[N,C||N]:N}catch{return g?[x]: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)}(ao,ao.exports)),ao.exports}var uo={exports:{}},Tu;function Hx(){return Tu||(Tu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}});const r=Qo(),n=function(o){for(var i=arguments.length,c=new Array(i>1?i-1:0),l=1;l<i;l++)c[l-1]=arguments[l];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(U.addLocale.addLocale(o,...c)):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)}(uo,uo.exports)),uo.exports}var Xi={},Ou;function Vp(){return Ou||(Ou=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="RouterContext")}(Xi)),Xi}var Ji={},Au;function Gp(){return Au||(Au=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(d,h){for(var m in h)Object.defineProperty(d,m,{enumerable:!0,get:h[m]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return c},LayoutRouterContext:function(){return i},MissingSlotContext:function(){return u},TemplateContext:function(){return l}});const n=Ct._(j),o=n.default.createContext(null),i=n.default.createContext(null),c=n.default.createContext(null),l=n.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",i.displayName="LayoutRouterContext",c.displayName="GlobalLayoutRouterContext",l.displayName="TemplateContext");const u=n.default.createContext(new Set)}(Ji)),Ji}var fo={exports:{}},po={exports:{}},ku;function Kp(){return ku||(ku=1,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,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return n}});const n=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(i){let c=Date.now();return self.setTimeout(function(){i({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-c))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(i){return clearTimeout(i)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(po,po.exports)),po.exports}var Mu;function $x(){return Mu||(Mu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return d}});const r=j,n=Kp(),o=typeof IntersectionObserver=="function",i=new Map,c=[];function l(h){const m={root:h.root||null,margin:h.rootMargin||""},_=c.find(S=>S.root===m.root&&S.margin===m.margin);let g;if(_&&(g=i.get(_),g))return g;const v=new Map,x=new IntersectionObserver(S=>{S.forEach(w=>{const I=v.get(w.target),P=w.isIntersecting||w.intersectionRatio>0;I&&P&&I(P)})},h);return g={id:m,observer:x,elements:v},c.push(m),i.set(m,g),g}function u(h,m,_){const{id:g,observer:v,elements:x}=l(_);return x.set(h,m),v.observe(h),function(){if(x.delete(h),v.unobserve(h),x.size===0){v.disconnect(),i.delete(g);const w=c.findIndex(I=>I.root===g.root&&I.margin===g.margin);w>-1&&c.splice(w,1)}}}function d(h){let{rootRef:m,rootMargin:_,disabled:g}=h;const v=g||!o,[x,S]=(0,r.useState)(!1),w=(0,r.useRef)(null),I=(0,r.useCallback)(C=>{w.current=C},[]);(0,r.useEffect)(()=>{if(o){if(v||x)return;const C=w.current;if(C&&C.tagName)return u(C,T=>T&&S(T),{root:m==null?void 0:m.current,rootMargin:_})}else if(!x){const C=(0,n.requestIdleCallback)(()=>S(!0));return()=>(0,n.cancelIdleCallback)(C)}},[v,_,m,x,w.current]);const P=(0,r.useCallback)(()=>{S(!1)},[]);return[I,x,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)}(fo,fo.exports)),fo.exports}var ho={exports:{}},mo={exports:{}},Lu;function Wx(){return Lu||(Lu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(n,o)=>process.env.__NEXT_I18N_SUPPORT?U.normalizeLocalePath.normalizeLocalePath(n,o):{pathname:n,detectedLocale:void 0};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(mo,mo.exports)),mo.exports}var _o={exports:{}},Du;function Vx(){return Du||(Du=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];if(process.env.__NEXT_I18N_SUPPORT)return U.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)}(_o,_o.exports)),_o.exports}var Fu;function Gx(){return Fu||(Fu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=Qo(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i,c,l,u){if(process.env.__NEXT_I18N_SUPPORT){const d=Wx().normalizeLocalePath,h=Vx().detectDomainLocale,m=c||d(i,l).detectedLocale,_=h(u,void 0,m);if(_){const g="http"+(_.http?"":"s")+"://",v=m===_.defaultLocale?"":"/"+m;return""+g+_.domain+(0,r.normalizePathTrailingSlash)(""+n+v+i)}return!1}else return!1}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(ho,ho.exports)),ho.exports}var go={exports:{}},zu;function Kx(){return zu||(zu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return i}});const r=U.addPathPrefix,n=Qo(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function i(c,l){return(0,n.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!l?c:(0,r.addPathPrefix)(c,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)}(go,go.exports)),go.exports}var yo={exports:{}},qu;function Qx(){return qu||(qu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(g,v){for(var x in v)Object.defineProperty(g,x,{enumerable:!0,get:v[x]})}r(t,{ACTION_FAST_REFRESH:function(){return u},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return l},ACTION_REFRESH:function(){return n},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return m},PrefetchKind:function(){return h},isThenable:function(){return _}});const n="refresh",o="navigate",i="restore",c="server-patch",l="prefetch",u="fast-refresh",d="server-action";var h;(function(g){g.AUTO="auto",g.FULL="full",g.TEMPORARY="temporary"})(h||(h={}));var m;(function(g){g.fresh="fresh",g.reusable="reusable",g.expired="expired",g.stale="stale"})(m||(m={}));function _(g){return g&&(typeof g=="object"||typeof g=="function")&&typeof g.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)}(yo,yo.exports)),yo.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return T}});const r=Ct,n=s,o=r._(j),i=Ux(),c=$p(),l=Hp(),u=Ko(),d=Hx(),h=Vp(),m=Gp(),_=$x(),g=Gx(),v=Kx(),x=Qx(),S=new Set;function w(O,M,z,D,B,G){if(typeof window>"u"||!G&&!(0,c.isLocalURL)(M))return;if(!D.bypassPrefetchedCheck){const Y=typeof D.locale<"u"?D.locale:"locale"in O?O.locale:void 0,X=M+"%"+z+"%"+Y;if(S.has(X))return;S.add(X)}(async()=>G?O.prefetch(M,B):O.prefetch(M,z,D))().catch(Y=>{if(process.env.NODE_ENV!=="production")throw Y})}function I(O){const z=O.currentTarget.getAttribute("target");return z&&z!=="_self"||O.metaKey||O.ctrlKey||O.shiftKey||O.altKey||O.nativeEvent&&O.nativeEvent.which===2}function P(O,M,z,D,B,G,J,Y,X){const{nodeName:Z}=O.currentTarget;if(Z.toUpperCase()==="A"&&(I(O)||!X&&!(0,c.isLocalURL)(z)))return;O.preventDefault();const fe=()=>{const ee=J??!0;"beforePopState"in M?M[B?"replace":"push"](z,D,{shallow:G,locale:Y,scroll:ee}):M[B?"replace":"push"](D||z,{scroll:ee})};X?o.default.startTransition(fe):fe()}function C(O){return typeof O=="string"?O:(0,l.formatUrl)(O)}const T=o.default.forwardRef(function(M,z){let D;const{href:B,as:G,children:J,prefetch:Y=null,passHref:X,replace:Z,shallow:he,scroll:fe,locale:ee,onClick:ie,onMouseEnter:_e,onTouchStart:Ce,legacyBehavior:ge=!1,...we}=M;D=J,ge&&(typeof D=="string"||typeof D=="number")&&(D=(0,n.jsx)("a",{children:D}));const V=o.default.useContext(h.RouterContext),oe=o.default.useContext(m.AppRouterContext),F=V??oe,ce=!V,je=Y!==!1,Oe=Y===null?x.PrefetchKind.AUTO:x.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let re=function(se){return new Error("Failed prop type: The prop `"+se.key+"` expects a "+se.expected+" in `<Link>`, but got `"+se.actual+"` instead."+(typeof window<"u"?`
1
+ "use strict";var xy=Object.defineProperty;var Ql=e=>{throw TypeError(e)};var by=(e,t,r)=>t in e?xy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qr=(e,t,r)=>by(e,typeof t!="symbol"?t+"":t,r),ki=(e,t,r)=>t.has(e)||Ql("Cannot "+r);var k=(e,t,r)=>(ki(e,t,"read from private field"),r?r.call(e):t.get(e)),ye=(e,t,r)=>t.has(e)?Ql("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ue=(e,t,r,n)=>(ki(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Re=(e,t,r)=>(ki(e,t,"access private method"),r);var so=(e,t,r,n)=>({set _(o){ue(e,t,o,r)},get _(){return k(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),j=require("react"),U=require("./index-HEA7MkPc.js"),hr=require("js-cookie"),er=require("idb-keyval"),xn=require("zustand"),p=require("@soma-vertical-web/core-components"),Fn=require("axios"),Sa=require("@date-fns/tz");require("jose");const zn=require("@soma-vertical-web/foundations"),dc=require("react-dom"),dn=require("draft-js"),Ud=require("react-intersection-observer");function jy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const $t=jy(j),fc=j.createContext({}),Sy=({data:e,children:t})=>s.jsx(fc.Provider,{value:{tags:e==null?void 0:e.config},children:t}),Cr=()=>{const{tags:e}=j.useContext(fc),t=j.useCallback(r=>{var l,u,d,h;const n=(u=(l=e==null?void 0:e.commercial)==null?void 0:l.items)==null?void 0:u.find(m=>{var _;return(_=r??[])==null?void 0:_.find(g=>g.id===m.key)}),o=(h=(d=e==null?void 0:e.institucional)==null?void 0:d.items)==null?void 0:h.find(m=>{var _;return(_=r??[])==null?void 0:_.find(g=>g.id===m.key)}),i=e==null?void 0:e.flagPdp,c=(r==null?void 0:r.find(m=>{var _;return m.id===((_=e==null?void 0:e.flagGoldenPdp)==null?void 0:_.key)}))&&(e==null?void 0:e.flagGoldenPdp);return{commercial:n,institucional:o,flagPdp:i,flagGoldenPdp:c}},[e]);return{tags:e,getAvailableProductTag:t}},Hd=({gridScrollBack:e})=>{j.useEffect(()=>{typeof window<"u"&&(e!=null&&e.refer)&&sessionStorage.setItem(e==null?void 0:e.refer,"true")},[])},$d=j.createContext({}),Cy=({children:e,gridScrollBack:t})=>{const r=j.useRef(null);return Hd({gridScrollBack:t}),s.jsx($d.Provider,{value:{sizesContainerRef:r},children:e})},Wd=()=>{const e=j.useContext($d);if(e===void 0)throw new Error("useContext(PDPContext) must be used within a PDPProvider");return e},Or=({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})},st={configs:{PLP_FILTERS:[{key:"",label:"",eventLabel:"",order:0}],currency:"BRL",categoryOff:"bazar",storeId:"",storeUrl:"https://www.example.com",MAIN_IMAGE:"1",NAME_SPLIT_SYMBOL:"-",VENDOR_CODE:""},productEvents:(e,t)=>{const{event:r,commonData:n,customData:o,promotionInfo:i,itemList:c,outsideEcommerceData:l}=e,{availableSizes:u,sizes:d,price:h}=n,m={...r==="view_item"?{currency:st.configs.currency,value:h,grade_disponivel:u??(d?Vd(d):"")}:{},...r==="add_to_wishlist"||r==="remove_from_wishlist"?{value:h,currency:st.configs.currency}:{}},_=oo({data:n,customData:{...o,...c,...i},configs:st.configs});Or({event:r,data:{...l,ecommerce:{...c,...m,items:[_]}}}),typeof t=="function"&&t(_,m)},productListEvent:e=>{const{commonData:{products:t},promotionInfo:r,itemList:n,outsideEcommerceData:o,customData:i}=e;if(t.length===0)return;const c=t.map(({node:l},u)=>oo({data:{...l},customData:{...r,index:u,...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n},configs:st.configs}));Or({event:"view_item_list",data:{...o,ecommerce:{...i!=null&&i.item_list_name?{item_list_name:i==null?void 0:i.item_list_name}:n,items:c}}})},skuEvents:e=>{const{event:t,commonData:{products:r},customData:n,supportData:{selectedSkus:o,price:i},promotionInfo:c,itemList:l,outsideEcommerceData:u}=e;let d=0;const h=r.map(m=>{var x,S,w,I,P,C,N,T,O;const _=o==null?void 0:o.find(M=>(m.productId??m.id)===M.productId);let g={...c,...l};if(_){const M=Kd(),z=Qd(M,_);z&&(g={...g,...z}),t==="add_to_cart"&&(c||l)&&Ca({persistedData:M,type:"add",sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku),newData:{promotionInfo:c,itemList:l}}),t==="remove_from_cart"&&Ca({persistedData:M,type:"remove",sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku)})}d+=m.price??((w=(S=(x=_==null?void 0:_.offers)==null?void 0:x.offers)==null?void 0:S[0])==null?void 0:w.price)??0;const v=(_==null?void 0:_.size)??U.getColorAndSizeFromSkuName((_==null?void 0:_.skuName)??(_==null?void 0:_.name)??((I=m.itemOffered)==null?void 0:I.skuName),st.configs.NAME_SPLIT_SYMBOL).size;return oo({data:m,customData:{...n,...g??{...c,...l},item_sku:(_==null?void 0:_.id)??(_==null?void 0:_.sku)??((P=m.itemOffered)==null?void 0:P.sku),quantity:(n==null?void 0:n.quantity)??m.quantity??1,item_variant2:v,seller_id:(_==null?void 0:_.sellerId)??(_==null?void 0:_.seller)??((O=(T=(N=(C=_==null?void 0:_.offers)==null?void 0:C.offers)==null?void 0:N[0])==null?void 0:T.seller)==null?void 0:O.identifier)??m.seller},configs:st.configs})});Or({event:t,data:{...u,ecommerce:{value:i??d,currency:st.configs.currency,items:h}}})},filterEvent:e=>{var c;const{commonData:t,customData:r,outsideEcommerceData:n}=e,o={},i={};Array.isArray(t==null?void 0:t.selectedFacets)&&((c=t==null?void 0:t.selectedFacets)!=null&&c.length)&&((t==null?void 0:t.selectedFacets).forEach(({key:l,value:u})=>{var m;const d=((m=st.configs.PLP_FILTERS.find(_=>_.key===l))==null?void 0:m.eventLabel)??l,h=(o==null?void 0:o[d])||[];d==="price_range"&&u.replace(":","-"),o[d]=[...h,u]}),Object.keys(o).forEach(l=>i[l]=o[l].join(", "))),Or({event:"filter",data:{...n,...i,...r}})},viewCartEvent:e=>{var h,m,_,g,v,x,S,w,I,P;const{commonData:t,outsideEcommerceData:r}=e,{cartStore:n}=t;if(!n)return;const o=window.localStorage.getItem("persistedCartEventsData"),i=o?JSON.parse(o):{},c=n.items.map(C=>{const{promotionInfo:N,itemList:T}=i[C.id]??{};return oo({data:{...C,price:C.price/100,listPrice:C.listPrice/100},customData:{...N,...T,item_sku:C.id??C.itemOffered.sku,quantity:C.quantity??1},configs:st.configs})}),l=(((h=n.totalizers.find(C=>C.name==="Total dos Itens"))==null?void 0:h.value)??0)/100,u=(((m=n.totalizers.find(C=>C.name==="Total dos Descontos"))==null?void 0:m.value)??0)/100,d=((_=n.marketingData)==null?void 0:_.utmiCampaign)===st.configs.VENDOR_CODE?(g=n.marketingData)==null?void 0:g.utmCampaign:(x=String((v=n.openTextField)==null?void 0:v.value))==null?void 0:x.split(" - ")[0];Or({event:"view_cart",data:{...r,ecommerce:{currency:st.configs.currency,value:l+u,total_discount:Math.abs(u),cep_preenchido:!!((w=(S=n.shippingData)==null?void 0:S.address)!=null&&w.postalCode),...d?{seller_coupon_name:d}:{},...((I=n.marketingData)==null?void 0:I.coupon)&&{sale_coupon_name:(P=n.marketingData)==null?void 0:P.coupon},subtotal:l,items:c}}})},readyEvents:e=>{const{event:t,readyData:r}=e;Or({event:t,data:{...r}})}},Vd=e=>e.reduce((t,r)=>(r.available&&t.push(r.value),t),[]).toString(),wy=e=>{const t=e.length;return{...e&&e.length>0?{item_category:e[0].includes(st.configs.categoryOff)?"Bazar":"Coleção",...e[1]?{item_category2:e[1]}:{},...t>2?{item_category3:e[t-1]}:{}}:{}}},oo=({data:e,customData:t,configs:r})=>({...Ey(e,r==null?void 0:r.MAIN_IMAGE),...Py(e),...Iy(e),...Ny(e),...t}),Gd=()=>{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("_"))??[]:[]},Kd=()=>{const e=window.localStorage.getItem("persistedCartEventsData");return e?JSON.parse(e):null},Qd=(e,t)=>e==null?void 0:e[t],Ca=({persistedData:e,type:t,sku:r,newData:n})=>{if(!e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({[r]:n}));return}if(e&&t==="add"){window.localStorage.setItem("persistedCartEventsData",JSON.stringify({...e,[r]:n}));return}e&&t==="remove"&&(delete e[r],window.localStorage.setItem("persistedCartEventsData",JSON.stringify(e)))},Ey=(e,t="1")=>{var i,c,l,u,d,h,m,_,g,v,x;const r=e.productReference??e.gtin??e.productRefId,n=e.image??((c=(i=e.items)==null?void 0:i[0])==null?void 0:c.images)??((l=e.itemOffered)==null?void 0:l.image),o=n==null?void 0:n.find(S=>S.alternateName===t||S.imageLabel===t||S.keywords===t);return{item_id:e.productId??((u=e.isVariantOf)==null?void 0:u.productGroupID)??((d=e.isVariationOf)==null?void 0:d.productGroupID)??((m=(h=e.itemOffered)==null?void 0:h.isVariationOf)==null?void 0:m.productGroupID),item_ref:/_\d$/.test(r)?r.slice(0,-2):r,item_name:e.productTitle??e.productName??e.name??U.splitNameAndSizeFromFullName((_=e.itemOffered)==null?void 0:_.name,st.configs.NAME_SPLIT_SYMBOL).name,item_brand:((g=e.brand)==null?void 0:g.brandName)??((v=e.brand)==null?void 0:v.name)??e.brand??((x=e.itemOffered)==null?void 0:x.brand.name),item_url:`${st.configs.storeUrl}${e.linkText}/p`,item_image:(o==null?void 0:o.url)??(o==null?void 0:o.imageUrl)}},Yl=e=>Array.isArray(e)?e.reduce((t,r)=>(r.length>t.length&&(t=r),t),""):e,Py=e=>{var d,h;const{categories:t,categoriesIds:r}=e,n=t??((d=e.itemOffered)==null?void 0:d.categories),o=r??((h=e.itemOffered)==null?void 0:h.categoriesIds),i=Yl(n),c=Yl(o),l=i.slice(1,-1).split("/"),u=c.slice(1,-1).split("/");return{item_category:l[0].toLowerCase().includes(st.configs.categoryOff)?"Bazar":"Coleção",...l[1]&&{item_category2:l[1]},...l.length>2&&{item_category3:l[l.length-1]},item_category_id:u[u.length-1],...u.length>1&&{item_parent_category_id:u[u.length-2]}}},Iy=e=>{var o,i,c,l,u,d;const t=((o=e.itemOffered)==null?void 0:o.skuName)??((l=(c=(i=e.isVariantOf)==null?void 0:i.hasVariant)==null?void 0:c[0])==null?void 0:l.name)??((d=(u=e.items)==null?void 0:u[0])==null?void 0:d.name),{color:r,size:n}=U.getColorAndSizeFromSkuName(t,st.configs.NAME_SPLIT_SYMBOL);return{item_variant:r,...e.itemOffered&&{item_variant2:n}}},Ny=e=>{var u,d;const{price:t,listPrice:r,installments:n}=e,o=t??((u=e.offers)==null?void 0:u.lowPrice)??0,i=r??((d=e.offers)==null?void 0:d.highPrice)??0,c=i?i-o:0,l=c%1===0?c:Number(c.toFixed(2));return{...t&&{price:o??i},...i&&{list_price:i,discount:l},...n&&{installments:n==null?void 0:n.count,installment_value:n==null?void 0:n.value},item_currency:st.configs.currency}},Yd=()=>{const[e,t]=Gd(),[r,n]=e.split("-"),o=r.includes("shop")||r.includes("sale")?r:"";return{page_category:o&&n?n:"",page_departament:o,id:t,name:e}},Ry=Object.freeze(Object.defineProperty({__proto__:null,eventsFunctions:st,findDataInPersistedData:Qd,getAvailablesSizes:Vd,getCategories:wy,getPageCategoryAndDepartmentFromSlug:Yd,getPersistedData:Kd,getProductListInfoFromHead:Gd,pushDatalayer:Or,updatePersistedData:Ca},Symbol.toStringTag,{value:"Module"})),Pt={ping:"is-ping",session:"is-session",anonymous:"is-anonymous"},Mi=[{name:Pt.session,duration:1/1440*30},{name:Pt.anonymous,duration:365}],Xd=({storeId:e,storeUrl:t})=>{const r=/\.[\w|\-+\.\w+\.\w]+/,[n]=(t==null?void 0:t.match(r))||[],o=(l,u)=>{if(typeof window>"u")return;const d={session:hr.get(Pt==null?void 0:Pt.session),anonymous:hr.get(Pt==null?void 0:Pt.anonymous),url:window.location.href,agent:window.navigator.userAgent,type:l,...u};return fetch(`https://sp.vtex.com/event-api/v1/${e}/event`,{body:JSON.stringify(d),method:"POST",headers:{"Content-Type":"application/json"}})},i=()=>{hr.get(Pt==null?void 0:Pt.ping)||(hr.set(Pt==null?void 0:Pt.ping,"1",{domain:process.env.NODE_ENV==="development"?"localhost":n,expires:1/1440*1}),o("session.ping"))};return{sendSearchEvent:o,sessionGenerator:()=>{typeof window>"u"||(i(),Mi==null||Mi.forEach(({name:l,duration:u})=>{var h;if(hr.get(l)||!("randomUUID"in window.crypto))return;const d=(h=window==null?void 0:window.crypto)==null?void 0:h.randomUUID().replace(/\-/g,"");hr.set(l,d,{path:"/",domain:process.env.NODE_ENV==="development"?"localhost":n,expires:u})}))}}},Jd=j.createContext({}),Ty=({children:e,evtFunctionsConfigs:t})=>{const r=j.useRef({}),n=j.useRef(null),o=j.useRef(null),i=j.useRef({}),{sendSearchEvent:c,sessionGenerator:l}=Xd(t),u=j.useRef({trigger:!1,index:0}),d=({functionKey:_,data:g,callBack:v,timeout:x=100})=>{window.dataLayer||(window.dataLayer=[]),st.configs=t;try{typeof st[_]=="function"&&setTimeout(()=>{var S;g.promotionInfo=r.current,(S=o.current)!=null&&S.item_list_name&&(g.itemList=o.current),st[_](g,v)},x)}catch(S){Or({event:"error_event",data:{error_message:(S==null?void 0:S.message)??S}})}},h=({content:_})=>{d({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:_.replace("::",":")}}})},m=({updatePromotionRef:_,promotion:g,index:v})=>{_&&(r.current={...g}),d({functionKey:"readyEvents",data:{event:"select_promotion",readyData:{ecommerce:{...g,...v!==void 0&&{index:v}}}}})};return l(),s.jsx(Jd.Provider,{value:{sendSearchEvent:c,sendDataLayerEvent:d,triggerSelectItemEventRef:u,promotionEventRef:r,currentLocalRef:n,itemListRef:o,cartProductsFullDataRef:i,handleSelectContent:h,handleSelectPromotionEvent:m},children:e})},Ce=()=>j.useContext(Jd),Zd=j.createContext({}),Oy=({children:e,productData:t,isKit:r,PDP_INFO:n,NAME_SPLIT_SYMBOL:o,TEXTURE_IMAGE:i})=>{var Y,X;const{sendDataLayerEvent:c,triggerSelectItemEventRef:l}=Ce(),{productId:u,productName:d,items:h,items:[{images:m,Videos:_}],description:g,["Composição"]:v="",productReference:x,categories:[S]}=t,{getAvailableProductTag:w}=Cr(),I=w(Object.entries(t.clusterHighlights).map(Z=>({id:Z[0],name:Z[1]}))),P=S.slice(1,-1).split("/"),{installments:C,price:N,listPrice:T,sizes:O,allSizesAvailable:M}=U.getSkuInfos({items:h,NAME_SPLIT_SYMBOL:o}),z=U.getThumbImage({images:m,TEXTURE_IMAGE:i}),D=[{label:`${n.product.description}`,value:"description",content:g},{label:`${n.product.materiais}`,value:"composition",content:v}],B=((X=U.getColorAndSizeFromSkuName((Y=t.items)==null?void 0:Y[0].name,o))==null?void 0:X.color)??t["Cores Filtráveis"][0]??"",G=()=>({commonData:{...t,sizes:O,price:N,listPrice:T,installments:C},customData:{installments:C==null?void 0:C.count,installment_value:Number(C==null?void 0:C.value).toFixed(2)}}),J=({sku:Z,size:he})=>{const{commonData:fe,customData:ee}=G();c({functionKey:"productEvents",data:{event:"view_item",commonData:fe,customData:{...ee,...Z&&{item_sku:Z},...he&&{item_variant2:he}}}})};return j.useEffect(()=>{if(l.current.trigger){const{commonData:Z,customData:he}=G();c({functionKey:"productEvents",data:{event:"select_item",commonData:Z,customData:{...he,index:l.current.index}}}),l.current.trigger=!1}J({})},[]),s.jsx(Zd.Provider,{value:{productData:t,productId:u,productName:d,productReference:x,tag:I,items:h,sizes:O,allSizesAvailable:M,installments:C,price:N,listPrice:T,thumbImage:z,images:m,video:_[0],descriptionContent:D,breadcrumbList:P,isKit:r,colorName:B,handleViewItemEvent:J},children:e})},Et=()=>{const e=j.useContext(Zd);if(e===void 0)throw new Error("useContext(PDPDataContext) must be used within a PDPDataProvider");return e},Ay=()=>{const[e,t]=j.useState(null);return[e,async n=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(n),t(n),!0}catch(o){return console.warn("Copy failed",o),t(null),!1}}]},ef=()=>{j.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)}},[])},ky=typeof window>"u",My=(e,t)=>{const[r,n]=j.useState(()=>{if(ky)return null;const i=localStorage.getItem(e);return i===null?t:JSON.parse(i||"{}")});return j.useEffect(()=>{const i=c=>{c.storageArea===localStorage&&c.key===e&&n(JSON.parse(c.newValue))};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[e,t]),[r,i=>{n(c=>{const l=typeof i=="function"?i(c):i;return localStorage.setItem(e,JSON.stringify(l)),l})}]};function pc(e,t,r){const[n,o]=j.useState(!1),{threshold:i}=r||{};return j.useEffect(()=>{if(!e.current)return()=>null;let c=null;const l=new IntersectionObserver(([u])=>{if(r!=null&&r.delay){c&&clearTimeout(c),c=setTimeout(()=>{o(u.isIntersecting),t&&u.isIntersecting&&l.unobserve(e.current)},r.delay);return}o(u.isIntersecting),t&&u.isIntersecting&&l.unobserve(e.current)},{threshold:i||1});return l.observe(e.current),()=>{l.disconnect()}},[e]),n}const $o=({callback:e,onEnterViewportOnce:t,options:r})=>{const n=j.useRef(null);return j.useEffect(()=>{const o=n.current;if(!o)return;const i=new IntersectionObserver(([c])=>{c.isIntersecting&&typeof e=="function"&&(e(),t&&(i.unobserve(o),i.disconnect()))},r);return i.observe(o),()=>{t&&i.unobserve(o),i.disconnect()}},[e,t,r]),{element:n}},tf=({defaultScale:e=1,maxScale:t=3})=>{const r=j.useRef(null),n=j.useRef(null),[o,i]=j.useState(e),c=j.useRef(0),l=j.useRef({x:0,y:0}),u=j.useRef({x:0,y:0}),d=()=>{if(!n.current||!r.current)return{minX:0,maxX:0,minY:0,maxY:0};const g=r.current.getBoundingClientRect(),v=n.current.children[0].getBoundingClientRect(),x=v.width,S=v.height,w=Math.min(0,(g.width-x)/2),I=Math.max(0,(x-g.width)/2),P=Math.min(0,(g.height-S)/2),C=Math.max(0,(S-g.height)/2);return{minX:w,maxX:I,minY:P,maxY:C}},h=(g,v,x)=>{if(n.current){const S=n.current.children[0];S&&requestAnimationFrame(()=>{S.style.transform=`translate(calc(-50% + ${g}px), calc(-50% + ${v}px)) scale(${x})`})}},m=j.useCallback(g=>{const{minX:v,maxX:x,minY:S,maxY:w}=d(),{x:I,y:P}=u.current,C=Math.max(v,Math.min(x,I)),N=Math.max(S,Math.min(w,P));if(g.touches.length>1){const T=g.touches[0],O=g.touches[1],M=T.pageX-O.pageX,z=T.pageY-O.pageY;c.current=Math.sqrt(M*M+z*z),l.current={x:(T.pageX+O.pageX)/2,y:(T.pageY+O.pageY)/2}}else g.touches.length===1&&(l.current={x:g.touches[0].pageX-C,y:g.touches[0].pageY-N})},[o,u]),_=j.useCallback(g=>{if(!n.current||!r.current)return;const{minX:v,maxX:x,minY:S,maxY:w}=d();if(g.touches.length>1){g.preventDefault();const I=g.touches[0],P=g.touches[1],C=I.pageX-P.pageX,N=I.pageY-P.pageY,T=Math.sqrt(C*C+N*N);if(!c.current){c.current=T;return}const O=T/c.current,M=Math.max(1,Math.min(t,o*O));if(o===M)return;i(M);const z=(I.pageX+P.pageX)/2,D=(I.pageY+P.pageY)/2;let B=z-l.current.x,G=D-l.current.y;B=Math.max(v,Math.min(x,B)),G=Math.max(S,Math.min(w,G)),u.current={x:B,y:G},c.current=T,h(B,G,M)}else if(g.touches.length===1){const I=g.touches[0].pageX,P=g.touches[0].pageY;let C=I-l.current.x,N=P-l.current.y;C=Math.max(v,Math.min(x,C)),N=Math.max(S,Math.min(w,N)),u.current={x:C,y:N},h(C,N,o)}},[t,o]);return j.useEffect(()=>(document.addEventListener("touchstart",m),document.addEventListener("touchmove",_,{passive:!1}),()=>{document.removeEventListener("touchstart",m),document.removeEventListener("touchmove",_)}),[_,m]),{containerRef:r,imgRef:n,scale:o}},Ly=()=>{const e=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/coupon",{body:{orderFormId:g,coupon:v}}),t=async(g,v,x={},S)=>{if(S)if(v){const w=v.includes(" - ")?v.split(" - ")[0]:v,I=await U.proxyCartAPI("/_v/proxy/checkout/order-form/seller-code",{body:{orderFormId:g,sellerCode:w}});return I instanceof Object&&x.name in I&&I[x.status]===!0?U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:g,sellerCode:w,sellerName:I[x.name]}}).then(C=>({...C,openTextField:{...(C==null?void 0:C.openTextField)??{},statusOk:!0}})):Promise.resolve({paymentData:null,openTextField:{statusOk:!1,value:w}})}else return U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments",{body:{orderFormId:g,sellerCode:"",sellerName:""}})},r=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:g,marketingData:v}}),n=async(g,v,x)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/items",{body:{orderFormId:g,orderItems:U.addItemOrder(v,x)}}),o=async(g,v,x,S=!1)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/offerings",{body:{id:v,itemIndex:x,orderFormId:g,remove:S}}),i=async g=>U.proxyCartAPI("/_v/proxy/checkout/order-form/items/remove-all",{body:{orderFormId:g}}),c=async g=>U.proxyCartAPI("/_v/proxy/checkout/order-form",{body:{orderFormId:g??""}}),l=async(g,v)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/profile",{body:{orderFormId:g,email:v}}),u=async(g,v,x)=>{const S=U.removeQuantity(v,x);return U.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderItems:S.updateItems,orderFormId:g}})},d=async(g,v,x,S,w,I,P)=>{var T,O;const C=P?{startDateUtc:(T=I==null?void 0:I.deliveryWindow)==null?void 0:T.startDate,endDateUtc:(O=I==null?void 0:I.deliveryWindow)==null?void 0:O.endDate}:null,N={logisticsInfo:Array.from({length:S},(M,z)=>({itemIndex:z,selectedDeliveryChannel:(I==null?void 0:I.deliveryChannel)||null,selectedSla:(I==null?void 0:I.deliveryMethod)||null,deliveryWindow:C})),selectedAddresses:w,clearAddressIfPostalCodeNotFound:!0};return U.proxyCartAPI("/_v/proxy/checkout/order-form/shipping",{body:{...N,orderFormId:g,country:x,postalCode:v}})},h=async(g,v,x)=>U.proxyCartAPI("/_v/proxy/checkout/order-form/shipping/update",{body:{orderFormId:g,options:v,selectedAddresses:x}}),m=async(g,v,x,S)=>{const w=U.updateQuantity(v,x,S);return U.proxyCartAPI("/_v/proxy/checkout/order-form/items/update",{body:{orderFormId:g,orderItems:w}})};return{addCoupon:e,addItem:n,addSellerCode:t,addMarketingData:r,giftItem:o,emptyCart:i,getOrderForm:c,insertProfileEmail:l,removeItem:u,shipping:d,shippingUpdate:h,updateItemQuantity:async(g,v,x,S,w)=>m(g,v,x,S).then(I=>I&&Array.isArray(I.items)?U.updateItemSellerExternal(I.items,x)?m(g,v,x,w):I:!1)}},Lo="soma::cart",gs="soma::options",hn=xn.create((e,t)=>{const r=Ly(),n=async(o,i,c)=>{e({loading:!0});const l=await U.updateOrderFormPromise(o);if(typeof l!="boolean"){e({...l});const u=await U.mergeOptionsPromise(er.get(gs),c);return er.set(gs,u),U.getValue(l,i).finally(()=>e({loading:!1,options:u}))}return U.promiseDefault};if(typeof window<"u"){const o=async i=>{if(i){const c=await er.get(gs).then(d=>U.findOptions(d,i.items));er.set(Lo,i),er.set(gs,c),e({...i,options:c});const l=new URLSearchParams(window.location.search),u=l.get("utm_campaign")||l.get("utmi_campaign")||"";u&&n(()=>r.addSellerCode(t().id,u.toUpperCase()),"openTextField")}};return er.get(Lo).then(i=>r.getOrderForm(i?i.id:"").then(o)),{...U.initialState,addCoupon:async i=>n(()=>r.addCoupon(t().id,i),"marketingData"),addItem:(i,c)=>{n(()=>r.addItem(t().id,t().items,i),"items",c)},addSellerCode:async(i,c)=>n(()=>r.addSellerCode(t().id,i,c,t().isOpen),"openTextField"),addMarketingData:async i=>n(()=>r.addMarketingData(t().id,i),"marketingData"),emptyCart:()=>{n(()=>r.emptyCart(t().id))},removeItem:async i=>{const c=await n(()=>r.removeItem(t().id,t().items,i),"items");return U.getRemoveId(i,c)},shipping:async(i,c="BR")=>n(()=>r.shipping(t().id,i??"",c,t().items.length,U.createNewAddress(i??"",null,c)),"shippingData"),shippingUpdate:async i=>n(()=>{var c;return r.shippingUpdate(t().id,i,(c=t().shippingData)==null?void 0:c.selectedAddresses)},"shippingData"),toggleServiceToProduct:async(i,c,l)=>n(()=>r.giftItem(t().id,i,c,l),"items"),updateItemQuantity:async(i,c,l)=>{const{id:u,items:d}=t();return n(()=>{var h;return r.updateItemQuantity(u,d,i,c,((h=d.find(m=>m.id===i))==null?void 0:h.quantity)??1)},"items",l?[l]:void 0)},insertProfileEmail:async i=>n(()=>r.insertProfileEmail(t().id,i),"clientProfileData"),setIsOpen:i=>e({isOpen:i})}}return U.initialState}),Dy=()=>hn(e=>e),rf=xn.create(e=>({notifications:[],actions:{addNotification:(t,r)=>e(n=>U.addNotification(n,t,r)),removeNotification:t=>e(r=>({notifications:r.notifications.filter(n=>n.id!==t)}))}})),hc=()=>rf(e=>e.notifications),mc=()=>rf(e=>e.actions),Fy=Object.freeze(Object.defineProperty({__proto__:null,KEY_INDEXED_OPTIONS:gs,KEY_INDEXED_STORE:Lo,useCartStore:hn,useGetCartStoreState:Dy,useGetNotificationActions:mc,useGetNotificationsStore:hc},Symbol.toStringTag,{value:"Module"})),zy=6e3,nf=j.createContext({}),sf=({children:e,...t})=>{const{items:r}=hn(),[n,o]=j.useState([]),i=j.useRef(null),c=j.useMemo(()=>Array.isArray(n)&&n.length>0?n.map(l=>r.find(u=>u.id===l.id)).filter(l=>l!==void 0):[],[r,n]);return j.useEffect(()=>{n.length&&(clearTimeout(i.current??0),i.current=setTimeout(()=>{o([])},zy))},[n]),s.jsx(nf.Provider,{value:j.useMemo(()=>({...t,setRecentlyAdded:o,recentlyAddedProducts:c}),[t,o,c]),children:e})},Ms=()=>{const e=j.useContext(nf);if(e===void 0)throw new Error("useUIContext must be used within a UIProvider");return e};class of{constructor(){Qr(this,"events",{});Qr(this,"prevData",{})}subscribe(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),()=>{this.events[t]=this.events[t].filter(n=>n!==r)}}publish(t,r){this.events[t]&&this.events[t].forEach(n=>{this.prevData[t]=r,n(r)})}}const af=j.createContext({}),qy=({children:e,headerConfigs:t,pathname:r,storeId:n,...o})=>{U.configureFetchProxy(n);const[i,c]=j.useState(!0),[l,u]=j.useState(!1),d=r==="/",h=j.useRef(new of),m=v=>v?{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},_=m(d),g=j.useRef(_);return j.useEffect(()=>{var S;const v=((S=new URLSearchParams(window.location.search))==null?void 0:S.toString())??"";(v.includes("utm_")||v.includes("gclid"))&&(hr.get("lastMedias")||hr.set("lastMedias",`${v}`,{expires:1/24}));const x=()=>{const w=typeof(window==null?void 0:window.navigator)>"u"?"":navigator==null?void 0:navigator.userAgent,I=window.innerWidth<1024||!!w.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);l||u(!0),i!==I&&(c(I),u(!0))};return l||x(),window.addEventListener("resize",x,{passive:!0}),()=>window.removeEventListener("resize",x)},[i,l]),j.useEffect(()=>{const v=m(d);h.current.publish("header:change_variant",v.headerVariant),h.current.publish("header:change_position",v.position),g.current=v},[d]),s.jsx(af.Provider,{value:{isMobile:i,mediatorRef:h,currentHeaderConfigsRef:g,deviceValidated:l,...o},children:s.jsx(sf,{children:e})})},xe=()=>j.useContext(af),cf=j.createContext({}),By=({children:e,...t})=>s.jsx(cf.Provider,{value:{...t},children:e}),Ae=()=>j.useContext(cf),bn=(e,t)=>xn.create(r=>{const n=()=>r({value:e});return t&&t instanceof Set&&t.add(n),{value:e,actions:{setValue:o=>r({value:o}),reset:n}}}),ws={category:null,menuMobileIsOpen:!1,searchModalIsOpen:!1,userMenuIsOpen:!1},Ls=new Set,Uy=()=>{Ls.forEach(e=>{e()})},lf=xn.create((e,t)=>{const r=()=>e({value:ws.category});return Ls.add(r),{value:ws.category,actions:{reset:r,setValue:n=>e(()=>({value:n})),updateValue:n=>{t().value!==n&&e({value:n})}}}}),uf=()=>lf(e=>e.value),Ds=()=>lf(e=>e.actions),df=bn(ws.menuMobileIsOpen,Ls),ff=()=>df(e=>e.value),pf=()=>df(e=>e.actions),hf=bn(ws.searchModalIsOpen,Ls),mf=()=>hf(e=>e.value),Wo=()=>hf(e=>e.actions),_f=bn(ws.userMenuIsOpen,Ls),_c=()=>_f(e=>e.value),gc=()=>_f(e=>e.actions),Hy=Object.freeze(Object.defineProperty({__proto__:null,resetAllHeaderStores:Uy,useActionsHeaderCategory:Ds,useActionsMenuMobileIsOpen:pf,useActionsSearchModalIsOpen:Wo,useActionsUserMenuIsOpen:gc,useGetHeaderCategoryStore:uf,useGetMenuMobileIsOpen:ff,useGetSearchModalIsOpen:mf,useGetUserMenuIsOpen:_c},Symbol.toStringTag,{value:"Module"})),es={selectedSkuInfo:{productId:"",name:"",size:"",sku:"",sellerId:"",sellerName:"",available:!1,quantity:1},openLetMeKnow:!1,openMeasurements:!1,showBottomNavigation:!1,showNotify:!1},rs=new Set,$y=()=>{rs.forEach(e=>{e()})},gf=xn.create(e=>{const t=()=>e({value:es.selectedSkuInfo});return rs.add(t),{value:es.selectedSkuInfo,actions:{setValue:r=>e(n=>({value:{...n,...r}})),reset:t}}}),Fs=()=>gf(e=>e.value),yf=()=>gf(e=>e.actions),vf=bn(es.openLetMeKnow,rs),Wy=()=>vf(e=>e.value),Vy=()=>vf(e=>e.actions),xf=bn(es.showNotify,rs),bf=()=>xf(e=>e.value),yc=()=>xf(e=>e.actions),jf=bn(es.showBottomNavigation,rs),Gy=()=>jf(e=>e.value),Ky=()=>jf(e=>e.actions),Sf=bn(es.openMeasurements,rs),Cf=()=>Sf(e=>e.value),wf=()=>Sf(e=>e.actions),Qy=Object.freeze(Object.defineProperty({__proto__:null,resetAllPDPStores:$y,useActionsPDPOpenLetMeKnow:Vy,useActionsPDPOpenMeasurements:wf,useActionsPDPSelectedSkuInfo:yf,useActionsPDPShowBottomNavigation:Ky,useActionsPDPShowNotify:yc,useGetPDPOpenLetMeKnow:Wy,useGetPDPOpenMeasurements:Cf,useGetPDPSelectedSkuInfo:Fs,useGetPDPShowBottomNavigation:Gy,useGetPDPShowNotify:bf},Symbol.toStringTag,{value:"Module"})),Xl={feedback:{active:!1,action:"add"},list:[]},vc=xn.create((e,t)=>({value:Xl,actions:{reset:()=>e({value:Xl}),setValue:n=>e(()=>({value:n})),toggleProduct:n=>e(o=>o.value.list.includes(n)?{value:{feedback:{active:!0,action:"remove"},list:o.value.list.filter(i=>i!==n)}}:{value:{feedback:{active:!0,action:"add"},list:[...o.value.list,n]}}),updateList:n=>e(o=>({value:{...o.value,list:n}})),resetFeedback:()=>e(n=>({value:{...n.value,feedback:{active:!1,action:""}}}))}})),ns=()=>vc(e=>e.value.list),xc=()=>vc(e=>e.value.feedback),jn=()=>vc(e=>e.actions),Yy=Object.freeze(Object.defineProperty({__proto__:null,useActionsWishlistStore:jn,useGetWishlistFeedbackStore:xc,useGetWishlistStore:ns},Symbol.toStringTag,{value:"Module"})),Ef=j.createContext({}),Xy=({children:e,headerData:t,...r})=>{var h,m;const n=j.useRef(null),o=j.useRef(null),i=j.useRef(null),c=j.useRef(null),l=j.useRef(null),{mediatorRef:u,currentHeaderConfigsRef:d}=xe();return(h=u.current)==null||h.subscribe("header:change_variant",_=>{var w,I,P;if(_&&d.current&&(d.current.bannerVariant=_),!n.current)return;const v=document.body.scrollTop>0,x=n.current.getAttribute("data-interactiveVariant"),S=v?x:_??((w=d.current)==null?void 0:w.bannerVariant)??"default";S!==((I=d.current)==null?void 0:I.headerVariant)&&(n.current.setAttribute("data-bottomdivider",String(v)),n.current.setAttribute("data-variant",String(S)),(P=u.current)==null||P.publish("herobanner:change_controllers_variant",S),d.current&&(d.current.headerVariant=S))}),(m=u.current)==null||m.subscribe("header:change_position",_=>{n.current&&(n.current.style.position=_)}),j.useEffect(()=>{const _=new AbortController,g=p.helpers.throttle(()=>{var x;return(x=u.current)==null?void 0:x.publish("header:change_variant",null)},200);document.body.addEventListener("scroll",g,{passive:!0,signal:_.signal});const v=x=>{var w;(w=x.target.closest("a"))==null||w.blur()};return n.current&&(n.current.addEventListener("click",v,{signal:_.signal}),n.current.addEventListener("touchend",v,{signal:_.signal})),()=>{_.abort()}},[]),s.jsx(Ef.Provider,{value:{headerData:t,structureRef:o,rootRef:n,tipbarRef:i,userMenuMobileRef:c,userMenuDesktopRef:l,...r},children:e})},Ze=()=>j.useContext(Ef),Pf=j.createContext({}),If=({children:e,...t})=>s.jsx(Pf.Provider,{value:j.useMemo(()=>t,[t]),children:e}),bc=()=>{const e=j.useContext(Pf);if(e===void 0)throw new Error("useMenuMobileContext must be used within a MenuMobileProvider");return e},Jy=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},Zy=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const n=t.getBoundingClientRect(),o=e.getBoundingClientRect(),i=e!=null&&e.parentElement?Jy(e==null?void 0:e.parentElement):0;return{left:n.left+n.width/2-(o.width+i),top:n.top+n.height+r}},Nf=j.createContext({}),Rf=({children:e,delay:t=600,gap:r=20,...n})=>{const[o,i]=j.useState(!1),c=j.useRef(null),[l,u]=j.useState(!1),[d,h]=j.useState({left:0,top:0}),m=j.useCallback(()=>{u(!0),typeof window<"u"&&(c.current=window.setTimeout(()=>{i(!1),u(!1)},t))},[u,i,t]);return j.useEffect(()=>{if(typeof window>"u")return;const _=window.document.querySelector("#cart-button"),g=window.document.querySelector("#add-to-cart--tooltip");if(_&&g){const{left:v,top:x}=Zy(g,_,r??0);h({left:v,top:x}),u(!1)}},[r,o]),s.jsx(Nf.Provider,{value:j.useMemo(()=>({...n,...d,handleClose:m,isLeaving:l,isOpen:o,setIsOpen:i,setIsLeaving:u}),[n,d,m,l,o,i,u]),children:e})},Sn=()=>{const e=j.useContext(Nf);if(e===void 0)throw new Error("useAddToCartContext must be used within a AddToCartProvider");return e},Tf=j.createContext({}),ev=({children:e,SELLER_CODE_VALIDATION_KEYS:t,CARTPROVIDER_MESSAGE_PRODUCT_REMOVE:r,data:n,...o})=>{var _e,we,ge,Ee;const i=hn(),{setRecentlyAdded:c}=Ms(),l=j.useRef(""),u=hc(),{addNotification:d,removeNotification:h}=mc(),[m,_]=j.useState(null),{addCoupon:g,addItem:v,addSellerCode:x,addMarketingData:S,emptyCart:w,isOpen:I,removeItem:P,shipping:C,shippingUpdate:N,toggleServiceToProduct:T,updateItemQuantity:O}=i;j.useEffect(()=>{(async()=>{var F,ce,je,Oe;if(!i.id||!((ce=(F=n==null?void 0:n.promotion)==null?void 0:F.promotionCart)!=null&&ce.idPromotion)||((Oe=(je=n==null?void 0:n.promotion)==null?void 0:je.promotionCart)==null?void 0:Oe.selectPromotion)==="Desativar")return;const oe=await fetch("/api/buywin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderFormId:i.id,promotionId:n.promotion.promotionCart.idPromotion,web:(n==null?void 0:n.promotion.promotionCart.versionAPI)==="Original"})}).then(q=>q.json());_(oe)})()},[i.id,i.items.length,n==null?void 0:n.versionId,(we=(_e=n==null?void 0:n.promotion)==null?void 0:_e.promotionCart)==null?void 0:we.idPromotion,(Ee=(ge=n==null?void 0:n.promotion)==null?void 0:ge.promotionCart)==null?void 0:Ee.versionAPI]),j.useEffect(()=>{const V=hr.get("lastMedias");if(i.id&&V&&l.current!==V){l.current=V;const oe=new URLSearchParams(V),F=U.mountMarketingData(oe);S(F)}},[i,S]);const M=j.useCallback(async(V,oe)=>(oe==="coupon"?g(V):x(V,t??{})).then(ce=>{if(typeof ce!="boolean"&&ce instanceof Object){if(oe==="seller"&&"value"in ce){const{statusOk:je,value:Oe}=ce,q=String(Oe??"").split(" - ");return U.getCode((q==null?void 0:q[0])??"",V,!!je)}return U.getCode(String(ce.coupon),V,!0)}return U.getCode("","")}).catch(()=>Promise.resolve({code:400})),[g,x]),z=j.useCallback((V,oe,F)=>{const{id:ce}=V;O(ce,oe,F)},[O]),D=j.useCallback((V,oe,F=!1)=>{if(!V)return;const{id:ce}=V,je=U.findItemIndex(i.items,ce);if(je!==-1&&!F){const Oe=Number(i.items[je].quantity),q=i.items[je]?Oe+1:1;z(V,q,oe)}else v({id:ce,quantity:(V==null?void 0:V.quantity)??1,seller:V.seller});I||c(Oe=>[...Oe,V])},[v,z,i.items,I,c]),B=j.useCallback((V,oe)=>{if(!V||!Array.isArray(V))return;c(ce=>[...ce,...V]);const F=V.map(ce=>{const{id:je,quantity:Oe,seller:q}=ce,$=U.findItemIndex(i.items,je),Ie=U.getQuantity(Oe??1,$);return{id:je,quantity:Ie,seller:q}});v(F,oe)},[v,i.items,c]),G=j.useCallback(async(V,oe,F)=>V?P(V).then(()=>(d(oe??`${r}`,F),U.getCode(V,V))):Promise.resolve(U.getCode("","Product id required")),[d,P]),J=j.useCallback(()=>{i.items.length>0&&w()},[w,i.items]),Y=j.useCallback((V,oe="BRA")=>C(V,oe),[C]),X=j.useCallback(V=>{V&&N(V)},[N]),Z=j.useCallback(async(V,oe,F=!1)=>{const ce=i.items.findIndex(Oe=>Oe.uniqueId===V);return i.items[ce]&&ce>=0?T(oe,ce,F):!1},[i.items,T]),he=j.useCallback(async(V,oe)=>O(V,oe).then(F=>{if(Array.isArray(F)){const ce=F.find(je=>je.id===V);if(ce&&(ce==null?void 0:ce.quantity)<oe)return String(ce.quantity)}return!1}),[O]),fe=j.useCallback(async()=>{await S({...i.marketingData,coupon:""})},[S,i.marketingData]),ee=j.useCallback(async()=>{await S({...i.marketingData,utmiCampaign:"",utmCampaign:"",utmSource:"",utmMedium:""})},[S,i.marketingData]),ie=j.useCallback(async()=>{await C("","BRA")},[C]);return s.jsx(Tf.Provider,{value:j.useMemo(()=>({...o,data:n,addCouponSeller:M,addToCart:D,addItemsToCart:B,cartStore:i,notifications:u,clearCart:J,addNotification:d,isOpen:i.isOpen,removeNotification:h,removeToCart:G,setIsOpen:i.setIsOpen,shipping:Y,shippingUpdateOption:X,toggleGiftItemCart:Z,updateItemQuantity:he,removeCoupon:fe,removeSellerCode:ee,removeCEP:ie,promotionRules:m,setPromotionRules:_}),[o,n,M,D,B,u,J,d,i,h,G,Y,X,Z,he,fe,ee,ie,m,_]),children:e})},Xe=()=>{const e=j.useContext(Tf);if(e===void 0)throw new Error("useCartContext must be used within a CartProvider");return e},Of=j.createContext({}),jc=({children:e,state:t,collectionId:r,brand:n,searchParams:o})=>{const i=j.useMemo(()=>{var c;return r?[{key:"productclusterids",value:r.toString()}]:n?[{key:"brand",value:n}]:(c=t.base)!=null&&c.length?t.base.slice(1).split("/").map((l,u)=>({key:`category-${u+1}`,value:l})):[]},[t.base,r]);return s.jsx(Of.Provider,{value:j.useMemo(()=>({state:{...t,facets:[...i,...t.facets??[]]},searchParams:o}),[i,t,o]),children:e})},ft=()=>{const e=j.useContext(Of);if(e===void 0)throw new Error("useSearchContext must be used within a SearchProvider");return e};var zs=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(){}},tv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ur,en,Od,rv=(Od=class{constructor(){ye(this,ur,tv);ye(this,en,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&k(this,en)&&e!==k(this,ur)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:k(this,ur),provider:e}),ue(this,ur,e),process.env.NODE_ENV!=="production"&&ue(this,en,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ue(this,en,!0),k(this,ur).setTimeout(e,t)}clearTimeout(e){k(this,ur).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ue(this,en,!0),k(this,ur).setInterval(e,t)}clearInterval(e){k(this,ur).clearInterval(e)}},ur=new WeakMap,en=new WeakMap,Od),Jr=new rv;function nv(e){setTimeout(e,0)}var mn=typeof window>"u"||"Deno"in globalThis;function Rt(){}function sv(e,t){return typeof e=="function"?e(t):e}function wa(e){return typeof e=="number"&&e>=0&&e!==1/0}function Af(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ur(e,t){return typeof e=="function"?e(t):e}function Ht(e,t){return typeof e=="function"?e(t):e}function Jl(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:c,stale:l}=e;if(c){if(n){if(t.queryHash!==Sc(c,t.options))return!1}else if(!Ps(t.queryKey,c))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function Zl(e,t){const{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Es(t.options.mutationKey)!==Es(i))return!1}else if(!Ps(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function Sc(e,t){return((t==null?void 0:t.queryKeyHashFn)||Es)(e)}function Es(e){return JSON.stringify(e,(t,r)=>Ia(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function Ps(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ps(e[r],t[r])):!1}var ov=Object.prototype.hasOwnProperty;function Ea(e,t){if(e===t)return e;const r=eu(e)&&eu(t);if(!r&&!(Ia(e)&&Ia(t)))return t;const o=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),c=i.length,l=r?new Array(c):{};let u=0;for(let d=0;d<c;d++){const h=r?d:i[d],m=e[h],_=t[h];if(m===_){l[h]=m,(r?d<o:ov.call(e,h))&&u++;continue}if(m===null||_===null||typeof m!="object"||typeof _!="object"){l[h]=_;continue}const g=Ea(m,_);l[h]=g,g===m&&u++}return o===c&&u===o?e:l}function Pa(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 eu(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ia(e){if(!tu(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!tu(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function tu(e){return Object.prototype.toString.call(e)==="[object Object]"}function iv(e){return new Promise(t=>{Jr.setTimeout(t,e)})}function Na(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 Ea(e,t)}catch(n){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}]: ${n}`),n}return Ea(e,t)}return t}function av(e){return e}function cv(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function lv(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Do=Symbol();function kf(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Do&&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===Do?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Mf(e,t){return typeof e=="function"?e(...t):!!e}function uv(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var tn,Mr,Un,Ad,dv=(Ad=class extends zs{constructor(){super();ye(this,tn);ye(this,Mr);ye(this,Un);ue(this,Un,t=>{if(!mn&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){k(this,Mr)||this.setEventListener(k(this,Un))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Mr))==null||t.call(this),ue(this,Mr,void 0))}setEventListener(t){var r;ue(this,Un,t),(r=k(this,Mr))==null||r.call(this),ue(this,Mr,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){k(this,tn)!==t&&(ue(this,tn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof k(this,tn)=="boolean"?k(this,tn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},tn=new WeakMap,Mr=new WeakMap,Un=new WeakMap,Ad),Cc=new dv;function Ra(){let e,t;const r=new Promise((o,i)=>{e=o,t=i});r.status="pending",r.catch(()=>{});function n(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{n({status:"fulfilled",value:o}),e(o)},r.reject=o=>{n({status:"rejected",reason:o}),t(o)},r}var fv=nv;function pv(){let e=[],t=0,r=l=>{l()},n=l=>{l()},o=fv;const i=l=>{t?e.push(l):o(()=>{r(l)})},c=()=>{const l=e;e=[],l.length&&o(()=>{n(()=>{l.forEach(u=>{r(u)})})})};return{batch:l=>{let u;t++;try{u=l()}finally{t--,t||c()}return u},batchCalls:l=>(...u)=>{i(()=>{l(...u)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{o=l}}}var ht=pv(),Hn,Lr,$n,kd,hv=(kd=class extends zs{constructor(){super();ye(this,Hn,!0);ye(this,Lr);ye(this,$n);ue(this,$n,t=>{if(!mn&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){k(this,Lr)||this.setEventListener(k(this,$n))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,Lr))==null||t.call(this),ue(this,Lr,void 0))}setEventListener(t){var r;ue(this,$n,t),(r=k(this,Lr))==null||r.call(this),ue(this,Lr,t(this.setOnline.bind(this)))}setOnline(t){k(this,Hn)!==t&&(ue(this,Hn,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return k(this,Hn)}},Hn=new WeakMap,Lr=new WeakMap,$n=new WeakMap,kd),Fo=new hv;function mv(e){return Math.min(1e3*2**e,3e4)}function Lf(e){return(e??"online")==="online"?Fo.isOnline():!0}var Ta=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Df(e){let t=!1,r=0,n;const o=Ra(),i=()=>o.status!=="pending",c=x=>{var S;if(!i()){const w=new Ta(x);_(w),(S=e.onCancel)==null||S.call(e,w)}},l=()=>{t=!0},u=()=>{t=!1},d=()=>Cc.isFocused()&&(e.networkMode==="always"||Fo.isOnline())&&e.canRun(),h=()=>Lf(e.networkMode)&&e.canRun(),m=x=>{i()||(n==null||n(),o.resolve(x))},_=x=>{i()||(n==null||n(),o.reject(x))},g=()=>new Promise(x=>{var S;n=w=>{(i()||d())&&x(w)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;n=void 0,i()||(x=e.onContinue)==null||x.call(e)}),v=()=>{if(i())return;let x;const S=r===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(w){x=Promise.reject(w)}Promise.resolve(x).then(m).catch(w=>{var T;if(i())return;const I=e.retry??(mn?0:3),P=e.retryDelay??mv,C=typeof P=="function"?P(r,w):P,N=I===!0||typeof I=="number"&&r<I||typeof I=="function"&&I(r,w);if(t||!N){_(w);return}r++,(T=e.onFail)==null||T.call(e,r,w),iv(C).then(()=>d()?void 0:g()).then(()=>{t?_(w):v()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(n==null||n(),o),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?v():g().then(v),o)}}var rn,Md,Ff=(Md=class{constructor(){ye(this,rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wa(this.gcTime)&&ue(this,rn,Jr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mn?1/0:5*60*1e3))}clearGcTimeout(){k(this,rn)&&(Jr.clearTimeout(k(this,rn)),ue(this,rn,void 0))}},rn=new WeakMap,Md),nn,Wn,Ut,sn,dt,Rs,on,Jt,br,Ld,_v=(Ld=class extends Ff{constructor(t){super();ye(this,Jt);ye(this,nn);ye(this,Wn);ye(this,Ut);ye(this,sn);ye(this,dt);ye(this,Rs);ye(this,on);ue(this,on,!1),ue(this,Rs,t.defaultOptions),this.setOptions(t.options),this.observers=[],ue(this,sn,t.client),ue(this,Ut,k(this,sn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ue(this,nn,nu(this.options)),this.state=t.state??k(this,nn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,dt))==null?void 0:t.promise}setOptions(t){if(this.options={...k(this,Rs),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=nu(this.options);r.data!==void 0&&(this.setState(ru(r.data,r.dataUpdatedAt)),ue(this,nn,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Ut).remove(this)}setData(t,r){const n=Na(this.state.data,t,this.options);return Re(this,Jt,br).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Re(this,Jt,br).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,o;const r=(n=k(this,dt))==null?void 0:n.promise;return(o=k(this,dt))==null||o.cancel(t),r?r.then(Rt).catch(Rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,nn))}isActive(){return this.observers.some(t=>Ht(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Do||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ur(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:!Af(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,dt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,dt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(k(this,dt)&&(k(this,on)?k(this,dt).cancel({revert:!0}):k(this,dt).cancelRetry()),this.scheduleGc()),k(this,Ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Re(this,Jt,br).call(this,{type:"invalidate"})}async fetch(t,r){var u,d,h,m,_,g,v,x,S,w,I,P;if(this.state.fetchStatus!=="idle"&&((u=k(this,dt))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(k(this,dt))return k(this,dt).continueRetry(),k(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(N=>N.options.queryFn);C&&this.setOptions(C.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 n=new AbortController,o=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(ue(this,on,!0),n.signal)})},i=()=>{const C=kf(this.options,r),T=(()=>{const O={client:k(this,sn),queryKey:this.queryKey,meta:this.meta};return o(O),O})();return ue(this,on,!1),this.options.persister?this.options.persister(C,T,this):C(T)},l=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:k(this,sn),state:this.state,fetchFn:i};return o(C),C})();(d=this.options.behavior)==null||d.onFetch(l,this),ue(this,Wn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&Re(this,Jt,br).call(this,{type:"fetch",meta:(m=l.fetchOptions)==null?void 0:m.meta}),ue(this,dt,Df({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:C=>{C instanceof Ta&&C.revert&&this.setState({...k(this,Wn),fetchStatus:"idle"}),n.abort()},onFail:(C,N)=>{Re(this,Jt,br).call(this,{type:"failed",failureCount:C,error:N})},onPause:()=>{Re(this,Jt,br).call(this,{type:"pause"})},onContinue:()=>{Re(this,Jt,br).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const C=await k(this,dt).start();if(C===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(C),(g=(_=k(this,Ut).config).onSuccess)==null||g.call(_,C,this),(x=(v=k(this,Ut).config).onSettled)==null||x.call(v,C,this.state.error,this),C}catch(C){if(C instanceof Ta){if(C.silent)return k(this,dt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Re(this,Jt,br).call(this,{type:"error",error:C}),(w=(S=k(this,Ut).config).onError)==null||w.call(S,C,this),(P=(I=k(this,Ut).config).onSettled)==null||P.call(I,this.state.data,C,this),C}finally{this.scheduleGc()}}},nn=new WeakMap,Wn=new WeakMap,Ut=new WeakMap,sn=new WeakMap,dt=new WeakMap,Rs=new WeakMap,on=new WeakMap,Jt=new WeakSet,br=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...zf(n.data,this.options),fetchMeta:t.meta??null};case"success":const o={...n,...ru(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ue(this,Wn,t.manual?o:void 0),o;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),ht.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),k(this,Ut).notify({query:this,type:"updated",action:t})})},Ld);function zf(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Lf(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ru(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var It,Te,Ts,bt,an,Vn,jr,Dr,Os,Gn,Kn,cn,ln,Fr,Qn,He,ys,Oa,Aa,ka,Ma,La,Da,Fa,qf,Dd,gv=(Dd=class extends zs{constructor(t,r){super();ye(this,He);ye(this,It);ye(this,Te);ye(this,Ts);ye(this,bt);ye(this,an);ye(this,Vn);ye(this,jr);ye(this,Dr);ye(this,Os);ye(this,Gn);ye(this,Kn);ye(this,cn);ye(this,ln);ye(this,Fr);ye(this,Qn,new Set);this.options=r,ue(this,It,t),ue(this,Dr,null),ue(this,jr,Ra()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,Te).addObserver(this),su(k(this,Te),this.options)?Re(this,He,ys).call(this):this.updateResult(),Re(this,He,Ma).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return za(k(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return za(k(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Re(this,He,La).call(this),Re(this,He,Da).call(this),k(this,Te).removeObserver(this)}setOptions(t){const r=this.options,n=k(this,Te);if(this.options=k(this,It).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ht(this.options.enabled,k(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Re(this,He,Fa).call(this),k(this,Te).setOptions(this.options),r._defaulted&&!Pa(this.options,r)&&k(this,It).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,Te),observer:this});const o=this.hasListeners();o&&ou(k(this,Te),n,this.options,r)&&Re(this,He,ys).call(this),this.updateResult(),o&&(k(this,Te)!==n||Ht(this.options.enabled,k(this,Te))!==Ht(r.enabled,k(this,Te))||Ur(this.options.staleTime,k(this,Te))!==Ur(r.staleTime,k(this,Te)))&&Re(this,He,Oa).call(this);const i=Re(this,He,Aa).call(this);o&&(k(this,Te)!==n||Ht(this.options.enabled,k(this,Te))!==Ht(r.enabled,k(this,Te))||i!==k(this,Fr))&&Re(this,He,ka).call(this,i)}getOptimisticResult(t){const r=k(this,It).getQueryCache().build(k(this,It),t),n=this.createResult(r,t);return vv(this,n)&&(ue(this,bt,n),ue(this,Vn,this.options),ue(this,an,k(this,Te).state)),n}getCurrentResult(){return k(this,bt)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r==null||r(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,jr).status==="pending"&&k(this,jr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,o))})}trackProp(t){k(this,Qn).add(t)}getCurrentQuery(){return k(this,Te)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=k(this,It).defaultQueryOptions(t),n=k(this,It).getQueryCache().build(k(this,It),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Re(this,He,ys).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,bt)))}createResult(t,r){var z;const n=k(this,Te),o=this.options,i=k(this,bt),c=k(this,an),l=k(this,Vn),d=t!==n?t.state:k(this,Ts),{state:h}=t;let m={...h},_=!1,g;if(r._optimisticResults){const D=this.hasListeners(),B=!D&&su(t,r),G=D&&ou(t,n,r,o);(B||G)&&(m={...m,...zf(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:v,errorUpdatedAt:x,status:S}=m;g=m.data;let w=!1;if(r.placeholderData!==void 0&&g===void 0&&S==="pending"){let D;i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(D=i.data,w=!0):D=typeof r.placeholderData=="function"?r.placeholderData((z=k(this,Kn))==null?void 0:z.state.data,k(this,Kn)):r.placeholderData,D!==void 0&&(S="success",g=Na(i==null?void 0:i.data,D,r),_=!0)}if(r.select&&g!==void 0&&!w)if(i&&g===(c==null?void 0:c.data)&&r.select===k(this,Os))g=k(this,Gn);else try{ue(this,Os,r.select),g=r.select(g),g=Na(i==null?void 0:i.data,g,r),ue(this,Gn,g),ue(this,Dr,null)}catch(D){ue(this,Dr,D)}k(this,Dr)&&(v=k(this,Dr),g=k(this,Gn),x=Date.now(),S="error");const I=m.fetchStatus==="fetching",P=S==="pending",C=S==="error",N=P&&I,T=g!==void 0,M={status:S,fetchStatus:m.fetchStatus,isPending:P,isSuccess:S==="success",isError:C,isInitialLoading:N,isLoading:N,data:g,dataUpdatedAt:m.dataUpdatedAt,error:v,errorUpdatedAt:x,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:I,isRefetching:I&&!P,isLoadingError:C&&!T,isPaused:m.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:C&&T,isStale:wc(t,r),refetch:this.refetch,promise:k(this,jr),isEnabled:Ht(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=J=>{M.status==="error"?J.reject(M.error):M.data!==void 0&&J.resolve(M.data)},B=()=>{const J=ue(this,jr,M.promise=Ra());D(J)},G=k(this,jr);switch(G.status){case"pending":t.queryHash===n.queryHash&&D(G);break;case"fulfilled":(M.status==="error"||M.data!==G.value)&&B();break;case"rejected":(M.status!=="error"||M.error!==G.reason)&&B();break}}return M}updateResult(){const t=k(this,bt),r=this.createResult(k(this,Te),this.options);if(ue(this,an,k(this,Te).state),ue(this,Vn,this.options),k(this,an).data!==void 0&&ue(this,Kn,k(this,Te)),Pa(r,t))return;ue(this,bt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!k(this,Qn).size)return!0;const c=new Set(i??k(this,Qn));return this.options.throwOnError&&c.add("error"),Object.keys(k(this,bt)).some(l=>{const u=l;return k(this,bt)[u]!==t[u]&&c.has(u)})};Re(this,He,qf).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Re(this,He,Ma).call(this)}},It=new WeakMap,Te=new WeakMap,Ts=new WeakMap,bt=new WeakMap,an=new WeakMap,Vn=new WeakMap,jr=new WeakMap,Dr=new WeakMap,Os=new WeakMap,Gn=new WeakMap,Kn=new WeakMap,cn=new WeakMap,ln=new WeakMap,Fr=new WeakMap,Qn=new WeakMap,He=new WeakSet,ys=function(t){Re(this,He,Fa).call(this);let r=k(this,Te).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Rt)),r},Oa=function(){Re(this,He,La).call(this);const t=Ur(this.options.staleTime,k(this,Te));if(mn||k(this,bt).isStale||!wa(t))return;const n=Af(k(this,bt).dataUpdatedAt,t)+1;ue(this,cn,Jr.setTimeout(()=>{k(this,bt).isStale||this.updateResult()},n))},Aa=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,Te)):this.options.refetchInterval)??!1},ka=function(t){Re(this,He,Da).call(this),ue(this,Fr,t),!(mn||Ht(this.options.enabled,k(this,Te))===!1||!wa(k(this,Fr))||k(this,Fr)===0)&&ue(this,ln,Jr.setInterval(()=>{(this.options.refetchIntervalInBackground||Cc.isFocused())&&Re(this,He,ys).call(this)},k(this,Fr)))},Ma=function(){Re(this,He,Oa).call(this),Re(this,He,ka).call(this,Re(this,He,Aa).call(this))},La=function(){k(this,cn)&&(Jr.clearTimeout(k(this,cn)),ue(this,cn,void 0))},Da=function(){k(this,ln)&&(Jr.clearInterval(k(this,ln)),ue(this,ln,void 0))},Fa=function(){const t=k(this,It).getQueryCache().build(k(this,It),this.options);if(t===k(this,Te))return;const r=k(this,Te);ue(this,Te,t),ue(this,Ts,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},qf=function(t){ht.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(k(this,bt))}),k(this,It).getQueryCache().notify({query:k(this,Te),type:"observerResultsUpdated"})})},Dd);function yv(e,t){return Ht(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function su(e,t){return yv(e,t)||e.state.data!==void 0&&za(e,t,t.refetchOnMount)}function za(e,t,r){if(Ht(t.enabled,e)!==!1&&Ur(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&wc(e,t)}return!1}function ou(e,t,r,n){return(e!==t||Ht(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&wc(e,r)}function wc(e,t){return Ht(t.enabled,e)!==!1&&e.isStaleByTime(Ur(t.staleTime,e))}function vv(e,t){return!Pa(e.getCurrentResult(),t)}function iu(e){return{onFetch:(t,r)=>{var h,m,_,g,v;const n=t.options,o=(_=(m=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:_.direction,i=((g=t.state.data)==null?void 0:g.pages)||[],c=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const d=async()=>{let x=!1;const S=P=>{uv(P,()=>t.signal,()=>x=!0)},w=kf(t.options,t.fetchOptions),I=async(P,C,N)=>{if(x)return Promise.reject();if(C==null&&P.pages.length)return Promise.resolve(P);const O=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:C,direction:N?"backward":"forward",meta:t.options.meta};return S(B),B})(),M=await w(O),{maxPages:z}=t.options,D=N?lv:cv;return{pages:D(P.pages,M,z),pageParams:D(P.pageParams,C,z)}};if(o&&i.length){const P=o==="backward",C=P?xv:au,N={pages:i,pageParams:c},T=C(n,N);l=await I(N,T,P)}else{const P=e??i.length;do{const C=u===0?c[0]??n.initialPageParam:au(n,l);if(u>0&&C==null)break;l=await I(l,C),u++}while(u<P)}return l};t.options.persister?t.fetchFn=()=>{var x,S;return(S=(x=t.options).persister)==null?void 0:S.call(x,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function au(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function xv(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var As,dr,jt,un,fr,Tr,Fd,bv=(Fd=class extends Ff{constructor(t){super();ye(this,fr);ye(this,As);ye(this,dr);ye(this,jt);ye(this,un);ue(this,As,t.client),this.mutationId=t.mutationId,ue(this,jt,t.mutationCache),ue(this,dr,[]),this.state=t.state||jv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,dr).includes(t)||(k(this,dr).push(t),this.clearGcTimeout(),k(this,jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ue(this,dr,k(this,dr).filter(r=>r!==t)),this.scheduleGc(),k(this,jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,dr).length||(this.state.status==="pending"?this.scheduleGc():k(this,jt).remove(this))}continue(){var t;return((t=k(this,un))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,l,u,d,h,m,_,g,v,x,S,w,I,P,C,N,T,O,M,z;const r=()=>{Re(this,fr,Tr).call(this,{type:"continue"})},n={client:k(this,As),meta:this.options.meta,mutationKey:this.options.mutationKey};ue(this,un,Df({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(D,B)=>{Re(this,fr,Tr).call(this,{type:"failed",failureCount:D,error:B})},onPause:()=>{Re(this,fr,Tr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,jt).canRun(this)}));const o=this.state.status==="pending",i=!k(this,un).canStart();try{if(o)r();else{Re(this,fr,Tr).call(this,{type:"pending",variables:t,isPaused:i}),await((l=(c=k(this,jt).config).onMutate)==null?void 0:l.call(c,t,this,n));const B=await((d=(u=this.options).onMutate)==null?void 0:d.call(u,t,n));B!==this.state.context&&Re(this,fr,Tr).call(this,{type:"pending",context:B,variables:t,isPaused:i})}const D=await k(this,un).start();return await((m=(h=k(this,jt).config).onSuccess)==null?void 0:m.call(h,D,t,this.state.context,this,n)),await((g=(_=this.options).onSuccess)==null?void 0:g.call(_,D,t,this.state.context,n)),await((x=(v=k(this,jt).config).onSettled)==null?void 0:x.call(v,D,null,this.state.variables,this.state.context,this,n)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,D,null,t,this.state.context,n)),Re(this,fr,Tr).call(this,{type:"success",data:D}),D}catch(D){try{await((P=(I=k(this,jt).config).onError)==null?void 0:P.call(I,D,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((N=(C=this.options).onError)==null?void 0:N.call(C,D,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((O=(T=k(this,jt).config).onSettled)==null?void 0:O.call(T,void 0,D,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((z=(M=this.options).onSettled)==null?void 0:z.call(M,void 0,D,t,this.state.context,n))}catch(B){Promise.reject(B)}throw Re(this,fr,Tr).call(this,{type:"error",error:D}),D}finally{k(this,jt).runNext(this)}}},As=new WeakMap,dr=new WeakMap,jt=new WeakMap,un=new WeakMap,fr=new WeakSet,Tr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ht.batch(()=>{k(this,dr).forEach(n=>{n.onMutationUpdate(t)}),k(this,jt).notify({mutation:this,type:"updated",action:t})})},Fd);function jv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sr,Zt,ks,zd,Sv=(zd=class extends zs{constructor(t={}){super();ye(this,Sr);ye(this,Zt);ye(this,ks);this.config=t,ue(this,Sr,new Set),ue(this,Zt,new Map),ue(this,ks,0)}build(t,r,n){const o=new bv({client:t,mutationCache:this,mutationId:++so(this,ks)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){k(this,Sr).add(t);const r=io(t);if(typeof r=="string"){const n=k(this,Zt).get(r);n?n.push(t):k(this,Zt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,Sr).delete(t)){const r=io(t);if(typeof r=="string"){const n=k(this,Zt).get(r);if(n)if(n.length>1){const o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&k(this,Zt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=io(t);if(typeof r=="string"){const n=k(this,Zt).get(r),o=n==null?void 0:n.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var n;const r=io(t);if(typeof r=="string"){const o=(n=k(this,Zt).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{k(this,Sr).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,Sr).clear(),k(this,Zt).clear()})}getAll(){return Array.from(k(this,Sr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Zl(r,n))}findAll(t={}){return this.getAll().filter(r=>Zl(t,r))}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return ht.batch(()=>Promise.all(t.map(r=>r.continue().catch(Rt))))}},Sr=new WeakMap,Zt=new WeakMap,ks=new WeakMap,zd);function io(e){var t;return(t=e.options.scope)==null?void 0:t.id}var pr,qd,Cv=(qd=class extends zs{constructor(t={}){super();ye(this,pr);this.config=t,ue(this,pr,new Map)}build(t,r,n){const o=r.queryKey,i=r.queryHash??Sc(o,r);let c=this.get(i);return c||(c=new _v({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(c)),c}add(t){k(this,pr).has(t.queryHash)||(k(this,pr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=k(this,pr).get(t.queryHash);r&&(t.destroy(),r===t&&k(this,pr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,pr).get(t)}getAll(){return[...k(this,pr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Jl(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Jl(t,n)):r}notify(t){ht.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pr=new WeakMap,qd),et,zr,qr,Yn,Xn,Br,Jn,Zn,Bd,Bf=(Bd=class{constructor(e={}){ye(this,et);ye(this,zr);ye(this,qr);ye(this,Yn);ye(this,Xn);ye(this,Br);ye(this,Jn);ye(this,Zn);ue(this,et,e.queryCache||new Cv),ue(this,zr,e.mutationCache||new Sv),ue(this,qr,e.defaultOptions||{}),ue(this,Yn,new Map),ue(this,Xn,new Map),ue(this,Br,0)}mount(){so(this,Br)._++,k(this,Br)===1&&(ue(this,Jn,Cc.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,et).onFocus())})),ue(this,Zn,Fo.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,et).onOnline())})))}unmount(){var e,t;so(this,Br)._--,k(this,Br)===0&&((e=k(this,Jn))==null||e.call(this),ue(this,Jn,void 0),(t=k(this,Zn))==null||t.call(this),ue(this,Zn,void 0))}isFetching(e){return k(this,et).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,zr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,et).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=k(this,et).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ur(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return k(this,et).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),o=k(this,et).get(n.queryHash),i=o==null?void 0:o.state.data,c=sv(t,i);if(c!==void 0)return k(this,et).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return ht.batch(()=>k(this,et).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,et).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=k(this,et);ht.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=k(this,et);return ht.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=ht.batch(()=>k(this,et).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Rt).catch(Rt)}invalidateQueries(e,t={}){return ht.batch(()=>(k(this,et).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},n=ht.batch(()=>k(this,et).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(Rt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Rt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=k(this,et).build(this,t);return r.isStaleByTime(Ur(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Rt).catch(Rt)}fetchInfiniteQuery(e){return e.behavior=iu(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Rt).catch(Rt)}ensureInfiniteQueryData(e){return e.behavior=iu(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Fo.isOnline()?k(this,zr).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,et)}getMutationCache(){return k(this,zr)}getDefaultOptions(){return k(this,qr)}setDefaultOptions(e){ue(this,qr,e)}setQueryDefaults(e,t){k(this,Yn).set(Es(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Yn).values()],r={};return t.forEach(n=>{Ps(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){k(this,Xn).set(Es(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Xn).values()],r={};return t.forEach(n=>{Ps(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,qr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sc(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===Do&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,qr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,et).clear(),k(this,zr).clear()}},et=new WeakMap,zr=new WeakMap,qr=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,Br=new WeakMap,Jn=new WeakMap,Zn=new WeakMap,Bd),Uf=$t.createContext(void 0),wv=e=>{const t=$t.useContext(Uf);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Hf=({client:e,children:t})=>($t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(Uf.Provider,{value:e,children:t})),$f=$t.createContext(!1),Ev=()=>$t.useContext($f);$f.Provider;function Pv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Iv=$t.createContext(Pv()),Nv=()=>$t.useContext(Iv),Rv=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Mf(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Tv=e=>{$t.useEffect(()=>{e.clearReset()},[e])},Ov=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||Mf(r,[e.error,n])),Av=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},kv=(e,t)=>e.isLoading&&e.isFetching&&!t,Mv=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,cu=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Lv(e,t,r){var _,g,v,x;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 n=Ev(),o=Nv(),i=wv(),c=i.defaultQueryOptions(e);(g=(_=i.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||g.call(_,c);const l=i.getQueryCache().get(c.queryHash);process.env.NODE_ENV!=="production"&&(c.queryFn||console.error(`[${c.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`)),c._optimisticResults=n?"isRestoring":"optimistic",Av(c),Rv(c,o,l),Tv(o);const u=!i.getQueryCache().get(c.queryHash),[d]=$t.useState(()=>new t(i,c)),h=d.getOptimisticResult(c),m=!n&&e.subscribed!==!1;if($t.useSyncExternalStore($t.useCallback(S=>{const w=m?d.subscribe(ht.batchCalls(S)):Rt;return d.updateResult(),w},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),$t.useEffect(()=>{d.setOptions(c)},[c,d]),Mv(c,h))throw cu(c,d,o);if(Ov({result:h,errorResetBoundary:o,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw h.error;if((x=(v=i.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||x.call(v,c,h),c.experimental_prefetchInRender&&!mn&&kv(h,n)){const S=u?cu(c,d,o):l==null?void 0:l.promise;S==null||S.catch(Rt).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?h:d.trackResult(h)}function Dv(e,t){return Lv(e,gv)}const hs={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"}},Fv={nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"0",count:0,total:0},zv="Imagem do produto",lu=1,qv="Marque a caixa para aceitar os termos de política de privacidade.",Bv="Algumas informações estão incorretas ou não foram preenchidas",Uv="Enviar",Hv="ditoTrackedProfile",$v=new Bf,Wf=j.createContext({}),Wv=({brand:e,constants:t,collectionId:r,children:n,itemsPerPage:o=24,pathname:i,searchParams:c,slug:l,...u})=>{const{PLP_SORT_DEFAULT:d}=t,h=j.useRef(""),[m,_]=j.useState(!1),g=(c==null?void 0:c.toString())??"",v=j.useMemo(()=>{const x=new URLSearchParams(g),S=x.get("query"),w=Number(x.get("page")??1),I=Number(x.get("count")??o),P=x.get("sort"),C=x.getAll("facets"),N=P??(r?"":d);return{base:S?"":i,count:I,facets:U.selectedFacets(C),page:w,sort:N,term:S??null}},[g,i,o,r,d]);return j.useEffect(()=>{h.current!==i&&(h.current=i,window.document.body.scrollTo(0,0))},[i]),s.jsx(Wf.Provider,{value:j.useMemo(()=>({...u,constants:t,openFilters:m,setOpenFilters:_}),[t,m,u]),children:s.jsx(Hf,{client:$v,children:s.jsx(jc,{brand:e,collectionId:r,state:v,searchParams:c??new URLSearchParams,children:n})})})},ut=()=>{const e=j.useContext(Wf);if(e===void 0)throw new Error("usePLPContext must be used within a PLPProvider");return e},zo=(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,i)=>zo(o,t[i]));if(Array.isArray(t))return!1;const r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&zo(e[o],t[o]))},Vv=(e,t,r="page")=>Object.keys(t).some(n=>n===r?!1:!zo(t[n],e[n])),Gv=async e=>{const t=await U.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},Vf=()=>({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}}}),Gf=(e,t,r,n=24)=>{const o=new Set,i=[];if(!Array.isArray(e)||e.length===0)return{taken:o,placedBanners:i};const c=t*n*r;for(const l of e){let u=Number(l.position_grid),d=!1;for(;u<c;){const h=u%r;if(h+l.columns>r){u+=r-h;continue}if(!Array.from({length:l.columns}).some((g,v)=>o.has(u+v))){for(let g=0;g<l.columns;g++)o.add(u+g);i.push(u),d=!0;break}u++}d||console.info(`[PLP INFINITE FAILED BANNER POSITION]: pos=${l.position_grid}, cols=${l.columns}`)}return{taken:o,placedBanners:i}},Vo=(e,t,r,n=24)=>{const{placedBanners:o,taken:i}=Gf(e??[],t,r),c=[];let l=0;try{for(;c.length<t*n;)i.has(l)||c.push(l),l++;return{banners:o,products:c}}catch(u){console.info(`[PLP INFINITE FAILED TO GEN POSITIONS]: page=${t}`,u)}return{banners:[],products:c}},qa=(e,t=!1)=>Array.from({length:e},(r,n)=>{const o=n+1;return{loading:t?!1:e===o,page:o}}),Kv=(e,t)=>[...e,{loading:!1,page:t}],Qv=(e=1,t=24)=>({nextPage:!1,previousPage:!1,startCursor:"0",endCursor:"1",count:t,total:e}),Yv=(e,t,r,n,o)=>{const i=o,c=(e.length-1)*o+i-1,l=r[c];return t.filter((u,d)=>{const h=n[d];return h<=l||o>i&&h>l})},Kf=(e,t)=>{const r=new Map;for(const o of e){const i=Math.floor(o/t);r.has(i)||r.set(i,[]),r.get(i).push(o)}const n=[];for(const[,o]of r){const i=o[Math.floor(Math.random()*o.length)];n.push(i)}return n},Qf=(e,t)=>{if(!e)return[];const r=e.map((n,o)=>n.video&&n.video!==""?o:null).filter(n=>n);return Kf(r,t)},Yf=e=>Array.isArray(e)?e.map((t,r)=>({href:`/${e.slice(0,r+1).join("/")}`,name:t})):[],Xv=Object.freeze(Object.defineProperty({__proto__:null,createBreadcrumb:Yf,createPage:Kv,createPages:qa,createPagination:Qv,createProduct:Vf,deepEqual:zo,fetchPage:Gv,getBanners:Gf,getPositions:Vo,getProductsWithVideo:Qf,getRandomVideoPerRow:Kf,getVisibleBanners:Yv,hasStateChangedExceptPage:Vv},Symbol.toStringTag,{value:"Module"})),Jv=(e,t,r,n=0)=>{if(!e.length)return[];let o=0;const i=[];for(let c=0;c<e.length;c+=r){const l=e.slice(c,c+r),u=l.findIndex(d=>{var h;return(h=d.node)==null?void 0:h.video});for(let d=0;d<l.length;d++){const h=c+d,m=n+h,_=t.find(v=>v.position_grid===m+1),g=m+o+1;_&&(o+=_.columns),i.push({position:g,canPlayVideo:d===u})}}return i},Xf=(e,t,r)=>{const n=(t-1)*r,o=t*r;return e>=n&&e<=o},qs=e=>{var t;return(t=e==null?void 0:e.map(r=>({disable:U.disableSKU(r),size:U.getSKUName(r),skuID:"sku"in r&&r.sku})))==null?void 0:t.filter(r=>r.disable)},Zv=Object.freeze(Object.defineProperty({__proto__:null,createGridPosAndVideo:Jv,getSkusNotify:qs,isPositionInCurrentPage:Xf},Symbol.toStringTag,{value:"Module"})),Jf=({isMobile:e,ICONS:t,NOTIFY_INFO:r})=>s.jsxs(s.Fragment,{children:[s.jsx(p.Modal.Controls,{navigation:e?"top":"middle",isMobile:e??!1,children:!e&&s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(p.Button,{"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})}),s.jsx(p.Modal.Title,{navigation:e?"top":"middle",title:r.title})]});Jf.displayName="Notify.Controls";const rr={"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 Zf(e){const r=decodeURIComponent(window.document.cookie).split(";");for(const n of r){const[o,i]=n.trim().split("=");if(o===e)return i}}function Ec(e,t,r={}){const o={...{path:"/",expires:new Date(Date.now()+36e5)},...r};let i=`${encodeURIComponent(e)}=${encodeURIComponent(t??"")}`;for(const c in o)o[c]!==void 0&&(i+=`; ${c}`,c==="expires"?i+=`=${o[c].toUTCString()}`:typeof o[c]=="boolean"?i+=`; ${o[c]?"true":"false"}`:i+=`=${o[c]}`);window.document.cookie=i}const ep=j.createContext({amount:null,boxes:null,toExpire:null,loading:!0,logout:()=>null,getCurrentCredits:()=>({credits:0,cashback:0})}),ex=({children:e,AUTH_TOKEN_COOKIE:t})=>{var h;const{shipping:r,cartStore:n}=Xe(),[o,i]=j.useState({amount:null,boxes:null,toExpire:null,loading:!0}),c=j.useCallback(async()=>{try{await fetch("/api/user",{priority:"low"}).then(m=>m.json()).then(m=>{const{userCredits:_,userId:g,sub:v,...x}=m,{wishlist:S,...w}=x;i({amount:_==null?void 0:_.amount,boxes:_==null?void 0:_.boxes,toExpire:_==null?void 0:_.toExpire,user:{...w,userId:g,sub:v??""},loading:!1,wishlist:(typeof S=="string"?S.split(",").filter(Boolean):S)??[]})})}catch(m){console.error("user info and my credits request",m),i({...o,loading:!1})}},[i]),l=j.useCallback(()=>{Ec(t),c()},[c]),u=j.useCallback(()=>o.boxes?o.boxes.reduce((m,_)=>_.gift_card_box.refid==="C1643"?(m.cashback+=_.amount,m):(m.credits+=_.amount,m),{cashback:0,credits:0}):{cashback:0,credits:0},[o]),d=j.useCallback(async()=>{var m,_,g;if((m=o.user)!=null&&m.postalCode&&(n!=null&&n.id)&&!(n!=null&&n.loading)&&!((g=(_=n==null?void 0:n.shippingData)==null?void 0:_.address)!=null&&g.postalCode))try{await r(o.user.postalCode)}catch(v){console.error("Error auto-filling CEP:",v)}},[(h=o.user)==null?void 0:h.postalCode]);return j.useEffect(()=>{c()},[c]),j.useEffect(()=>{d()},[d]),s.jsx(ep.Provider,{value:j.useMemo(()=>({...o,getCurrentCredits:u,logout:l}),[o,u,l]),children:e})},ss=()=>{const e=j.useContext(ep);if(e===void 0)throw new Error("useContext(SessionContext) must be used within a SessionProvider");return e},tp=({color:e,delay:t=3e3,sku:r,setStatus:n,setIsLoading:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c})=>{const l=j.useRef(null),[u,d]=j.useState(null),{sendDataLayerEvent:h}=Ce(),{user:m}=ss(),_=m!=null&&m.firstName?`${m==null?void 0:m.firstName} ${m==null?void 0:m.lastName}`:"";return s.jsx("div",{className:rr["notify--form"],children:s.jsxs("form",{action:"POST",onSubmit:async g=>{var S;g.preventDefault();const v=g.currentTarget,x=((S=v.querySelector("input"))==null?void 0:S.value)??"";fetch("/api/aviseme",{method:"POST",body:JSON.stringify({userName:_,email:x,sku:r==null?void 0:r.skuID})}).then(w=>n(w.ok)).finally(()=>{o(!1),v.reset(),h({functionKey:"readyEvents",data:{event:"notify_me",readyData:{size:r==null?void 0:r.size,item_id:r==null?void 0:r.skuID,color:e}}}),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{var w;(w=document.body)==null||w.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),d(!0),n(null)},t)})},children:[s.jsx(p.TextField.Structure,{input:s.jsx(p.TextField.Input,{feedback:typeof u=="boolean"&&u?"error":"none",type:"email",label:c.email_placeholder,mode:"over-label",variant:"outlined",sizeVariant:"large",onChange:g=>d(!g.target.validity.valid),required:!0}),supportText:typeof u=="boolean"&&u?s.jsx(p.TextField.SupportText,{text:i.messages.invalid_email,feedback:"error"}):s.jsx(s.Fragment,{})}),s.jsx(p.Button,{disabled:!(u===!1||!r)||!r,type:"submit",size:"large",children:c.button})]})})};tp.displayName="Notify.Form";const rp=({isLoading:e=!1})=>s.jsx("div",{className:rr["notify--loading"],"data-loading":e,children:s.jsx(p.Spinner,{})});rp.displayName="Notify.Loading";const Pc={"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"},np=({children:e,...t})=>s.jsx("div",{...t,className:Pc["product-variation-list--list"],children:e});np.displayName="ProductVariationList.List";const sp=({fill:e="#1352C7",src:t="",type:r="size",text:n,...o})=>{const{nextimage:i}=Ae();return r==="size"?s.jsxs(p.ToggleSize.Wrapper,{...o,size:"large",variation:"ghost",children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-size"}),s.jsx(p.ToggleSize.Text,{children:n})]}):s.jsxs(p.ToggleStyle.Wrapper,{...o,size:"small",title:"wrapper-texture",children:[s.jsx(p.ToggleStyle.DisabledAdornment,{title:"disabled-adornment-texture"}),r==="color"?s.jsx(p.ToggleStyle.Color,{background:e,title:"color"}):s.jsx(p.ToggleStyle.Texture,{title:"texture",children:s.jsx(i,{alt:n??"image",height:40,src:t,width:40})})]})};sp.displayName="ProductVariationList.Option";const op=({children:e,...t})=>s.jsx("div",{className:Pc["product-variation-list"],...t,children:e});op.displayName="ProductVariationList.Root";const ip=({children:e,title:t,...r})=>s.jsxs("div",{...r,className:Pc["product-variation-list--title"],children:[t?s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.SectionWrapper,{children:s.jsx("p",{children:t})})}):s.jsx(s.Fragment,{}),e]});ip.displayName="ProductVariationList.Title";const sr={List:np,Option:sp,Title:ip,Root:op},tx=(e,t)=>{if(!e||!t)return!1;const r=Object.keys(e);return r.length!==Object.keys(t).length?!1:r.every(n=>e[n]===t[n])},ap=({children:e,label:t="",skus:r,sku:n,setSku:o})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:rr["notify--selector--header"],children:e}),s.jsxs(sr.Root,{className:rr["notify--selector"],children:[s.jsx(sr.Title,{title:t}),s.jsx(sr.List,{children:Array.isArray(r)&&r.map((i,c)=>{const l=tx(n,i);return s.jsx(sr.Option,{active:l,onClick:()=>o(l?null:i),text:String(i.size),type:"size"},c)})})]})]});ap.displayName="Notify.Selector";const uu=({type:e,icon:t,title:r,subtitle:n})=>s.jsx("div",{className:rr[`notify--status--${e}`],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t,size:"large"})},children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h2",{children:r}),s.jsx("h3",{children:n})]})})}),cp=({status:e,ICONS:t,PRODUCT_CARD_TEXTS:r})=>s.jsxs("div",{className:rr["notify--status"],"data-status":e,children:[s.jsx(uu,{...r.success,icon:t.check_circle,type:"success"}),s.jsx(uu,{...r.error,icon:t.alert_circle,type:"error"})]});cp.displayName="Notify.Status";const Ic=({color:e,open:t,setVisible:r,skus:n,sku:o,setSku:i,ICONS:c,NEWSLETTER_CONFIGS:l,NOTIFY_INFO:u,PRODUCT_CARD_TEXTS:d,Z_INDEX_WAR:h})=>{const[m,_]=j.useState(!1),[g,v]=j.useState(null),{isMobile:x}=xe();return s.jsxs(p.Modal.Root,{isMobile:x??!1,isOpen:t,setIsOpen:r,variant:x?"sideBottom":"sideLeft",style:{zIndex:h.modal},className:rr["modal-modifier"],children:[s.jsx(p.Modal.Header,{navigation:"top",className:rr["notify--header-modifier"],children:s.jsx(Jf,{isMobile:x??!1,ICONS:c,NOTIFY_INFO:u})}),s.jsxs(p.Modal.Body,{className:rr["notify--modal--body"],children:[s.jsxs("div",{className:rr["notify--container"],children:[s.jsxs(ap,{label:u.selector_label,sku:o,skus:n,setSku:i,children:[s.jsx("p",{children:u.subtitle}),s.jsx("span",{children:u.description})]}),s.jsx(tp,{delay:4e3,sku:o,setStatus:v,setIsLoading:_,color:e,NEWSLETTER_CONFIGS:l,NOTIFY_INFO:u}),s.jsx(rp,{isLoading:m}),s.jsx("div",{className:rr["notify--selector--header"],children:s.jsx("span",{children:u.legal})})]}),s.jsx(cp,{status:g,ICONS:c,PRODUCT_CARD_TEXTS:d})]})]})};Ic.displayName="Notify";const Bs=({skus:e,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i,...c})=>{const l=qs(e??[]);return s.jsx(Ic,{...c,skus:l,ICONS:t,NEWSLETTER_CONFIGS:r,NOTIFY_INFO:n,PRODUCT_CARD_TEXTS:o,Z_INDEX_WAR:i})};Bs.displayName="PDC.Notification";const Wr=xn.create(e=>({banners:[],load:!1,pages:[],products:[],createPagesScroll:(t,r)=>{e(n=>({...n,...r,pages:qa(t)}))},trimPages:t=>{e(r=>r.pages.length?{...r,pages:r.pages.filter(n=>n.page<=t).map(n=>({...n,loading:!1}))}:r)},addPage:(t,r)=>{e(n=>n.pages.some(o=>o.page===t)?n:{...n,...r,pages:[...n.pages,{page:t,loading:!1}]})},reset:()=>e(()=>({pages:qa(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)}})),lp=j.createContext({}),up=({banners:e,children:t})=>{const{router:r}=Ae(),{isMobile:n}=xe(),{searchParams:o}=ft(),{addPage:i}=Wr(),{constants:c}=ut(),[l,u]=j.useState(!1),[d,h]=j.useState(null),[m,_]=j.useState([]),g=n?8:16,v=n?2:4,{ITEMS_PER_PAGE:x,ICONS:S,NEWSLETTER_CONFIGS:w,NOTIFY_INFO:I,PRODUCT_CARD_TEXTS:P,Z_INDEX_WAR:C}=c,N=j.useCallback((M,z,D=!1)=>{const B=M.page+1;if(D===!0&&B<=z){const G=Vo(e,B,v,x);i(B,G)}},[i,e,v,x]),T=j.useCallback(M=>{const z=new URLSearchParams(o.toString()),D=Number(z.get("page")??1);M!==D&&(z.set("page",String(M)),r.replace(`?${z.toString()}`,{scroll:!1}))},[r,o]),O=j.useCallback((M,z)=>{const D=z?qs([z]):null;_(M),h(D!=null&&D.length?D[0]:null),u(!0)},[]);return s.jsxs(lp.Provider,{value:j.useMemo(()=>({addNewPage:N,gap:g,columns:v,handleNotify:O,updateParamPage:T}),[N,O,g,v,T]),children:[t,s.jsx(Bs,{open:l,sku:d,skus:m,setSku:h,setVisible:u,ICONS:S,NEWSLETTER_CONFIGS:w,NOTIFY_INFO:I,PRODUCT_CARD_TEXTS:P,Z_INDEX_WAR:C})]})},Vr=()=>{const e=j.useContext(lp);if(e===void 0)throw new Error("PLPInfiniteScrollContext must be used within a ScrollInfiniteProvider");return e},dp=j.createContext({gridBanners:void 0,banners:[]}),rx=({children:e,data:t,device:r,SectionZone:n,COMMON_PAGE_COLUMN_GAP_PDC:o})=>{const{isMobile:i}=xe(),c=(t==null?void 0:t.sections.filter(m=>m.name!=="List Product Banners"))??[],l=c.slice(0,lu),u=c.slice(lu,c.length),d=t==null?void 0:t.sections.find(m=>m.name==="List Product Banners"),h=j.useMemo(()=>{var m,_;return((_=(m=d==null?void 0:d.data)==null?void 0:m.banners)==null?void 0:_.map(g=>({...g.banner,columns:g.bannerWidth,position_grid:g.bannerPosition})))??[]},[d]);return i&&r==="mobile"||!i&&r==="desktop"?s.jsxs(dp.Provider,{value:{gridBanners:d,banners:h},children:[s.jsx(n,{data:l??[]}),s.jsxs(p.Utils.Column,{gap:o,className:p.helpers.classNameConcat("utils-column-modifier"),children:[e,s.jsx(n,{data:u??[]})]})]}):s.jsx(s.Fragment,{})},Us=()=>{const e=j.useContext(dp);return e===void 0&&console.error("Needs PLPContentContext on parent component"),e},fp=j.createContext({}),pp=({children:e,filters:t,...r})=>{var i;const{constants:{PLP_FILTERS:n}}=ut(),o=(i=t.facets)==null?void 0:i.filter(c=>n.find(l=>l.key===c.key));return s.jsx(fp.Provider,{value:j.useMemo(()=>({...r,filters:{...t,facets:o}}),[t,o,r]),children:e})},wr=()=>{const e=j.useContext(fp);if(e===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return e},hp=j.createContext({product:void 0}),nx=({children:e,data:t,productId:r,COMMON_PAGE_COLUMN_GAP:n,SectionZone:o})=>s.jsxs(hp.Provider,{value:{productId:r},children:[e,s.jsx(p.Utils.Column,{gap:n,className:p.helpers.classNameConcat("utils-column-modifier"),children:s.jsx(o,{data:(t==null?void 0:t.sections)??[]})})]}),mp=()=>{const e=j.useContext(hp);return e||console.error("use this hook only inside PDPContentProvider hierarchy"),e},Ba=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g,"-").toLowerCase().trim();function sx(e,t=1e3){let r=!1;return(...n)=>{r||(e(...n),r=!0,setTimeout(()=>{r=!1},t))}}function ox(e,t=1e3){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}const _p=(e,t)=>t.getTime()>e.getTime()?Math.abs(t.getTime()-e.getTime()):0,vs=(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),ix=["name","email","phone","date","cpf","cep"],du={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}$/},gp=({type:e,input:t,required:r=!1})=>{if(typeof t!="string"||!r&&t===""||!du[e])return!0;const n=t.trim();return du[e].test(n)},ax=e=>{const t=/\/(\d+)-\d+-\d+\/(.+?)\./,r=typeof e=="string"?e.match(t):null;return r?r[2].replace(/-/g," "):zv},cx=Object.freeze(Object.defineProperty({__proto__:null,FieldTypes:ix,debounce:ox,getAltTextFromUrl:ax,getAuthenticatedUser:U.getAuthenticatedUser,getCookie:Zf,getDaysHoursMinutesSeconds:vs,getMilliSeconds:_p,removeAccentsAndReplaceSpaces:Ba,setCookie:Ec,throttle:sx,validateInput:gp},Symbol.toStringTag,{value:"Module"})),lx=({fields:e})=>{const t={};return{mountedFields:(e==null?void 0:e.reduce((n,o)=>(t[o.master_data_field]="none",{...n,[o.master_data_field]:o}),{}))??{},mountedInputsStatus:t}},ux=({formData:e,mountedFields:t,inputsStatus:r,hasTermsAndConditions:n,checkboxRef:o,setFormStatus:i})=>{let c=!1,l=!1;const u={...r};return n&&!o.current&&(i("unchecked"),c=!0),e.forEach((d,h)=>{var g;if(h==="terms-and-conditions")return;const m=(g=t[h])==null?void 0:g.required;if(m&&!d){u[h]="required",c=!0;return}gp({type:t[h].type,input:d,required:m})||(u[h]="error",l=!0),typeof d=="string"&&e.set(h,d.toString().trim())}),{hasEmptyFields:c,hasErrors:l,inputStatusToUpdate:u}};async function yp(e){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}const vp=async e=>await fetch("/api/dito-ingest",{method:"POST",body:JSON.stringify(e)}).then(r=>r.json()),xp=j.createContext({}),bp=({children:e,masterDataEmailField:t,fields:r,variant:n,dito:o,CONSTANTS:{MASTER_DATA_ENTITY:i,NEWSLETTER_CONFIGS:c}})=>{const{sendDataLayerEvent:l}=Ce(),u=c.hasTermsAndConditions,{mountedFields:d,mountedInputsStatus:h}=j.useMemo(()=>lx({fields:r}),[r]),m=j.useRef(!1),[_,g]=j.useState("idle"),[v,x]=j.useState(h),S=async({searchFields:O,entity:M})=>{const z=await Fn.post("/api/master-data/search",{body:{masterDataEntity:M,searchFields:O,headers:{"REST-Range":"resources=0-49"}}});return console.info(z),z.data},w=async({documentId:O,fieldsToBeUpdated:M,entity:z})=>(await Fn.post("/api/master-data/update",{dataEntityName:z,documentId:O,fieldsToBeUpdated:M})).status,I=j.useCallback(async({payload:O,response:M},z,D)=>{var X;const{email:B,...G}=O,[J]=await S({searchFields:{[z]:B},entity:D??i.newsletter}),Y=Array.isArray(J)?(X=J[0])==null?void 0:X.id:void 0;return J&&await w({documentId:Y,fieldsToBeUpdated:G,entity:D??i.newsletter})!==204?{...M,status:"error"}:{...M,status:"success"}},[]),P=j.useCallback(async({formData:O},M,z)=>{const D={status:"idle",inputsStatus:{}},B={};O.forEach((X,Z)=>{B[Z]=X});const G=await yp(B.email||""),J=new Date().toISOString(),Y=[{action:o==null?void 0:o.actionName,timestamp:J,type:"TRACK",user_id:G,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:B.email||z,nome:B.name,origem:o==null?void 0:o.originName}}}];G&&(Y.push({user_id:G,timestamp:J,type:"IDENTIFY",traits:{id:G,created_at:J,name:B.name,email:B.email||z,phone:B==null?void 0:B.phone}}),hr.set(Hv,G));try{const X=await Fn.post("/api/master-data",{body:{payload:B,masterDataEntity:M??i.newsletter}});vp(Y);const Z=X.data;return(Z==null?void 0:Z.Message)==="duplicated entry"?I({payload:B,response:D},z,M):Z!=null&&Z.Id?{...D,status:"success"}:{...D,status:"error"}}catch(X){return console.error("error",X),{...D,status:"error"}}},[I]),C=j.useCallback(async(O,M,z)=>{O.preventDefault();const D=new FormData(O.target);if(D.append("acceptedTerms",m.current?"true":"false"),m.current){const G=new Sa.TZDate(new Date,"America/Sao_Paulo").toISOString();D.append("termsAcceptedAt",G)}M&&Object.keys(M).forEach(G=>{D.append(G,M[G])});const B=await P({formData:D},z??"",t);B&&(g(B==null?void 0:B.status),x(B.inputsStatus),B.status==="success"&&l({functionKey:"readyEvents",data:{event:"generate_lead"}}))},[t,P,g,x,l]),N=j.useCallback(O=>{const M=new FormData(O.currentTarget.parentElement),{hasEmptyFields:z,hasErrors:D,inputStatusToUpdate:B}=ux({formData:M,mountedFields:d,inputsStatus:v,hasTermsAndConditions:u,checkboxRef:m,setFormStatus:g});if(x(B),z||D){O.preventDefault();return}g("loading")},[d,v,u,m]),T=j.useCallback(()=>{g("idle"),x(h)},[h]);return s.jsx(xp.Provider,{value:j.useMemo(()=>({formStatus:_,handleSubmit:C,setFormStatus:g,inputsStatus:v,setInputsStatus:x,hasTermsAndConditions:u,handleClickToSubmit:N,checkboxRef:m,masterDataEmailField:t,fields:r,variant:n,resetNewsletter:T}),[_,C,g,v,x,N,u,m,t,r,n,T]),children:e})},Nc=()=>{const e=j.useContext(xp);if(e===void 0)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return e},jp=j.createContext({}),Sp=({children:e,data:t})=>{const[r,n]=j.useState(),[o,i]=j.useState(),c=j.useCallback(d=>{const h=t.filter(m=>m.cidade===d);n(h)},[t]),l=j.useCallback(d=>{i(d)},[]),u=j.useCallback(()=>{i("")},[]);return s.jsx(jp.Provider,{value:j.useMemo(()=>({clearSelectedStore:u,data:t,handleSelectCity:c,handleSelectStore:l,selectedCity:r,selectedStore:o}),[u,t,c,l,r,o]),children:e})},Go=()=>{const e=j.useContext(jp);if(e===void 0)throw new Error("useLPStoreContext must be used within a LPStoreProvider");return e},qo={contexts:{addToCart:{hook:Sn,provider:Rf},cart:{hook:Xe,provider:ev},cms:{FlagsAndTags:{context:fc,hook:Cr,provider:Sy}},newsletter:{hook:Nc,provider:bp},events:{hook:Ce,provider:Ty},global:{hook:xe,provider:qy,mediator:of},header:{hook:Ze,provider:Xy},menuMobile:{hook:bc,provider:If},next:{hook:Ae,provider:By},pdp:{provider:Cy},PDPContent:{provider:nx,hook:mp},plp:{provider:Wv,hook:ut},plpFilter:{hook:wr,provider:pp},PLPContent:{provider:rx,hook:Us},plpInfinite:{provider:up,hook:Vr},pdpdata:{provider:Oy},searchSearch:{hook:ft,provider:jc},session:{hook:ss,provider:ex},ui:{hook:Ms,provider:sf},lpStore:{hook:Go,provider:Sp}},hooks:{useBackPDC:Hd,useClipboard:Ay,useDisableZoom:ef,useLocalStorage:My,useOnScreen:pc,useSentinel:$o,useTouchZoomPan:tf,useSessionManager:Xd},stores:{cart:Fy,header:Hy,pdp:Qy,wishlist:Yy}},dx={cart:U.cart,events:Ry,plp:Xv,product:U.productHelpers,utils:cx,search:U.search},Rc={helpers:dx},qt={"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"},Cp=({brand:e,className:t,name:r,...n})=>s.jsxs("div",{...n,className:p.helpers.classNameConcat(qt["add-to-cart--card--name"],t),children:[s.jsx(p.Tag,{style:{textTransform:"uppercase"},size:"small",variant:"quaternary",title:e,children:e}),s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:s.jsx("p",{className:"typography-style-body-md",children:r})})})]});Cp.displayName="AddToCart.Card.Name";const wp=({className:e,listPrice:t,price:r,quantity:n,productId:o,...i})=>{const c=U.formatPriceToCurrency(r/100),l=U.formatPriceToCurrency(t/100);return s.jsx("div",{...i,className:p.helpers.classNameConcat(qt["add-to-cart--card--price-quantity"],e),children:s.jsx(p.ProductInfo.Root,{size:"small",layout:"vertical",children:s.jsx(p.ProductInfo.Wrapper,{size:"small",layout:"vertical",children:s.jsx(p.ProductInfo.ValuesWrapper,{children:r!==t?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:c,size:"small"},"price-list"),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:l,size:"small"},"price-low")]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:l,size:"small"},"price-low")})})})})};wp.displayName="AddToCart.Card.PriceQuantity";const fx="_skeleton_12b79_1",px={skeleton:fx},Ep=({style:e})=>s.jsx("div",{style:e,className:px.skeleton}),hx="_image_1y08u_1",mx={image:hx},_x=({alt:e,className:t,objectFit:r,...n})=>{const{nextimage:o}=Ae();return s.jsx(o,{quality:90,...n,alt:e??"",className:p.helpers.classNameConcat(mx.image,t),"data-object-fit":r??"cover"})},gx=({videoRef:e,...t})=>s.jsx("video",{...t,ref:e,children:s.jsx("track",{kind:"captions"})}),at={Image:_x,Video:gx},Pp=({className:e,productGroupID:t,size:r,texture:n,...o})=>{const{CONSTANTS:{TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:c}}=Sn(),[l,u]=j.useState(n??"");return j.useEffect(()=>{l||U.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[t]})}).then(d=>d.json()).then(d=>{const h=d.data[0].items[0];if(h){const m=h.images.find(_=>i.includes(_.imageLabel));m!=null&&m.imageUrl?u(m.imageUrl):u(h.images[0].imageUrl)}}).catch(d=>{console.error(d)})},[l,t]),s.jsxs("div",{...o,className:p.helpers.classNameConcat(qt["add-to-cart--card--style-size"],e),children:[s.jsx(p.ToggleStyle.Wrapper,{size:"x-small",style:c,children:s.jsx(p.ToggleStyle.Texture,{children:l?s.jsx(at.Image,{alt:"",src:l??"",width:164,height:164,style:c}):s.jsx(Ep,{})})}),s.jsx(p.Utils.Divider,{direction:"vertical",size:"medium",style:{height:24}}),r&&s.jsxs(p.ToggleSize.Wrapper,{size:"small",title:"wrapper-texture",children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(p.ToggleSize.Text,{children:r})]})]})};Pp.displayName="AddToCart.Card.StyleSize";const{helpers:yx}=Rc,Ip=({className:e,item:t,texture:r,...n})=>{const{itemOffered:{name:o,brand:i,skuName:c,isVariationOf:{productGroupID:l}},quantity:u,price:d,sellingPrice:h}=t,{CONSTANTS:{NAME_SPLIT_SYMBOL:m}}=Sn(),{size:_}=yx.product.getColorAndSizeFromSkuName(c??o,m);return s.jsxs("div",{...n,className:p.helpers.classNameConcat(qt["add-to-cart--card--content"],e),children:[s.jsx(Cp,{brand:i.name,name:o}),s.jsx(wp,{price:d,listPrice:h,quantity:u,productId:t.id}),s.jsx(Pp,{size:_,texture:r,productGroupID:l})]})};Ip.displayName="AddToCart.Card.Content";const Np=({image:e,thumbnail:t=!1})=>s.jsx(at.Image,{alt:e.alternateName??"image","data-thumbnail":t,height:t?152:120,src:e.url,width:t?152:94});Np.displayName="AddToCart.Card";const Rp=({className:e,item:t,texture:r,thumbnail:n,...o})=>{const{itemOffered:{image:[i]}}=t,c=U.updatedResizedImg(i.url,{width:200,height:300});return s.jsxs("div",{...o,className:p.helpers.classNameConcat(qt["add-to-cart--card"],e),children:[s.jsx(Np,{image:{alternateName:i.alternateName||"Produto",url:c||""},thumbnail:n}),!n&&s.jsx(Ip,{item:t,texture:r})]})};Rp.displayName="AddToCart.Card";const Tp=({className:e,children:t,title:r,...n})=>s.jsxs("div",{...n,className:p.helpers.classNameConcat(qt["add-to-cart--content"],e),children:[s.jsx("div",{className:qt["add-to-cart--content--title"],children:r&&s.jsx("h2",{children:r})}),t,s.jsx(fn.Footer,{})]});Tp.displayName="AddToCart.Layout.Content";const Op=({className:e,...t})=>{var g,v;const{isMobile:r,handleClose:n,CONSTANTS:{ADD_TO_CART:o}}=Sn(),{cartStore:{totalizers:i},setIsOpen:c}=Xe(),l=(g=i.find(x=>x.id==="Discounts"))==null?void 0:g.value,u=((v=i.find(x=>x.id==="Items"))==null?void 0:v.value)??0,d=i.find(x=>x.id==="Shipping"),m=(u-Math.abs(l??0)+((d==null?void 0:d.value)??0))/100,_=U.formatPriceToCurrency(m??0);return s.jsxs("div",{...t,className:p.helpers.classNameConcat(qt["add-to-cart--footer"],e),children:[s.jsxs("div",{className:qt["add-to-cart--footer--total"],children:[s.jsx("span",{children:"Subtotal:"}),s.jsx("span",{children:_})]}),s.jsx(p.Button,{size:"medium",variant:"primary","data-close":!0,onClick:()=>c(!0),children:o.footer.bag}),r?s.jsx(p.Button,{"data-close":!0,size:"medium",variant:"tertiary",children:o.footer.keep_buying}):s.jsx(p.Button,{onClick:()=>n(),size:"medium",variant:"tertiary",children:o.footer.keep_buying})]})};Op.displayName="AddToCart.Layout.Footer";const Ap=({children:e,className:t,thumbnail:r=!1,...n})=>{const{cartStore:{options:o}}=Xe(),{recentlyAddedProducts:i}=Ms(),c=i.length>3?4:i.length;return s.jsxs("div",{...n,className:qt["add-to-cart--items"],"data-thumbnail":r,children:[Array.isArray(i)&&i.filter((l,u)=>u<c).map(l=>{var d;const u=(d=o==null?void 0:o.find(h=>h.id===l.itemOffered.isVariationOf.productGroupID))==null?void 0:d.texture;return s.jsx(fn.Card,{item:l,thumbnail:r,texture:u},l.itemOffered.sku)}),e]})};Ap.displayName="AddToCart.Layout.Items";const kp=({children:e,Z_INDEX_WAR:t})=>{const{isOpen:r,setIsOpen:n}=Sn(),{isMobile:o}=xe();return s.jsxs(p.Modal.Root,{"data-modal":"add-to-cart--modal",className:qt["add-to-cart__modal"],isMobile:o??!1,isOpen:r,setIsOpen:n,variant:"sideBottom",style:{zIndex:t.modal},children:[s.jsx(p.Modal.Header,{navigation:"top",children:s.jsx(p.Modal.Controls,{navigation:"top",isMobile:!0})}),s.jsx(p.Modal.Body,{children:e})]})};kp.displayName="AddToCart.Modal";const vx=({children:e})=>{const{count:t,handleClose:r,setIsOpen:n}=Sn(),o=j.useRef(t);return j.useEffect(()=>{t>o.current&&n(!0),t<o.current&&o.current>=1&&r(),o.current=t},[t,r,n]),s.jsx(s.Fragment,{children:e})},Mp=({children:e,component:t,CONSTANTS:r,...n})=>{const{recentlyAddedProducts:o}=Ms(),{isMobile:i}=xe(),c=o.length>3?4:o.length;return s.jsx(Rf,{...n,count:c,isMobile:i,CONSTANTS:r,children:s.jsx(vx,{children:i?s.jsxs(s.Fragment,{children:[s.jsx(fn.Modal,{Z_INDEX_WAR:r.Z_INDEX_WAR,children:t}),e]}):s.jsx(fn.Tooltip,{component:t,style:{width:350},Z_INDEX_WAR:r.Z_INDEX_WAR,children:e})})})};Mp.displayName="AddToCart.Root";const Lp=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:i,isLeaving:c,target:l,isOpen:u,top:d}=Sn();return s.jsx(p.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),id:"add-to-cart--tooltip",className:qt["add-to-cart--tooltip"],style:{zIndex:r.modal},isLeaving:c,isOpen:u,left:i,size:"medium",position:"top",top:d,children:s.jsx("div",{className:qt["add-to-cart--tooltip"],ref:l,children:e})})};Lp.displayName="AddToCart.Tooltip";const fn={Card:Rp,Content:Tp,Footer:Op,Items:Ap,Modal:kp,Root:Mp,Tooltip:Lp},Tc=({title:e,...t})=>{const{recentlyAddedProducts:r}=Ms(),{isMobile:n}=xe(),o=r.length>3?4:r.length,i=r.length>(o??1),c=r.length>1;return s.jsx(fn.Root,{isMobile:n,count:r.length,component:s.jsx(fn.Content,{title:e,children:s.jsx(fn.Items,{thumbnail:c,children:i&&s.jsx(p.Badge.Count,{count:r.length-o,size:"medium",variant:"secondary"})})}),...t})};Tc.displayName="AddToCart";const fu={"backtotop-btn":"_backtotop-btn_vcjsm_1","card-modifier":"_card-modifier_vcjsm_29"},xx=({children:e,className:t,classNameButton:r,adornment:n,iconPosition:o,scrollToOptions:i,style:c,...l})=>{const u={top:(i==null?void 0:i.top)??0,left:(i==null?void 0:i.left)??0,behavior:(i==null?void 0:i.behavior)??"smooth"},h=o&&n?{flexDirection:{top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"}[o]}:{},m=()=>{window&&window.document.body.scrollTo({...u})};return s.jsx(p.Card,{...l,shadow:!0,padding:"small",className:p.helpers.classNameConcat(fu["card-modifier"],t),style:{...c,padding:0},children:s.jsxs("button",{className:p.helpers.classNameConcat(fu["backtotop-btn"],r),onClick:m,style:{...h},"data-orientation":o,children:[n,e]})})},bx="_container_1sy8s_16",kr={"carousel-container":"_carousel-container_1sy8s_1","add-cart-container":"_add-cart-container_1sy8s_8",container:bx,"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"},jx=({selectedProducts:e,handleAddAllToCart:t,CONSTANTS:r})=>{const n=Object.values(e.products).length;return s.jsxs("div",{className:kr["add-itens-to-cart-container"],children:[s.jsxs("div",{className:kr["add-itens-to-cart-container-values"],children:[s.jsx("div",{className:kr["add-itens-to-cart-qty-products"],children:s.jsx("span",{children:n===0?r.BUY_PACKAGE.group_cart.select_all_product:`${n} ${n===1?r.BUY_PACKAGE.group_cart.select_product:r.BUY_PACKAGE.group_cart.select_product+"s"}`})}),s.jsx("div",{className:kr["add-itens-to-cart-total"],children:s.jsx("span",{children:U.freightParsePrice({valueInCents:e.totalPrice*100,hasFree:!1,freeTaxMessage:r.FREIGHT_CALCULATION.messages.free_tax})})})]}),s.jsx(p.Button,{onClick:t,className:kr["add-button"],size:"large",disabled:n===0,variant:"primary",children:r.BUY_BUTTON_LABELS.add_to_cart})]})},Sx=e=>e.reduce((t,r)=>{var o;const n=t.find(i=>i.node.id===r.node.id);if(!n)return[...t,r];if((o=n==null?void 0:n.node.isVariantOf)!=null&&o.hasVariant){const i=n.node.isVariantOf.hasVariant,c=r.node.isVariantOf.hasVariant;i&&c&&(n.node.isVariantOf.hasVariant=[...i,...c])}return t},[]),Cx=({selectedProduct:e,productId:t,prevState:r,mainSellerId:n})=>{const{products:o,totalPrice:i}=r;try{if(!e){const{[t]:d,...h}=o;return{...r,totalPrice:i-d.price,products:h}}const c=U.getValidOffer(e.offers.offers,n);if(!c)return r;const l=c.seller.identifier,u=c.price;if(o[t]){const{price:d}=o[t];return o[t]={...o[t],price:u,id:e.sku,seller:l},{totalPrice:i+u-d,products:{...o}}}return{totalPrice:i+u,products:{...o,[t]:{id:e.sku,price:u,seller:l,productId:t}}}}catch(c){return console.error("Error handling SKU selection:",c),r}},Dp=j.createContext({}),wx=({children:e,item:t,index:r,shelfTitle:n,...o})=>{const[i,c]=j.useState(null),l=j.useRef(null),u=j.useRef({availableSkus:[],priceInfo:{price:0,listPrice:0}}),{sendDataLayerEvent:d,itemListRef:h}=Ce(),m=x=>{d({functionKey:"productEvents",data:{commonData:{...t,availableSizes:u.current.availableSkus,...u.current.priceInfo},customData:{index:r+1},event:x}})},_=()=>{m("add_to_wishlist")},g=()=>{d({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...t,...u.current.priceInfo}]},supportData:{selectedSku:i,selectedSkus:[i]},customData:{index:r}}})},v=()=>{n&&(h.current={item_list_name:n}),m("select_item")};return s.jsx(Dp.Provider,{value:j.useMemo(()=>({...o,index:r,item:t,element:l,selectedSku:i,setSelectedSku:c,eventDataRef:u,sendAddToWishlistEvent:_,sendSelectItemEvent:v,sendAddToCartEvent:g}),[o,t,l,i]),children:e})},Kt=()=>{const e=j.useContext(Dp);if(e===void 0)throw new Error("useProductCardContext must be used within a ProductCardProvider");return e},mt={"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"},Fp=({callback:e,children:t,className:r,data:n,isKit:o,...i})=>{const{item:{availability:{status:c},image:l}}=Kt();return c?s.jsxs("div",{...i,className:p.helpers.classNameConcat(mt["product-card--actions"],r),children:[s.jsxs(Ue.Wrapper,{type:"actions--group",children:[s.jsx(Ue.Price,{}),s.jsx("div",{className:mt["product-card--actions--selectors"],children:!o&&s.jsx(Ue.StyleSelector,{data:n,images:l,callback:e})})]}),t]}):null};Fp.displayName="ProductCard.Actions";const zp=({className:e,isKit:t,...r})=>{const{addToCart:n}=Xe(),{isMobile:o=!1,selectedSku:i,outStock:c,item:l,sendAddToCartEvent:u,CONSTANTS:d}=Kt(),h=()=>{var g;if(!i)return;const _=U.getValidOffer(i.offers.offers,d.StoreConfig_MainSellerId);_&&n({id:i==null?void 0:i.sku,quantity:1,seller:_.seller.identifier},{id:l.id,texture:(g=l==null?void 0:l.image.find(v=>d.TEXTURE_IMAGE.includes(v.alternateName)))==null?void 0:g.url}),u()},m=i?d.BUY_BUTTON_LABELS.add_to_cart:d.BUY_BUTTON_LABELS.select_size;return s.jsx(p.Button,{...r,className:p.helpers.classNameConcat(e,"buy-button"),disabled:!t&&!i&&!c,size:o?"medium":"large",variant:c?"secondary":"primary",onClick:c?r.onClick:h,children:c?"Avise-me quando chegar":m})};zp.displayName="ProductCard.Actions.BuyButton";const Ex={"snackbar-modifier":"_snackbar-modifier_1va2l_1"},qn=({size:e,adornment:t,title:r,subtitle:n,supportChildren:o,className:i,Z_INDEX_WAR:c,...l})=>s.jsxs(p.SnackBar.Structure,{...l,size:e,className:p.helpers.classNameConcat(Ex["snackbar-modifier"],i),width:360,style:{zIndex:c.snackbar},children:[s.jsx(p.SnackBar.Content,{adornment:t,title:r,subtitle:n}),o&&s.jsx(p.SnackBar.Support,{children:o})]});qn.displayName="SnackBar";const js={"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 Ua={exports:{}},Ct={};Ct._=Ct._interop_require_default=Px;function Px(e){return e&&e.__esModule?e:{default:e}}var ao={exports:{}},Li={},pu;function qp(){return pu||(pu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{assign:function(){return i},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}});function r(c){const l={};return c.forEach((u,d)=>{typeof l[d]>"u"?l[d]=u:Array.isArray(l[d])?l[d].push(u):l[d]=[l[d],u]}),l}function n(c){return typeof c=="string"||typeof c=="number"&&!isNaN(c)||typeof c=="boolean"?String(c):""}function o(c){const l=new URLSearchParams;return Object.entries(c).forEach(u=>{let[d,h]=u;Array.isArray(h)?h.forEach(m=>l.append(d,n(m))):l.set(d,n(h))}),l}function i(c){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];return u.forEach(h=>{Array.from(h.keys()).forEach(m=>c.delete(m)),h.forEach((m,_)=>c.append(_,m))}),c}}(Li)),Li}var Di={},_n={};function Bp(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Bp=function(n){return n?r:t})(e)}_n._=_n._interop_require_wildcard=Ix;function Ix(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Bp(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var c=o?Object.getOwnPropertyDescriptor(e,i):null;c&&(c.get||c.set)?Object.defineProperty(n,i,c):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}var hu;function Up(){return hu||(hu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}t(e,{formatUrl:function(){return i},formatWithValidation:function(){return l},urlObjectKeys:function(){return c}});const n=_n._(qp()),o=/https?|ftp|gopher|file/;function i(u){let{auth:d,hostname:h}=u,m=u.protocol||"",_=u.pathname||"",g=u.hash||"",v=u.query||"",x=!1;d=d?encodeURIComponent(d).replace(/%3A/i,":")+"@":"",u.host?x=d+u.host:h&&(x=d+(~h.indexOf(":")?"["+h+"]":h),u.port&&(x+=":"+u.port)),v&&typeof v=="object"&&(v=String(n.urlQueryToSearchParams(v)));let S=u.search||v&&"?"+v||"";return m&&!m.endsWith(":")&&(m+=":"),u.slashes||(!m||o.test(m))&&x!==!1?(x="//"+(x||""),_&&_[0]!=="/"&&(_="/"+_)):x||(x=""),g&&g[0]!=="#"&&(g="#"+g),S&&S[0]!=="?"&&(S="?"+S),_=_.replace(/[?#]/g,encodeURIComponent),S=S.replace("#","%23"),""+m+x+_+S+g}const c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(u){return process.env.NODE_ENV==="development"&&u!==null&&typeof u=="object"&&Object.keys(u).forEach(d=>{c.includes(d)||console.warn("Unknown key passed via urlObject into url.format: "+d)}),i(u)}}(Di)),Di}var Fi={},mu;function Nx(){return mu||(mu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"omit",{enumerable:!0,get:function(){return t}});function t(r,n){const o={};return Object.keys(r).forEach(i=>{n.includes(i)||(o[i]=r[i])}),o}}(Fi)),Fi}var zi={},_u;function Ko(){return _u||(_u=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(C,N){for(var T in N)Object.defineProperty(C,T,{enumerable:!0,get:N[T]})}t(e,{DecodeError:function(){return v},MiddlewareNotFoundError:function(){return I},MissingStaticPage:function(){return w},NormalizeError:function(){return x},PageNotFoundError:function(){return S},SP:function(){return _},ST:function(){return g},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return l},isAbsoluteUrl:function(){return i},isResSent:function(){return d},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return P}});const r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(C){let N=!1,T;return function(){for(var O=arguments.length,M=new Array(O),z=0;z<O;z++)M[z]=arguments[z];return N||(N=!0,T=C(...M)),T}}const o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=C=>o.test(C);function c(){const{protocol:C,hostname:N,port:T}=window.location;return C+"//"+N+(T?":"+T:"")}function l(){const{href:C}=window.location,N=c();return C.substring(N.length)}function u(C){return typeof C=="string"?C:C.displayName||C.name||"Unknown"}function d(C){return C.finished||C.headersSent}function h(C){const N=C.split("?");return N[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(N[1]?"?"+N.slice(1).join("?"):"")}async function m(C,N){if(process.env.NODE_ENV!=="production"){var T;if((T=C.prototype)!=null&&T.getInitialProps){const z='"'+u(C)+'.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(z)}}const O=N.res||N.ctx&&N.ctx.res;if(!C.getInitialProps)return N.ctx&&N.Component?{pageProps:await m(N.Component,N.ctx)}:{};const M=await C.getInitialProps(N);if(O&&d(O))return M;if(!M){const z='"'+u(C)+'.getInitialProps()" should resolve to an object. But found "'+M+'" instead.';throw new Error(z)}return process.env.NODE_ENV!=="production"&&Object.keys(M).length===0&&!N.ctx&&console.warn(""+u(C)+" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps"),M}const _=typeof performance<"u",g=_&&["mark","measure","getEntriesByName"].every(C=>typeof performance[C]=="function");class v extends Error{}class x extends Error{}class S extends Error{constructor(N){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+N}}class w extends Error{constructor(N,T){super(),this.message="Failed to load static file for page: "+N+" "+T}}class I extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function P(C){return JSON.stringify({message:C.message,stack:C.stack})}}(zi)),zi}var co={exports:{}},gu;function Qo(){return gu||(gu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});const r=U.removeTrailingSlash,n=U.parsePath,o=i=>{if(!i.startsWith("/")||process.env.__NEXT_MANUAL_TRAILING_SLASH)return i;const{pathname:c,query:l,hash:u}=(0,n.parsePath)(i);return process.env.__NEXT_TRAILING_SLASH?/\.[^/]+\/?$/.test(c)?""+(0,r.removeTrailingSlash)(c)+l+u:c.endsWith("/")?""+c+l+u:c+"/"+l+u:""+(0,r.removeTrailingSlash)(c)+l+u};(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)}(co,co.exports)),co.exports}var qi={},lo={exports:{}},yu;function Rx(){return yu||(yu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});const r=U.pathHasPrefix,n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i){return(0,r.pathHasPrefix)(i,n)}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(lo,lo.exports)),lo.exports}var vu;function Hp(){return vu||(vu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isLocalURL",{enumerable:!0,get:function(){return n}});const t=Ko(),r=Rx();function n(o){if(!(0,t.isAbsoluteUrl)(o))return!0;try{const i=(0,t.getLocationOrigin)(),c=new URL(o,i);return c.origin===i&&(0,r.hasBasePath)(c.pathname)}catch{return!1}}}(qi)),qi}var Bi={},Ui={},xu;function Tx(){return xu||(xu=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 i=[...this.children.keys()].sort();this.slugName!==null&&i.splice(i.indexOf("[]"),1),this.restSlugName!==null&&i.splice(i.indexOf("[...]"),1),this.optionalRestSlugName!==null&&i.splice(i.indexOf("[[...]]"),1);const c=i.map(l=>this.children.get(l)._smoosh(""+o+l+"/")).reduce((l,u)=>[...l,...u],[]);if(this.slugName!==null&&c.push(...this.children.get("[]")._smoosh(o+"["+this.slugName+"]/")),!this.placeholder){const l=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 ("'+l+'" and "'+l+"[[..."+this.optionalRestSlugName+']]").');c.unshift(l)}return this.restSlugName!==null&&c.push(...this.children.get("[...]")._smoosh(o+"[..."+this.restSlugName+"]/")),this.optionalRestSlugName!==null&&c.push(...this.children.get("[[...]]")._smoosh(o+"[[..."+this.optionalRestSlugName+"]]/")),c}_insert(o,i,c){if(o.length===0){this.placeholder=!1;return}if(c)throw new Error("Catch-all must be the last part of the URL.");let l=o[0];if(l.startsWith("[")&&l.endsWith("]")){let h=function(m,_){if(m!==null&&m!==_)throw new Error("You cannot use different slug names for the same dynamic path ('"+m+"' !== '"+_+"').");i.forEach(g=>{if(g===_)throw new Error('You cannot have the same slug name "'+_+'" repeat within a single dynamic path');if(g.replace(/\W/g,"")===l.replace(/\W/g,""))throw new Error('You cannot have the slug names "'+g+'" and "'+_+'" differ only by non-word symbols within a single dynamic path')}),i.push(_)},u=l.slice(1,-1),d=!1;if(u.startsWith("[")&&u.endsWith("]")&&(u=u.slice(1,-1),d=!0),u.startsWith("...")&&(u=u.substring(3),c=!0),u.startsWith("[")||u.endsWith("]"))throw new Error("Segment names may not start or end with extra brackets ('"+u+"').");if(u.startsWith("."))throw new Error("Segment names may not start with erroneous periods ('"+u+"').");if(c)if(d){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]+'" ).');h(this.optionalRestSlugName,u),this.optionalRestSlugName=u,l="[[...]]"}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]+'").');h(this.restSlugName,u),this.restSlugName=u,l="[...]"}else{if(d)throw new Error('Optional route parameters are not yet supported ("'+o[0]+'").');h(this.slugName,u),this.slugName=u,l="[]"}}this.children.has(l)||this.children.set(l,new t),this.children.get(l)._insert(o.slice(1),i,c)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(n){const o=new t;return n.forEach(i=>o.insert(i)),o.smoosh()}}(Ui)),Ui}var Hi={},$i={},Wi={},Vi={},bu;function Ox(){return bu||(bu=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}}(Vi)),Vi}var Oc={};(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,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return r}});function r(i){return i[0]==="("&&i.endsWith(")")}const n="__PAGE__",o="__DEFAULT__"})(Oc);var ju;function Ax(){return ju||(ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return i}});const r=Ox(),n=Oc;function o(c){return(0,r.ensureLeadingSlash)(c.split("/").reduce((l,u,d,h)=>!u||(0,n.isGroupSegment)(u)||u[0]==="@"||(u==="page"||u==="route")&&d===h.length-1?l:l+"/"+u,""))}function i(c){return c.replace(/\.rsc($|\?)/,"$1")}}(Wi)),Wi}var Su;function $p(){return Su||(Su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{INTERCEPTION_ROUTE_MARKERS:function(){return n},extractInterceptionRouteInformation:function(){return i},isInterceptionRouteAppPath:function(){return o}});const r=Ax(),n=["(..)(..)","(.)","(..)","(...)"];function o(c){return c.split("/").find(l=>n.find(u=>l.startsWith(u)))!==void 0}function i(c){let l,u,d;for(const h of c.split("/"))if(u=n.find(m=>h.startsWith(m)),u){[l,d]=c.split(u,2);break}if(!l||!u||!d)throw new Error(`Invalid interception route: ${c}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(l=(0,r.normalizeAppPath)(l),u){case"(.)":l==="/"?d=`/${d}`:d=l+"/"+d;break;case"(..)":if(l==="/")throw new Error(`Invalid interception route: ${c}. Cannot use (..) marker at the root level, use (.) instead.`);d=l.split("/").slice(0,-1).concat(d).join("/");break;case"(...)":d="/"+d;break;case"(..)(..)":const h=l.split("/");if(h.length<=2)throw new Error(`Invalid interception route: ${c}. Cannot use (..)(..) marker at the root level or one level up.`);d=h.slice(0,-2).concat(d).join("/");break;default:throw new Error("Invariant: unexpected marker")}return{interceptingRoute:l,interceptedRoute:d}}}($i)),$i}var Cu;function kx(){return Cu||(Cu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return n}});const t=$p(),r=/\/\[[^/]+?\](?=\/|$)/;function n(o){return(0,t.isInterceptionRouteAppPath)(o)&&(o=(0,t.extractInterceptionRouteInformation)(o).interceptedRoute),r.test(o)}}(Hi)),Hi}var wu;function Mx(){return wu||(wu=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,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return n.isDynamicRoute}});const r=Tx(),n=kx()}(Bi)),Bi}var Gi={},Ki={},Eu;function Lx(){return Eu||(Eu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r}});const t=Ko();function r(n){let{re:o,groups:i}=n;return c=>{const l=o.exec(c);if(!l)return!1;const u=h=>{try{return decodeURIComponent(h)}catch{throw new t.DecodeError("failed to decode param")}},d={};return Object.keys(i).forEach(h=>{const m=i[h],_=l[m.pos];_!==void 0&&(d[h]=~_.indexOf("/")?_.split("/").map(g=>u(g)):m.repeat?[u(_)]:u(_))}),d}}}(Ki)),Ki}var Qi={},Yi={},Pu;function Dx(){return Pu||(Pu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"escapeStringRegexp",{enumerable:!0,get:function(){return n}});const t=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function n(o){return t.test(o)?o.replace(r,"\\$&"):o}}(Yi)),Yi}var Iu;function Fx(){return Iu||(Iu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(v,x){for(var S in x)Object.defineProperty(v,S,{enumerable:!0,get:x[S]})}t(e,{getNamedMiddlewareRegex:function(){return g},getNamedRouteRegex:function(){return _},getRouteRegex:function(){return u},parseParameter:function(){return c}});const r=U.constants,n=$p(),o=Dx(),i=U.removeTrailingSlash;function c(v){const x=v.startsWith("[")&&v.endsWith("]");x&&(v=v.slice(1,-1));const S=v.startsWith("...");return S&&(v=v.slice(3)),{key:v,repeat:S,optional:x}}function l(v){const x=(0,i.removeTrailingSlash)(v).slice(1).split("/"),S={};let w=1;return{parameterizedRoute:x.map(I=>{const P=n.INTERCEPTION_ROUTE_MARKERS.find(N=>I.startsWith(N)),C=I.match(/\[((?:\[.*\])|.+)\]/);if(P&&C){const{key:N,optional:T,repeat:O}=c(C[1]);return S[N]={pos:w++,repeat:O,optional:T},"/"+(0,o.escapeStringRegexp)(P)+"([^/]+?)"}else if(C){const{key:N,repeat:T,optional:O}=c(C[1]);return S[N]={pos:w++,repeat:T,optional:O},T?O?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}else return"/"+(0,o.escapeStringRegexp)(I)}).join(""),groups:S}}function u(v){const{parameterizedRoute:x,groups:S}=l(v);return{re:new RegExp("^"+x+"(?:/)?$"),groups:S}}function d(){let v=0;return()=>{let x="",S=++v;for(;S>0;)x+=String.fromCharCode(97+(S-1)%26),S=Math.floor((S-1)/26);return x}}function h(v){let{interceptionMarker:x,getSafeRouteKey:S,segment:w,routeKeys:I,keyPrefix:P}=v;const{key:C,optional:N,repeat:T}=c(w);let O=C.replace(/\W/g,"");P&&(O=""+P+O);let M=!1;(O.length===0||O.length>30)&&(M=!0),isNaN(parseInt(O.slice(0,1)))||(M=!0),M&&(O=S()),P?I[O]=""+P+C:I[O]=C;const z=x?(0,o.escapeStringRegexp)(x):"";return T?N?"(?:/"+z+"(?<"+O+">.+?))?":"/"+z+"(?<"+O+">.+?)":"/"+z+"(?<"+O+">[^/]+?)"}function m(v,x){const S=(0,i.removeTrailingSlash)(v).slice(1).split("/"),w=d(),I={};return{namedParameterizedRoute:S.map(P=>{const C=n.INTERCEPTION_ROUTE_MARKERS.some(T=>P.startsWith(T)),N=P.match(/\[((?:\[.*\])|.+)\]/);if(C&&N){const[T]=P.split(N[0]);return h({getSafeRouteKey:w,interceptionMarker:T,segment:N[1],routeKeys:I,keyPrefix:x?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}else return N?h({getSafeRouteKey:w,segment:N[1],routeKeys:I,keyPrefix:x?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(P)}).join(""),routeKeys:I}}function _(v,x){const S=m(v,x);return{...u(v),namedRegex:"^"+S.namedParameterizedRoute+"(?:/)?$",routeKeys:S.routeKeys}}function g(v,x){const{parameterizedRoute:S}=l(v),{catchAll:w=!0}=x;if(S==="/")return{namedRegex:"^/"+(w?".*":"")+"$"};const{namedParameterizedRoute:I}=m(v,!1);let P=w?"(?:(/.*)?)":"";return{namedRegex:"^"+I+P+"$"}}}(Qi)),Qi}var Nu;function zx(){return Nu||(Nu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"interpolateAs",{enumerable:!0,get:function(){return n}});const t=Lx(),r=Fx();function n(o,i,c){let l="";const u=(0,r.getRouteRegex)(o),d=u.groups,h=(i!==o?(0,t.getRouteMatcher)(u)(i):"")||c;l=o;const m=Object.keys(d);return m.every(_=>{let g=h[_]||"";const{repeat:v,optional:x}=d[_];let S="["+(v?"...":"")+_+"]";return x&&(S=(g?"":"/")+"["+S+"]"),v&&!Array.isArray(g)&&(g=[g]),(x||_ in h)&&(l=l.replace(S,v?g.map(w=>encodeURIComponent(w)).join("/"):encodeURIComponent(g))||"/")})||(l=""),{params:m,result:l}}}(Gi)),Gi}var Ru;function qx(){return Ru||(Ru=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return h}});const r=qp(),n=Up(),o=Nx(),i=Ko(),c=Qo(),l=Hp(),u=Mx(),d=zx();function h(m,_,g){let v,x=typeof _=="string"?_:(0,n.formatWithValidation)(_);const S=x.match(/^[a-zA-Z]{1,}:\/\//),w=S?x.slice(S[0].length):x;if((w.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+x+"' passed to next/router in page: '"+m.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");const P=(0,i.normalizeRepeatedSlashes)(w);x=(S?S[0]:"")+P}if(!(0,l.isLocalURL)(x))return g?[x]:x;try{v=new URL(x.startsWith("#")?m.asPath:m.pathname,"http://n")}catch{v=new URL("/","http://n")}try{const P=new URL(x,v);P.pathname=(0,c.normalizePathTrailingSlash)(P.pathname);let C="";if((0,u.isDynamicRoute)(P.pathname)&&P.searchParams&&g){const T=(0,r.searchParamsToUrlQuery)(P.searchParams),{result:O,params:M}=(0,d.interpolateAs)(P.pathname,P.pathname,T);O&&(C=(0,n.formatWithValidation)({pathname:O,hash:P.hash,query:(0,o.omit)(T,M)}))}const N=P.origin===v.origin?P.href.slice(P.origin.length):P.href;return g?[N,C||N]:N}catch{return g?[x]: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)}(ao,ao.exports)),ao.exports}var uo={exports:{}},Tu;function Bx(){return Tu||(Tu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}});const r=Qo(),n=function(o){for(var i=arguments.length,c=new Array(i>1?i-1:0),l=1;l<i;l++)c[l-1]=arguments[l];return process.env.__NEXT_I18N_SUPPORT?(0,r.normalizePathTrailingSlash)(U.addLocale.addLocale(o,...c)):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)}(uo,uo.exports)),uo.exports}var Xi={},Ou;function Wp(){return Ou||(Ou=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="RouterContext")}(Xi)),Xi}var Ac={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(d,h){for(var m in h)Object.defineProperty(d,m,{enumerable:!0,get:h[m]})}t(e,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return c},LayoutRouterContext:function(){return i},MissingSlotContext:function(){return u},TemplateContext:function(){return l}});const n=Ct._(j),o=n.default.createContext(null),i=n.default.createContext(null),c=n.default.createContext(null),l=n.default.createContext(null);process.env.NODE_ENV!=="production"&&(o.displayName="AppRouterContext",i.displayName="LayoutRouterContext",c.displayName="GlobalLayoutRouterContext",l.displayName="TemplateContext");const u=n.default.createContext(new Set)})(Ac);var fo={exports:{}},po={exports:{}},Au;function Vp(){return Au||(Au=1,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,{cancelIdleCallback:function(){return o},requestIdleCallback:function(){return n}});const n=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(i){let c=Date.now();return self.setTimeout(function(){i({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-c))}})},1)},o=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(i){return clearTimeout(i)};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(po,po.exports)),po.exports}var ku;function Ux(){return ku||(ku=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return d}});const r=j,n=Vp(),o=typeof IntersectionObserver=="function",i=new Map,c=[];function l(h){const m={root:h.root||null,margin:h.rootMargin||""},_=c.find(S=>S.root===m.root&&S.margin===m.margin);let g;if(_&&(g=i.get(_),g))return g;const v=new Map,x=new IntersectionObserver(S=>{S.forEach(w=>{const I=v.get(w.target),P=w.isIntersecting||w.intersectionRatio>0;I&&P&&I(P)})},h);return g={id:m,observer:x,elements:v},c.push(m),i.set(m,g),g}function u(h,m,_){const{id:g,observer:v,elements:x}=l(_);return x.set(h,m),v.observe(h),function(){if(x.delete(h),v.unobserve(h),x.size===0){v.disconnect(),i.delete(g);const w=c.findIndex(I=>I.root===g.root&&I.margin===g.margin);w>-1&&c.splice(w,1)}}}function d(h){let{rootRef:m,rootMargin:_,disabled:g}=h;const v=g||!o,[x,S]=(0,r.useState)(!1),w=(0,r.useRef)(null),I=(0,r.useCallback)(C=>{w.current=C},[]);(0,r.useEffect)(()=>{if(o){if(v||x)return;const C=w.current;if(C&&C.tagName)return u(C,T=>T&&S(T),{root:m==null?void 0:m.current,rootMargin:_})}else if(!x){const C=(0,n.requestIdleCallback)(()=>S(!0));return()=>(0,n.cancelIdleCallback)(C)}},[v,_,m,x,w.current]);const P=(0,r.useCallback)(()=>{S(!1)},[]);return[I,x,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)}(fo,fo.exports)),fo.exports}var ho={exports:{}},mo={exports:{}},Mu;function Hx(){return Mu||(Mu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}});const r=(n,o)=>process.env.__NEXT_I18N_SUPPORT?U.normalizeLocalePath.normalizeLocalePath(n,o):{pathname:n,detectedLocale:void 0};(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(mo,mo.exports)),mo.exports}var _o={exports:{}},Lu;function $x(){return Lu||(Lu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});const r=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];if(process.env.__NEXT_I18N_SUPPORT)return U.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)}(_o,_o.exports)),_o.exports}var Du;function Wx(){return Du||(Du=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return o}});const r=Qo(),n=process.env.__NEXT_ROUTER_BASEPATH||"";function o(i,c,l,u){if(process.env.__NEXT_I18N_SUPPORT){const d=Hx().normalizeLocalePath,h=$x().detectDomainLocale,m=c||d(i,l).detectedLocale,_=h(u,void 0,m);if(_){const g="http"+(_.http?"":"s")+"://",v=m===_.defaultLocale?"":"/"+m;return""+g+_.domain+(0,r.normalizePathTrailingSlash)(""+n+v+i)}return!1}else return!1}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(ho,ho.exports)),ho.exports}var go={exports:{}},Fu;function Vx(){return Fu||(Fu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return i}});const r=U.addPathPrefix,n=Qo(),o=process.env.__NEXT_ROUTER_BASEPATH||"";function i(c,l){return(0,n.normalizePathTrailingSlash)(process.env.__NEXT_MANUAL_CLIENT_BASE_PATH&&!l?c:(0,r.addPathPrefix)(c,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)}(go,go.exports)),go.exports}var yo={exports:{}},zu;function Gx(){return zu||(zu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(g,v){for(var x in v)Object.defineProperty(g,x,{enumerable:!0,get:v[x]})}r(t,{ACTION_FAST_REFRESH:function(){return u},ACTION_NAVIGATE:function(){return o},ACTION_PREFETCH:function(){return l},ACTION_REFRESH:function(){return n},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return m},PrefetchKind:function(){return h},isThenable:function(){return _}});const n="refresh",o="navigate",i="restore",c="server-patch",l="prefetch",u="fast-refresh",d="server-action";var h;(function(g){g.AUTO="auto",g.FULL="full",g.TEMPORARY="temporary"})(h||(h={}));var m;(function(g){g.fresh="fresh",g.reusable="reusable",g.expired="expired",g.stale="stale"})(m||(m={}));function _(g){return g&&(typeof g=="object"||typeof g=="function")&&typeof g.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)}(yo,yo.exports)),yo.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return T}});const r=Ct,n=s,o=r._(j),i=qx(),c=Hp(),l=Up(),u=Ko(),d=Bx(),h=Wp(),m=Ac,_=Ux(),g=Wx(),v=Vx(),x=Gx(),S=new Set;function w(O,M,z,D,B,G){if(typeof window>"u"||!G&&!(0,c.isLocalURL)(M))return;if(!D.bypassPrefetchedCheck){const Y=typeof D.locale<"u"?D.locale:"locale"in O?O.locale:void 0,X=M+"%"+z+"%"+Y;if(S.has(X))return;S.add(X)}(async()=>G?O.prefetch(M,B):O.prefetch(M,z,D))().catch(Y=>{if(process.env.NODE_ENV!=="production")throw Y})}function I(O){const z=O.currentTarget.getAttribute("target");return z&&z!=="_self"||O.metaKey||O.ctrlKey||O.shiftKey||O.altKey||O.nativeEvent&&O.nativeEvent.which===2}function P(O,M,z,D,B,G,J,Y,X){const{nodeName:Z}=O.currentTarget;if(Z.toUpperCase()==="A"&&(I(O)||!X&&!(0,c.isLocalURL)(z)))return;O.preventDefault();const fe=()=>{const ee=J??!0;"beforePopState"in M?M[B?"replace":"push"](z,D,{shallow:G,locale:Y,scroll:ee}):M[B?"replace":"push"](D||z,{scroll:ee})};X?o.default.startTransition(fe):fe()}function C(O){return typeof O=="string"?O:(0,l.formatUrl)(O)}const T=o.default.forwardRef(function(M,z){let D;const{href:B,as:G,children:J,prefetch:Y=null,passHref:X,replace:Z,shallow:he,scroll:fe,locale:ee,onClick:ie,onMouseEnter:_e,onTouchStart:we,legacyBehavior:ge=!1,...Ee}=M;D=J,ge&&(typeof D=="string"||typeof D=="number")&&(D=(0,n.jsx)("a",{children:D}));const V=o.default.useContext(h.RouterContext),oe=o.default.useContext(m.AppRouterContext),F=V??oe,ce=!V,je=Y!==!1,Oe=Y===null?x.PrefetchKind.AUTO:x.PrefetchKind.FULL;if(process.env.NODE_ENV!=="production"){let re=function(se){return new Error("Failed prop type: The prop `"+se.key+"` expects a "+se.expected+" in `<Link>`, but got `"+se.actual+"` instead."+(typeof window<"u"?`
2
2
  Open your browser's console to view the Component stack trace.`:""))};Object.keys({href:!0}).forEach(se=>{if(se==="href"&&(M[se]==null||typeof M[se]!="string"&&typeof M[se]!="object"))throw re({key:se,expected:"`string` or `object`",actual:M[se]===null?"null":typeof M[se]})}),Object.keys({as:!0,replace:!0,scroll:!0,shallow:!0,passHref:!0,prefetch:!0,locale:!0,onClick:!0,onMouseEnter:!0,onTouchStart:!0,legacyBehavior:!0}).forEach(se=>{const ve=typeof M[se];if(se==="as"){if(M[se]&&ve!=="string"&&ve!=="object")throw re({key:se,expected:"`string` or `object`",actual:ve})}else if(se==="locale"){if(M[se]&&ve!=="string")throw re({key:se,expected:"`string`",actual:ve})}else if(se==="onClick"||se==="onMouseEnter"||se==="onTouchStart"){if(M[se]&&ve!=="function")throw re({key:se,expected:"`function`",actual:ve})}else if((se==="replace"||se==="scroll"||se==="shallow"||se==="passHref"||se==="prefetch"||se==="legacyBehavior")&&M[se]!=null&&ve!=="boolean")throw re({key:se,expected:"`boolean`",actual:ve})});const Q=o.default.useRef(!1);M.prefetch&&!Q.current&&!ce&&(Q.current=!0,console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"))}if(process.env.NODE_ENV!=="production"&&ce&&!G){let re;if(typeof B=="string"?re=B:typeof B=="object"&&typeof B.pathname=="string"&&(re=B.pathname),re&&re.split("/").some($e=>$e.startsWith("[")&&$e.endsWith("]")))throw new Error("Dynamic href `"+re+"` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href")}const{href:q,as:$}=o.default.useMemo(()=>{if(!V){const $e=C(B);return{href:$e,as:G?C(G):$e}}const[re,De]=(0,i.resolveHref)(V,B,!0);return{href:re,as:G?(0,i.resolveHref)(V,G):De||re}},[V,B,G]),Ie=o.default.useRef(q),ne=o.default.useRef($);let te;if(ge)if(process.env.NODE_ENV==="development"){ie&&console.warn('"onClick" was passed to <Link> with `href` of `'+B+'` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'),_e&&console.warn('"onMouseEnter" was passed to <Link> with `href` of `'+B+'` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');try{te=o.default.Children.only(D)}catch{throw D?new Error("Multiple children were passed to <Link> with `href` of `"+B+"` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"+(typeof window<"u"?`
3
3
  Open your browser's console to view the Component stack trace.`:"")):new Error("No children were passed to <Link> with `href` of `"+B+"` but one child is required https://nextjs.org/docs/messages/link-no-children")}}else te=o.default.Children.only(D);else if(process.env.NODE_ENV==="development"&&(D==null?void 0:D.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 ke=ge?te&&typeof te=="object"&&te.ref:z,[ct,Me,Le]=(0,_.useIntersection)({rootMargin:"200px"}),tt=o.default.useCallback(re=>{(ne.current!==$||Ie.current!==q)&&(Le(),ne.current=$,Ie.current=q),ct(re),ke&&(typeof ke=="function"?ke(re):typeof ke=="object"&&(ke.current=re))},[$,ke,q,Le,ct]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&F&&(!Me||!je||w(F,q,$,{locale:ee},{kind:Oe},ce))},[$,q,Me,ee,je,V==null?void 0:V.locale,F,ce,Oe]);const We={ref:tt,onClick(re){if(process.env.NODE_ENV!=="production"&&!re)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!ge&&typeof ie=="function"&&ie(re),ge&&te.props&&typeof te.props.onClick=="function"&&te.props.onClick(re),F&&(re.defaultPrevented||P(re,F,q,$,Z,he,fe,ee,ce))},onMouseEnter(re){!ge&&typeof _e=="function"&&_e(re),ge&&te.props&&typeof te.props.onMouseEnter=="function"&&te.props.onMouseEnter(re),F&&((!je||process.env.NODE_ENV==="development")&&ce||w(F,q,$,{locale:ee,priority:!0,bypassPrefetchedCheck:!0},{kind:Oe},ce))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(De){!ge&&typeof Ce=="function"&&Ce(De),ge&&te.props&&typeof te.props.onTouchStart=="function"&&te.props.onTouchStart(De),F&&(!je&&ce||w(F,q,$,{locale:ee,priority:!0,bypassPrefetchedCheck:!0},{kind:Oe},ce))}};if((0,u.isAbsoluteUrl)($))We.href=$;else if(!ge||X||te.type==="a"&&!("href"in te.props)){const re=typeof ee<"u"?ee:V==null?void 0:V.locale,De=(V==null?void 0:V.isLocaleDomain)&&(0,g.getDomainLocale)($,re,V==null?void 0:V.locales,V==null?void 0:V.domainLocales);We.href=De||(0,v.addBasePath)((0,d.addLocale)($,re,V==null?void 0:V.defaultLocale))}return ge?o.default.cloneElement(te,We):(0,n.jsx)("a",{...we,...We,children:D})});(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)})(Ha,Ha.exports);var Yx=Ha.exports,Xx=Yx;const Ot=U.getDefaultExportFromCjs(Xx),Jx="_link_w24h0_1",Zx="_wrapper_w24h0_98",eb="_text_w24h0_106",Zi={link:Jx,wrapper:Zx,text:eb},wt=({children:e,adornments:t,className:r,disableUnderline:n,href:o,mode:i,size:c,title:l,onClick:u,disablePadding:d,...h})=>{const m=p.helpers.ValidateProp({fieldTypes:zn.SizesSmallExtended,property:c,fallback:"medium"}),_=p.helpers.ValidateProp({fieldTypes:zn.Mode,property:i,fallback:"default"});return s.jsx(Ot,{...h,className:p.helpers.classNameConcat(Zi.link,r),href:o&&o.length>0?o:"#","data-size":m,"data-variant":_,title:l||"NextLink","data-disable-underline":n??!1,"data-disable-padding":d??!0,children:s.jsxs("div",{className:Zi.wrapper,onClick:u,children:[t==null?void 0:t.start,s.jsx("p",{className:Zi.text,"data-size":m,children:e}),t==null?void 0:t.end]})})},tb=({ICONS:e})=>{const{resetFeedback:t}=jn();return s.jsxs("div",{className:bs["wishlist--snack--actions"],children:[s.jsx(wt,{href:"/favoritos",children:"Ver Favoritos"}),s.jsx(p.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:s.jsx(p.Icon,{name:e.close})}})]})},kc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=bc(),{resetFeedback:o}=jn(),i=j.useRef(null);return j.useEffect(()=>{i.current&&clearTimeout(i.current),n&&(i.current=setTimeout(()=>{o()},5e3))},[n,o]),(n==null?void 0:n.active)&&s.jsx(qn,{Z_INDEX_WAR:r,className:bs["wishlist--snack"],"data-action":n.action,title:n.action==="add"?e.messages.add:e.messages.remove,supportChildren:s.jsx(tb,{ICONS:t}),size:"medium"})};kc.displayName="WishList.Feedback";const Mc={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Qp=({className:e,children:t,columns:r=1,isMobile:n=!1,gap:o=8,position_grid:i,totalColumns:c=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,...u})=>{const d=j.useMemo(()=>r%c===0?"initial":n||r<2?l:l.split("/").reverse().join("/"),[r,c,n]);return s.jsx("div",{...u,className:p.helpers.classNameConcat(Mc["product-list--banner"],e),style:{aspectRatio:d,maxWidth:`${r/c*100}%`,order:i,padding:o/2},children:t})};Qp.displayName="ProductList.Banner";class rb{constructor(){Qr(this,"cache",new Map);Qr(this,"pendingRequests",new Map);Qr(this,"rafId",null)}request(t,r,n){const o=this.getCacheKey(t,n==null?void 0:n.filterTexture);if(this.cache.has(o)){r(this.cache.get(o));return}const i=this.pendingRequests.get(o);i?i.callbacks.push(r):this.pendingRequests.set(o,{productId:t,callbacks:[r],filterTexture:n.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=[],n=[];if(t.forEach((i,c)=>{this.cache.has(c)?n.push([c,i]):r.push(i)}),n.forEach(([i,c])=>{const l=this.cache.get(i);l&&c.callbacks.forEach(u=>u(l)),t.delete(i)}),r.length===0)return;const o=new Map;r.forEach(i=>{var u;const c=((u=i.filterTexture)==null?void 0:u.sort().join(","))||"no-filter",l=o.get(c)||[];l.push(i),o.set(c,l)}),await Promise.all(Array.from(o.values()).map(i=>this.executeGroupRequest(i)))}async executeGroupRequest(t){const r=t.map(o=>o.productId),n=t[0].filterTexture;try{const o=await U.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 i=await o.json();t.forEach(c=>{const l=i[c.productId]||[],u=n&&l.length?U.formattedSimilars(l,n):l,d=this.getCacheKey(c.productId,n);this.cache.set(d,u),c.callbacks.forEach(h=>h(u)),this.pendingRequests.delete(d)})}catch(o){console.error("Erro ao buscar similares:",o),t.forEach(i=>{const c=this.getCacheKey(i.productId,n);i.callbacks.forEach(l=>l([])),this.pendingRequests.delete(c)})}}clearCache(){this.cache.clear()}}const Bu=new rb;function Lc(e,t){const[r,n]=j.useState([]),o=j.useRef(!1);j.useEffect(()=>{o.current=!1},[e]);const i=j.useCallback(()=>{!e||o.current||(o.current=!0,Bu.request(e,n,t))},[e,t]),c=j.useCallback(()=>Bu.clearCache(),[]);return{items:r,loadSimilars:i,clearCache:c}}const Yp=({isKit:e,parent:t,productId:r,setNotify:n,CONSTANTS:o})=>{const{router:i}=Ae(),{items:c,loadSimilars:l}=Lc(r,{filterTexture:o.TEXTURE_IMAGE}),u=j.useRef(!1),d=j.useRef(null),h=g=>i.push(g??""),m=j.useCallback(g=>{!r||!g||l()},[r,l]),_=j.useCallback((g,v)=>{if(!g.isIntersecting){o.PLP_INFINITE_SCROLL&&d.current&&(clearTimeout(d.current),d.current=null);return}if(g.intersectionRatio>=v.threshold&&!u.current){if(o.PLP_INFINITE_SCROLL){d.current=setTimeout(()=>{m(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}m(!0)}},[m]);return j.useEffect(()=>{if(e||!t.current)return;const g={root:null,threshold:.1},v=new IntersectionObserver(([x])=>{_(x,g)},g);return v.observe(t.current),()=>{d.current&&clearTimeout(d.current),v.disconnect()}},[_,t,e]),s.jsx(Ue.Actions,{data:c,callback:h,isKit:e,children:!e&&s.jsx(Ue.SizeSelector,{setNotify:n,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};Yp.displayName="ProductList.Card.Actions";const Xp=({className:e,children:t,gap:r=32,item:n,isMobile:o,order:i,tag:c,hasMaxWidth:l=!0,index:u,setSkuSelected:d,showVideo:h,CONSTANTS:m,..._})=>{const g=j.useRef(null),{availability:{status:v}}=n,x=j.useCallback((w,I)=>{var P;typeof d=="function"&&d((P=w.isVariantOf)==null?void 0:P.hasVariant,I)},[d]),S=n.name.substring(0,4).toLowerCase()==="kit ";return s.jsxs("div",{..._,className:p.helpers.classNameConcat(Mc["product-list--card"],e),"data-mobile":o,"data-order":i,ref:g,style:{...l&&{maxWidth:o?"50%":"25%"},order:i,padding:r/2},children:[s.jsxs(Ue.Root,{item:n,isMobile:o,index:u,size:o?"small":"medium",order:i,outStock:!v,CONSTANTS:m,children:[s.jsx(Ue.Header,{product:n,tag:c==null?void 0:c.commercial}),s.jsx(Ue.Media,{showVideo:h,hasPriority:!0}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:c==null?void 0:c.institucional}),s.jsx(Yp,{productId:n.isVariantOf.productGroupID,parent:g,setNotify:x,isKit:S,CONSTANTS:m}),!S&&s.jsx(Ue.OutStock,{callback:x})]}),s.jsx(Ue.Wrapper,{type:"footer",children:v&&s.jsx(Ue.BuyButton,{isKit:S})})]}),t]})};Xp.displayName="ProductList.Card";const Jp=({children:e,className:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Mc["product-list"],t),children:e});Jp.displayName="ProductList.Grid";const Ft={Banner:Qp,Card:Xp,Root:Jp,helpers:tx},nb="_pdc_av7d8_1",St={"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:nb},Dc=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:n}=Ae(),{isMobile:o}=xe(),i=()=>{n.push(r==null?void 0:r.link)};return s.jsxs("div",{className:p.helpers.classNameConcat(St["pdc--empty"],e),children:[s.jsxs(p.TextStructure.DivWrapper,{className:St["pdc--empty-wrapper"],children:[s.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),s.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),s.jsx(p.Button,{adornment:{end:s.jsx(p.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>i(),variant:"tertiary",children:s.jsx("b",{children:r.text})})]})};Dc.displayName="PDC.Empty";const Fc=e=>s.jsx("div",{...e,className:St["pdc--infinite--next-page"],children:s.jsx(p.Spinner,{className:St["pdc--infinite--next-page--spinner"]})});Fc.displayName="PDC.Spinner";function Zp({CONSTANTS:e}){const{sendDataLayerEvent:t}=Ee(),{isMobile:r}=xe(),{getAvailableProductTag:n}=Cr(),[o,i]=j.useState([]),[c,l]=j.useState(!0),u=ns(),d=u.join(","),h=r?16:32;return j.useEffect(()=>{const m=async()=>{u.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:u})}).then(_=>_.json()).then(_=>{i(_),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:_}}})}).catch(_=>console.error(_)):i([]),l(!1)};if(u.length){m();return}if(u.length===0&&o.length===0){l(!1);return}i([]),l(!1)},[d]),s.jsx("section",{className:bs["wishlist-grid"],children:s.jsxs("div",{className:bs["wishlist-grid--container"],children:[c&&s.jsx(Fc,{}),!u.length&&!(o!=null&&o.length)&&!c&&s.jsx(Dc,{className:bs["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),s.jsx(Ft.Root,{children:Array.isArray(o)&&o.map((m,_)=>{const g=m.node.cluster.highlights||[],v=n(g);return s.jsx(Ft.Card,{gap:h,isMobile:r??!1,item:m.node,tag:v,index:_,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}},m.node.sku)})})]})})}Zp.displayName="Wishlist.Grid";const sb=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],eh=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=ss(),o=ns(),i=bc(),{updateList:c}=jn();return j.useEffect(()=>{var u,d;i.active&&er.set("fs::wishlist",o);const l=async()=>{var h;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(h=n==null?void 0:n.user)==null?void 0:h.id})}).catch(m=>{console.error("Error updating wishlist:",m)})};i.active&&((u=n.user)!=null&&u.id)&&o.length!==((d=n.wishlist)==null?void 0:d.length)&&l()},[i,n,o]),j.useEffect(()=>{var d;const l=async()=>{const h=await er.get("fs::wishlist");h&&(h==null?void 0:h.length)!==o.length&&c(h)},u=async()=>{var g;const h=await er.get("fs::wishlist")??[],m=n.wishlist?typeof n.wishlist[0]=="object"?sb(n.wishlist):n.wishlist:[],_=[...new Set([...h,...m])];c(_),er.set("fs::wishlist",_),m.length!==_.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:_,docId:(g=n.user)==null?void 0:g.id})}).catch(v=>{console.error("Error updating wishlist:",v)})};if((d=n.user)!=null&&d.id){u();return}l()},[n,c]),s.jsx(kc,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};eh.displayName="Wishlist.Init";const th=({product:e,priceInfo:t,size:r="medium",style:n,ICONS:o})=>{const{sendDataLayerEvent:i,currentLocalRef:c}=Ee(),l=ns(),{toggleProduct:u}=jn(),{isVariantOf:{productGroupID:d}}=e;return s.jsx(p.Button,{adornment:{start:s.jsx(p.Icon,{size:r,name:l.includes(d)?o.favorite_true:o.favorite_false})},onClick:()=>{u(d),i({functionKey:"productEvents",data:{event:l.includes(d)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:c.current},commonData:{...e,...t}}})},style:{...n,border:"none"},variant:"tertiary"})};th.displayName="WishList.Toggle";const rh={Feedback:kc,Toggle:th,Grid:Zp,Init:eh},nh=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:n}=Kt(),{tags:o}=Cr(),i=e.offers.offers[0],c=U.getDiscountPercent(i.listPrice,i.price),l=o==null?void 0:o.flagDiscount;return s.jsxs(Ue.Wrapper,{type:"header",style:{zIndex:n.Z_INDEX_WAR.product_card_header},children:[c>0&&!t&&(l==null?void 0:l.enableTag)&&s.jsxs(p.Tag,{title:`${c}% ${l==null?void 0:l.tagText}`,variant:"quaternary",size:"small",style:{background:l==null?void 0:l.tagColor,color:l==null?void 0:l.tagTextColor},children:[c,"% ",l==null?void 0:l.tagText]}),t?s.jsx(p.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?s.jsx(p.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,n.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&s.jsx(rh.Toggle,{product:e,priceInfo:{price:i.price,listPrice:i.listPrice},variant:"card",ICONS:n.ICONS})]})};nh.displayName="ProductCard.Actions.Header";const sh=({className:e,children:t,hasPriority:r=!1,showVideo:n=!1,...o})=>{const{element:i,index:c,item:{image:l,slug:u,video:d},sendSelectItemEvent:h,order:m,CONSTANTS:_}=Kt(),g=U.getFirstImages({images:l,label:{first:_.MAIN_IMAGE,second:_.SECOND_IMAGE}});return s.jsxs("div",{...o,className:p.helpers.classNameConcat(mt["product-card--image"],e),ref:i,style:{aspectRatio:_.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[s.jsx(Ot,{href:`/${u}/p`,onClick:()=>{h()},onMouseUp:v=>{v.button===1&&h(),_.PLP_INFINITE_SCROLL&&sessionStorage.setItem(_.PLP_GRID_SCROLL_BACK.order,String(m))},children:s.jsx("div",{className:mt["product-card--image--container"],children:Array.isArray(g)&&g.map(({url:v,alternateName:x},S)=>j.createElement(at.Image,{..._.PRODUCT_IMAGE_DIMENSIONS.product_card,style:_.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:x??"product image",key:S,...r&&{priority:S===0&&c<4},objectFit:"cover",src:v}))})}),_.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&n&&d&&s.jsx(Ue.Video,{url:d,poster:g[0].url}),t]})};sh.displayName="ProductCard.Media.Media";const oh=({className:e,callback:t,children:r,...n})=>{const{isMobile:o,item:i,CONSTANTS:{PRODUCT_CARD_TEXTS:c}}=Kt(),{availability:{status:l}}=i;return l?null:s.jsxs("div",{...n,className:p.helpers.classNameConcat(mt["product-card--outstock"],e),children:[s.jsx(p.Tag,{size:"small",variant:"secondary",title:c.disabled,children:c.disabled}),s.jsx(p.Button,{className:p.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(i)},children:c.notify})]})};oh.displayName="ProductCard.OutStock";const ih=({children:e,className:t="",index:r,isMobile:n=!1,item:o,size:i,order:c,outStock:l,shelfTitle:u,CONSTANTS:d,...h})=>s.jsx(Px,{item:o,isMobile:n,outStock:l,order:c,size:i,index:r,shelfTitle:u,CONSTANTS:d,children:s.jsx("div",{...h,className:p.helpers.classNameConcat(mt["product-card--wrapper"],t),"data-size":i,children:e})});ih.displayName="ProductCard.Root";const ah=({disabled:e,label:t,size:r,value:n,onClick:o,...i})=>s.jsxs(p.ToggleSize.Wrapper,{...i,disabled:!1,outOfStock:e,size:r,onClick:o,children:[s.jsx(p.ToggleSize.DisabledAdornment,{}),s.jsx(p.ToggleSize.Text,{children:t})]});ah.displayName="ProductCard.SizeSelector.Item";const ch=({active:e=!1,callback:t,selectedSku:r=null,item:n,setNotify:o})=>{const{item:i,isMobile:c,setSelectedSku:l,eventDataRef:u}=Kt();n.productId=i.id;const d=U.disableSKU(n),h=U.getSKUName(n,"tamanho");!d&&!u.current.availableSkus.includes(h)&&u.current.availableSkus.push(h);const m=j.useCallback(g=>{const v=r===g?null:g;typeof l=="function"&&l(v),typeof t=="function"&&t(v)},[t,l,r]),_=j.useCallback(()=>{if(d&&typeof o=="function"){o(i,n);return}m(n)},[n,o,m,d,i]);return s.jsx(ah,{active:e,disabled:d,label:h,onClick:()=>_(),size:c?"x-small":"small",value:n})};ch.displayName="ProductCard.SizeSelector.SkuItem";const lh=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((n,o)=>{const i=t(n).toUpperCase(),c=t(o).toUpperCase(),l=r.indexOf(i)-r.indexOf(c);return l!==0?l:i.localeCompare(c,"pt-BR")}):[],uh=({callback:e,className:t="",children:r,setNotify:n,PLP_SIZE_ORDER:o,...i})=>{const{isMobile:c,item:{isVariantOf:{hasVariant:l}},selectedSku:u}=Kt(),d=j.useMemo(()=>Array.isArray(l)?lh({items:l,getLabel:h=>U.getSKUName(h,"tamanho"),PLP_SIZE_ORDER:o}):[],[l]);return s.jsxs("div",{...i,className:p.helpers.classNameConcat(mt["product-card--selectors--size"],t),"data-mobile":c,children:[s.jsx("div",{className:mt["product-card--selectors--size--skus"],children:d.map((h,m)=>s.jsx(ch,{active:u===h,callback:e,item:h,selectedSku:u,setNotify:n},`size--${m}--${h.sku}`))}),s.jsx("div",{className:mt["product-card--selectors--size--button"],children:r})]})};uh.displayName="ProductCard.SizeSelector";const $a=({alt:e="",callback:t,more:r,total:n=4,src:o,url:i,...c})=>s.jsxs(p.ToggleStyle.Wrapper,{...c,onClick:()=>{typeof t=="function"&&t(i)},children:[s.jsx(p.ToggleStyle.DisabledAdornment,{}),s.jsxs(p.ToggleStyle.Texture,{children:[o&&s.jsx(at.Image,{alt:e??o,src:o,height:34,width:34}),r&&s.jsx(p.TextStructure.DivWrapper,{className:mt["product-card--selectors--style--more"],children:s.jsxs("p",{children:["+ ",n]})})]})]}),ob=({children:e,callback:t,data:r,total:n=4,size:o,...i})=>{const{index:c}=Kt(),{triggerSelectItemEventRef:l}=Ee();return s.jsxs("div",{...i,children:[e,Array.isArray(r)&&r.slice(0,n).map((u,d)=>s.jsx($a,{callback:h=>{l.current.trigger=!0,l.current.index=c,typeof t=="function"&&t(h)},src:(u==null?void 0:u.textureImage)??"",alt:u==null?void 0:u.textureAlt,url:u==null?void 0:u.slug,size:o},d)),Array.isArray(r)&&(r==null?void 0:r.length)>n&&s.jsx($a,{size:o,total:r.length-n,more:!0})]})},dh=({callback:e,className:t,data:r,images:n=[],findTexture:o,...i})=>{const{CONSTANTS:c}=Kt(),l=o||c.TEXTURE_IMAGE,u=n==null?void 0:n.find(d=>l.includes(d.alternateName));return s.jsx(ob,{...i,callback:e,className:p.helpers.classNameConcat(mt["product-card--selectors--style"],t),data:r,size:"x-small",children:u&&s.jsx($a,{active:!0,size:"x-small",src:u.url})})};dh.displayName="ProductCard.StyleSelector";const fh=({className:e,hasDecimal:t,...r})=>{const{isMobile:n,item:{offers:{lowPrice:o,highPrice:i},installments:{count:c,value:l}},eventDataRef:u}=Kt();u.current.priceInfo={price:o,listPrice:i};const d=U.formatPriceToCurrency(i,t),h=U.formatPriceToCurrency(o,t),m=U.formatPriceToCurrency(l??0),_=n?"horizontal":"stacked";return s.jsx("div",{...r,className:p.helpers.classNameConcat(mt["product-card--price"],e),"data-mobile":n,children:s.jsx(p.ProductInfo.Root,{size:"small",layout:_,children:s.jsxs(p.ProductInfo.Wrapper,{size:"small",layout:_,children:[s.jsx(p.ProductInfo.ValuesWrapper,{children:h!==d?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:d,size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:h,size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:h,size:"small"})}),c&&c>1&&l?s.jsx(p.ProductInfo.Price,{label:"installment",value:`${c}x ${m}`,size:"small"}):null]})})})};fh.displayName="ProductCard.Price";const ph=({tag:e,className:t})=>{const{item:{name:r}}=Kt();return s.jsxs("div",{className:p.helpers.classNameConcat(mt["product-card--title"],t),children:[s.jsx("div",{className:mt["product-card--title--tag"],children:e?s.jsx(p.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?s.jsx(p.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):s.jsx("div",{})}),s.jsx("div",{className:mt["product-card--title--content"],children:r&&s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h3",{children:r})})})})]})};ph.displayName="ProductCard.Title";const hh=({className:e,url:t,poster:r,...n})=>{const{element:o}=Kt();return j.useEffect(()=>{if(!(o!=null&&o.current))return;const i=o.current,c=i.querySelector("video");if(c){const l=new IntersectionObserver(h=>{h.forEach(m=>{U.setVideoPlay(m.isIntersecting,c,t)})},{root:null,rootMargin:"0px",threshold:.5}),u=()=>{c.setAttribute("data-loaded","true")},d=()=>{i&&(l.observe(i),c.addEventListener("loadeddata",u))};return document.readyState==="complete"?d():window.addEventListener("load",d),()=>{l.disconnect(),window.removeEventListener("load",d)}}return()=>null},[t,o]),s.jsx("div",{...n,className:p.helpers.classNameConcat(mt["product-card--video"],e),children:t&&s.jsx(at.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};hh.displayName="ProductCard.Media.Video";const mh=({children:e,className:t,type:r,...n})=>s.jsx("div",{...n,className:p.helpers.classNameConcat(mt[`product-card--${r}`],t),children:e});mh.displayName="ProductCard.Wrapper";const Ue={Actions:zp,BuyButton:qp,Header:nh,Media:sh,Root:ih,OutStock:oh,Price:fh,SizeSelector:uh,StyleSelector:dh,Title:ph,Video:hh,Wrapper:mh},ib="_carousel_1egdv_1",ab="_shelf__container_1egdv_14",cb="_shelf_without_carousel_1egdv_34",lb="_card_container_1egdv_57",Dn={carousel:ib,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:ab,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:cb,card_container:lb},Uu=({title:e})=>s.jsx("div",{className:Dn.shelf__container,children:e&&s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-body-md",U.responsive["responsive-mobile-flex"]),children:e}),s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-heading-md",U.responsive["responsive-desktop-flex"]),children:e})]})})}),ub=({children:e,ICONS:t,itemsPerPage:r,title:n})=>{const{isMobile:o}=xe(),i=r[o?"mobile":"desktop"],{initialize:c,controller:l,itemsStyles:u,pagination:d}=p.Carousel.useCarousel({itemsPerPage:i,gap:10,loop:!0,direction:"row"}),h=j.Children.toArray(e).length;return o||h>=4?s.jsxs(p.Carousel.Root,{innerRef:_=>{c(_)},className:Dn.carousel,children:[s.jsxs("div",{className:Dn["custom-controllers"],children:[n&&s.jsx(Uu,{title:n}),i<h&&s.jsxs(p.Carousel.Controller,{className:Dn["controllers-arrows-bullets"],children:[s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:s.jsx(p.Icon,{name:t.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:s.jsx(p.Icon,{name:t.arrow_right})}})]}),!o&&i>2&&s.jsx(p.Carousel.Bullets,{page:d.currentPage,total:d.totalPages,onBulletClick:_=>l==null?void 0:l.navigateTo(_)})]})]}),s.jsx(p.Carousel.Body,{children:j.Children.map(e,(_,g)=>s.jsx(p.Carousel.Item,{style:{...u,overflow:"hidden"},children:_},`${n}_${g}`))})]}):s.jsxs(s.Fragment,{children:[n&&s.jsx(Uu,{title:n}),s.jsx("div",{className:Dn.shelf_without_carousel,children:e})]})},_h=({className:e,item:t,isMobile:r,size:n,shelfTitle:o,...i})=>{const c=j.useRef(null),{getAvailableProductTag:l}=Cr(),{availability:{status:u}}=t,d=m=>{const _=m.filter(g=>!i.CONSTANTS.TEXTURE_IMAGE.includes(g.keywords));return r?_.splice(0,2):_},h=l(t.cluster.highlights);return s.jsx("div",{ref:c,className:Dn.card_container,children:s.jsxs(Ue.Root,{...i,item:{...t,image:d(t.image)},isMobile:r,size:r?"small":"medium",outStock:!u,shelfTitle:o,children:[s.jsx(Ue.Header,{product:t,tag:h==null?void 0:h.commercial}),s.jsx(Ue.Media,{}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:h==null?void 0:h.institucional}),s.jsx(Ue.Actions,{})]}),s.jsx(Ue.Wrapper,{type:"footer"})]})})};_h.displayName="ProductList.Card";const Ps={Shelf:ub,Card:_h},gh=({CONSTANTS:e,inView:t,products:r,innerRef:n})=>{const o=j.useMemo(()=>wx(r),[r]),{isMobile:i}=xe(),{addItemsToCart:c}=Xe(),{sendDataLayerEvent:l}=Ee(),{getAvailableProductTag:u}=Cr(),[d,h]=j.useState({totalPrice:0,products:{}}),m=()=>{const g=Object.values(d.products);c(g),l({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:g.map(v=>{const x=o.find(S=>S.node.id===v.productId);return x==null?void 0:x.node})},supportData:{selectedSkus:g,price:d.totalPrice}}})},_=({selectedProduct:g,productId:v})=>{const x=Ex({selectedProduct:g,productId:v,prevState:d,mainSellerId:e.StoreConfig_MainSellerId});h(x)};return j.useEffect(()=>{if(!t||o.length===0)return;const g=e.BUY_PACKAGE.header.title;l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:g},outsideEcommerceData:{item_list_name:g}}})},[t]),s.jsxs("div",{className:kr.container,ref:n,children:[s.jsx("div",{className:kr["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:s.jsx(Ps.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:g},v)=>{var w,I,P;const x=u(g.cluster.highlights),{availability:{status:S}}=g;return S?s.jsxs(Ue.Root,{item:{...g,image:Tc.helpers.product.getFirstImages({images:g.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:i,size:"medium",index:v,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[s.jsx(Ue.Header,{product:g,tag:x.commercial}),s.jsx(Ue.Media,{}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:{value:(w=x.institucional)==null?void 0:w.value,enableIcon:(I=x.institucional)==null?void 0:I.enableIcon,icon:(P=x.institucional)==null?void 0:P.icon}}),s.jsx(Ue.Actions,{children:s.jsx(Ue.SizeSelector,{callback:C=>_({selectedProduct:C,productId:g.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},g.id):null})})}),s.jsx("div",{className:kr["add-cart-container"],children:s.jsx(Cx,{handleAddAllToCart:m,selectedProducts:d,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},zc={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},qc=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=Xe(),{handleSelectContent:n}=Ee(),{CONSTANTS:o}=Ze(),i=r.reduce((c,l)=>c+(l.quantity??0),0);return s.jsx(p.Header.SupportItem,{onClick:()=>{t(!0),n({content:"header:minicart"})},id:e,children:s.jsxs(p.Badge.AutoPositioner,{children:[s.jsx(p.Badge.Count,{count:i,size:"medium",variant:"primary",style:{backgroundColor:"black",display:i>0?"flex":"none"}}),s.jsx(p.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};qc.displayName="Header.Bag";const gn=({children:e,href:t,...r})=>t&&t!=="#"?s.jsx(Ot,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,yh=()=>{const{headerData:e}=Ze(),{handleSelectContent:t}=Ee(),{reset:r,updateValue:n}=Ls(),o=i=>{i?n(i):r()};return s.jsx(p.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((i,c)=>s.jsx(gn,{href:i.link,onMouseEnter:()=>o(i.submenuId),onFocus:()=>o(i.submenuId),children:s.jsx(p.Header.CategoryItem,{className:zc["btn-header"],value:i.submenuId??null,adornment:{start:s.jsx(p.Icon,{name:i.iconStart}),end:s.jsx(p.Icon,{name:i.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${i.label}`})},children:i.label})},`category-${i.label}-${c}`))})};yh.displayName="Header.Categories";function db(){const{handleSelectContent:e}=Ee(),{CONSTANTS:t}=Ze(),{setValue:r}=Wo();return s.jsx(p.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:s.jsx(p.Icon,{name:t.header.ICONS.search,size:"medium"})})}const fb={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},pb={"observer-wrapper":"_observer-wrapper_r43gk_1"},Yo=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:n,stopOnIntersection:o=!0,className:i,...c})=>{const l=j.useRef(null),u=hc(l,o,r),{sendDataLayerEvent:d}=Ee();return j.useEffect(()=>{u&&(typeof n=="function"&&n(),t&&d({...t}))},[u]),s.jsx("div",{...c,ref:l,className:p.helpers.classNameConcat(pb["observer-wrapper"],i),children:e})},vh=({thumbnails:e,category:t,isMobile:r=!0,callBack:n})=>{const{handleSelectPromotionEvent:o}=Ee(),i=50/e.length;return s.jsx("div",{className:fb["menu-subcategories-container"],children:e.map((c,l)=>{const u=r?c.srcMobile:c.srcDesk;if(!u)return null;const d={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${l+1}`,promotion_id:u,promotion_name:c.promotion_name};return s.jsx(Yo,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...d}}}},observerOptions:{delay:1e3},children:s.jsxs(Ot,{href:c.link??"#",onClick:()=>{typeof n=="function"&&n(),o({updatePromotionRef:!0,promotion:d})},children:[s.jsx(at.Image,{src:u,alt:c.label??u,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${i}vw`}),c.label&&s.jsx("p",{children:c.label})]})},`thumb-${c.label}-${l}`)})})};vh.displayName="Menu.Thumbnail";const ko={"menu-desktop":"_menu-desktop_c3fq0_1","menu-categories":"_menu-categories_c3fq0_12","menu-categories--see-all":"_menu-categories--see-all_c3fq0_30"},xh=({children:e,dividerOnRight:t=!0,subMenu:r,...n})=>{var u;const{router:o}=Ae(),{reset:i}=Ls(),{handleSelectContent:c}=Ee(),{CONSTANTS:l}=Ze();return s.jsxs("div",{...n,className:ko["menu-categories"],children:[(u=r==null?void 0:r.subCategories)==null?void 0:u.map((d,h)=>{var g,v,x,S;const m=d.listCollapseDesk&&!((g=d.see_all)!=null&&g.link)?{expandAfterRowsQty:d.rowsToShowDesk}:{},_=d.listCollapseDesk&&!((v=d.see_all)!=null&&v.link)?{expansivesAdornments:{open:l.header.ICONS.add,close:l.header.ICONS.minus},expansivesLabels:{open:l.header.COMPONENT_LIST.listExpandLabel,close:l.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:"";return s.jsxs(p.ComponentList.Structure,{children:[s.jsx(gn,{href:d.linkLabel,title:d.label,onClick:()=>{d.linkLabel&&(i(),c({content:`menu:${d.label??""}:${r.label??""}`}))},children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{children:d.label})})})}),s.jsx(p.ComponentList.List,{columns:1,...m,className:ko["submenu-categories"],children:(x=d.items)==null?void 0:x.map((w,I)=>s.jsx(p.ComponentList.ListItem,{id:`list-item-${w.label}-${I}`,children:s.jsx(wt,{href:w.link??"#",size:"x-small",title:w.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{i(),c({content:`menu:${d.label??""}:${w.label??""}:${r.label??""}`})},children:w.label})},`list-item-${w.label}-${I}`))}),((S=d.see_all)==null?void 0:S.link)&&s.jsx(gn,{href:d.see_all.link,title:d.see_all.link,onClick:()=>{var w;(w=d.see_all)!=null&&w.link&&(i(),c({content:`menu:${d.label??""}:${r.label}`}),o.push(d.see_all.link))},children:s.jsx(p.TextStructure.Root,{..._,children:s.jsxs("span",{className:ko["menu-categories--see-all"],children:[d.see_all.link&&d.see_all.label,s.jsx(p.Icon,{name:l.header.ICONS.arrow_right,size:"small"})]})})})]},`list-${d.label}-${h}`)}),t&&s.jsx(p.Utils.Divider,{size:"small",direction:"vertical"})]})};xh.displayName="Menu.Categories";const bh=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:n}=Ze();return s.jsxs(s.Fragment,{children:[s.jsx("div",{...r,className:ko["menu-desktop"],style:{...r.style,justifyContent:n.header.ALIGNMENT_MENU},children:e}),t&&s.jsx(p.Utils.Divider,{size:"small"})]})};bh.displayName="Menu.MenuRoot";const ea={Root:bh,Categories:xh,Thumbnail:vh},jh=()=>{const{headerData:e,CONSTANTS:t}=Ze(),r=df(),{reset:n}=Ls();return s.jsx(p.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,i)=>{const{thumbnails:c,label:l,id:u}=o,d=u===r,h=c==null?void 0:c.some(m=>!!m.srcDesk);return s.jsxs(ea.Root,{id:u,style:d?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:d,children:[s.jsx(ea.Categories,{dividerOnRight:!!h,subMenu:o}),Array.isArray(c)&&s.jsx(ea.Thumbnail,{thumbnails:c,isMobile:!1,category:l,callBack:n})]},`submenu-${u}-${i}`)})})};jh.displayName="Header.SubMenu";const Sh=()=>{const{handleSelectContent:e}=Ee(),{CONSTANTS:t}=Ze();return s.jsx(Ot,{href:"/favoritos",children:s.jsx(p.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:s.jsx(p.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};Sh.displayName="Header.WishList";const hb="_root_im5yf_125",Wt={"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:hb},Ch=({className:e,children:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Wt["user-menu--content"],e),children:t});Ch.displayName="UserMenu.Content";var wh=(e=>(e.Account="account",e))(wh||{});const Eh=({className:e,cashBack:t,credits:r,link:n,total:o,...i})=>{const c=t?U.formatPriceToCurrency(t):void 0,l=r?U.formatPriceToCurrency(r):void 0,u=o?U.formatPriceToCurrency(o):void 0;return s.jsx(p.Credits.Account,{...i,className:p.helpers.classNameConcat(Wt["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:c,creditsValue:l,linkMore:n,totalValue:u,type:wh.Account})};Eh.displayName="UserMenu.Credits";const Ph=({className:e,children:t,description:r,text:n,...o})=>{const{isMobile:i}=xe();return s.jsx("div",{...o,className:p.helpers.classNameConcat(Wt["user-menu--login"],e),"data-mobile":i,children:s.jsxs("div",{className:Wt["user-menu--login--content"],children:[s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[s.jsx("h3",{className:"typography-style-body-lg-strong",children:n}),s.jsx("p",{children:r})]})}),t]})})};Ph.displayName="UserMenu.Login";const Ih=({className:e,isLogged:t,onLogoutClick:r,storeConfig:n,isMobile:o,LOGOUT_TEXT:i,LOGOUT_ICON:c,LOGIN_MENU_OPTIONS_ARRAY:l})=>{const u=o?l:l.filter(d=>d.deviceShown==="both"||d.deviceShown===(o?"mobile":"desktop"));return s.jsxs("ul",{className:p.helpers.classNameConcat(Wt["user-menu--menu"],e),children:[Array.isArray(u)&&u.map((d,h)=>s.jsx("li",{children:s.jsx(wt,{href:d.href??"#",size:"small",disableUnderline:!0,adornments:{start:s.jsx(p.Icon,{name:d.icon??"delete"})},children:d.label})},h)),t?s.jsx("li",{children:s.jsx(wt,{href:`${n.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${n.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:s.jsx(p.Icon,{name:c})},children:i})}):s.jsx(s.Fragment,{})]})};Ih.displayName="UserMenu.Menu";const Nh=e=>{const t=j.useRef(null),r=j.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),n=j.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),o=j.useCallback(i=>{i.key==="Escape"&&e()},[e]);return j.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",n)}),[r,o,n]),{ref:t}},mb=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},_b=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:n,left:o,top:i,width:c}=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=e!=null&&e.parentElement?mb(e==null?void 0:e.parentElement):0;return{left:o+c/2-(l.width+u*2),top:i+n+r}},Rh=j.createContext({}),gb=({children:e,delay:t=600,gap:r=20,isOpen:n,setIsOpen:o,target:i,...c})=>{const l=j.useRef(null),[u,d]=j.useState(!1),[h,m]=j.useState({left:0,top:0}),{ref:_}=Nh(()=>{d(!0),typeof window<"u"&&(l.current=window.setTimeout(()=>{o(!1),d(!1)},t))});return j.useEffect(()=>{if(i&&(_!=null&&_.current)){const{left:g,top:v}=_b(_.current,i,r??0);m({left:g,top:v}),d(!1)}},[r,n,i,_]),s.jsx(Rh.Provider,{value:j.useMemo(()=>({...c,...h,contentRef:_,isLeaving:u,isOpen:n,setIsOpen:o,setIsLeaving:d,target:i}),[c,h,_,u,n,o,d,i]),children:e})},Th=()=>{const e=j.useContext(Rh);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},Oh=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:n,setIsOpen:o}=Th();return s.jsxs(p.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:n,setIsOpen:o,variant:"sideBottom",className:Wt["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[s.jsx(p.Modal.Header,{navigation:"top",className:Wt["modal-header-modifier"],children:s.jsx(p.Modal.Controls,{navigation:"top",isMobile:!0,className:Wt["modal-controls-modifier"]})}),s.jsx(p.Modal.Body,{children:e})]})};Oh.displayName="UserMenu.Modal";const Ah=({children:e,component:t,Z_INDEX_WAR:r,isMobile:n,...o})=>s.jsx(gb,{...o,className:Wt.root,children:n?s.jsxs(s.Fragment,{children:[s.jsx(Ar.Modal,{Z_INDEX_WAR:r,children:t}),e]}):s.jsx(Ar.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});Ah.displayName="UserMenu.Root";const kh=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:i,isLeaving:c,isOpen:l,top:u}=Th();return s.jsx(p.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),className:p.helpers.classNameConcat(Wt["user-menu--tooltip"],Wt["tooltip-modifier"]),isLeaving:c,isOpen:l,left:i,size:"medium",position:"top",top:u,style:{zIndex:r.user_menu},children:s.jsx("div",{className:Wt["user-menu--tooltip"],children:e})})};kh.displayName="UserMenu.Tooltip";const Ar={Credits:Eh,Content:Ch,Login:Ph,Menu:Ih,Modal:Oh,Root:Ah,Tooltip:kh},Xo=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:n,mobileUserMenuTarget:o,storeConfig:i})=>{var g,v,x;const{isMobile:c}=xe(),{CONSTANTS:l}=Ze(),u=ss(),d=()=>{window.location.href=`${i.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},h=!!((g=u.user)!=null&&g.userId),{cashback:m,credits:_}=j.useMemo(()=>{var S,w;return{credits:((S=u==null?void 0:u.getCurrentCredits())==null?void 0:S.credits)??0,cashback:((w=u==null?void 0:u.getCurrentCredits())==null?void 0:w.cashback)??0}},[u]);return s.jsx(Ar.Root,{component:s.jsxs(Ar.Content,{children:[s.jsx(Ar.Login,{description:l.session.LOGIN_MENU_DESCRIPTION(h),text:l.session.LOGIN_MENU_TITLE(h,((v=u==null?void 0:u.user)==null?void 0:v.firstName)??((x=u==null?void 0:u.user)==null?void 0:x.email)),children:!h&&s.jsx(p.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>d(),children:l.header.MENU_INFO.login.button_text})}),_+m&&h?s.jsx(Ar.Credits,{credits:_,cashBack:m,link:`${i.secureSubdomain}/account#/meus-creditos`,total:_+m}):s.jsx(s.Fragment,{}),s.jsx(p.Utils.Divider,{}),s.jsx(Ar.Menu,{ICONS:l.header.ICONS,storeConfig:i,isLogged:h,className:U.responsive["responsive-desktop-flex"],onLogoutClick:()=>u.logout(),LOGOUT_TEXT:l.session.LOGOUT_TEXT,LOGOUT_ICON:l.session.LOGOUT_ICON,LOGIN_MENU_OPTIONS_ARRAY:l.session.LOGIN_MENU_OPTIONS_ARRAY}),s.jsx(Ar.Menu,{ICONS:l.header.ICONS,storeConfig:i,isMobile:!0,isLogged:h,className:U.responsive["responsive-mobile-flex"],onLogoutClick:()=>u.logout(),LOGOUT_TEXT:l.session.LOGOUT_TEXT,LOGOUT_ICON:l.session.LOGOUT_ICON,LOGIN_MENU_OPTIONS_ARRAY:l.session.LOGIN_MENU_OPTIONS_ARRAY})]}),isOpen:t,isMobile:c,setIsOpen:r,target:c?o:n,Z_INDEX_WAR:l.header.Z_INDEX_WAR,children:e})};Xo.displayName="UserMenu";const Mh=({storeConfig:e})=>{const{CONSTANTS:t}=Ze(),{handleSelectContent:r}=Ee(),{reset:n}=Ls(),{setValue:o}=yc(),i=gc(),c=j.useRef(null);return s.jsxs(s.Fragment,{children:[s.jsxs(p.Header.Wrapper,{className:"header-desktop-wrapper",children:[s.jsx(p.Header.Logo,{style:{width:"100%"},children:s.jsx(Ot,{href:"/",onMouseEnter:n,children:s.jsx(p.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),s.jsx(yh,{}),s.jsxs(p.Header.Support,{onMouseEnter:n,style:{justifyContent:"flex-end"},children:[s.jsx(db,{}),s.jsx(Xo,{isOpen:i,setIsOpen:o,desktopUserMenuTarget:c.current,storeConfig:e,children:s.jsx(p.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:zc["btn-login"],innerRef:c,children:s.jsx(p.Icon,{name:t.header.ICONS.person,size:"medium"})})}),s.jsx(Sh,{}),s.jsx(qc,{id:"cart-button"})]})]}),s.jsx(jh,{})]})};Mh.displayName="Header.HeaderDesktopWrapper";const Tt={"menu--banners":"_menu--banners_1cg51_1","menu--banners--item":"_menu--banners--item_1cg51_6","menu--banners--item--text":"_menu--banners--item--text_1cg51_17","menu--banners--list":"_menu--banners--list_1cg51_21","menu--dummy-close":"_menu--dummy-close_1cg51_46","menu--body":"_menu--body_1cg51_54","menu--categories":"_menu--categories_1cg51_67","menu--categories--title":"_menu--categories--title_1cg51_80","menu--categories--see-all":"_menu--categories--see-all_1cg51_92","menu--step":"_menu--step_1cg51_101","menu--sub-category":"_menu--sub-category_1cg51_117","menu--sub-category--item":"_menu--sub-category--item_1cg51_124","menu--sub-category--list":"_menu--sub-category--list_1cg51_130"},Lh=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:n,submenuId:o,label:i,...c})=>s.jsx("button",{...c,className:Tt["menu--banners--item"],children:r?s.jsxs(p.Banner.Container,{children:[s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),s.jsx(p.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Tt["menu--banners--item--text"],children:s.jsx("h2",{className:"typography-style-body-xs",style:n?{color:n}:{},children:e})})})})]}):s.jsx("h2",{...c,children:e})});Lh.displayName="Menu.Mobile.Category";const Dh=({label:e,...t})=>{const{CONSTANTS:r}=Ze();return s.jsx(p.Button,{...t,adornment:{end:s.jsx(p.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};Dh.displayName="Menu.Mobile.Body.Category";const Fh=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>s.jsx("div",{...n,className:Tt["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,i)=>s.jsx(wt,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},i)))});Fh.displayName="Menu.Mobile.List";const zh=({current:e,onHandleOut:t})=>{var r;return e?s.jsx("div",{className:Tt["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((n,o)=>s.jsxs("div",{className:Tt["menu--sub-category--item"],children:[s.jsx(js.Title,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id}),s.jsx(js.List,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id})]},o)))}):s.jsx(s.Fragment,{})};zh.displayName="Menu.Mobile.Body.SubCategory";const qh=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>{var l;const{router:o}=Ae(),{handleSelectContent:i}=Ee(),{CONSTANTS:c}=Ze();return s.jsxs("div",{...n,className:Tt["menu--categories--title"],children:[s.jsx(gn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{i({content:`menu:${e.label??""}:${t}`})},children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-md",style:e!=null&&e.linkLabel?{cursor:"pointer"}:void 0,children:e==null?void 0:e.label})})})}),((l=e==null?void 0:e.see_all)==null?void 0:l.link)&&s.jsx(gn,{href:e.see_all.link,title:e.see_all.link,onClick:()=>{var u;r(e.label,t),(u=e==null?void 0:e.see_all)!=null&&u.link&&o.push(e.see_all.link)},children:s.jsx(p.TextStructure.Root,{children:s.jsxs("span",{className:Tt["menu--categories--see-all"],children:[e.see_all.label,s.jsx(p.Icon,{name:c.header.ICONS.arrow_right,size:"small"})]})})})]})};qh.displayName="Menu.Mobile";const js={Banner:Lh,Category:Dh,List:Fh,SubCategory:zh,Title:qh},Bh=j.createContext({}),yb=({children:e})=>{const[t,r]=j.useState(null),n=j.useCallback(()=>{r(null)},[]),o=i=>{i!==t&&r(i)};return s.jsx(Bh.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:n,handleChangeSubMenuOpened:o},children:e})},Uh=()=>j.useContext(Bh),Hh=e=>{const{router:t}=Ae(),{headerData:r}=Ze(),{handleSelectContent:n}=Ee(),{currentCategory:o,setCurrentCategory:i}=Uh(),c=j.useRef(null),l=()=>{if(c.current){const g=c.current;g&&(i(null),g==null||g.click())}},u=(g,v)=>{n({content:`menu:${g}`}),t.push(v),l()},d=(g,v)=>{n({content:`menu:${g}:${v}`}),l()},h=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],m=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],_=g=>{g.submenuId?i(g.submenuId):u(g.label,g.link)};return s.jsxs("div",{...e,className:Tt["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[s.jsx("button",{className:Tt["menu--dummy-close"],ref:c,"data-close":!0}),s.jsxs("div",{className:Tt["menu--step"],"data-active":"true",children:[s.jsx("div",{className:Tt["menu--banners"],children:s.jsx("div",{className:Tt["menu--banners--list"],children:h.map((g,v)=>j.createElement(js.Banner,{...g,key:v,onClick:()=>u(g.label,g.link)},g.mobileBannerAlt))})}),s.jsx("div",{className:Tt["menu--categories"],children:h.map((g,v)=>s.jsx(js.Category,{label:g.label,onClick:()=>_(g)},v))})]}),s.jsx("div",{className:Tt["menu--step"],"data-active":!!o,children:s.jsx(js.SubCategory,{current:m.find(g=>g.id===o),onHandleOut:d})})]})};Hh.displayName="Menu.Mobile.Body";const vb={"menu--header":"_menu--header_1ozdf_1"},$h=()=>{var o;const{headerData:e}=Ze(),{currentCategory:t,setCurrentCategory:r}=Uh(),n=(o=e==null?void 0:e.categories)==null?void 0:o.find(i=>i.submenuId===t);return s.jsxs("div",{className:vb["menu--header"],children:[s.jsx(p.Button,{"data-out":!n,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),n&&s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{alignContent:"center",children:s.jsx("h2",{className:"typography-style-body-lg",children:n==null?void 0:n.label})})}),s.jsx(p.Button,{iconNameStart:"close","data-close":!0,"data-only":!n,mode:"inverse",onClick:()=>r(null)})]})};$h.displayName="Menu.Mobile.Header";var Wa={exports:{}};function xb(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 ta={},ra={},Hu;function bb(){return Hu||(Hu=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="LoadableContext")}(ra)),ra}var $u;function jb(){return $u||($u=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return g}});const r=Ct._(j),n=bb();function o(v){return v&&v.default?v.default:v}const i=[],c=[];let l=!1;function u(v){let x=v(),S={loading:!0,loaded:null,error:null};return S.promise=x.then(w=>(S.loading=!1,S.loaded=w,w)).catch(w=>{throw S.loading=!1,S.error=w,w}),S}function d(v,x){let S=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},x),w=null;function I(){if(!w){const N=new h(v,S);w={getCurrentValue:N.getCurrentValue.bind(N),subscribe:N.subscribe.bind(N),retry:N.retry.bind(N),promise:N.promise.bind(N)}}return w.promise()}if(typeof window>"u"&&i.push(I),!l&&typeof window<"u"){const N=S.webpack&&typeof xb.resolveWeak=="function"?S.webpack():S.modules;N&&c.push(T=>{for(const O of N)if(T.includes(O))return I()})}function P(){I();const N=r.default.useContext(n.LoadableContext);N&&Array.isArray(S.modules)&&S.modules.forEach(T=>{N(T)})}function C(N,T){P();const O=r.default.useSyncExternalStore(w.subscribe,w.getCurrentValue,w.getCurrentValue);return r.default.useImperativeHandle(T,()=>({retry:w.retry}),[]),r.default.useMemo(()=>O.loading||O.error?r.default.createElement(S.loading,{isLoading:O.loading,pastDelay:O.pastDelay,timedOut:O.timedOut,error:O.error,retry:w.retry}):O.loaded?r.default.createElement(o(O.loaded),N):null,[N,O])}return C.preload=()=>I(),C.displayName="LoadableComponent",r.default.forwardRef(C)}class h{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:x,_opts:S}=this;x.loading&&(typeof S.delay=="number"&&(S.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},S.delay)),typeof S.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},S.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(w=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(x){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...x},this._callbacks.forEach(S=>S())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(x){return this._callbacks.add(x),()=>{this._callbacks.delete(x)}}constructor(x,S){this._loadFn=x,this._opts=S,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function m(v){return d(u,v)}function _(v,x){let S=[];for(;v.length;){let w=v.pop();S.push(w(x))}return Promise.all(S).then(()=>{if(v.length)return _(v,x)})}m.preloadAll=()=>new Promise((v,x)=>{_(i).then(v,x)}),m.preloadReady=v=>(v===void 0&&(v=[]),new Promise(x=>{const S=()=>(l=!0,x());_(c,v).then(S,S)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=m.preloadReady);const g=m}(ta)),ta}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,m){for(var _ in m)Object.defineProperty(h,_,{enumerable:!0,get:m[_]})}r(t,{default:function(){return d},noSSR:function(){return u}});const n=Ct,o=s,i=n._(jb()),c=typeof window>"u";function l(h){return{default:(h==null?void 0:h.default)||h}}function u(h,m){if(delete m.webpack,delete m.modules,!c)return h(m);const _=m.loading;return()=>(0,o.jsx)(_,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function d(h,m){let _=i.default,g={loading:S=>{let{error:w,isLoading:I,pastDelay:P}=S;if(!P)return null;if(process.env.NODE_ENV!=="production"){if(I)return null;if(w)return(0,o.jsxs)("p",{children:[w.message,(0,o.jsx)("br",{}),w.stack]})}return null}};h instanceof Promise?g.loader=()=>h:typeof h=="function"?g.loader=h:typeof h=="object"&&(g={...g,...h}),g={...g,...m};const v=g.loader,x=()=>v!=null?v().then(l):Promise.resolve(l(()=>null));return g.loadableGenerated&&(g={...g,...g.loadableGenerated},delete g.loadableGenerated),typeof g.ssr=="boolean"&&!g.ssr?(delete g.webpack,delete g.modules,u(_,g)):_({...g,loader: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)})(Wa,Wa.exports);var Sb=Wa.exports,Cb=Sb;const Wh=U.getDefaultExportFromCjs(Cb),Bo={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Vh=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=jc(),{CONSTANTS:n}=Ze();return s.jsxs(p.Modal.RootWithoutPortal,{className:p.helpers.classNameConcat(Bo["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:n.header.Z_INDEX_WAR.menu_mobile},children:[s.jsx($h,{}),s.jsx(p.Modal.Body,{className:Bo["menu--root"],children:e})]})};Vh.displayName="Menu.MenuRoot";const wb=Wh(()=>Promise.resolve(Vh),{ssr:!1}),Gh=({children:e,last:t=!1,...r})=>s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&s.jsx(p.Utils.Divider,{direction:"vertical",size:"small",className:Bo.divider})]});Gh.displayName="Menu.NavigationBarItem";const Kh=()=>{const{setUserMenuIsOpen:e}=jc(),{handleSelectContent:t}=Ee(),{CONSTANTS:r}=Ze(),{router:n}=Ae(),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"}),n.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"}),n.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return s.jsx(p.Card,{id:"menu-navigationbar",shadow:!0,className:Bo["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((i,c)=>j.createElement(Gh,{...i,key:c},i.text))})};Kh.displayName="Menu.NavigationBar";const na={Body:Hh,NavigationBar:Kh,Root:wb},Qh=({storeConfig:e})=>{const t=j.useRef(null),{CONSTANTS:r}=Ze(),{MENU_NAVIGATION_BAR_ALLOWED:n,ICONS:o}=r.header,{handleSelectContent:i}=Ee(),{setValue:c}=Wo(),{setValue:l}=hf(),{setValue:u}=yc(),d=gc(),h=pf(),{isMobile:m}=xe();return s.jsxs(s.Fragment,{children:[s.jsxs(p.Header.Wrapper,{className:"header-mobile-wrapper",children:[s.jsx(p.Header.Logo,{style:{width:"100%"},children:s.jsx(Ot,{href:"/",children:s.jsx(p.Icon,{name:o.logo,size:"x-large",onClick:()=>{i({content:"header:logo"})}})})}),s.jsxs(p.Header.Support,{children:[s.jsx(p.Header.SupportItem,{onClick:()=>{c(!0),i({content:"header:search"})},children:s.jsx(p.Icon,{name:o.search,size:"medium"})}),s.jsx(qc,{}),s.jsxs(p.Header.SupportItem,{onClick:()=>l(!0),children:[s.jsx("span",{ref:t}),s.jsx(p.Icon,{name:o.menu,size:"medium"})]})]})]}),m&&s.jsx(Nf,{menuIsOpen:h,setMenuIsOpen:l,userMenuIsOpen:h,setUserMenuIsOpen:u,children:s.jsx(Xo,{storeConfig:e,isOpen:d,setIsOpen:u,mobileUserMenuTarget:t==null?void 0:t.current,children:s.jsxs(na.Root,{children:[s.jsx(na.Body,{}),n?s.jsx(na.NavigationBar,{}):s.jsx(s.Fragment,{})]})})})]})};Qh.displayName="Header.HeaderMobileWrapper";const Eb=j.createContext({}),Pb=({children:e})=>{const{sendDataLayerEvent:t}=Ee(),{cartStore:r,isOpen:n}=Xe();j.useEffect(()=>{n&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[n]),j.useEffect(()=>{var i,c,l;if(r.id&&!((c=(i=r.marketingData)==null?void 0:i.marketingTags)!=null&&c.includes("faststore"))){const{id:u}=r;U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:u,marketingData:{...r==null?void 0:r.marketingData,marketingTags:U.marketingTagsBuilder(((l=r.marketingData)==null?void 0:l.marketingTags)??[])}}}).catch(d=>{console.error(d)})}},[r]);const o=({cartItem:i,oldQuantity:c,newQuantity:l})=>{t({functionKey:"skuEvents",data:{event:c>l?"remove_from_cart":"add_to_cart",commonData:{products:[{...i,price:i.price/100,listPrice:i.listPrice/100}]},customData:{quantity:l},supportData:{selectedSkus:[i]}}})};return s.jsx(Eb.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},Ib="var(--color-background-brand-primary-lighter)",Nb="_fadeInOut_1l5ow_1",Rb="_fadeOut_1l5ow_1",be={brandPrimaryLighter:Ib,"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:Nb,fadeOut:Rb,"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"},Yh=({item:{id:e,message:t,callback:r},removeNotification:n,ICONS:o})=>{const i=j.useRef(null),c=()=>{var u;(u=i.current)==null||u.setAttribute("data-animation-out","true")},l=u=>{n(u)};return s.jsx("div",{className:be["mc--notify--item"],ref:i,onAnimationEnd:()=>l(e),children:s.jsxs(p.SnackBar.Structure,{size:"medium",children:[s.jsx(p.SnackBar.Content,{title:t}),s.jsxs(p.SnackBar.Support,{children:[typeof r=="function"&&s.jsx(p.Button,{onClick:()=>{r(),c()},size:"small",variant:"tertiary",children:"Desfazer"}),s.jsx(p.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>c(),variant:"tertiary"})]})]})},e)};Yh.displayName="MiniCart.Notify.Item";const Xh=({ICONS:e})=>{const t=mc(),{removeNotification:r}=_c(),n=t.length?[...t].sort((o,i)=>i.id-o.id):[];return n.length?s.jsx("div",{className:be["mc--notify"],children:s.jsx("div",{className:be["mc--notify--content"],children:Array.isArray(n)&&n.map(o=>s.jsx(Yh,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};Xh.displayName="MiniCart.Notifications";const Tb=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:n,...o})=>{const i=ns(),{toggleProduct:c}=jn(),{itemOffered:{isVariationOf:{productGroupID:l}},quantity:u}=r;return s.jsx(p.Button,{...o,adornment:{end:s.jsx(p.Icon,{name:`favorite-${i.includes(l)?"true":"false"}`,size:"small"})},onClick:()=>{c(l),i.includes(l)||t({texture:"mini-cart-wishlist",title:`${n.messages.add_wishlist}`},u,()=>c(l)),e(i.includes(l)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:n.messages.add_wishlist_button})},Jh=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:n,...o})=>{const{addToCart:i,removeToCart:c}=Xe(),{bundleItems:l=[],id:u,uniqueId:d,seller:h,offerings:m,quantity:_}=t,g=(v,x,S)=>{c(u,v.title,()=>{typeof S=="function"&&S(),i({id:u,quantity:x,seller:h},{id:u,texture:v.texture},!0)})};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:be["mc--card--actions--add-remove"],children:[n.has_wishlist_button&&s.jsx(Tb,{...o,product:t,handleSendEvent:e,onHandleRemove:g,ICONS:r,MINICART_CONFIG:n}),s.jsx(p.Button,{...o,adornment:{end:s.jsx(p.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{g({texture:"mini-cart",title:`${n.messages.remove}`},_),e("remove_from_cart","skuEvents")},children:n.messages.remove_button})]}),n.has_gift_option&&s.jsx(Ln.Gift,{uniqueId:d,bundleItems:l,offerings:m,ICONS:r,MINICART_CONFIG:n})]})};Jh.displayName="MiniCart.Card.Actions";const Zh=({bundleItems:e,offerings:t,uniqueId:r,ICONS:n,MINICART_CONFIG:o})=>{const[i,c]=j.useState(!1),{toggleGiftItemCart:l}=Xe(),u=()=>{if(t instanceof Object&&Array.isArray(t)){const[m]=t;if(m){c(!0);const _=e.some(g=>g.id===m.id);l(r,String(m.id),_).then(()=>c(!1))}}},d=t[0],h=e.find(m=>m.id===d.id);return d&&"id"in d?s.jsx("div",{className:be["mc--card--actions--gift"],children:s.jsx(p.Checkbox,{adornment:s.jsx(p.Icon,{name:n.check}),checked:!!h,disabled:i,label:o.messages.giftPackage,onChange:u})}):null};Zh.displayName="MiniCart.Card.Gift";const em=({itemOffered:e})=>{const t=U.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return s.jsx(Ot,{href:`${e==null?void 0:e.slug}`,className:be["mc--card--product-link"],children:s.jsx(at.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};em.displayName="MiniCart.Card.Media";const tm=({name:e,skuName:t,tagName:r,className:n})=>s.jsxs(s.Fragment,{children:[r&&s.jsx(p.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),s.jsx("p",{className:p.helpers.classNameConcat(be["mc--card--name"],n),children:U.getProductNameWithoutSku(e??"",t??"")})]});tm.displayName="MiniCart.Card.Name";const rm=({total:e,totalList:t})=>s.jsx(p.ProductInfo.Root,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:be["mc--card--price"],children:s.jsx(p.ProductInfo.Wrapper,{className:be["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:U.formatPriceToCurrency(t),size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:U.formatPriceToCurrency(e),size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:U.formatPriceToCurrency(e),size:"small"})})})})});rm.displayName="MiniCart.ProductPrice";const nm=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{var d;const[n,o]=j.useState(""),i=j.useRef(null),{cartStore:{options:c}}=Xe(),l=e.itemOffered.isVariationOf.productGroupID,u=j.useCallback(()=>{var m;const h=(m=c==null?void 0:c.find(_=>_.id===l))==null?void 0:m.texture;if(h){o(h);return}U.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[l]})}).then(_=>_.json()).then(_=>{const g=_.data[0].items.find(v=>v.itemId===e.id);if(g){const v=g.images.find(x=>t.includes(x.imageLabel));if(v!=null&&v.imageUrl){o(v.imageUrl);return}o(g.images[0].imageUrl)}}).catch(_=>{console.error(_)})},[c,l,e.id]);return j.useEffect(()=>{if(!i.current)return;const h=new IntersectionObserver(m=>{m[0].isIntersecting&&u()});return h.observe(i.current),()=>{h.disconnect()}},[u]),s.jsx("div",{ref:i,children:s.jsx(p.ToggleStyle.Wrapper,{size:"small",style:r,children:s.jsx(p.ToggleStyle.Texture,{children:n?s.jsx(at.Image,{alt:((d=e.itemOffered)==null?void 0:d.image[0].alternateName)??"Produto",src:n,width:164,height:164,style:r}):s.jsx(Pp,{})})})})};nm.displayName="MiniCart.Card.Style";const sm=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{size:i}=U.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return s.jsxs(p.Utils.Row,{alignItems:"center",children:[s.jsx(nm,{product:e,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o}),s.jsx(p.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),i&&s.jsx(p.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:be["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${be.brandPrimaryLighter}`},children:s.jsx(p.ToggleSize.Text,{children:i})})]})};sm.displayName="MiniCart.Card.Sku";const Ln={Actions:Jh,Gift:Zh,Media:em,Name:tm,Price:rm,Sku:sm},Ob=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}},om=({available:e=!0,index:t,product:r,ICONS:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:i,TEXTURE_IMAGE:c,TOGGLE_STYLE_MODIFIER:l})=>{var m,_;const{sendDataLayerEvent:u}=Ee(),d=Ob(r),h=(g,v)=>{const x={commonData:{...r,...d},customData:{index:t},event:g};if(v==="skuEvents"){const S={...r,...d};x.supportData={selectedSkus:[S]},x.commonData.products=[S]}u({functionKey:v,data:x})};return s.jsxs("div",{className:p.helpers.classNameConcat(be["mc--card"],e?"":be["mc--card--unavailable"]),children:[s.jsx(Ln.Media,{itemOffered:r.itemOffered}),s.jsxs("div",{className:be["mc--card--content-info"],children:[s.jsx(Ln.Name,{name:((m=r.itemOffered)==null?void 0:m.name)??"",skuName:(_=r.itemOffered)==null?void 0:_.skuName}),s.jsxs("div",{className:be["mc--card--details"],children:[s.jsx("div",{className:be["mc--card--actions"],children:e?s.jsx(Ln.Price,{total:d.price,totalList:d.listPrice}):s.jsx(p.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),s.jsxs("div",{className:be["mc--card--actions--secondary"],children:[e&&s.jsx(Ln.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:i,TEXTURE_IMAGE:c,TOGGLE_STYLE_MODIFIER:l}),s.jsx(Ln.Actions,{handleSendEvent:h,product:r,size:"small",variant:"tertiary",ICONS:n,MINICART_CONFIG:o})]})]})]})]})};om.displayName="MiniCart.Card";const im=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var i;const{toExpire:n}=ss(),o=((i=n==null?void 0:n.cashback)==null?void 0:i.reduce((c,l)=>c+l.remaining_value,0))??0;return o>0?s.jsxs("div",{className:p.helpers.classNameConcat(be["mc--cashback"],be[`mc--cashback--${e}`]),children:[s.jsx(p.Icon,{name:t.alert_circle,size:"medium"}),s.jsxs("p",{children:[s.jsx("span",{children:U.formatPriceToCurrency(o)})," ",r.title]})]}):null};im.displayName="MiniCart.Cashback";const am=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:n,removeCoupon:o,removeSellerCode:i,cartStore:{marketingData:c,openTextField:l}}=Xe(),[u,d]=j.useState(!1),[h,m]=j.useState(!1),_=j.useCallback(()=>{let S="";return e==="coupon"?S=(c==null?void 0:c.coupon)??"":S=String((l==null?void 0:l.value)??""),S.toUpperCase()??""},[c,l,e]),[g,v]=j.useState(!!_()),x=async S=>{m(!0),!!_()&&(e==="coupon"?await o():await i(),v(!1),d(!1)),await n(S,e).then(I=>{if(!I.statusOk&&S||I.code!==200){S?(d(!0),v(!1)):d(!1);return}v(!0),d(!1)}).catch(()=>d(!0)).finally(()=>m(!1))};return s.jsx(Nt.Field,{hasError:u,hasSuccess:g,isLoading:h,onHandler:x,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:_(),MINICART_CONFIG:r,ICONS:t})};am.displayName="MiniCart.CouponSeller";const cm=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:n}=Ae(),o=()=>{n.push(r.link)};return s.jsxs(p.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:be["mc--body--empty--feedback"],children:[s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsxs("p",{className:`typography-style-body-xs ${be["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),s.jsx(p.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:s.jsx(p.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};cm.displayName="MiniCart.Feedback";const Ab=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},lm=({feedback:e,hasError:t,onHandler:r,hasSuccess:n,type:o,title:i,value:c,ICONS:l})=>{const[u,d]=j.useState(c);j.useEffect(()=>{t||d(c)},[c,t]);const h=()=>t?s.jsx(p.Icon,{name:l.delete_circle}):String(c).length&&n?s.jsx(p.Icon,{name:l.check_circle}):null,m=()=>{if(o==="seller"){const x=String(c).includes(" - ")?String(c).split(" - ")[0]:u;d(x)}},_=()=>{if(o==="seller"){const x=String(c).includes(" - ")?c:u;d(x)}},g=x=>{const S=x.currentTarget.value;if(S===""&&typeof r=="function"||n&&String(c).length>0&&S!==String(c)||t&&S!==String(c)){d(""),r("");return}if(o==="cep"){const I=Ab(S);d(I)}else d(S)},v=x=>{if(x.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const S=x.currentTarget.value;r(S)}};return s.jsx(p.TextField.Input,{adornment:{end:h()},mode:"over-label",label:i,feedback:e,value:u,type:"text",onFocus:m,onBlur:_,onChange:g,onKeyDown:v})};lm.displayName="MiniCart.Field.Input";const um=({title:e,ICONS:t,MINICART_CONFIG:r,...n})=>{const o=j.useRef(null),{hasSuccess:i,hasError:c,isLoading:l,onHandler:u,type:d,value:h}=n,m=()=>c?"error":String(h).length&&i?"success":"none",_=j.useCallback(()=>{if(o.current){const x=o.current.querySelector("input");x&&typeof u=="function"&&(h!==""||c?(u(""),x.value=""):u((x==null?void 0:x.value)??""))}},[u,h,c]),g=m();return s.jsx("div",{ref:o,children:s.jsx(p.TextField.Structure,{className:be["mc--field"],input:s.jsx(lm,{...n,feedback:g,title:e,ICONS:t}),right:s.jsx(p.Button,{"data-has-success":!i,size:"medium",title:String(h).length&&i||c?"Remover":"Aplicar",onClick:()=>_(),disabled:l,children:String(h).length&&i||c?s.jsx(p.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:d==="cep"&&g==="success"?s.jsx(p.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};um.displayName="MiniCart.Field";const Wu=e=>{const t=e*100;return Math.round(t)},kb=e=>(e/100).toFixed(2).replace(".",","),Mb=(e,t)=>{const{valueType:r,remainingValueToActivate:n}=e;if(r==="quantity")return`Adicione mais ${n} ${n===1?"item":"itens"} ${t}`;if(r==="price"){const o=n===100?"Falta":"Faltam",i=kb(n);return`${o} R$ ${i} ${t}`}return t},dm=({ICONS:e})=>{var w;const{promotionRules:t,data:r,cartStore:n,cartStore:{items:o,marketingData:i},addCouponSeller:c,setIsOpen:l}=Xe(),{sendDataLayerEvent:u}=Ee(),d=(w=r==null?void 0:r.promotion)==null?void 0:w.promotionCart,h=j.useRef(!1),{router:m}=Ae();if(j.useEffect(()=>{(d==null?void 0:d.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(d==null?void 0:d.cupom)&&!h.current&&(i==null?void 0:i.coupon)!==d.cupom&&(h.current=!0,c(d.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&u({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:n}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(h.current=!1)},[d==null?void 0:d.selectPromotion,t==null?void 0:t.remainingValueToActivate,d==null?void 0:d.cupom,i==null?void 0:i.coupon,c]),!t||!d||d.selectPromotion==="Desativar"||o.length===0)return null;const _=d.title,g=d.subtitle,v=d.titleSuccess,x=d.subtitleSuccess,S=d.linkLabel;return s.jsxs("div",{className:be["mc--body--promotion"],children:[t.remainingValueToActivate>0&&s.jsx(p.Closeness,{className:be["mc--body--promotion--closeness"],title:Mb(t,_),subtitle:g,percentage:Wu(t.completeness),iconLink:e.arrow_right,linkLabel:S,onClick:()=>{u({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:n}}}),m.push(`${d.link}`),l(!1)}}),t.remainingValueToActivate<=0&&s.jsx(p.Closeness,{className:`${be["mc--body--promotion--closeness"]} ${be["mc--body--promotion--closeness--success"]}`,title:v,subtitle:x,percentage:Wu(t.completeness)})]})};dm.displayName="MiniCart.Modal.Body.Promotion";const fm=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:n,marketingData:o},addCouponSeller:i}=Xe(),c=t==null?void 0:t.flags.flagCart.flagCupom,l=(o==null?void 0:o.coupon)===(c==null?void 0:c.valueCupom),[u,d]=j.useState(!1),[h,m]=j.useState(!1);if(j.useEffect(()=>{u&&setTimeout(()=>{d(!1)},e.snackbar_timeout)},[u]),j.useEffect(()=>{h&&setTimeout(()=>{m(!1)},e.snackbar_timeout)},[h]),!c||c.active==="Desativar"||c.valueCupom===""||n.length===0)return null;const _=async()=>{if(!r.items.length){m(!0);return}(await i(c==null?void 0:c.valueCupom,"coupon")).code!==200&&d(!0)};return s.jsxs("div",{className:be["mc--body--coupon-tag"],style:{backgroundColor:`${c.tagColor}`,color:`${c.textColor}`},children:[s.jsx("div",{className:be["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:c.value}}),s.jsx("div",{className:be["mc--body--coupon-tag--button"],children:s.jsx(p.Button,{variant:"quaternary",mode:"inverse",onClick:_,disabled:l,children:l?"Cupom Aplicado":"Aplicar Cupom"})})]})};fm.displayName="MiniCart.Modal.Body.CouponTag";const pm=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:i,TIPBAR_CONFIGS:c,TOGGLE_STYLE_MODIFIER:l})=>{const{cartStore:{items:u,messages:d}}=Xe();return s.jsxs(p.Modal.Body,{className:be["mc--body"],children:[e,s.jsx(dm,{ICONS:t}),s.jsx(fm,{TIPBAR_CONFIGS:c}),s.jsx("div",{className:be["mc--body--products"],children:Array.isArray(u)&&u.length?u.map((h,m)=>{const _=d.find(g=>{var v;return g.code==="withoutStock"&&((v=g.fields)==null?void 0:v.ean)===h.ean})!==void 0;return s.jsx(Nt.Card,{available:!h.availability.includes("outStock")||!_,index:m,product:h,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:l},`${h.id}-${h.itemOffered.sku}-${m}`)}):s.jsx(Nt.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};pm.displayName="MiniCart.Body";const hm=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:n}=Xe();if(n.items.length===0)return null;const o=()=>{var c;const i=new URLSearchParams({orderFormId:n.id,...((c=n.marketingData)==null?void 0:c.utmCampaign)&&{utm_campaign:n.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${i.toString()}#/cart`};return s.jsxs(p.Modal.Footer,{className:be["mc--footer"],children:[e,s.jsx("div",{className:be["mc--footer--actions"],children:s.jsx(p.Button,{variant:"primary",size:"large","data-close":!0,className:be["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};hm.displayName="MiniCart.Modal.Footer";const mm=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:n})=>{const[o,i]=j.useState(!1),c=j.useRef(null),l=()=>i(u=>!u);return s.jsxs(s.Fragment,{children:[o&&s.jsx(p.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:s.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:be["inputs--tooltip"],style:{zIndex:n.modal},isOpen:!0,size:"medium",parent:c.current}),s.jsxs(p.Accordion.Wrapper,{className:be["mc--discount"],children:[s.jsx(p.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:s.jsx(p.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:s.jsx(p.Icon,{name:t.arrow_down,size:"medium"}),className:p.helpers.classNameConcat(be["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:s.jsxs(p.TextStructure.Root,{children:[s.jsx(p.TextStructure.DivWrapper,{children:s.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),s.jsx("div",{ref:c,onMouseEnter:l,onMouseLeave:l,"aria-label":"Mostrar descrição",children:s.jsx(p.Icon,{name:t.alert_circle,size:"small"})})]})}),s.jsx(p.Accordion.Body,{className:be["mc--discount--body"],children:e})]})]})};mm.displayName="MiniCart.Discount";const _m=({discount:e,shipping:t,total:r})=>{var u,d;const{data:n}=Xe(),o=(d=(u=n==null?void 0:n.flags)==null?void 0:u.flagCart)==null?void 0:d.flagTotal,i=r-Math.abs(e??0)+(t??0),c=t===0?"Frete Grátis":U.formatPriceToCurrency((t??0)/100),l=[{title:"Frete",value:t===void 0?"A calcular":c},{title:"Desconto",value:U.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${U.formatPriceToCurrency(i/100)}`}];return s.jsx("div",{className:be["mc--footer--total"],children:Array.isArray(l)&&l.map((h,m)=>s.jsxs("div",{className:be["mc--footer--total--info"],"data-discount":h.title==="Desconto",children:[s.jsx("p",{children:h.title}),s.jsxs("div",{className:be["mc--footer--total--info--content"],children:[h.message&&(o==null?void 0:o.active)==="Ativar"&&s.jsx(p.Tag,{variant:"primary",title:h.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:h.message}),s.jsx(p.ProductInfo.Price,{className:be["mc--footer--total--info"],label:h.title,value:h.value})]})]},m))})};_m.displayName="MiniCart.Modal.Footer.Resume.Items";const gm=()=>{var o,i,c;const{totalizers:e}=hn(),t=((o=e.find(l=>l.id==="Items"))==null?void 0:o.value)??0,r=(i=e.find(l=>l.id==="Discounts"))==null?void 0:i.value,n=(c=e.find(l=>l.id==="Shipping"))==null?void 0:c.value;return s.jsx(_m,{discount:r??0,total:t,shipping:n})};gm.displayName="MiniCart.Modal.Footer.Totals";const ym=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=xe(),{cartStore:{items:n}}=Xe(),o=n.reduce((i,c)=>i+(c.quantity??0),0);return s.jsx(p.Modal.Header,{navigation:"top",className:be["mc--header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(p.Modal.Title,{navigation:"top",title:t.messages.title}),s.jsx("span",{className:be["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),s.jsx(p.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};ym.displayName="MiniCart.Modal.Header";const vm=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:n,removeCEP:o}=Xe(),{sendDataLayerEvent:i}=Ee(),[c,l]=j.useState(!1),[u,d]=j.useState(!1),h=j.useCallback(()=>{var I;const w=((I=r==null?void 0:r.address)==null?void 0:I.postalCode)??"";return w.length===8&&!w.includes("-")?`${w.slice(0,5)}-${w.slice(5)}`:w},[r]),[m,_]=j.useState(!!h()),g=()=>{_(!1),l(!1)},v=w=>{var I;if(typeof w=="object"&&(w!=null&&w.logisticsInfo))return(I=w.logisticsInfo)==null?void 0:I.reduce((P,C)=>{var z;const N=(z=C==null?void 0:C.slas)==null?void 0:z.find(D=>(D==null?void 0:D.id)===(C==null?void 0:C.selectedSla));if(!N)return P;const T=parseInt(String((N==null?void 0:N.shippingEstimate)??"").replace("bd","")),O=Number((((N==null?void 0:N.price)??0)/100).toFixed(2));if(P.shipping_tier===void 0)return P.shipping_tier=C==null?void 0:C.selectedSla,P.delivery_time=T.toString(),P.shipping=O,P.flag_retirada=(C==null?void 0:C.selectedDeliveryChannel)==="delivery"?"false":"true",P;const M=parseInt(P.delivery_time??"0");return T>M&&(P.delivery_time=T.toString()),P.shipping=(P.shipping??0)+O,P},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},x=async w=>{const I=w.replace(/\D/g,"");if(I.length!==8)return!1;try{return!(await Fn.get(`https://viacep.com.br/ws/${I}/json/`)).data.erro}catch{return!1}},S=async w=>{if(d(!0),!!h()||!(w!=null&&w.trim())){await o(),g(),d(!1);return}if(!await x(w)){l(!0),_(!1),d(!1);return}try{const N=await n(w);if(l(!1),N){_(!0);const T=v(N);T&&i({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:T}})}}catch{l(!0)}finally{d(!1)}};return s.jsx(Nt.Field,{hasSuccess:m,hasError:c,isLoading:u,onHandler:S,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:h(),ICONS:e,MINICART_CONFIG:t})};vm.displayName="MiniCart.Shipping";const xm=()=>{var r,n;const{data:e}=Xe(),t=(n=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:n.flagHeader;return t!=null&&t.value?s.jsx(p.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?s.jsx(p.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};xm.displayName="MiniCart.TagMessage";const Nt={Body:pm,Card:om,Cashback:im,CouponSeller:am,Discount:mm,Field:um,Feedback:cm,Shipping:vm,Footer:hm,Header:ym,TagMessage:xm,Totals:gm},Lb=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c,Z_INDEX_WAR:l,storeConfig:u,minicartStyleModifiers:d})=>{const{isOpen:h,setIsOpen:m}=Xe(),{isMobile:_}=xe();return s.jsxs(p.Modal.Root,{className:p.helpers.classNameConcat(be["minicart--modal-modifier"],d),isMobile:!0,isOpen:h,setIsOpen:m,style:{zIndex:l.modal},variant:_?"sideBottom":"sideRight",children:[s.jsx(Nt.Header,{ICONS:e,MINICART_CONFIG:t}),s.jsx(Nt.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:c,TIPBAR_CONFIGS:i,children:s.jsx(Nt.TagMessage,{})}),s.jsxs(Nt.Footer,{MINICART_CONFIG:t,storeConfig:u,children:[s.jsxs(Nt.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:l,children:[s.jsx(Nt.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),s.jsx(Nt.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),s.jsx(Nt.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),s.jsx(Nt.Totals,{})]}),s.jsx(Xh,{ICONS:e})]})},bm=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:n,className:o})=>{const{structureRef:i,rootRef:c,CONSTANTS:l}=Ze(),{header:{HEADER_CONFIGS:u,Z_INDEX_WAR:d},minicart:h}=l;return s.jsx(p.Header.Structure,{innerRef:i,adornment:{start:e},style:{position:"sticky",top:0,zIndex:d.header},className:p.helpers.classNameConcat(zc["header-animation"],o),children:s.jsxs(p.Header.Root,{innerRef:c,style:{zIndex:d.header},variant:u.default_variant,interactiveVariant:u.interactive_variant,children:[r??s.jsxs(yb,{children:[s.jsx("div",{className:U.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:d.header_mobile},children:s.jsx(Qh,{storeConfig:n})}),s.jsx("div",{className:U.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:d.header_desktop},children:s.jsx(Mh,{storeConfig:n})})]}),s.jsx(Pb,{children:s.jsx(Lb,{...h,minicartStyleModifiers:t})}),s.jsx(Oc,{title:"Produto adicionado à sua sacola!",CONSTANTS:l.addToCart})]})})};bm.displayName="Header";const Db="_shippingFreight_6z8rf_6",Fb="_shippingFreight__postalCodeGrid_6z8rf_10",zb="_shippingFreight__grid_6z8rf_14",qb="_shippingFreight__grid__title_6z8rf_18",Bb="_shippingFreight__grid__remember_6z8rf_29",Ub="_postalCodeContainer_6z8rf_44",Hb="_deliveryStatusBar__tag_6z8rf_49",$b="_deliveryStatusBarError__tag_6z8rf_66",Wb="_deliveryInfo_6z8rf_74",Vb="_deliveryInfo__content_6z8rf_78",Gb="_deliveryInfo__text_6z8rf_84",Kb="_deliveryInfo__title_6z8rf_89",Qb="_deliveryInfo__subtitle_6z8rf_99",Yb="_deliveryInfo__tooltipIcon_6z8rf_109",Xb="_deliveryInfo__tooltip_6z8rf_109",Jb="_freightGrid_6z8rf_148",Zb="_freightContainer_6z8rf_155",ej="_freightOption__content_6z8rf_160",tj="_freightOption__value_6z8rf_166",rj="_freightOption__title_6z8rf_177",nj="_freightOption__title_item_6z8rf_181",sj="_freightOption__paragraph_6z8rf_192",ze={shippingFreight:Db,shippingFreight__postalCodeGrid:Fb,shippingFreight__grid:zb,shippingFreight__grid__title:qb,shippingFreight__grid__remember:Bb,postalCodeContainer:Ub,deliveryStatusBar__tag:Hb,deliveryStatusBarError__tag:$b,deliveryInfo:Wb,deliveryInfo__content:Vb,deliveryInfo__text:Gb,deliveryInfo__title:Kb,deliveryInfo__subtitle:Qb,deliveryInfo__tooltipIcon:Yb,deliveryInfo__tooltip:Xb,freightGrid:Jb,freightContainer:Zb,freightOption__content:ej,freightOption__value:tj,freightOption__title:rj,freightOption__title_item:nj,freightOption__paragraph:sj,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},oj=({icon:e,title:t,subtitle:r,packageCount:n,packageUnit:o="",labelDescription:i,freightConfig:c,toolTipZIndex:l})=>{const[u,d]=j.useState(!1),h=j.useRef(null),m=()=>d(_=>!_);return s.jsxs("div",{className:ze.deliveryInfo,ref:h,children:[s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsx("div",{children:s.jsx("p",{children:c.messages.select_size_tag})}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:h.current}),s.jsxs("div",{className:ze.deliveryInfo__content,children:[s.jsx("div",{className:ze.deliveryInfo__icon,children:s.jsx(p.Icon,{name:e,size:"medium"})}),s.jsxs("div",{className:ze.deliveryInfo__text,children:[s.jsxs("span",{className:ze.deliveryInfo__title,children:[t," ",n," ",o]}),r&&s.jsx("span",{className:ze.deliveryInfo__subtitle,children:r})]}),i&&s.jsxs("div",{className:ze.deliveryInfo__tooltipIcon,onMouseEnter:m,onMouseLeave:m,"aria-label":"Mostrar descrição",children:[s.jsx("span",{children:s.jsx(p.Icon,{name:c.icons.feedback_help,size:"small"})}),u&&s.jsx("div",{className:ze.deliveryInfo__tooltip,children:i})]})]})]})},ij=({value:e,title:t,paragraph:r})=>s.jsx("div",{className:ze.freightOption,children:s.jsxs("div",{className:ze.freightOption__content,children:[s.jsx("span",{className:ze.freightOption__value,children:e}),s.jsx("span",{className:ze.freightOption__title,children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:ze.footer__item,children:[s.jsx("span",{className:ze.freightOption__title_item,children:t}),r&&s.jsx("span",{className:ze.freightOption__paragraph,children:r})]})})})]})}),aj=({children:e})=>s.jsx("div",{className:ze.freightContainer,children:e}),cj=({children:e})=>s.jsx("div",{className:ze.freightGrid,children:e}),lj=({children:e})=>s.jsx("div",{className:ze.postalCodeContainer,children:e}),Vu=({message:e,seller:t="",size:r="small",setError:n})=>s.jsx("div",{className:n?ze.deliveryStatusBarError:ze.deliveryStatusBar,children:s.jsxs(p.Tag,{title:e,className:n?ze.deliveryStatusBarError__tag:ze.deliveryStatusBar__tag,size:r,children:[e," ",!n&&t]})}),uj=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},dj=e=>{var r,n,o;const t=[];return(o=(n=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:n.slas)==null||o.forEach(i=>{t.push({id:i.id,name:i.name,price:i.price,shippingEstimate:i.shippingEstimate})}),t},fj=({component:e,parent:t,top:r,left:n,target:o,contentRef:i,freightConfig:c,toolTipZIndex:l=999,...u})=>{const{isMobile:d}=xe();return s.jsx(s.Fragment,{children:d?s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...u,ref:i,children:[e,s.jsx("p",{children:c.messages.select_size_tag})]}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...u,ref:i,children:[e,s.jsx("p",{children:c.messages.select_size_tag})]}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},pj=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:n,quantity:o,setError:i,setIsButtonClicked:c,component:l,freightConfig:u,toolTipZIndex:d})=>{var B,G,J,Y;const h=hn(),m=hn(X=>X.shipping),[_,g]=j.useState(),[v,x]=j.useState(!1),[S,w]=j.useState(!1),[I,P]=j.useState(!1),C=(G=(B=h.shippingData)==null?void 0:B.address)==null?void 0:G.postalCode,N=!(_!=null&&_.length)&&C?C:_,T=j.useRef(null),O=async X=>{const he=X.target.value.replace(/\D/g,"").slice(0,8);he.length>5?g(he.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):g(he)},M=async X=>{const Z=X.target.value.replace(/\D/g,"");try{if((await Fn.get(`https://viacep.com.br/ws/${Z}/json/`)).data.erro){i&&i(u.messages.cep_not_found),c(!1),w(!0);return}i&&i(""),w(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},z=async()=>{x(!0);try{const X=await Fn.post("/api/checkout/simulation",{items:[{id:n,quantity:o,seller:t}],country:"BRA",postalCode:N});e(dj(X.data))}catch(X){console.error("Erro ao atualizar o documento:",X)}finally{x(!1),m(N,"BRA")}},D=async()=>{if(!n){P(!0),setTimeout(()=>P(!1),1500);return}await M({target:{value:N}}),v||(z(),c(!0))};return s.jsxs("div",{ref:T,style:{position:"relative"},children:[!n&&I?s.jsx(fj,{component:l,isOpen:I,parent:T.current,toolTipZIndex:d,freightConfig:u}):s.jsx(s.Fragment,{}),s.jsx("div",{style:{position:"relative"},children:s.jsx(p.TextField.Structure,{title:"structure",style:{width:"100%"},input:s.jsx(p.TextField.Input,{defaultValue:(Y=(J=h.shippingData)==null?void 0:J.address)==null?void 0:Y.postalCode,label:u.messages.text_input_label,title:"textfield",value:_,sizeVariant:r,onMouseOver:()=>n?null:P(!0),onMouseOut:()=>n?null:P(!1),mode:"simple",onChange:O,onKeyDown:X=>{X.key==="Enter"&&D()},className:ze["input-modifier"],feedback:S?"error":"none"}),right:s.jsx(p.Button,{onClick:D,size:r,title:"button",children:v?s.jsx(p.Spinner,{size:"small",indicatorColor:"#ffffff"}):u.messages.text_input_btn})})})]})},hj=({children:e,freightConfig:t})=>s.jsxs("div",{className:ze.shippingFreight,children:[s.jsxs("div",{className:ze.shippingFreight__grid,children:[s.jsx("span",{className:ze.shippingFreight__grid__title,children:t.messages.title}),s.jsx("span",{className:ze.shippingFreight__grid__remember,children:s.jsx(wt,{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})})]}),s.jsx("div",{className:ze.shippingFreight__postalCodeGrid,children:e})]}),mj=({children:e})=>s.jsx("div",{className:ze.freightContainer,children:e}),jm=({className:e,sellerId:t,skuId:r,quantity:n,size:o,seller:i,local:c,CONSTANTS_PROPS:l})=>{const{sendDataLayerEvent:u}=Ee(),[d,h]=j.useState(""),[m,_]=j.useState([]),[g,v]=j.useState(""),[x,S]=j.useState(!1),w=P=>h(P),I=P=>{_(P),u({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:P.map(C=>({shipping_tier:C.id,delivery_time:C.shippingEstimate.replace("bd",""),flag_pickup:C.name.toLowerCase().includes("retirada")?"true":"false",shipping:C.price,currency:l.currency||"BRL"}))}}})};return s.jsxs(mj,{className:e,children:[s.jsxs(hj,{freightConfig:l.freightConfig,children:[s.jsx(lj,{children:s.jsx(pj,{onUpdateFreightItems:I,skuId:r,quantity:n,size:o,sellerId:t,local:c,setError:v,setIsButtonClicked:S,freightConfig:l.freightConfig,toolTipZIndex:l.toolTipZIndex})}),g?s.jsx(Vu,{size:o,message:g,setError:v}):m.length>0&&s.jsx(Vu,{size:o,message:l.freightConfig.messages.delivered_by,seller:i})]}),x&&!g?m.length>0&&s.jsxs(aj,{children:[s.jsx(cj,{children:m.filter(({id:P})=>!P.includes("Retirada")).map(P=>s.jsx(ij,{id:P.id,value:U.freightParsePrice({valueInCents:P.price,hasFree:!1,freeTaxMessage:l.freightConfig.messages.free_tax}),title:P.name,paragraph:`${l.freightConfig.messages.prefix_days}${uj(P.shippingEstimate)}`,radioValue:d,changeValue:w},P.id))}),l.deliveryInfoBoxesAllowed?s.jsx(oj,{icon:l.freightConfig.icons.delivery_truck,packageUnit:l.freightConfig.messages.unit_amout,title:l.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:l.freightConfig,toolTipZIndex:l.toolTipZIndex??999}):s.jsx(s.Fragment,{})]}):null]})},yn={"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"},_j=({children:e,href:t,isLast:r,title:n})=>{const{constants:{ICONS:o}}=ut();return s.jsx(p.BreadCrumb.Item,{adornment:{end:r&&s.jsx(p.Icon,{name:o.arrow_right})},children:r?s.jsx(wt,{href:t??"/",size:"medium",title:n,disableUnderline:!0,children:e}):e})},Sm=()=>{var o;const{state:e}=ft(),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("/"),n=Xf(r);return s.jsx("div",{className:yn["pcd-navigation--breadcrumb"],children:s.jsx(p.BreadCrumb.DivWrapper,{children:s.jsx(p.BreadCrumb.List,{children:Array.isArray(n)&&n.map((i,c)=>{var l,u;return j.createElement(_j,{...i,isLast:c!==n.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," ")},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};Sm.displayName="PLPNavigation.BreadCrumb";const Cm=({children:e,...t})=>s.jsxs("div",{...t,className:yn["pdc-navigation--content"],children:[s.jsx($r.Filters,{}),e]});Cm.displayName="PLPNavigation.Content";const gj="_sort_35wro_1",Jo={sort:gj,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},yj=({children:e,sortListOpen:t,btnAdornment:r,style:n,...o})=>s.jsx(p.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...n,textDecoration:"none"},className:Jo["sort-button"],children:e}),vj=e=>s.jsx(p.RadioButton.Radio,{...e}),xj=({children:e,className:t,name:r,...n})=>s.jsx(p.RadioButton.Group,{...n,name:r||"sort-group",className:p.helpers.classNameConcat(Jo["sort-list"],t),children:e}),bj=({children:e,className:t,shadow:r=!0,padding:n="small",height:o="fit-content",...i})=>s.jsx(p.Card,{...i,shadow:r,className:p.helpers.classNameConcat(Jo["sort-list-wrapper"],t),padding:n,height:o,children:e}),wm=j.forwardRef(({children:e,className:t,...r},n)=>s.jsx("div",{...r,ref:n,className:p.helpers.classNameConcat(Jo.sort,t),children:e}));wm.displayName="SortRoot";const Zo=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:n,ICONS:o,...i})=>{var _;const c=(_=n==null?void 0:n.get("sort"))==null?void 0:_.replace(":","_"),[l,u]=j.useState(c),{sendDataLayerEvent:d}=Ee();j.useEffect(()=>{u(c||void 0)},[c]);const{ref:h}=Nh(()=>r(!1)),m=g=>{const v=g.target.value;u(v),typeof e=="function"&&e(v),d({functionKey:"filterEvent",data:{customData:{ordering:ps.options[v]}}}),r(!1)};return s.jsxs(wm,{...i,ref:h,children:[s.jsx(yj,{btnAdornment:{listOpen:s.jsx(p.Icon,{name:o.arrow_up,size:"small"}),listClosed:s.jsx(p.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:l?ps.options[l]:ps.placeholder},"sort-button"),t&&s.jsx(bj,{children:s.jsx(xj,{name:"sort-group",value:l??"",onChange:m,children:Object.keys(ps.options).map(g=>s.jsx(vj,{label:ps.options[g],value:g},g))})})]})};Zo.displayName="Sort";const Em=j.createContext({}),jj=({children:e,...t})=>{const[r,n]=j.useState(!1);return s.jsx(Em.Provider,{value:j.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:n}),[t,r,n]),children:e})},Sj=()=>{const e=j.useContext(Em);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},Pm=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:n}=Sj(),{constants:{ICONS:o,PDC_NAVIGATION:i}}=ut();return s.jsxs("div",{className:yn["pdc-navigation--filters"],children:[s.jsx($r.BreadCrumb,{}),s.jsxs("div",{className:yn["pdc-navigation--filters--content"],children:[s.jsx(Zo,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:n,ICONS:o,searchParams:new URLSearchParams}),s.jsx(p.Button,{adornment:{end:s.jsx(p.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:i.filter_button}),s.jsx($r.Total,{})]})]})};Pm.displayName="PLPNavigation.Filters";const Im=({children:e,onSort:t,setOpenFilters:r,style:n,...o})=>{const i=j.useRef(null);return s.jsx(jj,{onSort:t,setOpenFilters:r,children:s.jsx("div",{...o,className:yn["pdc-navigation"],ref:i,style:{...n},children:s.jsx($r.Content,{children:e})})})};Im.displayName="Root";const Nm=({callback:e,selected:t,...r})=>s.jsx("div",{...r,className:yn["pdc-navigation--selected"],children:s.jsx("div",{className:yn["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(n=>n.key==="productclusterids"?null:s.jsx($r.SelectedItem,{callback:e,facet:n},n.value)):null})});Nm.displayName="PLPNavigation.Selected";const Bc=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,Uc=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(n=>n.value===e))==null?void 0:r.color)??"#F2F2F2"},Rm=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(n=>n.key===e))==null?void 0:r.label},Tm=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(n=>n.key===e))==null?void 0:r.order)??0},Va=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],n=U.formatPriceToCurrency(Number(r));return`${U.formatPriceToCurrency(Number(t))} até ${n}`},Om=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),n=Math.max(...t.map(Math.abs));return[r,n]},Am=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:Bc,createTagPrice:Va,getAbsoluteMinMax:Om,getColor:Uc,getName:Rm,getOrder:Tm},Symbol.toStringTag,{value:"Module"})),Vt={"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"},km=({columns:e=2,CONSTANTS:t,...r})=>{var u,d,h,m,_;const{filters:n,onToggleFacet:o}=wr(),i=(u=n.facets)==null?void 0:u.find(g=>g.key==="category-3"),c=((d=n.selected)==null?void 0:d.some(g=>g.key==="category-3"))||((h=i==null?void 0:i.values)==null?void 0:h.some(g=>g.selected)),l=(m=n.facets)==null?void 0:m.filter(g=>g.key==="category-3"?!c:g.key==="category-4"?c:!0);return s.jsxs("div",{...r,className:Vt["filter--modal--body--content"],children:[Array.isArray(n.facets)&&(l==null?void 0:l.map(g=>s.jsx(tr.Item,{columns:e,facet:g,onToggleFacet:o,CONSTANTS:t},g.key))),!((_=n.facets)!=null&&_.length)&&s.jsx(tr.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};km.displayName="Filter.Item.Content";const Mm=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return s.jsxs("div",{className:Vt["filter--empty"],children:[s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h4",{children:e.title}),s.jsx("p",{children:e.subtitle})]}),s.jsx(p.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Mm.displayName="Filter.Empty";const Lm=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:n,...o})=>{var g,v,x,S;const{filters:i}=wr(),c=Tm({key:t.key,PLP_FILTERS:n.PLP_FILTERS}),l=(g=i.facets)==null?void 0:g.find(w=>w.key==="category-3"),u=(v=i.facets)==null?void 0:v.find(w=>w.key==="category-4"),d=(x=l==null?void 0:l.values)==null?void 0:x.some(w=>w.selected),h=(((S=u==null?void 0:u.values)==null?void 0:S.length)??0)>0,m=d&&h,_=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return s.jsx(tr.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:n.PLP_FILTERS,PLP_FILTERS_COLORS:n.PLP_FILTERS_COLORS});if(t.key==="tamanho")return s.jsx(tr.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:n.PLP_SIZE_ORDER});if(t.key==="tecido")return s.jsx(tr.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS});if(t.key==="category-3"&&!d)return s.jsx(tr.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS});if(t.key==="category-4"&&m)return s.jsx(tr.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS})}return t.__typename==="FacetRange"?s.jsx(tr.Price,{facet:t}):s.jsx("p",{children:"Filtro não encontrado!"})};return s.jsx("div",{...o,className:Vt["filter--item"],style:{order:c},children:s.jsxs(p.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(p.Accordion.Header,{id:t.key,closeIndicator:s.jsx(p.Icon,{name:n.ICONS.arrow_up}),openIndicator:s.jsx(p.Icon,{name:n.ICONS.arrow_down}),children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h4",{className:"typography-style-body-sm",children:Rm({key:t.key,PLP_FILTERS:n.PLP_FILTERS})})})})}),s.jsx(p.Accordion.Body,{children:_()})]})})};Lm.displayName="Filter.Item";const Dm=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:n,...o})=>{const{filters:{selected:i}}=wr();return s.jsx(sr.Root,{...o,children:s.jsx(sr.List,{children:Array.isArray(t)&&t.map(({key:c,value:l})=>s.jsx(sr.Option,{active:!!(i!=null&&i.find(u=>u.key===c&&u.value===l)),"data-color":Bc({key:c,PLP_FILTERS:r}),fill:Uc({value:l,PLP_FILTERS_COLORS:n}),onClick:()=>e({key:c,value:l}),type:"color"},`${c}-${l}`))})})};Dm.displayName="Filter.Item.Color";const Fm=({facet:e,...t})=>{var d,h;const{filters:{selected:r},price:n,onToggleFacet:o}=wr(),[i,c]=(n==null?void 0:n.split(":").map(Number))??[0,100],[l,u]=((h=(d=r==null?void 0:r.find(({key:m})=>m==="price"))==null?void 0:d.value)==null?void 0:h.split(":").map(Number))??[i,c];return s.jsx("div",{...t,className:Vt["filter--item--price"],children:s.jsxs(p.Slider.SliderDual,{format:"price",initialValue:[l<i?i:l,u>c?c:u],min:i,max:c,type:"dual",step:1,onFinish:m=>{var _,g;m&&o({key:"price",value:`${(_=m.range)==null?void 0:_.min}:${(g=m.range)==null?void 0:g.max}`})},children:[s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{"data-min-value":!0})})}),s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{"data-max-value":!0})})})]})})};Fm.displayName="Filter.Item.Price";const zm=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...n})=>{const{filters:{selected:o}}=wr(),i=[...t].sort((c,l)=>{const u=r.indexOf(c.name),d=r.indexOf(l.name);return u-d});return s.jsx(sr.Root,{...n,children:s.jsx(sr.List,{children:Array.isArray(i)&&i.map(({key:c,value:l})=>s.jsx(sr.Option,{active:!!(o!=null&&o.find(u=>u.key===c&&u.value===l)),text:l,type:"size",onClick:()=>e({key:c,value:l})},l))})})};zm.displayName="Filter.Item.Sizes";const qm=({columns:e,facetKey:t,onToggleFacet:r,values:n,ICONS:o,...i})=>s.jsx("div",{...i,className:Vt["filter--item--toggle"],children:s.jsx("div",{className:Vt["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(n)&&n.map(c=>s.jsx(p.Checkbox,{label:(c==null?void 0:c.name)??"",adornment:s.jsx(p.Icon,{name:o.check}),checked:c.selected,onChange:()=>r(c)},c.value))})});qm.displayName="Filter.Item.Toggle";const Bm=({...e})=>{const{isLoading:t}=wr();return s.jsx("div",{className:Vt["filter--loading"],"data-active":t,...e,children:s.jsx(p.Spinner,{indicatorColor:"#000",background:"#222"})})};Bm.displayName="Filter.Loading";const Um=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:n,ICONS:o}})=>{var d;const{deleteAllFacets:i,filters:c,isOpen:l,setIsOpen:u}=wr();return s.jsxs(p.Modal.Root,{className:p.helpers.classNameConcat(Vt["filter--modal"],t),isMobile:r??!1,isOpen:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[s.jsxs(p.Modal.Header,{navigation:"top",children:[s.jsx(p.Modal.Controls,{navigation:"top",isMobile:r,children:s.jsx(p.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),s.jsx(p.Modal.Title,{navigation:"top",title:n})]}),s.jsxs(p.Modal.Body,{style:{width:500},children:[s.jsx("div",{className:Vt["filter--modal--body"],children:e}),s.jsx(tr.Loading,{})]}),s.jsx(p.Modal.Footer,{children:s.jsxs("div",{className:Vt["filter--modal--footer"],children:[s.jsx(p.Button,{"data-close":!0,size:"large",variant:"primary",children:(d=c.facets)!=null&&d.length?"ver resultados":"fechar"}),s.jsx(p.Button,{"data-close":!0,onClick:()=>i(),variant:"tertiary",children:"limpar filtros"})]})})]})};Um.displayName="Filter.Modal";const Hm=({children:e,className:t,isMobile:r,CONSTANTS:n,...o})=>s.jsx(hp,{...o,PLP_FILTERS:n.PLP_FILTERS,children:s.jsx(tr.Modal,{className:t,isMobile:r,CONSTANTS:n,children:e})});Hm.displayName="Filter.Root";const $m=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:n,onToggleFacet:o}=wr();return s.jsx("div",{className:Vt["filter--selected"],children:s.jsx("div",{className:Vt["filter--selected--content"],children:Array.isArray(n.selected)&&n.selected.map(({key:i,value:c})=>i==="productclusterids"?null:s.jsx(p.Tag,{title:i==="price"?Va({value:c}):c,adornment:{end:s.jsx(p.Icon,{name:e.close,size:"x-small"})},colorSquare:Uc({value:c,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:i,value:c}),squareShow:Bc({key:i,PLP_FILTERS:r}),size:"medium",variant:"primary",children:i==="price"?Va({value:c}):c},c))})})};$m.displayName="Filter.Selected";const tr={Colors:Dm,Content:km,Empty:Mm,Modal:Um,Item:Lm,Root:Hm,Loading:Bm,Selected:$m,Price:Fm,Sizes:zm,Toggle:qm},{checkedColor:Cj,createTagPrice:Gu,getColor:wj}=Am,Wm=({callback:e,facet:t})=>{const{constants:{ICONS:r,PLP_FILTERS_COLORS:n,PLP_FILTERS:o}}=ut();return s.jsx(p.Tag,{title:(t==null?void 0:t.key)==="price"?Gu({value:t.value}):t.value.toUpperCase(),adornment:{end:s.jsx(p.Icon,{name:r.close,size:"x-small"})},colorSquare:wj({value:t.value,PLP_FILTERS_COLORS:n}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:Cj({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Gu({value:t.value}):t.value.toUpperCase()})};Wm.displayName="PLPNavigation.Selected.Item";const Vm=()=>s.jsx(p.TextStructure.Root,{children:s.jsx("p",{id:"pdc-navigation--total"})});Vm.displayName="PLPNavigation.Total";const $r={BreadCrumb:Sm,Content:Cm,Filters:Pm,Root:Im,Selected:Nm,SelectedItem:Wm,Total:Vm},Ej="_footer__bottom_198g6_2",Pj="_footer__wrapper_198g6_10",Ij="_footer__main_198g6_39",Nj="_footer__legalInformation_198g6_55",Rj="_footer__column_198g6_77",Tj="_footer__columnContent_198g6_87",Oj="_footer__item_198g6_91",Aj="_footer__itemLink_198g6_107",kj="_footer__columnTitle_198g6_122",Mj="_footer__columnTitleIcon_198g6_134",Lj="_footer__iconList_198g6_147",Dj="_footer__itemSmallText_198g6_157",Fj="_payment_198g6_168",zj="_footer__iconContainer_198g6_173",qj="_footer__iconListSubHeader_198g6_178",Bj="_accordionWrapper_198g6_200",Uj="_accordionHeader_198g6_204",Hj="_accordionTextWrapper_198g6_208",Be={footer__bottom:Ej,footer__wrapper:Pj,footer__main:Ij,footer__legalInformation:Nj,footer__column:Rj,footer__columnContent:Tj,footer__item:Oj,footer__itemLink:Aj,footer__columnTitle:kj,footer__columnTitleIcon:Mj,footer__iconList:Lj,footer__itemSmallText:Dj,payment:Fj,footer__iconContainer:zj,footer__iconListSubHeader:qj,accordionWrapper:Bj,accordionHeader:Uj,accordionTextWrapper:Hj,"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 Gm={},Hc={},ei={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=n=>{r.has(n)||console.warn(n),r.add(n)}}})(ei);var Km={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:n,heightInt:o,blurWidth:i,blurHeight:c,blurDataURL:l,objectFit:u}=r;const d=20,h=i?i*40:n,m=c?c*40:o,_=h&&m?"viewBox='0 0 "+h+" "+m+"'":"",g=_?"none":u==="contain"?"xMidYMid":u==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+_+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+d+"'/%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='"+d+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+g+"' style='filter: url(%23b);' href='"+l+"'/%3E%3C/svg%3E"}})(Km);var ti={};(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,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});const r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(ti);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return g}});const t=ei,r=Km,n=ti,o=["lazy","eager",void 0];function i(v){return v.default!==void 0}function c(v){return v.src!==void 0}function l(v){return typeof v=="object"&&(i(v)||c(v))}const u=new Map;let d;function h(v){return typeof v>"u"?v:typeof v=="number"?Number.isFinite(v)?v:NaN:typeof v=="string"&&/^[0-9]+$/.test(v)?parseInt(v,10):NaN}function m(v,x,S){let{deviceSizes:w,allSizes:I}=v;if(S){const C=/(^|\s)(1?\d?\d)vw/g,N=[];for(let T;T=C.exec(S);T)N.push(parseInt(T[2]));if(N.length){const T=Math.min(...N)*.01;return{widths:I.filter(O=>O>=w[0]*T),kind:"w"}}return{widths:I,kind:"w"}}return typeof x!="number"?{widths:w,kind:"w"}:{widths:[...new Set([x,x*2].map(C=>I.find(N=>N>=C)||I[I.length-1]))],kind:"x"}}function _(v){let{config:x,src:S,unoptimized:w,width:I,quality:P,sizes:C,loader:N}=v;if(w)return{src:S,srcSet:void 0,sizes:void 0};const{widths:T,kind:O}=m(x,I,C),M=T.length-1;return{sizes:!C&&O==="w"?"100vw":C,srcSet:T.map((z,D)=>N({config:x,src:S,quality:P,width:z})+" "+(O==="w"?z:D+1)+O).join(", "),src:N({config:x,src:S,quality:P,width:T[M]})}}function g(v,x){let{src:S,sizes:w,unoptimized:I=!1,priority:P=!1,loading:C,className:N,quality:T,width:O,height:M,fill:z=!1,style:D,overrideSrc:B,onLoad:G,onLoadingComplete:J,placeholder:Y="empty",blurDataURL:X,fetchPriority:Z,decoding:he="async",layout:fe,objectFit:ee,objectPosition:ie,lazyBoundary:_e,lazyRoot:Ce,...ge}=v;const{imgConf:we,showAltText:V,blurComplete:oe,defaultLoader:F}=x;let ce,je=we||n.imageConfigDefault;if("allSizes"in je)ce=je;else{var Oe;const de=[...je.deviceSizes,...je.imageSizes].sort((ve,qe)=>ve-qe),Q=je.deviceSizes.sort((ve,qe)=>ve-qe),se=(Oe=je.qualities)==null?void 0:Oe.sort((ve,qe)=>ve-qe);ce={...je,allSizes:de,deviceSizes:Q,qualities:se}}if(typeof F>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
4
+ Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);const ke=ge?te&&typeof te=="object"&&te.ref:z,[ct,Me,Le]=(0,_.useIntersection)({rootMargin:"200px"}),tt=o.default.useCallback(re=>{(ne.current!==$||Ie.current!==q)&&(Le(),ne.current=$,Ie.current=q),ct(re),ke&&(typeof ke=="function"?ke(re):typeof ke=="object"&&(ke.current=re))},[$,ke,q,Le,ct]);o.default.useEffect(()=>{process.env.NODE_ENV==="production"&&F&&(!Me||!je||w(F,q,$,{locale:ee},{kind:Oe},ce))},[$,q,Me,ee,je,V==null?void 0:V.locale,F,ce,Oe]);const We={ref:tt,onClick(re){if(process.env.NODE_ENV!=="production"&&!re)throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');!ge&&typeof ie=="function"&&ie(re),ge&&te.props&&typeof te.props.onClick=="function"&&te.props.onClick(re),F&&(re.defaultPrevented||P(re,F,q,$,Z,he,fe,ee,ce))},onMouseEnter(re){!ge&&typeof _e=="function"&&_e(re),ge&&te.props&&typeof te.props.onMouseEnter=="function"&&te.props.onMouseEnter(re),F&&((!je||process.env.NODE_ENV==="development")&&ce||w(F,q,$,{locale:ee,priority:!0,bypassPrefetchedCheck:!0},{kind:Oe},ce))},onTouchStart:process.env.__NEXT_LINK_NO_TOUCH_START?void 0:function(De){!ge&&typeof we=="function"&&we(De),ge&&te.props&&typeof te.props.onTouchStart=="function"&&te.props.onTouchStart(De),F&&(!je&&ce||w(F,q,$,{locale:ee,priority:!0,bypassPrefetchedCheck:!0},{kind:Oe},ce))}};if((0,u.isAbsoluteUrl)($))We.href=$;else if(!ge||X||te.type==="a"&&!("href"in te.props)){const re=typeof ee<"u"?ee:V==null?void 0:V.locale,De=(V==null?void 0:V.isLocaleDomain)&&(0,g.getDomainLocale)($,re,V==null?void 0:V.locales,V==null?void 0:V.domainLocales);We.href=De||(0,v.addBasePath)((0,d.addLocale)($,re,V==null?void 0:V.defaultLocale))}return ge?o.default.cloneElement(te,We):(0,n.jsx)("a",{...Ee,...We,children:D})});(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)})(Ua,Ua.exports);var Kx=Ua.exports,Qx=Kx;const Ot=U.getDefaultExportFromCjs(Qx),Yx="_link_w24h0_1",Xx="_wrapper_w24h0_98",Jx="_text_w24h0_106",Ji={link:Yx,wrapper:Xx,text:Jx},wt=({children:e,adornments:t,className:r,disableUnderline:n,href:o,mode:i,size:c,title:l,onClick:u,disablePadding:d,...h})=>{const m=p.helpers.ValidateProp({fieldTypes:zn.SizesSmallExtended,property:c,fallback:"medium"}),_=p.helpers.ValidateProp({fieldTypes:zn.Mode,property:i,fallback:"default"});return s.jsx(Ot,{...h,className:p.helpers.classNameConcat(Ji.link,r),href:o&&o.length>0?o:"#","data-size":m,"data-variant":_,title:l||"NextLink","data-disable-underline":n??!1,"data-disable-padding":d??!0,children:s.jsxs("div",{className:Ji.wrapper,onClick:u,children:[t==null?void 0:t.start,s.jsx("p",{className:Ji.text,"data-size":m,children:e}),t==null?void 0:t.end]})})},Zx=({ICONS:e})=>{const{resetFeedback:t}=jn();return s.jsxs("div",{className:js["wishlist--snack--actions"],children:[s.jsx(wt,{href:"/favoritos",children:"Ver Favoritos"}),s.jsx(p.Button,{variant:"tertiary",size:"small",onClick:t,adornment:{start:s.jsx(p.Icon,{name:e.close})}})]})},kc=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=xc(),{resetFeedback:o}=jn(),i=j.useRef(null);return j.useEffect(()=>{i.current&&clearTimeout(i.current),n&&(i.current=setTimeout(()=>{o()},5e3))},[n,o]),(n==null?void 0:n.active)&&s.jsx(qn,{Z_INDEX_WAR:r,className:js["wishlist--snack"],"data-action":n.action,title:n.action==="add"?e.messages.add:e.messages.remove,supportChildren:s.jsx(Zx,{ICONS:t}),size:"medium"})};kc.displayName="WishList.Feedback";const Mc={"product-list--banner":"_product-list--banner_sfibj_1","product-list--card":"_product-list--card_sfibj_30","product-list":"_product-list_sfibj_1"},Gp=({className:e,children:t,columns:r=1,isMobile:n=!1,gap:o=8,position_grid:i,totalColumns:c=4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,...u})=>{const d=j.useMemo(()=>r%c===0?"initial":n||r<2?l:l.split("/").reverse().join("/"),[r,c,n]);return s.jsx("div",{...u,className:p.helpers.classNameConcat(Mc["product-list--banner"],e),style:{aspectRatio:d,maxWidth:`${r/c*100}%`,order:i,padding:o/2},children:t})};Gp.displayName="ProductList.Banner";class eb{constructor(){Qr(this,"cache",new Map);Qr(this,"pendingRequests",new Map);Qr(this,"rafId",null)}request(t,r,n){const o=this.getCacheKey(t,n==null?void 0:n.filterTexture);if(this.cache.has(o)){r(this.cache.get(o));return}const i=this.pendingRequests.get(o);i?i.callbacks.push(r):this.pendingRequests.set(o,{productId:t,callbacks:[r],filterTexture:n.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=[],n=[];if(t.forEach((i,c)=>{this.cache.has(c)?n.push([c,i]):r.push(i)}),n.forEach(([i,c])=>{const l=this.cache.get(i);l&&c.callbacks.forEach(u=>u(l)),t.delete(i)}),r.length===0)return;const o=new Map;r.forEach(i=>{var u;const c=((u=i.filterTexture)==null?void 0:u.sort().join(","))||"no-filter",l=o.get(c)||[];l.push(i),o.set(c,l)}),await Promise.all(Array.from(o.values()).map(i=>this.executeGroupRequest(i)))}async executeGroupRequest(t){const r=t.map(o=>o.productId),n=t[0].filterTexture;try{const o=await U.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 i=await o.json();t.forEach(c=>{const l=i[c.productId]||[],u=n&&l.length?U.formattedSimilars(l,n):l,d=this.getCacheKey(c.productId,n);this.cache.set(d,u),c.callbacks.forEach(h=>h(u)),this.pendingRequests.delete(d)})}catch(o){console.error("Erro ao buscar similares:",o),t.forEach(i=>{const c=this.getCacheKey(i.productId,n);i.callbacks.forEach(l=>l([])),this.pendingRequests.delete(c)})}}clearCache(){this.cache.clear()}}const qu=new eb;function Lc(e,t){const[r,n]=j.useState([]),o=j.useRef(!1);j.useEffect(()=>{o.current=!1},[e]);const i=j.useCallback(()=>{!e||o.current||(o.current=!0,qu.request(e,n,t))},[e,t]),c=j.useCallback(()=>qu.clearCache(),[]);return{items:r,loadSimilars:i,clearCache:c}}const Kp=({isKit:e,parent:t,productId:r,setNotify:n,CONSTANTS:o})=>{const{router:i}=Ae(),{items:c,loadSimilars:l}=Lc(r,{filterTexture:o.TEXTURE_IMAGE}),u=j.useRef(!1),d=j.useRef(null),h=g=>i.push(g??""),m=j.useCallback(g=>{!r||!g||l()},[r,l]),_=j.useCallback((g,v)=>{if(!g.isIntersecting){o.PLP_INFINITE_SCROLL&&d.current&&(clearTimeout(d.current),d.current=null);return}if(g.intersectionRatio>=v.threshold&&!u.current){if(o.PLP_INFINITE_SCROLL){d.current=setTimeout(()=>{m(!0)},o.PLP_PRODUCT_SIMILAR_DELAY);return}m(!0)}},[m]);return j.useEffect(()=>{if(e||!t.current)return;const g={root:null,threshold:.1},v=new IntersectionObserver(([x])=>{_(x,g)},g);return v.observe(t.current),()=>{d.current&&clearTimeout(d.current),v.disconnect()}},[_,t,e]),s.jsx(Ue.Actions,{data:c,callback:h,isKit:e,children:!e&&s.jsx(Ue.SizeSelector,{setNotify:n,PLP_SIZE_ORDER:o.PLP_SIZE_ORDER})})};Kp.displayName="ProductList.Card.Actions";const Qp=({className:e,children:t,gap:r=32,item:n,isMobile:o,order:i,tag:c,hasMaxWidth:l=!0,index:u,setSkuSelected:d,showVideo:h,CONSTANTS:m,..._})=>{const g=j.useRef(null),{availability:{status:v}}=n,x=j.useCallback((w,I)=>{var P;typeof d=="function"&&d((P=w.isVariantOf)==null?void 0:P.hasVariant,I)},[d]),S=n.name.substring(0,4).toLowerCase()==="kit ";return s.jsxs("div",{..._,className:p.helpers.classNameConcat(Mc["product-list--card"],e),"data-mobile":o,"data-order":i,ref:g,style:{...l&&{maxWidth:o?"50%":"25%"},order:i,padding:r/2},children:[s.jsxs(Ue.Root,{item:n,isMobile:o,index:u,size:o?"small":"medium",order:i,outStock:!v,CONSTANTS:m,children:[s.jsx(Ue.Header,{product:n,tag:c==null?void 0:c.commercial}),s.jsx(Ue.Media,{showVideo:h,hasPriority:!0}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:c==null?void 0:c.institucional}),s.jsx(Kp,{productId:n.isVariantOf.productGroupID,parent:g,setNotify:x,isKit:S,CONSTANTS:m}),!S&&s.jsx(Ue.OutStock,{callback:x})]}),s.jsx(Ue.Wrapper,{type:"footer",children:v&&s.jsx(Ue.BuyButton,{isKit:S})})]}),t]})};Qp.displayName="ProductList.Card";const Yp=({children:e,className:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Mc["product-list"],t),children:e});Yp.displayName="ProductList.Grid";const Ft={Banner:Gp,Card:Qp,Root:Yp,helpers:Zv},tb="_pdc_av7d8_1",St={"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:tb},Dc=({className:e,ICONS:t,PLP_NOT_RESULT:r})=>{const{router:n}=Ae(),{isMobile:o}=xe(),i=()=>{n.push(r==null?void 0:r.link)};return s.jsxs("div",{className:p.helpers.classNameConcat(St["pdc--empty"],e),children:[s.jsxs(p.TextStructure.DivWrapper,{className:St["pdc--empty-wrapper"],children:[s.jsx("span",{className:o?"typography-style-body-md":"typography-style-heading-sm",children:r.title}),s.jsx("p",{className:o?"typography-style-body-xs":"typography-style-body-sm",children:r.subtitle})]}),s.jsx(p.Button,{adornment:{end:s.jsx(p.Icon,{name:t.arrow_right})},className:"typography-style-body-sm-strong",onClick:()=>i(),variant:"tertiary",children:s.jsx("b",{children:r.text})})]})};Dc.displayName="PDC.Empty";const Fc=e=>s.jsx("div",{...e,className:St["pdc--infinite--next-page"],children:s.jsx(p.Spinner,{className:St["pdc--infinite--next-page--spinner"]})});Fc.displayName="PDC.Spinner";function Xp({CONSTANTS:e}){const{sendDataLayerEvent:t}=Ce(),{isMobile:r}=xe(),{getAvailableProductTag:n}=Cr(),[o,i]=j.useState([]),[c,l]=j.useState(!0),u=ns(),d=u.join(","),h=r?16:32;return j.useEffect(()=>{const m=async()=>{u.length?await fetch("/api/wishlist/products",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productIds:u})}).then(_=>_.json()).then(_=>{i(_),t({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:_}}})}).catch(_=>console.error(_)):i([]),l(!1)};if(u.length){m();return}if(u.length===0&&o.length===0){l(!1);return}i([]),l(!1)},[d]),s.jsx("section",{className:js["wishlist-grid"],children:s.jsxs("div",{className:js["wishlist-grid--container"],children:[c&&s.jsx(Fc,{}),!u.length&&!(o!=null&&o.length)&&!c&&s.jsx(Dc,{className:js["pdc-empty-modifier"],ICONS:e.ICONS,PLP_NOT_RESULT:e.WISHLIST_NOT_RESULT}),s.jsx(Ft.Root,{children:Array.isArray(o)&&o.map((m,_)=>{const g=m.node.cluster.highlights||[],v=n(g);return s.jsx(Ft.Card,{gap:h,isMobile:r??!1,item:m.node,tag:v,index:_,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}},m.node.sku)})})]})})}Xp.displayName="Wishlist.Grid";const rb=e=>e.map(t=>{var r;return(r=t.isVariantOf)==null?void 0:r.productGroupID})??[],Jp=({WISHLIST_INFO:e,ICONS:t,Z_INDEX_WAR:r})=>{const n=ss(),o=ns(),i=xc(),{updateList:c}=jn();return j.useEffect(()=>{var u,d;i.active&&er.set("fs::wishlist",o);const l=async()=>{var h;await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:o,docId:(h=n==null?void 0:n.user)==null?void 0:h.id})}).catch(m=>{console.error("Error updating wishlist:",m)})};i.active&&((u=n.user)!=null&&u.id)&&o.length!==((d=n.wishlist)==null?void 0:d.length)&&l()},[i,n,o]),j.useEffect(()=>{var d;const l=async()=>{const h=await er.get("fs::wishlist");h&&(h==null?void 0:h.length)!==o.length&&c(h)},u=async()=>{var g;const h=await er.get("fs::wishlist")??[],m=n.wishlist?typeof n.wishlist[0]=="object"?rb(n.wishlist):n.wishlist:[],_=[...new Set([...h,...m])];c(_),er.set("fs::wishlist",_),m.length!==_.length&&await fetch("/api/wishlist/documents",{method:"PATCH",body:JSON.stringify({productIds:_,docId:(g=n.user)==null?void 0:g.id})}).catch(v=>{console.error("Error updating wishlist:",v)})};if((d=n.user)!=null&&d.id){u();return}l()},[n,c]),s.jsx(kc,{ICONS:t,Z_INDEX_WAR:r,WISHLIST_INFO:e})};Jp.displayName="Wishlist.Init";const Zp=({product:e,priceInfo:t,size:r="medium",style:n,ICONS:o})=>{const{sendDataLayerEvent:i,currentLocalRef:c}=Ce(),l=ns(),{toggleProduct:u}=jn(),{isVariantOf:{productGroupID:d}}=e;return s.jsx(p.Button,{adornment:{start:s.jsx(p.Icon,{size:r,name:l.includes(d)?o.favorite_true:o.favorite_false})},onClick:()=>{u(d),i({functionKey:"productEvents",data:{event:l.includes(d)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:c.current},commonData:{...e,...t}}})},style:{...n,border:"none"},variant:"tertiary"})};Zp.displayName="WishList.Toggle";const eh={Feedback:kc,Toggle:Zp,Grid:Xp,Init:Jp},th=({product:e,tag:t,size:r="small"})=>{const{CONSTANTS:n}=Kt(),{tags:o}=Cr(),i=e.offers.offers[0],c=U.getDiscountPercent(i.listPrice,i.price),l=o==null?void 0:o.flagDiscount;return s.jsxs(Ue.Wrapper,{type:"header",style:{zIndex:n.Z_INDEX_WAR.product_card_header},children:[c>0&&!t&&(l==null?void 0:l.enableTag)&&s.jsxs(p.Tag,{title:`${c}% ${l==null?void 0:l.tagText}`,variant:"quaternary",size:"small",style:{background:l==null?void 0:l.tagColor,color:l==null?void 0:l.tagTextColor},children:[c,"% ",l==null?void 0:l.tagText]}),t?s.jsx(p.Tag,{title:t.value,adornment:{start:t.enableIcon&&t.icon?s.jsx(p.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,n.PRODUCT_CARD_TOP_WISHLIST_TOGGLE&&s.jsx(eh.Toggle,{product:e,priceInfo:{price:i.price,listPrice:i.listPrice},variant:"card",ICONS:n.ICONS})]})};th.displayName="ProductCard.Actions.Header";const rh=j.createContext({}),nh=({children:e,fetch:t,queryKey:r,options:n})=>{const{data:o,isLoading:i,isFetched:c,refetch:l,isRefetching:u,error:d}=Dv({queryKey:r,queryFn:async()=>{const h=await t();if(!h.ok)throw new Error("[ROOT QUERY PROVIDER ERROR]: NOT LOAD!");return h.json()},...n});return s.jsx(rh.Provider,{value:j.useMemo(()=>({data:o,refetch:l,isLoading:i,isFetched:c,isRefetching:u,isError:!!d}),[o,l,i,c,u,d]),children:e})},sh=()=>{const e=j.useContext(rh);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},oh=j.createContext({}),nb=({callback:e,children:t})=>{const{data:r,isLoading:n,...o}=sh(),i=r&&"data"in r?r.data:null;return j.useEffect(()=>{i&&typeof e=="function"&&e({...i})},[i]),s.jsx(oh.Provider,{value:{...o,isLoading:n,products:(i==null?void 0:i.products)??[],pagination:(i==null?void 0:i.pagination)??Fv,total:(i==null?void 0:i.pagination.count)??0},children:t})},zc=({callback:e,children:t,forceUpdate:r,options:n,state:o,queryKey:i})=>s.jsx(nh,{fetch:()=>U.fetchProxy("/_v/proxy/search/product",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...o,forceUpdate:r})}),queryKey:i,options:n,children:s.jsx(nb,{callback:e,children:t})}),os=()=>{const e=j.useContext(oh);if(e===void 0)throw new Error("useQueryProductsContext must be used within a QueryProductsProvider");return e},ih=({className:e,children:t,hasPriority:r=!1,showVideo:n=!1,...o})=>{const{element:i,index:c,item:{image:l,slug:u,video:d,id:h},sendSelectItemEvent:m,order:_,CONSTANTS:g}=Kt(),{sendSearchEvent:v}=Ce(),{term:x}=os(),S=U.getFirstImages({images:l,label:{first:g.MAIN_IMAGE,second:g.SECOND_IMAGE}});return s.jsxs("div",{...o,className:p.helpers.classNameConcat(mt["product-card--image"],e),ref:i,style:{aspectRatio:g.PRODUCT_CARD_IMAGE_ASPECT_RATIO},children:[s.jsx(Ot,{href:`/${u}/p`,onClick:()=>{m(),x&&v("search.click",{productId:h,position:c,text:x})},onMouseUp:w=>{w.button===1&&m(),g.PLP_INFINITE_SCROLL&&sessionStorage.setItem(g.PLP_GRID_SCROLL_BACK.order,String(_))},children:s.jsx("div",{className:mt["product-card--image--container"],children:Array.isArray(S)&&S.map(({url:w,alternateName:I},P)=>j.createElement(at.Image,{...g.PRODUCT_IMAGE_DIMENSIONS.product_card,style:g.PRODUCT_IMAGE_DIMENSIONS.product_card,alt:I??"product image",key:P,...r&&{priority:P===0&&c<4},objectFit:"cover",src:w}))})}),g.PLP_SHOW_VIDEO_ON_PRODUCT_CARD&&n&&d&&s.jsx(Ue.Video,{url:d,poster:S[0].url}),t]})};ih.displayName="ProductCard.Media.Media";const ah=({className:e,callback:t,children:r,...n})=>{const{isMobile:o,item:i,CONSTANTS:{PRODUCT_CARD_TEXTS:c}}=Kt(),{availability:{status:l}}=i;return l?null:s.jsxs("div",{...n,className:p.helpers.classNameConcat(mt["product-card--outstock"],e),children:[s.jsx(p.Tag,{size:"small",variant:"secondary",title:c.disabled,children:c.disabled}),s.jsx(p.Button,{className:p.helpers.classNameConcat(e,"buy-button"),size:o?"medium":"large",variant:"quaternary",onClick:()=>{typeof t=="function"&&t(i)},children:c.notify})]})};ah.displayName="ProductCard.OutStock";const ch=({children:e,className:t="",index:r,isMobile:n=!1,item:o,size:i,order:c,outStock:l,shelfTitle:u,CONSTANTS:d,...h})=>s.jsx(wx,{item:o,isMobile:n,outStock:l,order:c,size:i,index:r,shelfTitle:u,CONSTANTS:d,children:s.jsx("div",{...h,className:p.helpers.classNameConcat(mt["product-card--wrapper"],t),"data-size":i,children:e})});ch.displayName="ProductCard.Root";const lh=({disabled:e,label:t,size:r,value:n,onClick:o,...i})=>s.jsxs(p.ToggleSize.Wrapper,{...i,disabled:!1,outOfStock:e,size:r,onClick:o,children:[s.jsx(p.ToggleSize.DisabledAdornment,{}),s.jsx(p.ToggleSize.Text,{children:t})]});lh.displayName="ProductCard.SizeSelector.Item";const uh=({active:e=!1,callback:t,selectedSku:r=null,item:n,setNotify:o})=>{const{item:i,isMobile:c,setSelectedSku:l,eventDataRef:u}=Kt();n.productId=i.id;const d=U.disableSKU(n),h=U.getSKUName(n,"tamanho");!d&&!u.current.availableSkus.includes(h)&&u.current.availableSkus.push(h);const m=j.useCallback(g=>{const v=r===g?null:g;typeof l=="function"&&l(v),typeof t=="function"&&t(v)},[t,l,r]),_=j.useCallback(()=>{if(d&&typeof o=="function"){o(i,n);return}m(n)},[n,o,m,d,i]);return s.jsx(lh,{active:e,disabled:d,label:h,onClick:()=>_(),size:c?"x-small":"small",value:n})};uh.displayName="ProductCard.SizeSelector.SkuItem";const dh=({items:e,getLabel:t,PLP_SIZE_ORDER:r})=>Array.isArray(e)?[...e].sort((n,o)=>{const i=t(n).toUpperCase(),c=t(o).toUpperCase(),l=r.indexOf(i)-r.indexOf(c);return l!==0?l:i.localeCompare(c,"pt-BR")}):[],fh=({callback:e,className:t="",children:r,setNotify:n,PLP_SIZE_ORDER:o,...i})=>{const{isMobile:c,item:{isVariantOf:{hasVariant:l}},selectedSku:u}=Kt(),d=j.useMemo(()=>Array.isArray(l)?dh({items:l,getLabel:h=>U.getSKUName(h,"tamanho"),PLP_SIZE_ORDER:o}):[],[l]);return s.jsxs("div",{...i,className:p.helpers.classNameConcat(mt["product-card--selectors--size"],t),"data-mobile":c,children:[s.jsx("div",{className:mt["product-card--selectors--size--skus"],children:d.map((h,m)=>s.jsx(uh,{active:u===h,callback:e,item:h,selectedSku:u,setNotify:n},`size--${m}--${h.sku}`))}),s.jsx("div",{className:mt["product-card--selectors--size--button"],children:r})]})};fh.displayName="ProductCard.SizeSelector";const Ha=({alt:e="",callback:t,more:r,total:n=4,src:o,url:i,...c})=>s.jsxs(p.ToggleStyle.Wrapper,{...c,onClick:()=>{typeof t=="function"&&t(i)},children:[s.jsx(p.ToggleStyle.DisabledAdornment,{}),s.jsxs(p.ToggleStyle.Texture,{children:[o&&s.jsx(at.Image,{alt:e??o,src:o,height:34,width:34}),r&&s.jsx(p.TextStructure.DivWrapper,{className:mt["product-card--selectors--style--more"],children:s.jsxs("p",{children:["+ ",n]})})]})]}),sb=({children:e,callback:t,data:r,total:n=4,size:o,...i})=>{const{index:c}=Kt(),{triggerSelectItemEventRef:l}=Ce();return s.jsxs("div",{...i,children:[e,Array.isArray(r)&&r.slice(0,n).map((u,d)=>s.jsx(Ha,{callback:h=>{l.current.trigger=!0,l.current.index=c,typeof t=="function"&&t(h)},src:(u==null?void 0:u.textureImage)??"",alt:u==null?void 0:u.textureAlt,url:u==null?void 0:u.slug,size:o},d)),Array.isArray(r)&&(r==null?void 0:r.length)>n&&s.jsx(Ha,{size:o,total:r.length-n,more:!0})]})},ph=({callback:e,className:t,data:r,images:n=[],findTexture:o,...i})=>{const{CONSTANTS:c}=Kt(),l=o||c.TEXTURE_IMAGE,u=n==null?void 0:n.find(d=>l.includes(d.alternateName));return s.jsx(sb,{...i,callback:e,className:p.helpers.classNameConcat(mt["product-card--selectors--style"],t),data:r,size:"x-small",children:u&&s.jsx(Ha,{active:!0,size:"x-small",src:u.url})})};ph.displayName="ProductCard.StyleSelector";const hh=({className:e,hasDecimal:t,...r})=>{const{isMobile:n,item:{offers:{lowPrice:o,highPrice:i},installments:{count:c,value:l}},eventDataRef:u}=Kt();u.current.priceInfo={price:o,listPrice:i};const d=U.formatPriceToCurrency(i,t),h=U.formatPriceToCurrency(o,t),m=U.formatPriceToCurrency(l??0),_=n?"horizontal":"stacked";return s.jsx("div",{...r,className:p.helpers.classNameConcat(mt["product-card--price"],e),"data-mobile":n,children:s.jsx(p.ProductInfo.Root,{size:"small",layout:_,children:s.jsxs(p.ProductInfo.Wrapper,{size:"small",layout:_,children:[s.jsx(p.ProductInfo.ValuesWrapper,{children:h!==d?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:d,size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:h,size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:h,size:"small"})}),c&&c>1&&l?s.jsx(p.ProductInfo.Price,{label:"installment",value:`${c}x ${m}`,size:"small"}):null]})})})};hh.displayName="ProductCard.Price";const mh=({tag:e,className:t})=>{const{item:{name:r}}=Kt();return s.jsxs("div",{className:p.helpers.classNameConcat(mt["product-card--title"],t),children:[s.jsx("div",{className:mt["product-card--title--tag"],children:e?s.jsx(p.Tag,{size:"small",title:e.value,variant:"quaternary",adornment:{start:e.enableIcon&&e.icon?s.jsx(p.Icon,{name:e.icon,style:{color:e.iconColor}}):null},style:{background:e.tagColor,color:e.textColor},children:e.value}):s.jsx("div",{})}),s.jsx("div",{className:mt["product-card--title--content"],children:r&&s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h3",{children:r})})})})]})};mh.displayName="ProductCard.Title";const _h=({className:e,url:t,poster:r,...n})=>{const{element:o}=Kt();return j.useEffect(()=>{if(!(o!=null&&o.current))return;const i=o.current,c=i.querySelector("video");if(c){const l=new IntersectionObserver(h=>{h.forEach(m=>{U.setVideoPlay(m.isIntersecting,c,t)})},{root:null,rootMargin:"0px",threshold:.5}),u=()=>{c.setAttribute("data-loaded","true")},d=()=>{i&&(l.observe(i),c.addEventListener("loadeddata",u))};return document.readyState==="complete"?d():window.addEventListener("load",d),()=>{l.disconnect(),window.removeEventListener("load",d)}}return()=>null},[t,o]),s.jsx("div",{...n,className:p.helpers.classNameConcat(mt["product-card--video"],e),children:t&&s.jsx(at.Video,{autoPlay:!1,muted:!0,loop:!0,preload:"none",playsInline:!0,poster:r})})};_h.displayName="ProductCard.Media.Video";const gh=({children:e,className:t,type:r,...n})=>s.jsx("div",{...n,className:p.helpers.classNameConcat(mt[`product-card--${r}`],t),children:e});gh.displayName="ProductCard.Wrapper";const Ue={Actions:Fp,BuyButton:zp,Header:th,Media:ih,Root:ch,OutStock:ah,Price:hh,SizeSelector:fh,StyleSelector:ph,Title:mh,Video:_h,Wrapper:gh},ob="_carousel_1egdv_1",ib="_shelf__container_1egdv_14",ab="_shelf_without_carousel_1egdv_34",cb="_card_container_1egdv_57",Dn={carousel:ob,"custom-controllers":"_custom-controllers_1egdv_5",shelf__container:ib,"controllers-arrows-bullets":"_controllers-arrows-bullets_1egdv_23",shelf_without_carousel:ab,card_container:cb},Bu=({title:e})=>s.jsx("div",{className:Dn.shelf__container,children:e&&s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-body-md",U.responsive["responsive-mobile-flex"]),children:e}),s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-heading-md",U.responsive["responsive-desktop-flex"]),children:e})]})})}),lb=({children:e,ICONS:t,itemsPerPage:r,title:n})=>{const{isMobile:o}=xe(),i=r[o?"mobile":"desktop"],{initialize:c,controller:l,itemsStyles:u,pagination:d}=p.Carousel.useCarousel({itemsPerPage:i,gap:10,loop:!0,direction:"row"}),h=j.Children.toArray(e).length;return o||h>=4?s.jsxs(p.Carousel.Root,{innerRef:_=>{c(_)},className:Dn.carousel,children:[s.jsxs("div",{className:Dn["custom-controllers"],children:[n&&s.jsx(Bu,{title:n}),i<h&&s.jsxs(p.Carousel.Controller,{className:Dn["controllers-arrows-bullets"],children:[s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.prevPage(),adornment:{start:s.jsx(p.Icon,{name:t.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>l==null?void 0:l.nextPage(),adornment:{start:s.jsx(p.Icon,{name:t.arrow_right})}})]}),!o&&i>2&&s.jsx(p.Carousel.Bullets,{page:d.currentPage,total:d.totalPages,onBulletClick:_=>l==null?void 0:l.navigateTo(_)})]})]}),s.jsx(p.Carousel.Body,{children:j.Children.map(e,(_,g)=>s.jsx(p.Carousel.Item,{style:{...u,overflow:"hidden"},children:_},`${n}_${g}`))})]}):s.jsxs(s.Fragment,{children:[n&&s.jsx(Bu,{title:n}),s.jsx("div",{className:Dn.shelf_without_carousel,children:e})]})},yh=({className:e,item:t,isMobile:r,size:n,shelfTitle:o,...i})=>{const c=j.useRef(null),{getAvailableProductTag:l}=Cr(),{availability:{status:u}}=t,d=m=>{const _=m.filter(g=>!i.CONSTANTS.TEXTURE_IMAGE.includes(g.keywords));return r?_.splice(0,2):_},h=l(t.cluster.highlights);return s.jsx("div",{ref:c,className:Dn.card_container,children:s.jsxs(Ue.Root,{...i,item:{...t,image:d(t.image)},isMobile:r,size:r?"small":"medium",outStock:!u,shelfTitle:o,children:[s.jsx(Ue.Header,{product:t,tag:h==null?void 0:h.commercial}),s.jsx(Ue.Media,{}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:h==null?void 0:h.institucional}),s.jsx(Ue.Actions,{})]}),s.jsx(Ue.Wrapper,{type:"footer"})]})})};yh.displayName="ProductList.Card";const Is={Shelf:lb,Card:yh},vh=({CONSTANTS:e,inView:t,products:r,innerRef:n})=>{const o=j.useMemo(()=>Sx(r),[r]),{isMobile:i}=xe(),{addItemsToCart:c}=Xe(),{sendDataLayerEvent:l}=Ce(),{getAvailableProductTag:u}=Cr(),[d,h]=j.useState({totalPrice:0,products:{}}),m=()=>{const g=Object.values(d.products);c(g),l({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:g.map(v=>{const x=o.find(S=>S.node.id===v.productId);return x==null?void 0:x.node})},supportData:{selectedSkus:g,price:d.totalPrice}}})},_=({selectedProduct:g,productId:v})=>{const x=Cx({selectedProduct:g,productId:v,prevState:d,mainSellerId:e.StoreConfig_MainSellerId});h(x)};return j.useEffect(()=>{if(!t||o.length===0)return;const g=e.BUY_PACKAGE.header.title;l({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:g},outsideEcommerceData:{item_list_name:g}}})},[t]),s.jsxs("div",{className:kr.container,ref:n,children:[s.jsx("div",{className:kr["carousel-container"],style:{width:o.length<=3?"max-content":"75%"},children:s.jsx(Is.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:g},v)=>{var w,I,P;const x=u(g.cluster.highlights),{availability:{status:S}}=g;return S?s.jsxs(Ue.Root,{item:{...g,image:Rc.helpers.product.getFirstImages({images:g.image,label:{first:e.MAIN_IMAGE,second:e.SECOND_IMAGE}})},isMobile:i,size:"medium",index:v,shelfTitle:e.BUY_PACKAGE.header.title,CONSTANTS:e,children:[s.jsx(Ue.Header,{product:g,tag:x.commercial}),s.jsx(Ue.Media,{}),s.jsxs(Ue.Wrapper,{type:"body",children:[s.jsx(Ue.Title,{tag:{value:(w=x.institucional)==null?void 0:w.value,enableIcon:(I=x.institucional)==null?void 0:I.enableIcon,icon:(P=x.institucional)==null?void 0:P.icon}}),s.jsx(Ue.Actions,{children:s.jsx(Ue.SizeSelector,{callback:C=>_({selectedProduct:C,productId:g.id}),PLP_SIZE_ORDER:e.PLP_SIZE_ORDER})})]})]},g.id):null})})}),s.jsx("div",{className:kr["add-cart-container"],children:s.jsx(jx,{handleAddAllToCart:m,selectedProducts:d,CONSTANTS:{BUY_BUTTON_LABELS:e.BUY_BUTTON_LABELS,BUY_PACKAGE:e.BUY_PACKAGE,FREIGHT_CALCULATION:e.FREIGHT_CALCULATION}})})]})},qc={"btn-login":"_btn-login_yas63_12","btn-header":"_btn-header_yas63_22","header-animation":"_header-animation_yas63_35"},Bc=({id:e})=>{const{setIsOpen:t,cartStore:{items:r}}=Xe(),{handleSelectContent:n}=Ce(),{CONSTANTS:o}=Ze(),i=r.reduce((c,l)=>c+(l.quantity??0),0);return s.jsx(p.Header.SupportItem,{onClick:()=>{t(!0),n({content:"header:minicart"})},id:e,children:s.jsxs(p.Badge.AutoPositioner,{children:[s.jsx(p.Badge.Count,{count:i,size:"medium",variant:"primary",style:{backgroundColor:"black",display:i>0?"flex":"none"}}),s.jsx(p.Icon,{name:o.header.ICONS.bag,size:"medium"})]})})};Bc.displayName="Header.Bag";const gn=({children:e,href:t,...r})=>t&&t!=="#"?s.jsx(Ot,{href:t.startsWith("/")?t:`/${t}`,...r,children:e}):e,xh=()=>{const{headerData:e}=Ze(),{handleSelectContent:t}=Ce(),{reset:r,updateValue:n}=Ds(),o=i=>{i?n(i):r()};return s.jsx(p.Header.Categories,{children:Array.isArray(e.categories)&&e.categories.map((i,c)=>s.jsx(gn,{href:i.link,onMouseEnter:()=>o(i.submenuId),onFocus:()=>o(i.submenuId),children:s.jsx(p.Header.CategoryItem,{className:qc["btn-header"],value:i.submenuId??null,adornment:{start:s.jsx(p.Icon,{name:i.iconStart}),end:s.jsx(p.Icon,{name:i.iconEnd})},style:{textWrap:"nowrap",gap:"0"},onClick:()=>{t({content:`header:${i.label}`})},children:i.label})},`category-${i.label}-${c}`))})};xh.displayName="Header.Categories";function ub(){const{handleSelectContent:e}=Ce(),{CONSTANTS:t}=Ze(),{setValue:r}=Wo();return s.jsx(p.Header.SupportItem,{onClick:()=>{r(!0),e({content:"header:search"})},children:s.jsx(p.Icon,{name:t.header.ICONS.search,size:"medium"})})}const db={"menu-subcategories-container":"_menu-subcategories-container_a93cr_1"},fb={"observer-wrapper":"_observer-wrapper_r43gk_1"},Yo=({children:e,eventData:t,observerOptions:r,callBackWhenVisible:n,stopOnIntersection:o=!0,className:i,...c})=>{const l=j.useRef(null),u=pc(l,o,r),{sendDataLayerEvent:d}=Ce();return j.useEffect(()=>{u&&(typeof n=="function"&&n(),t&&d({...t}))},[u]),s.jsx("div",{...c,ref:l,className:p.helpers.classNameConcat(fb["observer-wrapper"],i),children:e})},bh=({thumbnails:e,category:t,isMobile:r=!0,callBack:n})=>{const{handleSelectPromotionEvent:o}=Ce(),i=50/e.length;return s.jsx("div",{className:db["menu-subcategories-container"],children:e.map((c,l)=>{const u=r?c.srcMobile:c.srcDesk;if(!u)return null;const d={creative_name:"banner-menu",creative_slot:`banner-menu:${t}:${l+1}`,promotion_id:u,promotion_name:c.promotion_name};return s.jsx(Yo,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{...d}}}},observerOptions:{delay:1e3},children:s.jsxs(Ot,{href:c.link??"#",onClick:()=>{typeof n=="function"&&n(),o({updatePromotionRef:!0,promotion:d})},children:[s.jsx(at.Image,{src:u,alt:c.label??u,width:500,height:500,sizes:`(max-width: 768px) 100vw, (max-width: 1023px) 75vw, ${i}vw`}),c.label&&s.jsx("p",{children:c.label})]})},`thumb-${c.label}-${l}`)})})};bh.displayName="Menu.Thumbnail";const ko={"menu-desktop":"_menu-desktop_c3fq0_1","menu-categories":"_menu-categories_c3fq0_12","menu-categories--see-all":"_menu-categories--see-all_c3fq0_30"},jh=({children:e,dividerOnRight:t=!0,subMenu:r,...n})=>{var u;const{router:o}=Ae(),{reset:i}=Ds(),{handleSelectContent:c}=Ce(),{CONSTANTS:l}=Ze();return s.jsxs("div",{...n,className:ko["menu-categories"],children:[(u=r==null?void 0:r.subCategories)==null?void 0:u.map((d,h)=>{var g,v,x,S;const m=d.listCollapseDesk&&!((g=d.see_all)!=null&&g.link)?{expandAfterRowsQty:d.rowsToShowDesk}:{},_=d.listCollapseDesk&&!((v=d.see_all)!=null&&v.link)?{expansivesAdornments:{open:l.header.ICONS.add,close:l.header.ICONS.minus},expansivesLabels:{open:l.header.COMPONENT_LIST.listExpandLabel,close:l.header.COMPONENT_LIST.listCollapseLabel},iconSize:"x-small"}:"";return s.jsxs(p.ComponentList.Structure,{children:[s.jsx(gn,{href:d.linkLabel,title:d.label,onClick:()=>{d.linkLabel&&(i(),c({content:`menu:${d.label??""}:${r.label??""}`}))},children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{children:d.label})})})}),s.jsx(p.ComponentList.List,{columns:1,...m,className:ko["submenu-categories"],children:(x=d.items)==null?void 0:x.map((w,I)=>s.jsx(p.ComponentList.ListItem,{id:`list-item-${w.label}-${I}`,children:s.jsx(wt,{href:w.link??"#",size:"x-small",title:w.label??"",disableUnderline:!0,disablePadding:!0,onClick:()=>{i(),c({content:`menu:${d.label??""}:${w.label??""}:${r.label??""}`})},children:w.label})},`list-item-${w.label}-${I}`))}),((S=d.see_all)==null?void 0:S.link)&&s.jsx(gn,{href:d.see_all.link,title:d.see_all.link,onClick:()=>{var w;(w=d.see_all)!=null&&w.link&&(i(),c({content:`menu:${d.label??""}:${r.label}`}),o.push(d.see_all.link))},children:s.jsx(p.TextStructure.Root,{..._,children:s.jsxs("span",{className:ko["menu-categories--see-all"],children:[d.see_all.link&&d.see_all.label,s.jsx(p.Icon,{name:l.header.ICONS.arrow_right,size:"small"})]})})})]},`list-${d.label}-${h}`)}),t&&s.jsx(p.Utils.Divider,{size:"small",direction:"vertical"})]})};jh.displayName="Menu.Categories";const Sh=({children:e,dividerOnBottom:t=!0,...r})=>{const{CONSTANTS:n}=Ze();return s.jsxs(s.Fragment,{children:[s.jsx("div",{...r,className:ko["menu-desktop"],style:{...r.style,justifyContent:n.header.ALIGNMENT_MENU},children:e}),t&&s.jsx(p.Utils.Divider,{size:"small"})]})};Sh.displayName="Menu.MenuRoot";const Zi={Root:Sh,Categories:jh,Thumbnail:bh},Ch=()=>{const{headerData:e,CONSTANTS:t}=Ze(),r=uf(),{reset:n}=Ds();return s.jsx(p.Header.SubMenu,{className:"header-desktop-submenu",children:Array.isArray(e.subMenus)&&e.subMenus.map((o,i)=>{const{thumbnails:c,label:l,id:u}=o,d=u===r,h=c==null?void 0:c.some(m=>!!m.srcDesk);return s.jsxs(Zi.Root,{id:u,style:d?{display:"flex",zIndex:t.header.Z_INDEX_WAR.menu_desktop}:{display:"none"},dividerOnBottom:d,children:[s.jsx(Zi.Categories,{dividerOnRight:!!h,subMenu:o}),Array.isArray(c)&&s.jsx(Zi.Thumbnail,{thumbnails:c,isMobile:!1,category:l,callBack:n})]},`submenu-${u}-${i}`)})})};Ch.displayName="Header.SubMenu";const wh=()=>{const{handleSelectContent:e}=Ce(),{CONSTANTS:t}=Ze();return s.jsx(Ot,{href:"/favoritos",children:s.jsx(p.Header.SupportItem,{onClick:()=>e({content:"header:wishlist"}),children:s.jsx(p.Icon,{name:t.header.ICONS.favorite_false,size:"medium"})})})};wh.displayName="Header.WishList";const pb="_root_im5yf_125",Wt={"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:pb},Eh=({className:e,children:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Wt["user-menu--content"],e),children:t});Eh.displayName="UserMenu.Content";var Ph=(e=>(e.Account="account",e))(Ph||{});const Ih=({className:e,cashBack:t,credits:r,link:n,total:o,...i})=>{const c=t?U.formatPriceToCurrency(t):void 0,l=r?U.formatPriceToCurrency(r):void 0,u=o?U.formatPriceToCurrency(o):void 0;return s.jsx(p.Credits.Account,{...i,className:p.helpers.classNameConcat(Wt["user-menu--credits"],e),icon:"wallet",showIcon:!0,cashBackValue:c,creditsValue:l,linkMore:n,totalValue:u,type:Ph.Account})};Ih.displayName="UserMenu.Credits";const Nh=({className:e,children:t,description:r,text:n,...o})=>{const{isMobile:i}=xe();return s.jsx("div",{...o,className:p.helpers.classNameConcat(Wt["user-menu--login"],e),"data-mobile":i,children:s.jsxs("div",{className:Wt["user-menu--login--content"],children:[s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{alignContent:"flex-start",alignItems:"flex-start",children:[s.jsx("h3",{className:"typography-style-body-lg-strong",children:n}),s.jsx("p",{children:r})]})}),t]})})};Nh.displayName="UserMenu.Login";const Rh=({className:e,isLogged:t,onLogoutClick:r,storeConfig:n,isMobile:o,LOGOUT_TEXT:i,LOGOUT_ICON:c,LOGIN_MENU_OPTIONS_ARRAY:l})=>{const u=o?l:l.filter(d=>d.deviceShown==="both"||d.deviceShown===(o?"mobile":"desktop"));return s.jsxs("ul",{className:p.helpers.classNameConcat(Wt["user-menu--menu"],e),children:[Array.isArray(u)&&u.map((d,h)=>s.jsx("li",{children:s.jsx(wt,{href:d.href??"#",size:"small",disableUnderline:!0,adornments:{start:s.jsx(p.Icon,{name:d.icon??"delete"})},children:d.label})},h)),t?s.jsx("li",{children:s.jsx(wt,{href:`${n.secureSubdomain}/api/vtexid/pub/logout?scope=mariafilo&returnUrl=${encodeURIComponent(`${n.storeUrl}`)}`,size:"small",disableUnderline:!0,onClick:r,adornments:{start:s.jsx(p.Icon,{name:c})},children:i})}):s.jsx(s.Fragment,{})]})};Rh.displayName="UserMenu.Menu";const Th=e=>{const t=j.useRef(null),r=j.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),n=j.useCallback(i=>{t.current&&!t.current.contains(i.target)&&e()},[e]),o=j.useCallback(i=>{i.key==="Escape"&&e()},[e]);return j.useEffect(()=>(document.addEventListener("mousedown",r),document.addEventListener("keydown",o),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",o),document.removeEventListener("touchstart",n)}),[r,o,n]),{ref:t}},hb=e=>{if(!e||typeof window>"u")return 0;const t=window.getComputedStyle(e);return parseInt(t.padding,10)},mb=(e,t,r)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement))return{left:0,top:0};const{height:n,left:o,top:i,width:c}=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=e!=null&&e.parentElement?hb(e==null?void 0:e.parentElement):0;return{left:o+c/2-(l.width+u*2),top:i+n+r}},Oh=j.createContext({}),_b=({children:e,delay:t=600,gap:r=20,isOpen:n,setIsOpen:o,target:i,...c})=>{const l=j.useRef(null),[u,d]=j.useState(!1),[h,m]=j.useState({left:0,top:0}),{ref:_}=Th(()=>{d(!0),typeof window<"u"&&(l.current=window.setTimeout(()=>{o(!1),d(!1)},t))});return j.useEffect(()=>{if(i&&(_!=null&&_.current)){const{left:g,top:v}=mb(_.current,i,r??0);m({left:g,top:v}),d(!1)}},[r,n,i,_]),s.jsx(Oh.Provider,{value:j.useMemo(()=>({...c,...h,contentRef:_,isLeaving:u,isOpen:n,setIsOpen:o,setIsLeaving:d,target:i}),[c,h,_,u,n,o,d,i]),children:e})},Ah=()=>{const e=j.useContext(Oh);if(e===void 0)throw new Error("useUserMenuContext must be used within a UserMenuProvider");return e},kh=({children:e,isMobile:t=!1,Z_INDEX_WAR:r})=>{const{isOpen:n,setIsOpen:o}=Ah();return s.jsxs(p.Modal.Root,{"data-user":"user-menu--modal",isMobile:t??!1,isOpen:n,setIsOpen:o,variant:"sideBottom",className:Wt["modal-root-modifier"],style:{zIndex:r.user_menu_mobile},children:[s.jsx(p.Modal.Header,{navigation:"top",className:Wt["modal-header-modifier"],children:s.jsx(p.Modal.Controls,{navigation:"top",isMobile:!0,className:Wt["modal-controls-modifier"]})}),s.jsx(p.Modal.Body,{children:e})]})};kh.displayName="UserMenu.Modal";const Mh=({children:e,component:t,Z_INDEX_WAR:r,isMobile:n,...o})=>s.jsx(_b,{...o,className:Wt.root,children:n?s.jsxs(s.Fragment,{children:[s.jsx(Ar.Modal,{Z_INDEX_WAR:r,children:t}),e]}):s.jsx(Ar.Tooltip,{component:t,style:{width:304,zIndex:r.user_menu},Z_INDEX_WAR:r,children:e})});Mh.displayName="UserMenu.Root";const Lh=({children:e,component:t,Z_INDEX_WAR:r,...n})=>{const{contentRef:o,left:i,isLeaving:c,isOpen:l,top:u}=Ah();return s.jsx(p.Tooltip.Root,{arrow:"top-right",component:s.jsx("div",{...n,ref:o,children:t}),className:p.helpers.classNameConcat(Wt["user-menu--tooltip"],Wt["tooltip-modifier"]),isLeaving:c,isOpen:l,left:i,size:"medium",position:"top",top:u,style:{zIndex:r.user_menu},children:s.jsx("div",{className:Wt["user-menu--tooltip"],children:e})})};Lh.displayName="UserMenu.Tooltip";const Ar={Credits:Ih,Content:Eh,Login:Nh,Menu:Rh,Modal:kh,Root:Mh,Tooltip:Lh},Xo=({children:e,isOpen:t,setIsOpen:r,desktopUserMenuTarget:n,mobileUserMenuTarget:o,storeConfig:i})=>{var g,v,x;const{isMobile:c}=xe(),{CONSTANTS:l}=Ze(),u=ss(),d=()=>{window.location.href=`${i.secureSubdomain}/api/io/login?returnUrl=${encodeURIComponent(`${window.location.href}`)}`},h=!!((g=u.user)!=null&&g.userId),{cashback:m,credits:_}=j.useMemo(()=>{var S,w;return{credits:((S=u==null?void 0:u.getCurrentCredits())==null?void 0:S.credits)??0,cashback:((w=u==null?void 0:u.getCurrentCredits())==null?void 0:w.cashback)??0}},[u]);return s.jsx(Ar.Root,{component:s.jsxs(Ar.Content,{children:[s.jsx(Ar.Login,{description:l.session.LOGIN_MENU_DESCRIPTION(h),text:l.session.LOGIN_MENU_TITLE(h,((v=u==null?void 0:u.user)==null?void 0:v.firstName)??((x=u==null?void 0:u.user)==null?void 0:x.email)),children:!h&&s.jsx(p.Button,{id:"conta",size:"medium",variant:"quaternary",onClick:()=>d(),children:l.header.MENU_INFO.login.button_text})}),_+m&&h?s.jsx(Ar.Credits,{credits:_,cashBack:m,link:`${i.secureSubdomain}/account#/meus-creditos`,total:_+m}):s.jsx(s.Fragment,{}),s.jsx(p.Utils.Divider,{}),s.jsx(Ar.Menu,{ICONS:l.header.ICONS,storeConfig:i,isLogged:h,className:U.responsive["responsive-desktop-flex"],onLogoutClick:()=>u.logout(),LOGOUT_TEXT:l.session.LOGOUT_TEXT,LOGOUT_ICON:l.session.LOGOUT_ICON,LOGIN_MENU_OPTIONS_ARRAY:l.session.LOGIN_MENU_OPTIONS_ARRAY}),s.jsx(Ar.Menu,{ICONS:l.header.ICONS,storeConfig:i,isMobile:!0,isLogged:h,className:U.responsive["responsive-mobile-flex"],onLogoutClick:()=>u.logout(),LOGOUT_TEXT:l.session.LOGOUT_TEXT,LOGOUT_ICON:l.session.LOGOUT_ICON,LOGIN_MENU_OPTIONS_ARRAY:l.session.LOGIN_MENU_OPTIONS_ARRAY})]}),isOpen:t,isMobile:c,setIsOpen:r,target:c?o:n,Z_INDEX_WAR:l.header.Z_INDEX_WAR,children:e})};Xo.displayName="UserMenu";const Dh=({storeConfig:e})=>{const{CONSTANTS:t}=Ze(),{handleSelectContent:r}=Ce(),{reset:n}=Ds(),{setValue:o}=gc(),i=_c(),c=j.useRef(null);return s.jsxs(s.Fragment,{children:[s.jsxs(p.Header.Wrapper,{className:"header-desktop-wrapper",children:[s.jsx(p.Header.Logo,{style:{width:"100%"},children:s.jsx(Ot,{href:"/",onMouseEnter:n,children:s.jsx(p.Icon,{name:t.header.ICONS.logo,onClick:()=>{r({content:"header:logo"})}})})}),s.jsx(xh,{}),s.jsxs(p.Header.Support,{onMouseEnter:n,style:{justifyContent:"flex-end"},children:[s.jsx(ub,{}),s.jsx(Xo,{isOpen:i,setIsOpen:o,desktopUserMenuTarget:c.current,storeConfig:e,children:s.jsx(p.Header.SupportItem,{onClick:()=>{o(!0),r({content:"header:user_menu"})},className:qc["btn-login"],innerRef:c,children:s.jsx(p.Icon,{name:t.header.ICONS.person,size:"medium"})})}),s.jsx(wh,{}),s.jsx(Bc,{id:"cart-button"})]})]}),s.jsx(Ch,{})]})};Dh.displayName="Header.HeaderDesktopWrapper";const Tt={"menu--banners":"_menu--banners_1cg51_1","menu--banners--item":"_menu--banners--item_1cg51_6","menu--banners--item--text":"_menu--banners--item--text_1cg51_17","menu--banners--list":"_menu--banners--list_1cg51_21","menu--dummy-close":"_menu--dummy-close_1cg51_46","menu--body":"_menu--body_1cg51_54","menu--categories":"_menu--categories_1cg51_67","menu--categories--title":"_menu--categories--title_1cg51_80","menu--categories--see-all":"_menu--categories--see-all_1cg51_92","menu--step":"_menu--step_1cg51_101","menu--sub-category":"_menu--sub-category_1cg51_117","menu--sub-category--item":"_menu--sub-category--item_1cg51_124","menu--sub-category--list":"_menu--sub-category--list_1cg51_130"},Fh=({children:e,mobileBannerAlt:t,mobileBannerSrc:r,textColor:n,submenuId:o,label:i,...c})=>s.jsx("button",{...c,className:Tt["menu--banners--item"],children:r?s.jsxs(p.Banner.Container,{children:[s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{alt:t??r,height:128,src:r,width:343,unoptimized:!0})}),s.jsx(p.Banner.Slot,{verticalAlignment:"end",horizontalAlignment:"center",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Tt["menu--banners--item--text"],children:s.jsx("h2",{className:"typography-style-body-xs",style:n?{color:n}:{},children:e})})})})]}):s.jsx("h2",{...c,children:e})});Fh.displayName="Menu.Mobile.Category";const zh=({label:e,...t})=>{const{CONSTANTS:r}=Ze();return s.jsx(p.Button,{...t,adornment:{end:s.jsx(p.Icon,{name:r.header.ICONS.arrow_right,size:"medium"})},mode:"inverse",size:"medium",variant:"primary",children:e})};zh.displayName="Menu.Mobile.Body.Category";const qh=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>s.jsx("div",{...n,className:Tt["menu--sub-category--list"],children:Array.isArray(e==null?void 0:e.items)&&(e==null?void 0:e.items.map((o,i)=>s.jsx(wt,{disableUnderline:!0,disablePadding:!1,href:o.link??"#",onClick:()=>r(o.label,t),size:"medium",title:o.label??"",children:o.label},i)))});qh.displayName="Menu.Mobile.List";const Bh=({current:e,onHandleOut:t})=>{var r;return e?s.jsx("div",{className:Tt["menu--sub-category"],children:Array.isArray(e==null?void 0:e.subCategories)&&((r=e==null?void 0:e.subCategories)==null?void 0:r.map((n,o)=>s.jsxs("div",{className:Tt["menu--sub-category--item"],children:[s.jsx(Ss.Title,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id}),s.jsx(Ss.List,{onHandleOut:t,subCategory:n,submenuLabel:e==null?void 0:e.id})]},o)))}):s.jsx(s.Fragment,{})};Bh.displayName="Menu.Mobile.Body.SubCategory";const Uh=({subCategory:e,submenuLabel:t,onHandleOut:r,...n})=>{var l;const{router:o}=Ae(),{handleSelectContent:i}=Ce(),{CONSTANTS:c}=Ze();return s.jsxs("div",{...n,className:Tt["menu--categories--title"],children:[s.jsx(gn,{href:e==null?void 0:e.linkLabel,title:e==null?void 0:e.linkLabel,onClick:()=>{i({content:`menu:${e.label??""}:${t}`})},children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-md",style:e!=null&&e.linkLabel?{cursor:"pointer"}:void 0,children:e==null?void 0:e.label})})})}),((l=e==null?void 0:e.see_all)==null?void 0:l.link)&&s.jsx(gn,{href:e.see_all.link,title:e.see_all.link,onClick:()=>{var u;r(e.label,t),(u=e==null?void 0:e.see_all)!=null&&u.link&&o.push(e.see_all.link)},children:s.jsx(p.TextStructure.Root,{children:s.jsxs("span",{className:Tt["menu--categories--see-all"],children:[e.see_all.label,s.jsx(p.Icon,{name:c.header.ICONS.arrow_right,size:"small"})]})})})]})};Uh.displayName="Menu.Mobile";const Ss={Banner:Fh,Category:zh,List:qh,SubCategory:Bh,Title:Uh},Hh=j.createContext({}),gb=({children:e})=>{const[t,r]=j.useState(null),n=j.useCallback(()=>{r(null)},[]),o=i=>{i!==t&&r(i)};return s.jsx(Hh.Provider,{value:{currentCategory:t,setCurrentCategory:r,handleCloseMenu:n,handleChangeSubMenuOpened:o},children:e})},$h=()=>j.useContext(Hh),Wh=e=>{const{router:t}=Ae(),{headerData:r}=Ze(),{handleSelectContent:n}=Ce(),{currentCategory:o,setCurrentCategory:i}=$h(),c=j.useRef(null),l=()=>{if(c.current){const g=c.current;g&&(i(null),g==null||g.click())}},u=(g,v)=>{n({content:`menu:${g}`}),t.push(v),l()},d=(g,v)=>{n({content:`menu:${g}:${v}`}),l()},h=Array.isArray(r==null?void 0:r.categories)?r==null?void 0:r.categories:[],m=Array.isArray(r==null?void 0:r.subMenus)?r==null?void 0:r.subMenus:[],_=g=>{g.submenuId?i(g.submenuId):u(g.label,g.link)};return s.jsxs("div",{...e,className:Tt["menu--body"],style:{transform:`translate3d(calc(-100% * ${o?1:0}), 0px, 0px)`},children:[s.jsx("button",{className:Tt["menu--dummy-close"],ref:c,"data-close":!0}),s.jsxs("div",{className:Tt["menu--step"],"data-active":"true",children:[s.jsx("div",{className:Tt["menu--banners"],children:s.jsx("div",{className:Tt["menu--banners--list"],children:h.map((g,v)=>j.createElement(Ss.Banner,{...g,key:v,onClick:()=>u(g.label,g.link)},g.mobileBannerAlt))})}),s.jsx("div",{className:Tt["menu--categories"],children:h.map((g,v)=>s.jsx(Ss.Category,{label:g.label,onClick:()=>_(g)},v))})]}),s.jsx("div",{className:Tt["menu--step"],"data-active":!!o,children:s.jsx(Ss.SubCategory,{current:m.find(g=>g.id===o),onHandleOut:d})})]})};Wh.displayName="Menu.Mobile.Body";const yb={"menu--header":"_menu--header_1ozdf_1"},Vh=()=>{var o;const{headerData:e}=Ze(),{currentCategory:t,setCurrentCategory:r}=$h(),n=(o=e==null?void 0:e.categories)==null?void 0:o.find(i=>i.submenuId===t);return s.jsxs("div",{className:yb["menu--header"],children:[s.jsx(p.Button,{"data-out":!n,iconNameStart:"arrow-left",mode:"inverse",onClick:()=>r(null)}),n&&s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{alignContent:"center",children:s.jsx("h2",{className:"typography-style-body-lg",children:n==null?void 0:n.label})})}),s.jsx(p.Button,{iconNameStart:"close","data-close":!0,"data-only":!n,mode:"inverse",onClick:()=>r(null)})]})};Vh.displayName="Menu.Mobile.Header";var $a={exports:{}};function vb(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 ea={},ta={},Uu;function xb(){return Uu||(Uu=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext(null);process.env.NODE_ENV!=="production"&&(n.displayName="LoadableContext")}(ta)),ta}var Hu;function bb(){return Hu||(Hu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return g}});const r=Ct._(j),n=xb();function o(v){return v&&v.default?v.default:v}const i=[],c=[];let l=!1;function u(v){let x=v(),S={loading:!0,loaded:null,error:null};return S.promise=x.then(w=>(S.loading=!1,S.loaded=w,w)).catch(w=>{throw S.loading=!1,S.error=w,w}),S}function d(v,x){let S=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},x),w=null;function I(){if(!w){const N=new h(v,S);w={getCurrentValue:N.getCurrentValue.bind(N),subscribe:N.subscribe.bind(N),retry:N.retry.bind(N),promise:N.promise.bind(N)}}return w.promise()}if(typeof window>"u"&&i.push(I),!l&&typeof window<"u"){const N=S.webpack&&typeof vb.resolveWeak=="function"?S.webpack():S.modules;N&&c.push(T=>{for(const O of N)if(T.includes(O))return I()})}function P(){I();const N=r.default.useContext(n.LoadableContext);N&&Array.isArray(S.modules)&&S.modules.forEach(T=>{N(T)})}function C(N,T){P();const O=r.default.useSyncExternalStore(w.subscribe,w.getCurrentValue,w.getCurrentValue);return r.default.useImperativeHandle(T,()=>({retry:w.retry}),[]),r.default.useMemo(()=>O.loading||O.error?r.default.createElement(S.loading,{isLoading:O.loading,pastDelay:O.pastDelay,timedOut:O.timedOut,error:O.error,retry:w.retry}):O.loaded?r.default.createElement(o(O.loaded),N):null,[N,O])}return C.preload=()=>I(),C.displayName="LoadableComponent",r.default.forwardRef(C)}class h{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};const{_res:x,_opts:S}=this;x.loading&&(typeof S.delay=="number"&&(S.delay===0?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},S.delay)),typeof S.timeout=="number"&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},S.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(w=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(x){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...x},this._callbacks.forEach(S=>S())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(x){return this._callbacks.add(x),()=>{this._callbacks.delete(x)}}constructor(x,S){this._loadFn=x,this._opts=S,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function m(v){return d(u,v)}function _(v,x){let S=[];for(;v.length;){let w=v.pop();S.push(w(x))}return Promise.all(S).then(()=>{if(v.length)return _(v,x)})}m.preloadAll=()=>new Promise((v,x)=>{_(i).then(v,x)}),m.preloadReady=v=>(v===void 0&&(v=[]),new Promise(x=>{const S=()=>(l=!0,x());_(c,v).then(S,S)})),typeof window<"u"&&(window.__NEXT_PRELOADREADY=m.preloadReady);const g=m}(ea)),ea}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(h,m){for(var _ in m)Object.defineProperty(h,_,{enumerable:!0,get:m[_]})}r(t,{default:function(){return d},noSSR:function(){return u}});const n=Ct,o=s,i=n._(bb()),c=typeof window>"u";function l(h){return{default:(h==null?void 0:h.default)||h}}function u(h,m){if(delete m.webpack,delete m.modules,!c)return h(m);const _=m.loading;return()=>(0,o.jsx)(_,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function d(h,m){let _=i.default,g={loading:S=>{let{error:w,isLoading:I,pastDelay:P}=S;if(!P)return null;if(process.env.NODE_ENV!=="production"){if(I)return null;if(w)return(0,o.jsxs)("p",{children:[w.message,(0,o.jsx)("br",{}),w.stack]})}return null}};h instanceof Promise?g.loader=()=>h:typeof h=="function"?g.loader=h:typeof h=="object"&&(g={...g,...h}),g={...g,...m};const v=g.loader,x=()=>v!=null?v().then(l):Promise.resolve(l(()=>null));return g.loadableGenerated&&(g={...g,...g.loadableGenerated},delete g.loadableGenerated),typeof g.ssr=="boolean"&&!g.ssr?(delete g.webpack,delete g.modules,u(_,g)):_({...g,loader: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)})($a,$a.exports);var jb=$a.exports,Sb=jb;const Gh=U.getDefaultExportFromCjs(Sb),Bo={"modal-modifier":"_modal-modifier_10zw4_1","menu--navigation-bar":"_menu--navigation-bar_10zw4_15","menu--root":"_menu--root_10zw4_26"},Kh=({children:e})=>{const{menuIsOpen:t,setMenuIsOpen:r}=bc(),{CONSTANTS:n}=Ze();return s.jsxs(p.Modal.RootWithoutPortal,{className:p.helpers.classNameConcat(Bo["modal-modifier"],"menu-mobile-root"),isOpen:t,setIsOpen:r,variant:"sideRight",style:{bottom:"unset",overflowY:"hidden",position:"fixed",top:0,zIndex:n.header.Z_INDEX_WAR.menu_mobile},children:[s.jsx(Vh,{}),s.jsx(p.Modal.Body,{className:Bo["menu--root"],children:e})]})};Kh.displayName="Menu.MenuRoot";const Cb=Gh(()=>Promise.resolve(Kh),{ssr:!1}),Qh=({children:e,last:t=!1,...r})=>s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{...r,"data-close":!0,size:"small",variant:"tertiary",children:e}),!t&&s.jsx(p.Utils.Divider,{direction:"vertical",size:"small",className:Bo.divider})]});Qh.displayName="Menu.NavigationBarItem";const Yh=()=>{const{setUserMenuIsOpen:e}=bc(),{handleSelectContent:t}=Ce(),{CONSTANTS:r}=Ze(),{router:n}=Ae(),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"}),n.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"}),n.push("/institucional/lojas")},text:r.header.MENU_INFO.store.button_text}];return s.jsx(p.Card,{id:"menu-navigationbar",shadow:!0,className:Bo["menu--navigation-bar"],style:{zIndex:r.header.Z_INDEX_WAR.menu_mobile_navigation_bar},children:Array.isArray(o)&&o.map((i,c)=>j.createElement(Qh,{...i,key:c},i.text))})};Yh.displayName="Menu.NavigationBar";const ra={Body:Wh,NavigationBar:Yh,Root:Cb},Xh=({storeConfig:e})=>{const t=j.useRef(null),{CONSTANTS:r}=Ze(),{MENU_NAVIGATION_BAR_ALLOWED:n,ICONS:o}=r.header,{handleSelectContent:i}=Ce(),{setValue:c}=Wo(),{setValue:l}=pf(),{setValue:u}=gc(),d=_c(),h=ff(),{isMobile:m}=xe();return s.jsxs(s.Fragment,{children:[s.jsxs(p.Header.Wrapper,{className:"header-mobile-wrapper",children:[s.jsx(p.Header.Logo,{style:{width:"100%"},children:s.jsx(Ot,{href:"/",children:s.jsx(p.Icon,{name:o.logo,size:"x-large",onClick:()=>{i({content:"header:logo"})}})})}),s.jsxs(p.Header.Support,{children:[s.jsx(p.Header.SupportItem,{onClick:()=>{c(!0),i({content:"header:search"})},children:s.jsx(p.Icon,{name:o.search,size:"medium"})}),s.jsx(Bc,{}),s.jsxs(p.Header.SupportItem,{onClick:()=>l(!0),children:[s.jsx("span",{ref:t}),s.jsx(p.Icon,{name:o.menu,size:"medium"})]})]})]}),m&&s.jsx(If,{menuIsOpen:h,setMenuIsOpen:l,userMenuIsOpen:h,setUserMenuIsOpen:u,children:s.jsx(Xo,{storeConfig:e,isOpen:d,setIsOpen:u,mobileUserMenuTarget:t==null?void 0:t.current,children:s.jsxs(ra.Root,{children:[s.jsx(ra.Body,{}),n?s.jsx(ra.NavigationBar,{}):s.jsx(s.Fragment,{})]})})})]})};Xh.displayName="Header.HeaderMobileWrapper";const wb=j.createContext({}),Eb=({children:e})=>{const{sendDataLayerEvent:t}=Ce(),{cartStore:r,isOpen:n}=Xe();j.useEffect(()=>{n&&t({functionKey:"viewCartEvent",data:{commonData:{cartStore:r}}})},[n]),j.useEffect(()=>{var i,c,l;if(r.id&&!((c=(i=r.marketingData)==null?void 0:i.marketingTags)!=null&&c.includes("faststore"))){const{id:u}=r;U.proxyCartAPI("/_v/proxy/checkout/order-form/attachments/marketing-data",{body:{orderFormId:u,marketingData:{...r==null?void 0:r.marketingData,marketingTags:U.marketingTagsBuilder(((l=r.marketingData)==null?void 0:l.marketingTags)??[])}}}).catch(d=>{console.error(d)})}},[r]);const o=({cartItem:i,oldQuantity:c,newQuantity:l})=>{t({functionKey:"skuEvents",data:{event:c>l?"remove_from_cart":"add_to_cart",commonData:{products:[{...i,price:i.price/100,listPrice:i.listPrice/100}]},customData:{quantity:l},supportData:{selectedSkus:[i]}}})};return s.jsx(wb.Provider,{value:{handleUpdateItemQuantityEvent:o},children:e})},Pb="var(--color-background-brand-primary-lighter)",Ib="_fadeInOut_1l5ow_1",Nb="_fadeOut_1l5ow_1",be={brandPrimaryLighter:Pb,"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:Ib,fadeOut:Nb,"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"},Jh=({item:{id:e,message:t,callback:r},removeNotification:n,ICONS:o})=>{const i=j.useRef(null),c=()=>{var u;(u=i.current)==null||u.setAttribute("data-animation-out","true")},l=u=>{n(u)};return s.jsx("div",{className:be["mc--notify--item"],ref:i,onAnimationEnd:()=>l(e),children:s.jsxs(p.SnackBar.Structure,{size:"medium",children:[s.jsx(p.SnackBar.Content,{title:t}),s.jsxs(p.SnackBar.Support,{children:[typeof r=="function"&&s.jsx(p.Button,{onClick:()=>{r(),c()},size:"small",variant:"tertiary",children:"Desfazer"}),s.jsx(p.Button,{iconNameStart:o.close,iconSize:"small",onClick:()=>c(),variant:"tertiary"})]})]})},e)};Jh.displayName="MiniCart.Notify.Item";const Zh=({ICONS:e})=>{const t=hc(),{removeNotification:r}=mc(),n=t.length?[...t].sort((o,i)=>i.id-o.id):[];return n.length?s.jsx("div",{className:be["mc--notify"],children:s.jsx("div",{className:be["mc--notify--content"],children:Array.isArray(n)&&n.map(o=>s.jsx(Jh,{item:o,removeNotification:r,ICONS:e},o.id))})}):null};Zh.displayName="MiniCart.Notifications";const Rb=({handleSendEvent:e,onHandleRemove:t,product:r,MINICART_CONFIG:n,...o})=>{const i=ns(),{toggleProduct:c}=jn(),{itemOffered:{isVariationOf:{productGroupID:l}},quantity:u}=r;return s.jsx(p.Button,{...o,adornment:{end:s.jsx(p.Icon,{name:`favorite-${i.includes(l)?"true":"false"}`,size:"small"})},onClick:()=>{c(l),i.includes(l)||t({texture:"mini-cart-wishlist",title:`${n.messages.add_wishlist}`},u,()=>c(l)),e(i.includes(l)?"remove_from_wishlist":"add_to_wishlist","productEvents")},children:n.messages.add_wishlist_button})},em=({handleSendEvent:e,product:t,ICONS:r,MINICART_CONFIG:n,...o})=>{const{addToCart:i,removeToCart:c}=Xe(),{bundleItems:l=[],id:u,uniqueId:d,seller:h,offerings:m,quantity:_}=t,g=(v,x,S)=>{c(u,v.title,()=>{typeof S=="function"&&S(),i({id:u,quantity:x,seller:h},{id:u,texture:v.texture},!0)})};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:be["mc--card--actions--add-remove"],children:[n.has_wishlist_button&&s.jsx(Rb,{...o,product:t,handleSendEvent:e,onHandleRemove:g,ICONS:r,MINICART_CONFIG:n}),s.jsx(p.Button,{...o,adornment:{end:s.jsx(p.Icon,{name:r.delete,size:"small"})},underline:!0,variant:"secondary",state:"danger",onClick:()=>{g({texture:"mini-cart",title:`${n.messages.remove}`},_),e("remove_from_cart","skuEvents")},children:n.messages.remove_button})]}),n.has_gift_option&&s.jsx(Ln.Gift,{uniqueId:d,bundleItems:l,offerings:m,ICONS:r,MINICART_CONFIG:n})]})};em.displayName="MiniCart.Card.Actions";const tm=({bundleItems:e,offerings:t,uniqueId:r,ICONS:n,MINICART_CONFIG:o})=>{const[i,c]=j.useState(!1),{toggleGiftItemCart:l}=Xe(),u=()=>{if(t instanceof Object&&Array.isArray(t)){const[m]=t;if(m){c(!0);const _=e.some(g=>g.id===m.id);l(r,String(m.id),_).then(()=>c(!1))}}},d=t[0],h=e.find(m=>m.id===d.id);return d&&"id"in d?s.jsx("div",{className:be["mc--card--actions--gift"],children:s.jsx(p.Checkbox,{adornment:s.jsx(p.Icon,{name:n.check}),checked:!!h,disabled:i,label:o.messages.giftPackage,onChange:u})}):null};tm.displayName="MiniCart.Card.Gift";const rm=({itemOffered:e})=>{const t=U.updatedResizedImg(e==null?void 0:e.image[0].url,{width:200,height:300});return s.jsx(Ot,{href:`${e==null?void 0:e.slug}`,className:be["mc--card--product-link"],children:s.jsx(at.Image,{alt:(e==null?void 0:e.image[0].alternateName)||"Produto",src:t||"",width:108,height:164,objectFit:"unset"})})};rm.displayName="MiniCart.Card.Media";const nm=({name:e,skuName:t,tagName:r,className:n})=>s.jsxs(s.Fragment,{children:[r&&s.jsx(p.Tag,{variant:"quaternary",title:r,style:{textTransform:"uppercase"},children:r}),s.jsx("p",{className:p.helpers.classNameConcat(be["mc--card--name"],n),children:U.getProductNameWithoutSku(e??"",t??"")})]});nm.displayName="MiniCart.Card.Name";const sm=({total:e,totalList:t})=>s.jsx(p.ProductInfo.Root,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:be["mc--card--price"],children:s.jsx(p.ProductInfo.Wrapper,{className:be["mc--card--price--details"],size:"small",layout:"horizontal",children:t&&e!==t?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:U.formatPriceToCurrency(t),size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:U.formatPriceToCurrency(e),size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:U.formatPriceToCurrency(e),size:"small"})})})})});sm.displayName="MiniCart.ProductPrice";const om=({product:e,TEXTURE_IMAGE:t,TOGGLE_STYLE_MODIFIER:r})=>{var d;const[n,o]=j.useState(""),i=j.useRef(null),{cartStore:{options:c}}=Xe(),l=e.itemOffered.isVariationOf.productGroupID,u=j.useCallback(()=>{var m;const h=(m=c==null?void 0:c.find(_=>_.id===l))==null?void 0:m.texture;if(h){o(h);return}U.fetchProxy("/_v/proxy/catalog/product/info",{method:"POST",body:JSON.stringify({ids:[l]})}).then(_=>_.json()).then(_=>{const g=_.data[0].items.find(v=>v.itemId===e.id);if(g){const v=g.images.find(x=>t.includes(x.imageLabel));if(v!=null&&v.imageUrl){o(v.imageUrl);return}o(g.images[0].imageUrl)}}).catch(_=>{console.error(_)})},[c,l,e.id]);return j.useEffect(()=>{if(!i.current)return;const h=new IntersectionObserver(m=>{m[0].isIntersecting&&u()});return h.observe(i.current),()=>{h.disconnect()}},[u]),s.jsx("div",{ref:i,children:s.jsx(p.ToggleStyle.Wrapper,{size:"small",style:r,children:s.jsx(p.ToggleStyle.Texture,{children:n?s.jsx(at.Image,{alt:((d=e.itemOffered)==null?void 0:d.image[0].alternateName)??"Produto",src:n,width:164,height:164,style:r}):s.jsx(Ep,{})})})})};om.displayName="MiniCart.Card.Style";const im=({product:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{size:i}=U.getColorAndSizeFromSkuName(e.itemOffered.skuName??"",r);return s.jsxs(p.Utils.Row,{alignItems:"center",children:[s.jsx(om,{product:e,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o}),s.jsx(p.Utils.Divider,{direction:"vertical",size:"small",style:{height:24}}),i&&s.jsx(p.ToggleSize.Wrapper,{size:t.product_card.sku.size??"small",variation:t.product_card.sku.variation??"fill",className:be["mc-container-actions--toggle-size-modifier"],style:{backgroundColor:`${be.brandPrimaryLighter}`},children:s.jsx(p.ToggleSize.Text,{children:i})})]})};im.displayName="MiniCart.Card.Sku";const Ln={Actions:em,Gift:tm,Media:rm,Name:nm,Price:sm,Sku:im},Tb=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}},am=({available:e=!0,index:t,product:r,ICONS:n,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:i,TEXTURE_IMAGE:c,TOGGLE_STYLE_MODIFIER:l})=>{var m,_;const{sendDataLayerEvent:u}=Ce(),d=Tb(r),h=(g,v)=>{const x={commonData:{...r,...d},customData:{index:t},event:g};if(v==="skuEvents"){const S={...r,...d};x.supportData={selectedSkus:[S]},x.commonData.products=[S]}u({functionKey:v,data:x})};return s.jsxs("div",{className:p.helpers.classNameConcat(be["mc--card"],e?"":be["mc--card--unavailable"]),children:[s.jsx(Ln.Media,{itemOffered:r.itemOffered}),s.jsxs("div",{className:be["mc--card--content-info"],children:[s.jsx(Ln.Name,{name:((m=r.itemOffered)==null?void 0:m.name)??"",skuName:(_=r.itemOffered)==null?void 0:_.skuName}),s.jsxs("div",{className:be["mc--card--details"],children:[s.jsx("div",{className:be["mc--card--actions"],children:e?s.jsx(Ln.Price,{total:d.price,totalList:d.listPrice}):s.jsx(p.Tag,{variant:"secondary",size:"small",children:"Indisponível"})}),s.jsxs("div",{className:be["mc--card--actions--secondary"],children:[e&&s.jsx(Ln.Sku,{product:r,MINICART_CONFIG:o,NAME_SPLIT_SYMBOL:i,TEXTURE_IMAGE:c,TOGGLE_STYLE_MODIFIER:l}),s.jsx(Ln.Actions,{handleSendEvent:h,product:r,size:"small",variant:"tertiary",ICONS:n,MINICART_CONFIG:o})]})]})]})]})};am.displayName="MiniCart.Card";const cm=({type:e="positive",ICONS:t,MESSAGE_CASHBACK:r})=>{var i;const{toExpire:n}=ss(),o=((i=n==null?void 0:n.cashback)==null?void 0:i.reduce((c,l)=>c+l.remaining_value,0))??0;return o>0?s.jsxs("div",{className:p.helpers.classNameConcat(be["mc--cashback"],be[`mc--cashback--${e}`]),children:[s.jsx(p.Icon,{name:t.alert_circle,size:"medium"}),s.jsxs("p",{children:[s.jsx("span",{children:U.formatPriceToCurrency(o)})," ",r.title]})]}):null};cm.displayName="MiniCart.Cashback";const lm=({type:e,ICONS:t,MINICART_CONFIG:r})=>{const{addCouponSeller:n,removeCoupon:o,removeSellerCode:i,cartStore:{marketingData:c,openTextField:l}}=Xe(),[u,d]=j.useState(!1),[h,m]=j.useState(!1),_=j.useCallback(()=>{let S="";return e==="coupon"?S=(c==null?void 0:c.coupon)??"":S=String((l==null?void 0:l.value)??""),S.toUpperCase()??""},[c,l,e]),[g,v]=j.useState(!!_()),x=async S=>{m(!0),!!_()&&(e==="coupon"?await o():await i(),v(!1),d(!1)),await n(S,e).then(I=>{if(!I.statusOk&&S||I.code!==200){S?(d(!0),v(!1)):d(!1);return}v(!0),d(!1)}).catch(()=>d(!0)).finally(()=>m(!1))};return s.jsx(Nt.Field,{hasError:u,hasSuccess:g,isLoading:h,onHandler:x,type:e,title:e==="coupon"?`${r.messages.descount_cupom_placeholder}`:`${r.messages.sellers_code_placeholder}`,value:_(),MINICART_CONFIG:r,ICONS:t})};lm.displayName="MiniCart.CouponSeller";const um=({ICONS:e,MINICART_CONFIG:t,PLP_NOT_RESULT:r})=>{const{router:n}=Ae(),o=()=>{n.push(r.link)};return s.jsxs(p.Utils.Column,{alignContent:"center",alignItems:"center",gap:"24px",className:be["mc--body--empty--feedback"],children:[s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsxs("p",{className:`typography-style-body-xs ${be["mc--body--empty--text"]}`,children:[t.messages.empty_card," "]})})}),s.jsx(p.Button,{variant:"tertiary",size:"large",onClick:()=>o(),"data-close":!0,adornment:{end:s.jsx(p.Icon,{name:e.arrow_right,size:"medium"})},children:t.messages.empty_bag})]})};um.displayName="MiniCart.Feedback";const Ob=e=>{const t=e.replace(/\D/g,"");return t.length>5?`${t.slice(0,5)}-${t.slice(5,8)}`:t},dm=({feedback:e,hasError:t,onHandler:r,hasSuccess:n,type:o,title:i,value:c,ICONS:l})=>{const[u,d]=j.useState(c);j.useEffect(()=>{t||d(c)},[c,t]);const h=()=>t?s.jsx(p.Icon,{name:l.delete_circle}):String(c).length&&n?s.jsx(p.Icon,{name:l.check_circle}):null,m=()=>{if(o==="seller"){const x=String(c).includes(" - ")?String(c).split(" - ")[0]:u;d(x)}},_=()=>{if(o==="seller"){const x=String(c).includes(" - ")?c:u;d(x)}},g=x=>{const S=x.currentTarget.value;if(S===""&&typeof r=="function"||n&&String(c).length>0&&S!==String(c)||t&&S!==String(c)){d(""),r("");return}if(o==="cep"){const I=Ob(S);d(I)}else d(S)},v=x=>{if(x.key.toLocaleLowerCase()==="enter"&&typeof r=="function"){const S=x.currentTarget.value;r(S)}};return s.jsx(p.TextField.Input,{adornment:{end:h()},mode:"over-label",label:i,feedback:e,value:u,type:"text",onFocus:m,onBlur:_,onChange:g,onKeyDown:v})};dm.displayName="MiniCart.Field.Input";const fm=({title:e,ICONS:t,MINICART_CONFIG:r,...n})=>{const o=j.useRef(null),{hasSuccess:i,hasError:c,isLoading:l,onHandler:u,type:d,value:h}=n,m=()=>c?"error":String(h).length&&i?"success":"none",_=j.useCallback(()=>{if(o.current){const x=o.current.querySelector("input");x&&typeof u=="function"&&(h!==""||c?(u(""),x.value=""):u((x==null?void 0:x.value)??""))}},[u,h,c]),g=m();return s.jsx("div",{ref:o,children:s.jsx(p.TextField.Structure,{className:be["mc--field"],input:s.jsx(dm,{...n,feedback:g,title:e,ICONS:t}),right:s.jsx(p.Button,{"data-has-success":!i,size:"medium",title:String(h).length&&i||c?"Remover":"Aplicar",onClick:()=>_(),disabled:l,children:String(h).length&&i||c?s.jsx(p.Icon,{name:"close",size:"small"}):`${r.messages.promo_code_button}`}),supportText:d==="cep"&&g==="success"?s.jsx(p.TextField.SupportText,{text:"Mais informações de frete na etapa a seguir",feedback:"success",title:"support"}):null})})};fm.displayName="MiniCart.Field";const $u=e=>{const t=e*100;return Math.round(t)},Ab=e=>(e/100).toFixed(2).replace(".",","),kb=(e,t)=>{const{valueType:r,remainingValueToActivate:n}=e;if(r==="quantity")return`Adicione mais ${n} ${n===1?"item":"itens"} ${t}`;if(r==="price"){const o=n===100?"Falta":"Faltam",i=Ab(n);return`${o} R$ ${i} ${t}`}return t},pm=({ICONS:e})=>{var w;const{promotionRules:t,data:r,cartStore:n,cartStore:{items:o,marketingData:i},addCouponSeller:c,setIsOpen:l}=Xe(),{sendDataLayerEvent:u}=Ce(),d=(w=r==null?void 0:r.promotion)==null?void 0:w.promotionCart,h=j.useRef(!1),{router:m}=Ae();if(j.useEffect(()=>{(d==null?void 0:d.selectPromotion)==="Cupom"&&(t==null?void 0:t.remainingValueToActivate)&&(t==null?void 0:t.remainingValueToActivate)<=0&&(d==null?void 0:d.cupom)&&!h.current&&(i==null?void 0:i.coupon)!==d.cupom&&(h.current=!0,c(d.cupom,"coupon")),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)<=0&&u({functionKey:"viewCartEvent",data:{event:"closeness_filled",commonData:{cartStore:n}}}),t!=null&&t.remainingValueToActivate&&(t==null?void 0:t.remainingValueToActivate)>0&&(h.current=!1)},[d==null?void 0:d.selectPromotion,t==null?void 0:t.remainingValueToActivate,d==null?void 0:d.cupom,i==null?void 0:i.coupon,c]),!t||!d||d.selectPromotion==="Desativar"||o.length===0)return null;const _=d.title,g=d.subtitle,v=d.titleSuccess,x=d.subtitleSuccess,S=d.linkLabel;return s.jsxs("div",{className:be["mc--body--promotion"],children:[t.remainingValueToActivate>0&&s.jsx(p.Closeness,{className:be["mc--body--promotion--closeness"],title:kb(t,_),subtitle:g,percentage:$u(t.completeness),iconLink:e.arrow_right,linkLabel:S,onClick:()=>{u({functionKey:"viewCartEvent",data:{event:"closeness_view_more",commonData:{cartStore:n}}}),m.push(`${d.link}`),l(!1)}}),t.remainingValueToActivate<=0&&s.jsx(p.Closeness,{className:`${be["mc--body--promotion--closeness"]} ${be["mc--body--promotion--closeness--success"]}`,title:v,subtitle:x,percentage:$u(t.completeness)})]})};pm.displayName="MiniCart.Modal.Body.Promotion";const hm=({TIPBAR_CONFIGS:e})=>{const{data:t,cartStore:r,cartStore:{items:n,marketingData:o},addCouponSeller:i}=Xe(),c=t==null?void 0:t.flags.flagCart.flagCupom,l=(o==null?void 0:o.coupon)===(c==null?void 0:c.valueCupom),[u,d]=j.useState(!1),[h,m]=j.useState(!1);if(j.useEffect(()=>{u&&setTimeout(()=>{d(!1)},e.snackbar_timeout)},[u]),j.useEffect(()=>{h&&setTimeout(()=>{m(!1)},e.snackbar_timeout)},[h]),!c||c.active==="Desativar"||c.valueCupom===""||n.length===0)return null;const _=async()=>{if(!r.items.length){m(!0);return}(await i(c==null?void 0:c.valueCupom,"coupon")).code!==200&&d(!0)};return s.jsxs("div",{className:be["mc--body--coupon-tag"],style:{backgroundColor:`${c.tagColor}`,color:`${c.textColor}`},children:[s.jsx("div",{className:be["mc--body--coupon-tag--text"],dangerouslySetInnerHTML:{__html:c.value}}),s.jsx("div",{className:be["mc--body--coupon-tag--button"],children:s.jsx(p.Button,{variant:"quaternary",mode:"inverse",onClick:_,disabled:l,children:l?"Cupom Aplicado":"Aplicar Cupom"})})]})};hm.displayName="MiniCart.Modal.Body.CouponTag";const mm=({children:e,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,PLP_NOT_RESULT:o,TEXTURE_IMAGE:i,TIPBAR_CONFIGS:c,TOGGLE_STYLE_MODIFIER:l})=>{const{cartStore:{items:u,messages:d}}=Xe();return s.jsxs(p.Modal.Body,{className:be["mc--body"],children:[e,s.jsx(pm,{ICONS:t}),s.jsx(hm,{TIPBAR_CONFIGS:c}),s.jsx("div",{className:be["mc--body--products"],children:Array.isArray(u)&&u.length?u.map((h,m)=>{const _=d.find(g=>{var v;return g.code==="withoutStock"&&((v=g.fields)==null?void 0:v.ean)===h.ean})!==void 0;return s.jsx(Nt.Card,{available:!h.availability.includes("outStock")||!_,index:m,product:h,ICONS:t,MINICART_CONFIG:r,NAME_SPLIT_SYMBOL:n,TEXTURE_IMAGE:i,TOGGLE_STYLE_MODIFIER:l},`${h.id}-${h.itemOffered.sku}-${m}`)}):s.jsx(Nt.Feedback,{ICONS:t,MINICART_CONFIG:r,PLP_NOT_RESULT:o})})]})};mm.displayName="MiniCart.Body";const _m=({children:e,storeConfig:t,MINICART_CONFIG:r})=>{const{cartStore:n}=Xe();if(n.items.length===0)return null;const o=()=>{var c;const i=new URLSearchParams({orderFormId:n.id,...((c=n.marketingData)==null?void 0:c.utmCampaign)&&{utm_campaign:n.marketingData.utmCampaign}});window.location.href=`${t.checkoutUrl}?${i.toString()}#/cart`};return s.jsxs(p.Modal.Footer,{className:be["mc--footer"],children:[e,s.jsx("div",{className:be["mc--footer--actions"],children:s.jsx(p.Button,{variant:"primary",size:"large","data-close":!0,className:be["mc--footer--actions-button"],onClick:o,children:r.messages.checkout_button})})]})};_m.displayName="MiniCart.Modal.Footer";const gm=({children:e,ICONS:t,MINICART_CONFIG:r,Z_INDEX_WAR:n})=>{const[o,i]=j.useState(!1),c=j.useRef(null),l=()=>i(u=>!u);return s.jsxs(s.Fragment,{children:[o&&s.jsx(p.Tooltip.Root,{arrow:"right",position:"top",top:-3,left:-3,component:s.jsx("p",{children:"Código da vendedora, cupom ou cálculo do frete"}),id:"inputs--tooltip",className:be["inputs--tooltip"],style:{zIndex:n.modal},isOpen:!0,size:"medium",parent:c.current}),s.jsxs(p.Accordion.Wrapper,{className:be["mc--discount"],children:[s.jsx(p.Accordion.Header,{id:"frete",title:"Frete",closeIndicator:s.jsx(p.Icon,{name:t.arrow_up,size:"medium"}),openIndicator:s.jsx(p.Icon,{name:t.arrow_down,size:"medium"}),className:p.helpers.classNameConcat(be["mc--discount--header"]),startOpen:r.promotion_input_starts_open,children:s.jsxs(p.TextStructure.Root,{children:[s.jsx(p.TextStructure.DivWrapper,{children:s.jsxs("h3",{className:"typography-style-body-sm",children:[r.messages.promo_code_title," "]})}),s.jsx("div",{ref:c,onMouseEnter:l,onMouseLeave:l,"aria-label":"Mostrar descrição",children:s.jsx(p.Icon,{name:t.alert_circle,size:"small"})})]})}),s.jsx(p.Accordion.Body,{className:be["mc--discount--body"],children:e})]})]})};gm.displayName="MiniCart.Discount";const ym=({discount:e,shipping:t,total:r})=>{var u,d;const{data:n}=Xe(),o=(d=(u=n==null?void 0:n.flags)==null?void 0:u.flagCart)==null?void 0:d.flagTotal,i=r-Math.abs(e??0)+(t??0),c=t===0?"Frete Grátis":U.formatPriceToCurrency((t??0)/100),l=[{title:"Frete",value:t===void 0?"A calcular":c},{title:"Desconto",value:U.formatPriceToCurrency((e??0)/100)},{message:(o==null?void 0:o.value)??"",title:"Total",value:`1x de ${U.formatPriceToCurrency(i/100)}`}];return s.jsx("div",{className:be["mc--footer--total"],children:Array.isArray(l)&&l.map((h,m)=>s.jsxs("div",{className:be["mc--footer--total--info"],"data-discount":h.title==="Desconto",children:[s.jsx("p",{children:h.title}),s.jsxs("div",{className:be["mc--footer--total--info--content"],children:[h.message&&(o==null?void 0:o.active)==="Ativar"&&s.jsx(p.Tag,{variant:"primary",title:h.message,style:{backgroundColor:o==null?void 0:o.tagColor,color:o==null?void 0:o.textColor},children:h.message}),s.jsx(p.ProductInfo.Price,{className:be["mc--footer--total--info"],label:h.title,value:h.value})]})]},m))})};ym.displayName="MiniCart.Modal.Footer.Resume.Items";const vm=()=>{var o,i,c;const{totalizers:e}=hn(),t=((o=e.find(l=>l.id==="Items"))==null?void 0:o.value)??0,r=(i=e.find(l=>l.id==="Discounts"))==null?void 0:i.value,n=(c=e.find(l=>l.id==="Shipping"))==null?void 0:c.value;return s.jsx(ym,{discount:r??0,total:t,shipping:n})};vm.displayName="MiniCart.Modal.Footer.Totals";const xm=({ICONS:e,MINICART_CONFIG:t})=>{const{isMobile:r}=xe(),{cartStore:{items:n}}=Xe(),o=n.reduce((i,c)=>i+(c.quantity??0),0);return s.jsx(p.Modal.Header,{navigation:"top",className:be["mc--header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(p.Modal.Title,{navigation:"top",title:t.messages.title}),s.jsx("span",{className:be["mc--header--subtitle"],children:o!==1?`[${o}] Produtos`:`[${o}] Produto`}),s.jsx(p.Button,{"data-close":!0,iconNameStart:e.close,size:"small",variant:"tertiary"})]})})};xm.displayName="MiniCart.Modal.Header";const bm=({ICONS:e,MINICART_CONFIG:t})=>{const{cartStore:{shippingData:r},shipping:n,removeCEP:o}=Xe(),{sendDataLayerEvent:i}=Ce(),[c,l]=j.useState(!1),[u,d]=j.useState(!1),h=j.useCallback(()=>{var I;const w=((I=r==null?void 0:r.address)==null?void 0:I.postalCode)??"";return w.length===8&&!w.includes("-")?`${w.slice(0,5)}-${w.slice(5)}`:w},[r]),[m,_]=j.useState(!!h()),g=()=>{_(!1),l(!1)},v=w=>{var I;if(typeof w=="object"&&(w!=null&&w.logisticsInfo))return(I=w.logisticsInfo)==null?void 0:I.reduce((P,C)=>{var z;const N=(z=C==null?void 0:C.slas)==null?void 0:z.find(D=>(D==null?void 0:D.id)===(C==null?void 0:C.selectedSla));if(!N)return P;const T=parseInt(String((N==null?void 0:N.shippingEstimate)??"").replace("bd","")),O=Number((((N==null?void 0:N.price)??0)/100).toFixed(2));if(P.shipping_tier===void 0)return P.shipping_tier=C==null?void 0:C.selectedSla,P.delivery_time=T.toString(),P.shipping=O,P.flag_retirada=(C==null?void 0:C.selectedDeliveryChannel)==="delivery"?"false":"true",P;const M=parseInt(P.delivery_time??"0");return T>M&&(P.delivery_time=T.toString()),P.shipping=(P.shipping??0)+O,P},{shipping_tier:void 0,delivery_time:void 0,flag_retirada:void 0,shipping:void 0,currency:"BRL"})},x=async w=>{const I=w.replace(/\D/g,"");if(I.length!==8)return!1;try{return!(await Fn.get(`https://viacep.com.br/ws/${I}/json/`)).data.erro}catch{return!1}},S=async w=>{if(d(!0),!!h()||!(w!=null&&w.trim())){await o(),g(),d(!1);return}if(!await x(w)){l(!0),_(!1),d(!1);return}try{const N=await n(w);if(l(!1),N){_(!0);const T=v(N);T&&i({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:T}})}}catch{l(!0)}finally{d(!1)}};return s.jsx(Nt.Field,{hasSuccess:m,hasError:c,isLoading:u,onHandler:S,title:`${t.messages.shipping_calculation_placeholder}`,type:"cep",value:h(),ICONS:e,MINICART_CONFIG:t})};bm.displayName="MiniCart.Shipping";const jm=()=>{var r,n;const{data:e}=Xe(),t=(n=(r=e==null?void 0:e.flags)==null?void 0:r.flagCart)==null?void 0:n.flagHeader;return t!=null&&t.value?s.jsx(p.Tag,{variant:"tertiary",title:t==null?void 0:t.value,size:"small",adornment:{start:t!=null&&t.enableIcon&&(t!=null&&t.icon)?s.jsx(p.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};jm.displayName="MiniCart.TagMessage";const Nt={Body:mm,Card:am,Cashback:cm,CouponSeller:lm,Discount:gm,Field:fm,Feedback:um,Shipping:bm,Footer:_m,Header:xm,TagMessage:jm,Totals:vm},Mb=({ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TIPBAR_CONFIGS:i,TOGGLE_STYLE_MODIFIER:c,Z_INDEX_WAR:l,storeConfig:u,minicartStyleModifiers:d})=>{const{isOpen:h,setIsOpen:m}=Xe(),{isMobile:_}=xe();return s.jsxs(p.Modal.Root,{className:p.helpers.classNameConcat(be["minicart--modal-modifier"],d),isMobile:!0,isOpen:h,setIsOpen:m,style:{zIndex:l.modal},variant:_?"sideBottom":"sideRight",children:[s.jsx(Nt.Header,{ICONS:e,MINICART_CONFIG:t}),s.jsx(Nt.Body,{ICONS:e,MINICART_CONFIG:t,NAME_SPLIT_SYMBOL:r,PLP_NOT_RESULT:n,TEXTURE_IMAGE:o,TOGGLE_STYLE_MODIFIER:c,TIPBAR_CONFIGS:i,children:s.jsx(Nt.TagMessage,{})}),s.jsxs(Nt.Footer,{MINICART_CONFIG:t,storeConfig:u,children:[s.jsxs(Nt.Discount,{ICONS:e,MINICART_CONFIG:t,Z_INDEX_WAR:l,children:[s.jsx(Nt.CouponSeller,{type:"seller",ICONS:e,MINICART_CONFIG:t}),s.jsx(Nt.CouponSeller,{type:"coupon",ICONS:e,MINICART_CONFIG:t}),s.jsx(Nt.Shipping,{ICONS:e,MINICART_CONFIG:t})]}),s.jsx(Nt.Totals,{})]}),s.jsx(Zh,{ICONS:e})]})},Sm=({tipBar:e,minicartStyleModifiers:t,menuV2:r,storeConfig:n,className:o})=>{const{structureRef:i,rootRef:c,CONSTANTS:l}=Ze(),{header:{HEADER_CONFIGS:u,Z_INDEX_WAR:d},minicart:h}=l;return s.jsx(p.Header.Structure,{innerRef:i,adornment:{start:e},style:{position:"sticky",top:0,zIndex:d.header},className:p.helpers.classNameConcat(qc["header-animation"],o),children:s.jsxs(p.Header.Root,{innerRef:c,style:{zIndex:d.header},variant:u.default_variant,interactiveVariant:u.interactive_variant,children:[r??s.jsxs(gb,{children:[s.jsx("div",{className:U.responsive["responsive-mobile-block"],style:{height:"100%",width:"100%",zIndex:d.header_mobile},children:s.jsx(Xh,{storeConfig:n})}),s.jsx("div",{className:U.responsive["responsive-desktop-block"],style:{height:"100%",width:"100%",zIndex:d.header_desktop},children:s.jsx(Dh,{storeConfig:n})})]}),s.jsx(Eb,{children:s.jsx(Mb,{...h,minicartStyleModifiers:t})}),s.jsx(Tc,{title:"Produto adicionado à sua sacola!",CONSTANTS:l.addToCart})]})})};Sm.displayName="Header";const Lb="_shippingFreight_6z8rf_6",Db="_shippingFreight__postalCodeGrid_6z8rf_10",Fb="_shippingFreight__grid_6z8rf_14",zb="_shippingFreight__grid__title_6z8rf_18",qb="_shippingFreight__grid__remember_6z8rf_29",Bb="_postalCodeContainer_6z8rf_44",Ub="_deliveryStatusBar__tag_6z8rf_49",Hb="_deliveryStatusBarError__tag_6z8rf_66",$b="_deliveryInfo_6z8rf_74",Wb="_deliveryInfo__content_6z8rf_78",Vb="_deliveryInfo__text_6z8rf_84",Gb="_deliveryInfo__title_6z8rf_89",Kb="_deliveryInfo__subtitle_6z8rf_99",Qb="_deliveryInfo__tooltipIcon_6z8rf_109",Yb="_deliveryInfo__tooltip_6z8rf_109",Xb="_freightGrid_6z8rf_148",Jb="_freightContainer_6z8rf_155",Zb="_freightOption__content_6z8rf_160",ej="_freightOption__value_6z8rf_166",tj="_freightOption__title_6z8rf_177",rj="_freightOption__title_item_6z8rf_181",nj="_freightOption__paragraph_6z8rf_192",ze={shippingFreight:Lb,shippingFreight__postalCodeGrid:Db,shippingFreight__grid:Fb,shippingFreight__grid__title:zb,shippingFreight__grid__remember:qb,postalCodeContainer:Bb,deliveryStatusBar__tag:Ub,deliveryStatusBarError__tag:Hb,deliveryInfo:$b,deliveryInfo__content:Wb,deliveryInfo__text:Vb,deliveryInfo__title:Gb,deliveryInfo__subtitle:Kb,deliveryInfo__tooltipIcon:Qb,deliveryInfo__tooltip:Yb,freightGrid:Xb,freightContainer:Jb,freightOption__content:Zb,freightOption__value:ej,freightOption__title:tj,freightOption__title_item:rj,freightOption__paragraph:nj,"input-modifier":"_input-modifier_6z8rf_207","freight--tooltip":"_freight--tooltip_6z8rf_227"},sj=({icon:e,title:t,subtitle:r,packageCount:n,packageUnit:o="",labelDescription:i,freightConfig:c,toolTipZIndex:l})=>{const[u,d]=j.useState(!1),h=j.useRef(null),m=()=>d(_=>!_);return s.jsxs("div",{className:ze.deliveryInfo,ref:h,children:[s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsx("div",{children:s.jsx("p",{children:c.messages.select_size_tag})}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:h.current}),s.jsxs("div",{className:ze.deliveryInfo__content,children:[s.jsx("div",{className:ze.deliveryInfo__icon,children:s.jsx(p.Icon,{name:e,size:"medium"})}),s.jsxs("div",{className:ze.deliveryInfo__text,children:[s.jsxs("span",{className:ze.deliveryInfo__title,children:[t," ",n," ",o]}),r&&s.jsx("span",{className:ze.deliveryInfo__subtitle,children:r})]}),i&&s.jsxs("div",{className:ze.deliveryInfo__tooltipIcon,onMouseEnter:m,onMouseLeave:m,"aria-label":"Mostrar descrição",children:[s.jsx("span",{children:s.jsx(p.Icon,{name:c.icons.feedback_help,size:"small"})}),u&&s.jsx("div",{className:ze.deliveryInfo__tooltip,children:i})]})]})]})},oj=({value:e,title:t,paragraph:r})=>s.jsx("div",{className:ze.freightOption,children:s.jsxs("div",{className:ze.freightOption__content,children:[s.jsx("span",{className:ze.freightOption__value,children:e}),s.jsx("span",{className:ze.freightOption__title,children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:ze.footer__item,children:[s.jsx("span",{className:ze.freightOption__title_item,children:t}),r&&s.jsx("span",{className:ze.freightOption__paragraph,children:r})]})})})]})}),ij=({children:e})=>s.jsx("div",{className:ze.freightContainer,children:e}),aj=({children:e})=>s.jsx("div",{className:ze.freightGrid,children:e}),cj=({children:e})=>s.jsx("div",{className:ze.postalCodeContainer,children:e}),Wu=({message:e,seller:t="",size:r="small",setError:n})=>s.jsx("div",{className:n?ze.deliveryStatusBarError:ze.deliveryStatusBar,children:s.jsxs(p.Tag,{title:e,className:n?ze.deliveryStatusBarError__tag:ze.deliveryStatusBar__tag,size:r,children:[e," ",!n&&t]})}),lj=e=>{const t=parseInt(e,10);return t===1?`${t} dia`:`${t} dias`},uj=e=>{var r,n,o;const t=[];return(o=(n=(r=e==null?void 0:e.logisticsInfo)==null?void 0:r[0])==null?void 0:n.slas)==null||o.forEach(i=>{t.push({id:i.id,name:i.name,price:i.price,shippingEstimate:i.shippingEstimate})}),t},dj=({component:e,parent:t,top:r,left:n,target:o,contentRef:i,freightConfig:c,toolTipZIndex:l=999,...u})=>{const{isMobile:d}=xe();return s.jsx(s.Fragment,{children:d?s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...u,ref:i,children:[e,s.jsx("p",{children:c.messages.select_size_tag})]}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-170%",left:"4%",parent:t}):s.jsx(p.Tooltip.Root,{arrow:"bottom",component:s.jsxs("div",{...u,ref:i,children:[e,s.jsx("p",{children:c.messages.select_size_tag})]}),id:"freight--tooltip",className:ze["freight--tooltip"],style:{zIndex:l},isOpen:!0,size:"medium",position:"top",top:"-110%",left:"3%",parent:t})})},fj=({onUpdateFreightItems:e,sellerId:t,size:r,skuId:n,quantity:o,setError:i,setIsButtonClicked:c,component:l,freightConfig:u,toolTipZIndex:d})=>{var B,G,J,Y;const h=hn(),m=hn(X=>X.shipping),[_,g]=j.useState(),[v,x]=j.useState(!1),[S,w]=j.useState(!1),[I,P]=j.useState(!1),C=(G=(B=h.shippingData)==null?void 0:B.address)==null?void 0:G.postalCode,N=!(_!=null&&_.length)&&C?C:_,T=j.useRef(null),O=async X=>{const he=X.target.value.replace(/\D/g,"").slice(0,8);he.length>5?g(he.replace(/^(\d{5})(\d{1,3})/,"$1-$2")):g(he)},M=async X=>{const Z=X.target.value.replace(/\D/g,"");try{if((await Fn.get(`https://viacep.com.br/ws/${Z}/json/`)).data.erro){i&&i(u.messages.cep_not_found),c(!1),w(!0);return}i&&i(""),w(!1)}catch{console.log("Erro ao validar o CEP. Tente novamente mais tarde.")}},z=async()=>{x(!0);try{const X=await Fn.post("/api/checkout/simulation",{items:[{id:n,quantity:o,seller:t}],country:"BRA",postalCode:N});e(uj(X.data))}catch(X){console.error("Erro ao atualizar o documento:",X)}finally{x(!1),m(N,"BRA")}},D=async()=>{if(!n){P(!0),setTimeout(()=>P(!1),1500);return}await M({target:{value:N}}),v||(z(),c(!0))};return s.jsxs("div",{ref:T,style:{position:"relative"},children:[!n&&I?s.jsx(dj,{component:l,isOpen:I,parent:T.current,toolTipZIndex:d,freightConfig:u}):s.jsx(s.Fragment,{}),s.jsx("div",{style:{position:"relative"},children:s.jsx(p.TextField.Structure,{title:"structure",style:{width:"100%"},input:s.jsx(p.TextField.Input,{defaultValue:(Y=(J=h.shippingData)==null?void 0:J.address)==null?void 0:Y.postalCode,label:u.messages.text_input_label,title:"textfield",value:_,sizeVariant:r,onMouseOver:()=>n?null:P(!0),onMouseOut:()=>n?null:P(!1),mode:"simple",onChange:O,onKeyDown:X=>{X.key==="Enter"&&D()},className:ze["input-modifier"],feedback:S?"error":"none"}),right:s.jsx(p.Button,{onClick:D,size:r,title:"button",children:v?s.jsx(p.Spinner,{size:"small",indicatorColor:"#ffffff"}):u.messages.text_input_btn})})})]})},pj=({children:e,freightConfig:t})=>s.jsxs("div",{className:ze.shippingFreight,children:[s.jsxs("div",{className:ze.shippingFreight__grid,children:[s.jsx("span",{className:ze.shippingFreight__grid__title,children:t.messages.title}),s.jsx("span",{className:ze.shippingFreight__grid__remember,children:s.jsx(wt,{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})})]}),s.jsx("div",{className:ze.shippingFreight__postalCodeGrid,children:e})]}),hj=({children:e})=>s.jsx("div",{className:ze.freightContainer,children:e}),Cm=({className:e,sellerId:t,skuId:r,quantity:n,size:o,seller:i,local:c,CONSTANTS_PROPS:l})=>{const{sendDataLayerEvent:u}=Ce(),[d,h]=j.useState(""),[m,_]=j.useState([]),[g,v]=j.useState(""),[x,S]=j.useState(!1),w=P=>h(P),I=P=>{_(P),u({functionKey:"readyEvents",data:{event:"search_zipcode",readyData:{shippings:P.map(C=>({shipping_tier:C.id,delivery_time:C.shippingEstimate.replace("bd",""),flag_pickup:C.name.toLowerCase().includes("retirada")?"true":"false",shipping:C.price,currency:l.currency||"BRL"}))}}})};return s.jsxs(hj,{className:e,children:[s.jsxs(pj,{freightConfig:l.freightConfig,children:[s.jsx(cj,{children:s.jsx(fj,{onUpdateFreightItems:I,skuId:r,quantity:n,size:o,sellerId:t,local:c,setError:v,setIsButtonClicked:S,freightConfig:l.freightConfig,toolTipZIndex:l.toolTipZIndex})}),g?s.jsx(Wu,{size:o,message:g,setError:v}):m.length>0&&s.jsx(Wu,{size:o,message:l.freightConfig.messages.delivered_by,seller:i})]}),x&&!g?m.length>0&&s.jsxs(ij,{children:[s.jsx(aj,{children:m.filter(({id:P})=>!P.includes("Retirada")).map(P=>s.jsx(oj,{id:P.id,value:U.freightParsePrice({valueInCents:P.price,hasFree:!1,freeTaxMessage:l.freightConfig.messages.free_tax}),title:P.name,paragraph:`${l.freightConfig.messages.prefix_days}${lj(P.shippingEstimate)}`,radioValue:d,changeValue:w},P.id))}),l.deliveryInfoBoxesAllowed?s.jsx(sj,{icon:l.freightConfig.icons.delivery_truck,packageUnit:l.freightConfig.messages.unit_amout,title:l.freightConfig.messages.delivered_amount_packages,subtitle:"",packageCount:1,labelDescription:"Label",freightConfig:l.freightConfig,toolTipZIndex:l.toolTipZIndex??999}):s.jsx(s.Fragment,{})]}):null]})},yn={"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"},mj=({children:e,href:t,isLast:r,title:n})=>{const{constants:{ICONS:o}}=ut();return s.jsx(p.BreadCrumb.Item,{adornment:{end:r&&s.jsx(p.Icon,{name:o.arrow_right})},children:r?s.jsx(wt,{href:t??"/",size:"medium",title:n,disableUnderline:!0,children:e}):e})},wm=()=>{var o;const{state:e}=ft(),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("/"),n=Yf(r);return s.jsx("div",{className:yn["pcd-navigation--breadcrumb"],children:s.jsx(p.BreadCrumb.DivWrapper,{children:s.jsx(p.BreadCrumb.List,{children:Array.isArray(n)&&n.map((i,c)=>{var l,u;return j.createElement(mj,{...i,isLast:c!==n.length-1,key:i.href,title:(l=i.name)==null?void 0:l.replace(/-/g," ")},(u=i.name)==null?void 0:u.replace(/-/g," "))})})})})};wm.displayName="PLPNavigation.BreadCrumb";const Em=({children:e,...t})=>s.jsxs("div",{...t,className:yn["pdc-navigation--content"],children:[s.jsx($r.Filters,{}),e]});Em.displayName="PLPNavigation.Content";const _j="_sort_35wro_1",Jo={sort:_j,"sort-list-wrapper":"_sort-list-wrapper_35wro_8","sort-list":"_sort-list_35wro_8","sort-button":"_sort-button_35wro_25"},gj=({children:e,sortListOpen:t,btnAdornment:r,style:n,...o})=>s.jsx(p.Button,{...o,adornment:{end:t?r==null?void 0:r.listOpen:r==null?void 0:r.listClosed},size:"small",variant:"tertiary",style:{...n,textDecoration:"none"},className:Jo["sort-button"],children:e}),yj=e=>s.jsx(p.RadioButton.Radio,{...e}),vj=({children:e,className:t,name:r,...n})=>s.jsx(p.RadioButton.Group,{...n,name:r||"sort-group",className:p.helpers.classNameConcat(Jo["sort-list"],t),children:e}),xj=({children:e,className:t,shadow:r=!0,padding:n="small",height:o="fit-content",...i})=>s.jsx(p.Card,{...i,shadow:r,className:p.helpers.classNameConcat(Jo["sort-list-wrapper"],t),padding:n,height:o,children:e}),Pm=j.forwardRef(({children:e,className:t,...r},n)=>s.jsx("div",{...r,ref:n,className:p.helpers.classNameConcat(Jo.sort,t),children:e}));Pm.displayName="SortRoot";const Zo=({handleSelectValue:e,sortListOpen:t,setSortListOpen:r,searchParams:n,ICONS:o,...i})=>{var _;const c=(_=n==null?void 0:n.get("sort"))==null?void 0:_.replace(":","_"),[l,u]=j.useState(c),{sendDataLayerEvent:d}=Ce();j.useEffect(()=>{u(c||void 0)},[c]);const{ref:h}=Th(()=>r(!1)),m=g=>{const v=g.target.value;u(v),typeof e=="function"&&e(v),d({functionKey:"filterEvent",data:{customData:{ordering:hs.options[v]}}}),r(!1)};return s.jsxs(Pm,{...i,ref:h,children:[s.jsx(gj,{btnAdornment:{listOpen:s.jsx(p.Icon,{name:o.arrow_up,size:"small"}),listClosed:s.jsx(p.Icon,{name:o.arrow_down,size:"small"})},sortListOpen:t,onClick:()=>r(!t),children:l?hs.options[l]:hs.placeholder},"sort-button"),t&&s.jsx(xj,{children:s.jsx(vj,{name:"sort-group",value:l??"",onChange:m,children:Object.keys(hs.options).map(g=>s.jsx(yj,{label:hs.options[g],value:g},g))})})]})};Zo.displayName="Sort";const Im=j.createContext({}),bj=({children:e,...t})=>{const[r,n]=j.useState(!1);return s.jsx(Im.Provider,{value:j.useMemo(()=>({...t,openOrderBy:r,setOpenOrderBy:n}),[t,r,n]),children:e})},jj=()=>{const e=j.useContext(Im);if(e===void 0)throw new Error("usePLPNavigationContext must be used within a PDCNavigationProvider");return e},Nm=()=>{const{openOrderBy:e,onSort:t,setOpenFilters:r,setOpenOrderBy:n}=jj(),{constants:{ICONS:o,PDC_NAVIGATION:i}}=ut();return s.jsxs("div",{className:yn["pdc-navigation--filters"],children:[s.jsx($r.BreadCrumb,{}),s.jsxs("div",{className:yn["pdc-navigation--filters--content"],children:[s.jsx(Zo,{handleSelectValue:c=>t(c??"release_desc"),sortListOpen:e,setSortListOpen:n,ICONS:o,searchParams:new URLSearchParams}),s.jsx(p.Button,{adornment:{end:s.jsx(p.Icon,{name:o.arrow_down})},onClick:()=>r(!0),size:"small",variant:"tertiary",children:i.filter_button}),s.jsx($r.Total,{})]})]})};Nm.displayName="PLPNavigation.Filters";const Rm=({children:e,onSort:t,setOpenFilters:r,style:n,...o})=>{const i=j.useRef(null);return s.jsx(bj,{onSort:t,setOpenFilters:r,children:s.jsx("div",{...o,className:yn["pdc-navigation"],ref:i,style:{...n},children:s.jsx($r.Content,{children:e})})})};Rm.displayName="Root";const Tm=({callback:e,selected:t,...r})=>s.jsx("div",{...r,className:yn["pdc-navigation--selected"],children:s.jsx("div",{className:yn["pdc-navigation--selected--container"],children:Array.isArray(t)?t.map(n=>n.key==="productclusterids"?null:s.jsx($r.SelectedItem,{callback:e,facet:n},n.value)):null})});Tm.displayName="PLPNavigation.Selected";const Uc=({key:e,PLP_FILTERS:t})=>t.some(r=>r.key===e)?e==="cores-filtraveis":!1,Hc=({value:e,PLP_FILTERS_COLORS:t})=>{var r;return((r=t.find(n=>n.value===e))==null?void 0:r.color)??"#F2F2F2"},Om=({key:e,PLP_FILTERS:t})=>{var r;return(r=t.find(n=>n.key===e))==null?void 0:r.label},Am=({key:e,PLP_FILTERS:t})=>{var r;return((r=t.find(n=>n.key===e))==null?void 0:r.order)??0},Wa=({value:e})=>{const[t,r]=e.split(":").length===2?e.split(":"):[0,0],n=U.formatPriceToCurrency(Number(r));return`${U.formatPriceToCurrency(Number(t))} até ${n}`},km=({items:e})=>{const t=e.flatMap(o=>[o.range.from,o.range.to]),r=Math.min(...t.map(Math.abs)),n=Math.max(...t.map(Math.abs));return[r,n]},Mm=Object.freeze(Object.defineProperty({__proto__:null,checkedColor:Uc,createTagPrice:Wa,getAbsoluteMinMax:km,getColor:Hc,getName:Om,getOrder:Am},Symbol.toStringTag,{value:"Module"})),Vt={"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"},Lm=({columns:e=2,CONSTANTS:t,...r})=>{var u,d,h,m,_;const{filters:n,onToggleFacet:o}=wr(),i=(u=n.facets)==null?void 0:u.find(g=>g.key==="category-3"),c=((d=n.selected)==null?void 0:d.some(g=>g.key==="category-3"))||((h=i==null?void 0:i.values)==null?void 0:h.some(g=>g.selected)),l=(m=n.facets)==null?void 0:m.filter(g=>g.key==="category-3"?!c:g.key==="category-4"?c:!0);return s.jsxs("div",{...r,className:Vt["filter--modal--body--content"],children:[Array.isArray(n.facets)&&(l==null?void 0:l.map(g=>s.jsx(tr.Item,{columns:e,facet:g,onToggleFacet:o,CONSTANTS:t},g.key))),!((_=n.facets)!=null&&_.length)&&s.jsx(tr.Empty,{PLP_FILTERS_EMPTY:t.PLP_FILTERS_EMPTY})]})};Lm.displayName="Filter.Item.Content";const Dm=({PLP_FILTERS_EMPTY:e})=>{const t=()=>{window.history.back()};return s.jsxs("div",{className:Vt["filter--empty"],children:[s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h4",{children:e.title}),s.jsx("p",{children:e.subtitle})]}),s.jsx(p.Button,{onClick:()=>t(),variant:"tertiary",children:e.button})]})};Dm.displayName="Filter.Empty";const Fm=({columns:e,facet:t,onToggleFacet:r,CONSTANTS:n,...o})=>{var g,v,x,S;const{filters:i}=wr(),c=Am({key:t.key,PLP_FILTERS:n.PLP_FILTERS}),l=(g=i.facets)==null?void 0:g.find(w=>w.key==="category-3"),u=(v=i.facets)==null?void 0:v.find(w=>w.key==="category-4"),d=(x=l==null?void 0:l.values)==null?void 0:x.some(w=>w.selected),h=(((S=u==null?void 0:u.values)==null?void 0:S.length)??0)>0,m=d&&h,_=()=>{if(t.__typename==="FacetBoolean"){if(t.key==="cores-filtraveis")return s.jsx(tr.Colors,{onToggleFacet:r,values:t.values,PLP_FILTERS:n.PLP_FILTERS,PLP_FILTERS_COLORS:n.PLP_FILTERS_COLORS});if(t.key==="tamanho")return s.jsx(tr.Sizes,{onToggleFacet:r,values:t.values,PLP_SIZE_ORDER:n.PLP_SIZE_ORDER});if(t.key==="tecido")return s.jsx(tr.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS});if(t.key==="category-3"&&!d)return s.jsx(tr.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS});if(t.key==="category-4"&&m)return s.jsx(tr.Toggle,{columns:e,facetKey:t.key,onToggleFacet:r,values:t.values,ICONS:n.ICONS})}return t.__typename==="FacetRange"?s.jsx(tr.Price,{facet:t}):s.jsx("p",{children:"Filtro não encontrado!"})};return s.jsx("div",{...o,className:Vt["filter--item"],style:{order:c},children:s.jsxs(p.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(p.Accordion.Header,{id:t.key,closeIndicator:s.jsx(p.Icon,{name:n.ICONS.arrow_up}),openIndicator:s.jsx(p.Icon,{name:n.ICONS.arrow_down}),children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h4",{className:"typography-style-body-sm",children:Om({key:t.key,PLP_FILTERS:n.PLP_FILTERS})})})})}),s.jsx(p.Accordion.Body,{children:_()})]})})};Fm.displayName="Filter.Item";const zm=({onToggleFacet:e,values:t,PLP_FILTERS:r,PLP_FILTERS_COLORS:n,...o})=>{const{filters:{selected:i}}=wr();return s.jsx(sr.Root,{...o,children:s.jsx(sr.List,{children:Array.isArray(t)&&t.map(({key:c,value:l})=>s.jsx(sr.Option,{active:!!(i!=null&&i.find(u=>u.key===c&&u.value===l)),"data-color":Uc({key:c,PLP_FILTERS:r}),fill:Hc({value:l,PLP_FILTERS_COLORS:n}),onClick:()=>e({key:c,value:l}),type:"color"},`${c}-${l}`))})})};zm.displayName="Filter.Item.Color";const qm=({facet:e,...t})=>{var d,h;const{filters:{selected:r},price:n,onToggleFacet:o}=wr(),[i,c]=(n==null?void 0:n.split(":").map(Number))??[0,100],[l,u]=((h=(d=r==null?void 0:r.find(({key:m})=>m==="price"))==null?void 0:d.value)==null?void 0:h.split(":").map(Number))??[i,c];return s.jsx("div",{...t,className:Vt["filter--item--price"],children:s.jsxs(p.Slider.SliderDual,{format:"price",initialValue:[l<i?i:l,u>c?c:u],min:i,max:c,type:"dual",step:1,onFinish:m=>{var _,g;m&&o({key:"price",value:`${(_=m.range)==null?void 0:_.min}:${(g=m.range)==null?void 0:g.max}`})},children:[s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{"data-min-value":!0})})}),s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{"data-max-value":!0})})})]})})};qm.displayName="Filter.Item.Price";const Bm=({onToggleFacet:e,values:t,PLP_SIZE_ORDER:r,...n})=>{const{filters:{selected:o}}=wr(),i=[...t].sort((c,l)=>{const u=r.indexOf(c.name),d=r.indexOf(l.name);return u-d});return s.jsx(sr.Root,{...n,children:s.jsx(sr.List,{children:Array.isArray(i)&&i.map(({key:c,value:l})=>s.jsx(sr.Option,{active:!!(o!=null&&o.find(u=>u.key===c&&u.value===l)),text:l,type:"size",onClick:()=>e({key:c,value:l})},l))})})};Bm.displayName="Filter.Item.Sizes";const Um=({columns:e,facetKey:t,onToggleFacet:r,values:n,ICONS:o,...i})=>s.jsx("div",{...i,className:Vt["filter--item--toggle"],children:s.jsx("div",{className:Vt["filter--item--toggle--container"],style:{gridTemplateColumns:`repeat(${e}, 1fr)`},children:Array.isArray(n)&&n.map(c=>s.jsx(p.Checkbox,{label:(c==null?void 0:c.name)??"",adornment:s.jsx(p.Icon,{name:o.check}),checked:c.selected,onChange:()=>r(c)},c.value))})});Um.displayName="Filter.Item.Toggle";const Hm=({...e})=>{const{isLoading:t}=wr();return s.jsx("div",{className:Vt["filter--loading"],"data-active":t,...e,children:s.jsx(p.Spinner,{indicatorColor:"#000",background:"#222"})})};Hm.displayName="Filter.Loading";const $m=({children:e,className:t,isMobile:r=!1,CONSTANTS:{PLP_FILTERS_TITLE:n,ICONS:o}})=>{var d;const{deleteAllFacets:i,filters:c,isOpen:l,setIsOpen:u}=wr();return s.jsxs(p.Modal.Root,{className:p.helpers.classNameConcat(Vt["filter--modal"],t),isMobile:r??!1,isOpen:l,setIsOpen:u,variant:r?"sideBottom":"sideRight",style:{zIndex:99},children:[s.jsxs(p.Modal.Header,{navigation:"top",children:[s.jsx(p.Modal.Controls,{navigation:"top",isMobile:r,children:s.jsx(p.Button,{"data-close":!0,iconNameStart:o.close,size:"small",variant:"tertiary",style:{marginLeft:"auto"}})}),s.jsx(p.Modal.Title,{navigation:"top",title:n})]}),s.jsxs(p.Modal.Body,{style:{width:500},children:[s.jsx("div",{className:Vt["filter--modal--body"],children:e}),s.jsx(tr.Loading,{})]}),s.jsx(p.Modal.Footer,{children:s.jsxs("div",{className:Vt["filter--modal--footer"],children:[s.jsx(p.Button,{"data-close":!0,size:"large",variant:"primary",children:(d=c.facets)!=null&&d.length?"ver resultados":"fechar"}),s.jsx(p.Button,{"data-close":!0,onClick:()=>i(),variant:"tertiary",children:"limpar filtros"})]})})]})};$m.displayName="Filter.Modal";const Wm=({children:e,className:t,isMobile:r,CONSTANTS:n,...o})=>s.jsx(pp,{...o,PLP_FILTERS:n.PLP_FILTERS,children:s.jsx(tr.Modal,{className:t,isMobile:r,CONSTANTS:n,children:e})});Wm.displayName="Filter.Root";const Vm=({ICONS:e,PLP_FILTERS_COLORS:t,PLP_FILTERS:r})=>{const{filters:n,onToggleFacet:o}=wr();return s.jsx("div",{className:Vt["filter--selected"],children:s.jsx("div",{className:Vt["filter--selected--content"],children:Array.isArray(n.selected)&&n.selected.map(({key:i,value:c})=>i==="productclusterids"?null:s.jsx(p.Tag,{title:i==="price"?Wa({value:c}):c,adornment:{end:s.jsx(p.Icon,{name:e.close,size:"x-small"})},colorSquare:Hc({value:c,PLP_FILTERS_COLORS:t}),onClick:()=>o({key:i,value:c}),squareShow:Uc({key:i,PLP_FILTERS:r}),size:"medium",variant:"primary",children:i==="price"?Wa({value:c}):c},c))})})};Vm.displayName="Filter.Selected";const tr={Colors:zm,Content:Lm,Empty:Dm,Modal:$m,Item:Fm,Root:Wm,Loading:Hm,Selected:Vm,Price:qm,Sizes:Bm,Toggle:Um},{checkedColor:Sj,createTagPrice:Vu,getColor:Cj}=Mm,Gm=({callback:e,facet:t})=>{const{constants:{ICONS:r,PLP_FILTERS_COLORS:n,PLP_FILTERS:o}}=ut();return s.jsx(p.Tag,{title:(t==null?void 0:t.key)==="price"?Vu({value:t.value}):t.value.toUpperCase(),adornment:{end:s.jsx(p.Icon,{name:r.close,size:"x-small"})},colorSquare:Cj({value:t.value,PLP_FILTERS_COLORS:n}),onClick:()=>{typeof e=="function"&&e(t,!0)},squareShow:Sj({key:t.key,PLP_FILTERS:o}),size:"medium",variant:"primary",children:(t==null?void 0:t.key)==="price"?Vu({value:t.value}):t.value.toUpperCase()})};Gm.displayName="PLPNavigation.Selected.Item";const Km=()=>s.jsx(p.TextStructure.Root,{children:s.jsx("p",{id:"pdc-navigation--total"})});Km.displayName="PLPNavigation.Total";const $r={BreadCrumb:wm,Content:Em,Filters:Nm,Root:Rm,Selected:Tm,SelectedItem:Gm,Total:Km},wj="_footer__bottom_198g6_2",Ej="_footer__wrapper_198g6_10",Pj="_footer__main_198g6_39",Ij="_footer__legalInformation_198g6_55",Nj="_footer__column_198g6_77",Rj="_footer__columnContent_198g6_87",Tj="_footer__item_198g6_91",Oj="_footer__itemLink_198g6_107",Aj="_footer__columnTitle_198g6_122",kj="_footer__columnTitleIcon_198g6_134",Mj="_footer__iconList_198g6_147",Lj="_footer__itemSmallText_198g6_157",Dj="_payment_198g6_168",Fj="_footer__iconContainer_198g6_173",zj="_footer__iconListSubHeader_198g6_178",qj="_accordionWrapper_198g6_200",Bj="_accordionHeader_198g6_204",Uj="_accordionTextWrapper_198g6_208",Be={footer__bottom:wj,footer__wrapper:Ej,footer__main:Pj,footer__legalInformation:Ij,footer__column:Nj,footer__columnContent:Rj,footer__item:Tj,footer__itemLink:Oj,footer__columnTitle:Aj,footer__columnTitleIcon:kj,footer__iconList:Mj,footer__itemSmallText:Lj,payment:Dj,footer__iconContainer:Fj,footer__iconListSubHeader:zj,accordionWrapper:qj,accordionHeader:Bj,accordionTextWrapper:Uj,"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 Qm={},$c={},ei={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return t}});let t=r=>{};if(process.env.NODE_ENV!=="production"){const r=new Set;t=n=>{r.has(n)||console.warn(n),r.add(n)}}})(ei);var Ym={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return t}});function t(r){let{widthInt:n,heightInt:o,blurWidth:i,blurHeight:c,blurDataURL:l,objectFit:u}=r;const d=20,h=i?i*40:n,m=c?c*40:o,_=h&&m?"viewBox='0 0 "+h+" "+m+"'":"",g=_?"none":u==="contain"?"xMidYMid":u==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+_+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+d+"'/%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='"+d+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+g+"' style='filter: url(%23b);' href='"+l+"'/%3E%3C/svg%3E"}})(Ym);var ti={};(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,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});const r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(ti);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImgProps",{enumerable:!0,get:function(){return g}});const t=ei,r=Ym,n=ti,o=["lazy","eager",void 0];function i(v){return v.default!==void 0}function c(v){return v.src!==void 0}function l(v){return typeof v=="object"&&(i(v)||c(v))}const u=new Map;let d;function h(v){return typeof v>"u"?v:typeof v=="number"?Number.isFinite(v)?v:NaN:typeof v=="string"&&/^[0-9]+$/.test(v)?parseInt(v,10):NaN}function m(v,x,S){let{deviceSizes:w,allSizes:I}=v;if(S){const C=/(^|\s)(1?\d?\d)vw/g,N=[];for(let T;T=C.exec(S);T)N.push(parseInt(T[2]));if(N.length){const T=Math.min(...N)*.01;return{widths:I.filter(O=>O>=w[0]*T),kind:"w"}}return{widths:I,kind:"w"}}return typeof x!="number"?{widths:w,kind:"w"}:{widths:[...new Set([x,x*2].map(C=>I.find(N=>N>=C)||I[I.length-1]))],kind:"x"}}function _(v){let{config:x,src:S,unoptimized:w,width:I,quality:P,sizes:C,loader:N}=v;if(w)return{src:S,srcSet:void 0,sizes:void 0};const{widths:T,kind:O}=m(x,I,C),M=T.length-1;return{sizes:!C&&O==="w"?"100vw":C,srcSet:T.map((z,D)=>N({config:x,src:S,quality:P,width:z})+" "+(O==="w"?z:D+1)+O).join(", "),src:N({config:x,src:S,quality:P,width:T[M]})}}function g(v,x){let{src:S,sizes:w,unoptimized:I=!1,priority:P=!1,loading:C,className:N,quality:T,width:O,height:M,fill:z=!1,style:D,overrideSrc:B,onLoad:G,onLoadingComplete:J,placeholder:Y="empty",blurDataURL:X,fetchPriority:Z,decoding:he="async",layout:fe,objectFit:ee,objectPosition:ie,lazyBoundary:_e,lazyRoot:we,...ge}=v;const{imgConf:Ee,showAltText:V,blurComplete:oe,defaultLoader:F}=x;let ce,je=Ee||n.imageConfigDefault;if("allSizes"in je)ce=je;else{var Oe;const de=[...je.deviceSizes,...je.imageSizes].sort((ve,qe)=>ve-qe),Q=je.deviceSizes.sort((ve,qe)=>ve-qe),se=(Oe=je.qualities)==null?void 0:Oe.sort((ve,qe)=>ve-qe);ce={...je,allSizes:de,deviceSizes:Q,qualities:se}}if(typeof F>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
5
5
  Read more: https://nextjs.org/docs/messages/invalid-images-config`);let q=ge.loader||F;delete ge.loader,delete ge.srcSet;const $="__next_img_default"in q;if($){if(ce.loader==="custom")throw new Error('Image with src "'+S+`" is missing "loader" prop.
6
6
  Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const de=q;q=Q=>{const{config:se,...ve}=Q;return de(ve)}}if(fe){fe==="fill"&&(z=!0);const de={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},Q={responsive:"100vw",fill:"100vw"},se=de[fe];se&&(D={...D,...se});const ve=Q[fe];ve&&!w&&(w=ve)}let Ie="",ne=h(O),te=h(M),ke,ct;if(l(S)){const de=i(S)?S.default:S;if(!de.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(de));if(!de.height||!de.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(de));if(ke=de.blurWidth,ct=de.blurHeight,X=X||de.blurDataURL,Ie=de.src,!z){if(!ne&&!te)ne=de.width,te=de.height;else if(ne&&!te){const Q=ne/de.width;te=Math.round(de.height*Q)}else if(!ne&&te){const Q=te/de.height;ne=Math.round(de.width*Q)}}}S=typeof S=="string"?S:Ie;let Me=!P&&(C==="lazy"||typeof C>"u");(!S||S.startsWith("data:")||S.startsWith("blob:"))&&(I=!0,Me=!1),ce.unoptimized&&(I=!0),$&&S.endsWith(".svg")&&!ce.dangerouslyAllowSVG&&(I=!0),P&&(Z="high");const Le=h(T);if(process.env.NODE_ENV!=="production"){if(ce.output==="export"&&$&&!I)throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");if(!S)I=!0;else if(z){if(O)throw new Error('Image with src "'+S+'" has both "width" and "fill" properties. Only one should be used.');if(M)throw new Error('Image with src "'+S+'" has both "height" and "fill" properties. Only one should be used.');if(D!=null&&D.position&&D.position!=="absolute")throw new Error('Image with src "'+S+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(D!=null&&D.width&&D.width!=="100%")throw new Error('Image with src "'+S+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(D!=null&&D.height&&D.height!=="100%")throw new Error('Image with src "'+S+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof ne>"u")throw new Error('Image with src "'+S+'" is missing required "width" property.');if(isNaN(ne))throw new Error('Image with src "'+S+'" has invalid "width" property. Expected a numeric value in pixels but received "'+O+'".');if(typeof te>"u")throw new Error('Image with src "'+S+'" is missing required "height" property.');if(isNaN(te))throw new Error('Image with src "'+S+'" has invalid "height" property. Expected a numeric value in pixels but received "'+M+'".')}if(!o.includes(C))throw new Error('Image with src "'+S+'" has invalid "loading" property. Provided "'+C+'" should be one of '+o.map(String).join(",")+".");if(P&&C==="lazy")throw new Error('Image with src "'+S+`" has both "priority" and "loading='lazy'" properties. Only one should be used.`);if(Y!=="empty"&&Y!=="blur"&&!Y.startsWith("data:image/"))throw new Error('Image with src "'+S+'" has invalid "placeholder" property "'+Y+'".');if(Y!=="empty"&&ne&&te&&ne*te<1600&&(0,t.warnOnce)('Image with src "'+S+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),Y==="blur"&&!X){const de=["jpeg","png","webp","avif"];throw new Error('Image with src "'+S+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
7
7
  Possible solutions:
@@ -9,22 +9,22 @@ Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{con
9
9
  - Change the "src" property to a static import with one of the supported file types: `+de.join(",")+` (animated images not supported)
10
10
  - Remove the "placeholder" property, effectively no blur effect
11
11
  Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in ge&&(0,t.warnOnce)('Image with src "'+S+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!I&&!$){const de=q({config:ce,src:S,width:ne||400,quality:Le||75});let Q;try{Q=new URL(de)}catch{}(de===S||Q&&Q.pathname===S&&!Q.search)&&(0,t.warnOnce)('Image with src "'+S+`" 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`)}J&&(0,t.warnOnce)('Image with src "'+S+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[de,Q]of Object.entries({layout:fe,objectFit:ee,objectPosition:ie,lazyBoundary:_e,lazyRoot:Ce}))Q&&(0,t.warnOnce)('Image with src "'+S+'" has legacy prop "'+de+`". Did you forget to run the codemod?
12
+ Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}J&&(0,t.warnOnce)('Image with src "'+S+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[de,Q]of Object.entries({layout:fe,objectFit:ee,objectPosition:ie,lazyBoundary:_e,lazyRoot:we}))Q&&(0,t.warnOnce)('Image with src "'+S+'" has legacy prop "'+de+`". Did you forget to run the codemod?
13
13
  Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!d&&window.PerformanceObserver){d=new PerformanceObserver(de=>{for(const se of de.getEntries()){var Q;const ve=(se==null||(Q=se.element)==null?void 0:Q.src)||"",qe=u.get(ve);qe&&!qe.priority&&qe.placeholder==="empty"&&!qe.src.startsWith("data:")&&!qe.src.startsWith("blob:")&&(0,t.warnOnce)('Image with src "'+qe.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{d.observe({type:"largest-contentful-paint",buffered:!0})}catch(de){console.error(de)}}}const tt=Object.assign(z?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:ee,objectPosition:ie}:{},V?{}:{color:"transparent"},D),We=!oe&&Y!=="empty"?Y==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:ne,heightInt:te,blurWidth:ke,blurHeight:ct,blurDataURL:X||"",objectFit:tt.objectFit})+'")':'url("'+Y+'")':null;let re=We?{backgroundSize:tt.objectFit||"cover",backgroundPosition:tt.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:We}:{};process.env.NODE_ENV==="development"&&re.backgroundImage&&Y==="blur"&&X!=null&&X.startsWith("/")&&(re.backgroundImage='url("'+X+'")');const De=_({config:ce,src:S,unoptimized:I,width:ne,quality:Le,sizes:w,loader:q});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let de;try{de=new URL(De.src)}catch{de=new URL(De.src,window.location.href)}u.set(de.href,{src:S,priority:P,placeholder:Y})}return{props:{...ge,loading:Me?"lazy":C,fetchPriority:Z,width:ne,height:te,decoding:he,className:N,style:{...tt,...re},sizes:De.sizes,srcSet:De.srcSet,src:B||De.src},meta:{unoptimized:I,priority:P,placeholder:Y,fill:z}}}})(Hc);var Ga={exports:{}},vo={exports:{}},sa={},Ku;function $j(){return Ku||(Ku=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});const t=j,r=typeof window>"u",n=r?()=>{}:t.useLayoutEffect,o=r?()=>{}:t.useEffect;function i(c){const{headManager:l,reduceComponentsToState:u}=c;function d(){if(l&&l.mountedInstances){const m=t.Children.toArray(Array.from(l.mountedInstances).filter(Boolean));l.updateHead(u(m,c))}}if(r){var h;l==null||(h=l.mountedInstances)==null||h.add(c.children),d()}return n(()=>{var m;return l==null||(m=l.mountedInstances)==null||m.add(c.children),()=>{var _;l==null||(_=l.mountedInstances)==null||_.delete(c.children)}}),n(()=>(l&&(l._pendingUpdate=d),()=>{l&&(l._pendingUpdate=d)})),o(()=>(l&&l._pendingUpdate&&(l._pendingUpdate(),l._pendingUpdate=null),()=>{l&&l._pendingUpdate&&(l._pendingUpdate(),l._pendingUpdate=null)})),null}}(sa)),sa}var oa={},Qu;function Wj(){return Qu||(Qu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="AmpStateContext")}(oa)),oa}var ia={},Yu;function Qm(){return Yu||(Yu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="HeadManagerContext")}(ia)),ia}var aa={},Xu;function Vj(){return Xu||(Xu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(r){let{ampFirst:n=!1,hybrid:o=!1,hasQuery:i=!1}=r===void 0?{}:r;return n||o&&i}}(aa)),aa}var Ju;function Gj(){return Ju||(Ju=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(P,C){for(var N in C)Object.defineProperty(P,N,{enumerable:!0,get:C[N]})}r(t,{default:function(){return I},defaultHead:function(){return _}});const n=Ct,o=_n,i=s,c=o._(j),l=n._($j()),u=Wj(),d=Qm(),h=Vj(),m=ei;function _(P){P===void 0&&(P=!1);const C=[(0,i.jsx)("meta",{charSet:"utf-8"})];return P||C.push((0,i.jsx)("meta",{name:"viewport",content:"width=device-width"})),C}function g(P,C){return typeof C=="string"||typeof C=="number"?P:C.type===c.default.Fragment?P.concat(c.default.Children.toArray(C.props.children).reduce((N,T)=>typeof T=="string"||typeof T=="number"?N:N.concat(T),[])):P.concat(C)}const v=["name","httpEquiv","charSet","itemProp"];function x(){const P=new Set,C=new Set,N=new Set,T={};return O=>{let M=!0,z=!1;if(O.key&&typeof O.key!="number"&&O.key.indexOf("$")>0){z=!0;const D=O.key.slice(O.key.indexOf("$")+1);P.has(D)?M=!1:P.add(D)}switch(O.type){case"title":case"base":C.has(O.type)?M=!1:C.add(O.type);break;case"meta":for(let D=0,B=v.length;D<B;D++){const G=v[D];if(O.props.hasOwnProperty(G))if(G==="charSet")N.has(G)?M=!1:N.add(G);else{const J=O.props[G],Y=T[G]||new Set;(G!=="name"||!z)&&Y.has(J)?M=!1:(Y.add(J),T[G]=Y)}}break}return M}}function S(P,C){const{inAmpMode:N}=C;return P.reduce(g,[]).reverse().concat(_(N).reverse()).filter(x()).reverse().map((T,O)=>{const M=T.key||O;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!N&&T.type==="link"&&T.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(z=>T.props.href.startsWith(z))){const z={...T.props||{}};return z["data-href"]=z.href,z.href=void 0,z["data-optimized-fonts"]=!0,c.default.cloneElement(T,z)}if(process.env.NODE_ENV==="development")if(T.type==="script"&&T.props.type!=="application/ld+json"){const z=T.props.src?'<script> tag with src="'+T.props.src+'"':"inline <script>";(0,m.warnOnce)("Do not add <script> tags using next/head (see "+z+`). Use next/script instead.
14
+ Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{d.observe({type:"largest-contentful-paint",buffered:!0})}catch(de){console.error(de)}}}const tt=Object.assign(z?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:ee,objectPosition:ie}:{},V?{}:{color:"transparent"},D),We=!oe&&Y!=="empty"?Y==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:ne,heightInt:te,blurWidth:ke,blurHeight:ct,blurDataURL:X||"",objectFit:tt.objectFit})+'")':'url("'+Y+'")':null;let re=We?{backgroundSize:tt.objectFit||"cover",backgroundPosition:tt.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:We}:{};process.env.NODE_ENV==="development"&&re.backgroundImage&&Y==="blur"&&X!=null&&X.startsWith("/")&&(re.backgroundImage='url("'+X+'")');const De=_({config:ce,src:S,unoptimized:I,width:ne,quality:Le,sizes:w,loader:q});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let de;try{de=new URL(De.src)}catch{de=new URL(De.src,window.location.href)}u.set(de.href,{src:S,priority:P,placeholder:Y})}return{props:{...ge,loading:Me?"lazy":C,fetchPriority:Z,width:ne,height:te,decoding:he,className:N,style:{...tt,...re},sizes:De.sizes,srcSet:De.srcSet,src:B||De.src},meta:{unoptimized:I,priority:P,placeholder:Y,fill:z}}}})($c);var Va={exports:{}},vo={exports:{}},na={},Gu;function Hj(){return Gu||(Gu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});const t=j,r=typeof window>"u",n=r?()=>{}:t.useLayoutEffect,o=r?()=>{}:t.useEffect;function i(c){const{headManager:l,reduceComponentsToState:u}=c;function d(){if(l&&l.mountedInstances){const m=t.Children.toArray(Array.from(l.mountedInstances).filter(Boolean));l.updateHead(u(m,c))}}if(r){var h;l==null||(h=l.mountedInstances)==null||h.add(c.children),d()}return n(()=>{var m;return l==null||(m=l.mountedInstances)==null||m.add(c.children),()=>{var _;l==null||(_=l.mountedInstances)==null||_.delete(c.children)}}),n(()=>(l&&(l._pendingUpdate=d),()=>{l&&(l._pendingUpdate=d)})),o(()=>(l&&l._pendingUpdate&&(l._pendingUpdate(),l._pendingUpdate=null),()=>{l&&l._pendingUpdate&&(l._pendingUpdate(),l._pendingUpdate=null)})),null}}(na)),na}var sa={},Ku;function $j(){return Ku||(Ku=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="AmpStateContext")}(sa)),sa}var oa={},Qu;function Xm(){return Qu||(Qu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HeadManagerContext",{enumerable:!0,get:function(){return n}});const n=Ct._(j).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="HeadManagerContext")}(oa)),oa}var ia={},Yu;function Wj(){return Yu||(Yu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return t}});function t(r){let{ampFirst:n=!1,hybrid:o=!1,hasQuery:i=!1}=r===void 0?{}:r;return n||o&&i}}(ia)),ia}var Xu;function Vj(){return Xu||(Xu=1,function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(P,C){for(var N in C)Object.defineProperty(P,N,{enumerable:!0,get:C[N]})}r(t,{default:function(){return I},defaultHead:function(){return _}});const n=Ct,o=_n,i=s,c=o._(j),l=n._(Hj()),u=$j(),d=Xm(),h=Wj(),m=ei;function _(P){P===void 0&&(P=!1);const C=[(0,i.jsx)("meta",{charSet:"utf-8"})];return P||C.push((0,i.jsx)("meta",{name:"viewport",content:"width=device-width"})),C}function g(P,C){return typeof C=="string"||typeof C=="number"?P:C.type===c.default.Fragment?P.concat(c.default.Children.toArray(C.props.children).reduce((N,T)=>typeof T=="string"||typeof T=="number"?N:N.concat(T),[])):P.concat(C)}const v=["name","httpEquiv","charSet","itemProp"];function x(){const P=new Set,C=new Set,N=new Set,T={};return O=>{let M=!0,z=!1;if(O.key&&typeof O.key!="number"&&O.key.indexOf("$")>0){z=!0;const D=O.key.slice(O.key.indexOf("$")+1);P.has(D)?M=!1:P.add(D)}switch(O.type){case"title":case"base":C.has(O.type)?M=!1:C.add(O.type);break;case"meta":for(let D=0,B=v.length;D<B;D++){const G=v[D];if(O.props.hasOwnProperty(G))if(G==="charSet")N.has(G)?M=!1:N.add(G);else{const J=O.props[G],Y=T[G]||new Set;(G!=="name"||!z)&&Y.has(J)?M=!1:(Y.add(J),T[G]=Y)}}break}return M}}function S(P,C){const{inAmpMode:N}=C;return P.reduce(g,[]).reverse().concat(_(N).reverse()).filter(x()).reverse().map((T,O)=>{const M=T.key||O;if(process.env.NODE_ENV!=="development"&&process.env.__NEXT_OPTIMIZE_FONTS&&!N&&T.type==="link"&&T.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(z=>T.props.href.startsWith(z))){const z={...T.props||{}};return z["data-href"]=z.href,z.href=void 0,z["data-optimized-fonts"]=!0,c.default.cloneElement(T,z)}if(process.env.NODE_ENV==="development")if(T.type==="script"&&T.props.type!=="application/ld+json"){const z=T.props.src?'<script> tag with src="'+T.props.src+'"':"inline <script>";(0,m.warnOnce)("Do not add <script> tags using next/head (see "+z+`). Use next/script instead.
15
15
  See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else T.type==="link"&&T.props.rel==="stylesheet"&&(0,m.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+T.props.href+`"). Use Document instead.
16
- See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return c.default.cloneElement(T,{key:M})})}function w(P){let{children:C}=P;const N=(0,c.useContext)(u.AmpStateContext),T=(0,c.useContext)(d.HeadManagerContext);return(0,i.jsx)(l.default,{reduceComponentsToState:S,headManager:T,inAmpMode:(0,h.isInAmpMode)(N),children:C})}const I=w;(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)),vo.exports}var ca={},Zu;function Kj(){return Zu||(Zu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Ct._(j),n=ti,o=r.default.createContext(n.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(ca)),ca}var la={},ua={},da={exports:{}},ed;function Ym(){return ed||(ed=1,(()=>{var e={170:(o,i,c)=>{const l=c(510),u=()=>{if(typeof navigator<"u"&&navigator.platform){const h=navigator.platform.toLowerCase();return h==="win32"||h==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function d(h,m,_=!1){return m&&(m.windows===null||m.windows===void 0)&&(m={...m,windows:u()}),l(h,m,_)}Object.assign(d,l),o.exports=d},154:o=>{const i="\\\\/",c=`[^${i}]`,l="\\.",u="\\+",d="\\?",h="\\/",m="(?=.)",_="[^/]",g=`(?:${h}|$)`,v=`(?:^|${h})`,x=`${l}{1,2}${g}`,S=`(?!${l})`,w=`(?!${v}${x})`,I=`(?!${l}{0,1}${g})`,P=`(?!${x})`,C=`[^.${h}]`,N=`${_}*?`,O={DOT_LITERAL:l,PLUS_LITERAL:u,QMARK_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:m,QMARK:_,END_ANCHOR:g,DOTS_SLASH:x,NO_DOT:S,NO_DOTS:w,NO_DOT_SLASH:I,NO_DOTS_SLASH:P,QMARK_NO_DOT:C,STAR:N,START_ANCHOR:v,SEP:"/"},M={...O,SLASH_LITERAL:`[${i}]`,QMARK:c,STAR:`${c}*?`,DOTS_SLASH:`${l}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${l})`,NO_DOTS:`(?!(?:^|[${i}])${l}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${l}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${l}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`,SEP:"\\"},z={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:z,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(D){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${D.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(D){return D===!0?M:O}}},697:(o,i,c)=>{const l=c(154),u=c(96),{MAX_LENGTH:d,POSIX_REGEX_SOURCE:h,REGEX_NON_SPECIAL_CHARS:m,REGEX_SPECIAL_CHARS_BACKREF:_,REPLACEMENTS:g}=l,v=(w,I)=>{if(typeof I.expandRange=="function")return I.expandRange(...w,I);w.sort();const P=`[${w.join("-")}]`;try{new RegExp(P)}catch{return w.map(N=>u.escapeRegex(N)).join("..")}return P},x=(w,I)=>`Missing ${w}: "${I}" - use "\\\\${I}" to match literal characters`,S=(w,I)=>{if(typeof w!="string")throw new TypeError("Expected a string");w=g[w]||w;const P={...I},C=typeof P.maxLength=="number"?Math.min(d,P.maxLength):d;let N=w.length;if(N>C)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${C}`);const T={type:"bos",value:"",output:P.prepend||""},O=[T],M=P.capture?"":"?:",z=l.globChars(P.windows),D=l.extglobChars(z),{DOT_LITERAL:B,PLUS_LITERAL:G,SLASH_LITERAL:J,ONE_CHAR:Y,DOTS_SLASH:X,NO_DOT:Z,NO_DOT_SLASH:he,NO_DOTS_SLASH:fe,QMARK:ee,QMARK_NO_DOT:ie,STAR:_e,START_ANCHOR:Ce}=z,ge=ae=>`(${M}(?:(?!${Ce}${ae.dot?X:B}).)*?)`,we=P.dot?"":Z,V=P.dot?ee:ie;let oe=P.bash===!0?ge(P):_e;P.capture&&(oe=`(${oe})`),typeof P.noext=="boolean"&&(P.noextglob=P.noext);const F={input:w,index:-1,start:0,dot:P.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:O};w=u.removePrefix(w,F),N=w.length;const ce=[],je=[],Oe=[];let q=T,$;const Ie=()=>F.index===N-1,ne=F.peek=(ae=1)=>w[F.index+ae],te=F.advance=()=>w[++F.index]||"",ke=()=>w.slice(F.index+1),ct=(ae="",de=0)=>{F.consumed+=ae,F.index+=de},Me=ae=>{F.output+=ae.output!=null?ae.output:ae.value,ct(ae.value)},Le=()=>{let ae=1;for(;ne()==="!"&&(ne(2)!=="("||ne(3)==="?");)te(),F.start++,ae++;return ae%2===0?!1:(F.negated=!0,F.start++,!0)},tt=ae=>{F[ae]++,Oe.push(ae)},We=ae=>{F[ae]--,Oe.pop()},re=ae=>{if(q.type==="globstar"){const de=F.braces>0&&(ae.type==="comma"||ae.type==="brace"),Q=ae.extglob===!0||ce.length&&(ae.type==="pipe"||ae.type==="paren");ae.type!=="slash"&&ae.type!=="paren"&&!de&&!Q&&(F.output=F.output.slice(0,-q.output.length),q.type="star",q.value="*",q.output=oe,F.output+=q.output)}if(ce.length&&ae.type!=="paren"&&(ce[ce.length-1].inner+=ae.value),(ae.value||ae.output)&&Me(ae),q&&q.type==="text"&&ae.type==="text"){q.output=(q.output||q.value)+ae.value,q.value+=ae.value;return}ae.prev=q,O.push(ae),q=ae},De=(ae,de)=>{const Q={...D[de],conditions:1,inner:""};Q.prev=q,Q.parens=F.parens,Q.output=F.output;const se=(P.capture?"(":"")+Q.open;tt("parens"),re({type:ae,value:de,output:F.output?"":Y}),re({type:"paren",extglob:!0,value:te(),output:se}),ce.push(Q)},$e=ae=>{let de=ae.close+(P.capture?")":""),Q;if(ae.type==="negate"){let se=oe;if(ae.inner&&ae.inner.length>1&&ae.inner.includes("/")&&(se=ge(P)),(se!==oe||Ie()||/^\)+$/.test(ke()))&&(de=ae.close=`)$))${se}`),ae.inner.includes("*")&&(Q=ke())&&/^\.[^\\/.]+$/.test(Q)){const ve=S(Q,{...I,fastpaths:!1}).output;de=ae.close=`)${ve})${se})`}ae.prev.type==="bos"&&(F.negatedExtglob=!0)}re({type:"paren",extglob:!0,value:$,output:de}),We("parens")};if(P.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(w)){let ae=!1,de=w.replace(_,(Q,se,ve,qe,Je,Gr)=>qe==="\\"?(ae=!0,Q):qe==="?"?se?se+qe+(Je?ee.repeat(Je.length):""):Gr===0?V+(Je?ee.repeat(Je.length):""):ee.repeat(ve.length):qe==="."?B.repeat(ve.length):qe==="*"?se?se+qe+(Je?oe:""):oe:se?Q:`\\${Q}`);return ae===!0&&(P.unescape===!0?de=de.replace(/\\/g,""):de=de.replace(/\\+/g,Q=>Q.length%2===0?"\\\\":Q?"\\":"")),de===w&&P.contains===!0?(F.output=w,F):(F.output=u.wrapOutput(de,F,I),F)}for(;!Ie();){if($=te(),$==="\0")continue;if($==="\\"){const Q=ne();if(Q==="/"&&P.bash!==!0||Q==="."||Q===";")continue;if(!Q){$+="\\",re({type:"text",value:$});continue}const se=/^\\+/.exec(ke());let ve=0;if(se&&se[0].length>2&&(ve=se[0].length,F.index+=ve,ve%2!==0&&($+="\\")),P.unescape===!0?$=te():$+=te(),F.brackets===0){re({type:"text",value:$});continue}}if(F.brackets>0&&($!=="]"||q.value==="["||q.value==="[^")){if(P.posix!==!1&&$===":"){const Q=q.value.slice(1);if(Q.includes("[")&&(q.posix=!0,Q.includes(":"))){const se=q.value.lastIndexOf("["),ve=q.value.slice(0,se),qe=q.value.slice(se+2),Je=h[qe];if(Je){q.value=ve+Je,F.backtrack=!0,te(),!T.output&&O.indexOf(q)===1&&(T.output=Y);continue}}}($==="["&&ne()!==":"||$==="-"&&ne()==="]")&&($=`\\${$}`),$==="]"&&(q.value==="["||q.value==="[^")&&($=`\\${$}`),P.posix===!0&&$==="!"&&q.value==="["&&($="^"),q.value+=$,Me({value:$});continue}if(F.quotes===1&&$!=='"'){$=u.escapeRegex($),q.value+=$,Me({value:$});continue}if($==='"'){F.quotes=F.quotes===1?0:1,P.keepQuotes===!0&&re({type:"text",value:$});continue}if($==="("){tt("parens"),re({type:"paren",value:$});continue}if($===")"){if(F.parens===0&&P.strictBrackets===!0)throw new SyntaxError(x("opening","("));const Q=ce[ce.length-1];if(Q&&F.parens===Q.parens+1){$e(ce.pop());continue}re({type:"paren",value:$,output:F.parens?")":"\\)"}),We("parens");continue}if($==="["){if(P.nobracket===!0||!ke().includes("]")){if(P.nobracket!==!0&&P.strictBrackets===!0)throw new SyntaxError(x("closing","]"));$=`\\${$}`}else tt("brackets");re({type:"bracket",value:$});continue}if($==="]"){if(P.nobracket===!0||q&&q.type==="bracket"&&q.value.length===1){re({type:"text",value:$,output:`\\${$}`});continue}if(F.brackets===0){if(P.strictBrackets===!0)throw new SyntaxError(x("opening","["));re({type:"text",value:$,output:`\\${$}`});continue}We("brackets");const Q=q.value.slice(1);if(q.posix!==!0&&Q[0]==="^"&&!Q.includes("/")&&($=`/${$}`),q.value+=$,Me({value:$}),P.literalBrackets===!1||u.hasRegexChars(Q))continue;const se=u.escapeRegex(q.value);if(F.output=F.output.slice(0,-q.value.length),P.literalBrackets===!0){F.output+=se,q.value=se;continue}q.value=`(${M}${se}|${q.value})`,F.output+=q.value;continue}if($==="{"&&P.nobrace!==!0){tt("braces");const Q={type:"brace",value:$,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};je.push(Q),re(Q);continue}if($==="}"){const Q=je[je.length-1];if(P.nobrace===!0||!Q){re({type:"text",value:$,output:$});continue}let se=")";if(Q.dots===!0){const ve=O.slice(),qe=[];for(let Je=ve.length-1;Je>=0&&(O.pop(),ve[Je].type!=="brace");Je--)ve[Je].type!=="dots"&&qe.unshift(ve[Je].value);se=v(qe,P),F.backtrack=!0}if(Q.comma!==!0&&Q.dots!==!0){const ve=F.output.slice(0,Q.outputIndex),qe=F.tokens.slice(Q.tokensIndex);Q.value=Q.output="\\{",$=se="\\}",F.output=ve;for(const Je of qe)F.output+=Je.output||Je.value}re({type:"brace",value:$,output:se}),We("braces"),je.pop();continue}if($==="|"){ce.length>0&&ce[ce.length-1].conditions++,re({type:"text",value:$});continue}if($===","){let Q=$;const se=je[je.length-1];se&&Oe[Oe.length-1]==="braces"&&(se.comma=!0,Q="|"),re({type:"comma",value:$,output:Q});continue}if($==="/"){if(q.type==="dot"&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",O.pop(),q=T;continue}re({type:"slash",value:$,output:J});continue}if($==="."){if(F.braces>0&&q.type==="dot"){q.value==="."&&(q.output=B);const Q=je[je.length-1];q.type="dots",q.output+=$,q.value+=$,Q.dots=!0;continue}if(F.braces+F.parens===0&&q.type!=="bos"&&q.type!=="slash"){re({type:"text",value:$,output:B});continue}re({type:"dot",value:$,output:B});continue}if($==="?"){if(!(q&&q.value==="(")&&P.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){De("qmark",$);continue}if(q&&q.type==="paren"){const se=ne();let ve=$;(q.value==="("&&!/[!=<:]/.test(se)||se==="<"&&!/<([!=]|\w+>)/.test(ke()))&&(ve=`\\${$}`),re({type:"text",value:$,output:ve});continue}if(P.dot!==!0&&(q.type==="slash"||q.type==="bos")){re({type:"qmark",value:$,output:ie});continue}re({type:"qmark",value:$,output:ee});continue}if($==="!"){if(P.noextglob!==!0&&ne()==="("&&(ne(2)!=="?"||!/[!=<:]/.test(ne(3)))){De("negate",$);continue}if(P.nonegate!==!0&&F.index===0){Le();continue}}if($==="+"){if(P.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){De("plus",$);continue}if(q&&q.value==="("||P.regex===!1){re({type:"plus",value:$,output:G});continue}if(q&&(q.type==="bracket"||q.type==="paren"||q.type==="brace")||F.parens>0){re({type:"plus",value:$});continue}re({type:"plus",value:G});continue}if($==="@"){if(P.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){re({type:"at",extglob:!0,value:$,output:""});continue}re({type:"text",value:$});continue}if($!=="*"){($==="$"||$==="^")&&($=`\\${$}`);const Q=m.exec(ke());Q&&($+=Q[0],F.index+=Q[0].length),re({type:"text",value:$});continue}if(q&&(q.type==="globstar"||q.star===!0)){q.type="star",q.star=!0,q.value+=$,q.output=oe,F.backtrack=!0,F.globstar=!0,ct($);continue}let ae=ke();if(P.noextglob!==!0&&/^\([^?]/.test(ae)){De("star",$);continue}if(q.type==="star"){if(P.noglobstar===!0){ct($);continue}const Q=q.prev,se=Q.prev,ve=Q.type==="slash"||Q.type==="bos",qe=se&&(se.type==="star"||se.type==="globstar");if(P.bash===!0&&(!ve||ae[0]&&ae[0]!=="/")){re({type:"star",value:$,output:""});continue}const Je=F.braces>0&&(Q.type==="comma"||Q.type==="brace"),Gr=ce.length&&(Q.type==="pipe"||Q.type==="paren");if(!ve&&Q.type!=="paren"&&!Je&&!Gr){re({type:"star",value:$,output:""});continue}for(;ae.slice(0,3)==="/**";){const Pr=w[F.index+4];if(Pr&&Pr!=="/")break;ae=ae.slice(3),ct("/**",3)}if(Q.type==="bos"&&Ie()){q.type="globstar",q.value+=$,q.output=ge(P),F.output=q.output,F.globstar=!0,ct($);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&!qe&&Ie()){F.output=F.output.slice(0,-(Q.output+q.output).length),Q.output=`(?:${Q.output}`,q.type="globstar",q.output=ge(P)+(P.strictSlashes?")":"|$)"),q.value+=$,F.globstar=!0,F.output+=Q.output+q.output,ct($);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&ae[0]==="/"){const Pr=ae[1]!==void 0?"|$":"";F.output=F.output.slice(0,-(Q.output+q.output).length),Q.output=`(?:${Q.output}`,q.type="globstar",q.output=`${ge(P)}${J}|${J}${Pr})`,q.value+=$,F.output+=Q.output+q.output,F.globstar=!0,ct($+te()),re({type:"slash",value:"/",output:""});continue}if(Q.type==="bos"&&ae[0]==="/"){q.type="globstar",q.value+=$,q.output=`(?:^|${J}|${ge(P)}${J})`,F.output=q.output,F.globstar=!0,ct($+te()),re({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-q.output.length),q.type="globstar",q.output=ge(P),q.value+=$,F.output+=q.output,F.globstar=!0,ct($);continue}const de={type:"star",value:$,output:oe};if(P.bash===!0){de.output=".*?",(q.type==="bos"||q.type==="slash")&&(de.output=we+de.output),re(de);continue}if(q&&(q.type==="bracket"||q.type==="paren")&&P.regex===!0){de.output=$,re(de);continue}(F.index===F.start||q.type==="slash"||q.type==="dot")&&(q.type==="dot"?(F.output+=he,q.output+=he):P.dot===!0?(F.output+=fe,q.output+=fe):(F.output+=we,q.output+=we),ne()!=="*"&&(F.output+=Y,q.output+=Y)),re(de)}for(;F.brackets>0;){if(P.strictBrackets===!0)throw new SyntaxError(x("closing","]"));F.output=u.escapeLast(F.output,"["),We("brackets")}for(;F.parens>0;){if(P.strictBrackets===!0)throw new SyntaxError(x("closing",")"));F.output=u.escapeLast(F.output,"("),We("parens")}for(;F.braces>0;){if(P.strictBrackets===!0)throw new SyntaxError(x("closing","}"));F.output=u.escapeLast(F.output,"{"),We("braces")}if(P.strictSlashes!==!0&&(q.type==="star"||q.type==="bracket")&&re({type:"maybe_slash",value:"",output:`${J}?`}),F.backtrack===!0){F.output="";for(const ae of F.tokens)F.output+=ae.output!=null?ae.output:ae.value,ae.suffix&&(F.output+=ae.suffix)}return F};S.fastpaths=(w,I)=>{const P={...I},C=typeof P.maxLength=="number"?Math.min(d,P.maxLength):d,N=w.length;if(N>C)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${C}`);w=g[w]||w;const{DOT_LITERAL:T,SLASH_LITERAL:O,ONE_CHAR:M,DOTS_SLASH:z,NO_DOT:D,NO_DOTS:B,NO_DOTS_SLASH:G,STAR:J,START_ANCHOR:Y}=l.globChars(P.windows),X=P.dot?B:D,Z=P.dot?G:D,he=P.capture?"":"?:",fe={negated:!1,prefix:""};let ee=P.bash===!0?".*?":J;P.capture&&(ee=`(${ee})`);const ie=we=>we.noglobstar===!0?ee:`(${he}(?:(?!${Y}${we.dot?z:T}).)*?)`,_e=we=>{switch(we){case"*":return`${X}${M}${ee}`;case".*":return`${T}${M}${ee}`;case"*.*":return`${X}${ee}${T}${M}${ee}`;case"*/*":return`${X}${ee}${O}${M}${Z}${ee}`;case"**":return X+ie(P);case"**/*":return`(?:${X}${ie(P)}${O})?${Z}${M}${ee}`;case"**/*.*":return`(?:${X}${ie(P)}${O})?${Z}${ee}${T}${M}${ee}`;case"**/.*":return`(?:${X}${ie(P)}${O})?${T}${M}${ee}`;default:{const V=/^(.*?)\.(\w+)$/.exec(we);if(!V)return;const oe=_e(V[1]);return oe?oe+T+V[2]:void 0}}},Ce=u.removePrefix(w,fe);let ge=_e(Ce);return ge&&P.strictSlashes!==!0&&(ge+=`${O}?`),ge},o.exports=S},510:(o,i,c)=>{const l=c(716),u=c(697),d=c(96),h=c(154),m=g=>g&&typeof g=="object"&&!Array.isArray(g),_=(g,v,x=!1)=>{if(Array.isArray(g)){const O=g.map(z=>_(z,v,x));return z=>{for(const D of O){const B=D(z);if(B)return B}return!1}}const S=m(g)&&g.tokens&&g.input;if(g===""||typeof g!="string"&&!S)throw new TypeError("Expected pattern to be a non-empty string");const w=v||{},I=w.windows,P=S?_.compileRe(g,v):_.makeRe(g,v,!1,!0),C=P.state;delete P.state;let N=()=>!1;if(w.ignore){const O={...v,ignore:null,onMatch:null,onResult:null};N=_(w.ignore,O,x)}const T=(O,M=!1)=>{const{isMatch:z,match:D,output:B}=_.test(O,P,v,{glob:g,posix:I}),G={glob:g,state:C,regex:P,posix:I,input:O,output:B,match:D,isMatch:z};return typeof w.onResult=="function"&&w.onResult(G),z===!1?(G.isMatch=!1,M?G:!1):N(O)?(typeof w.onIgnore=="function"&&w.onIgnore(G),G.isMatch=!1,M?G:!1):(typeof w.onMatch=="function"&&w.onMatch(G),M?G:!0)};return x&&(T.state=C),T};_.test=(g,v,x,{glob:S,posix:w}={})=>{if(typeof g!="string")throw new TypeError("Expected input to be a string");if(g==="")return{isMatch:!1,output:""};const I=x||{},P=I.format||(w?d.toPosixSlashes:null);let C=g===S,N=C&&P?P(g):g;return C===!1&&(N=P?P(g):g,C=N===S),(C===!1||I.capture===!0)&&(I.matchBase===!0||I.basename===!0?C=_.matchBase(g,v,x,w):C=v.exec(N)),{isMatch:!!C,match:C,output:N}},_.matchBase=(g,v,x)=>(v instanceof RegExp?v:_.makeRe(v,x)).test(d.basename(g)),_.isMatch=(g,v,x)=>_(v,x)(g),_.parse=(g,v)=>Array.isArray(g)?g.map(x=>_.parse(x,v)):u(g,{...v,fastpaths:!1}),_.scan=(g,v)=>l(g,v),_.compileRe=(g,v,x=!1,S=!1)=>{if(x===!0)return g.output;const w=v||{},I=w.contains?"":"^",P=w.contains?"":"$";let C=`${I}(?:${g.output})${P}`;g&&g.negated===!0&&(C=`^(?!${C}).*$`);const N=_.toRegex(C,v);return S===!0&&(N.state=g),N},_.makeRe=(g,v={},x=!1,S=!1)=>{if(!g||typeof g!="string")throw new TypeError("Expected a non-empty string");let w={negated:!1,fastpaths:!0};return v.fastpaths!==!1&&(g[0]==="."||g[0]==="*")&&(w.output=u.fastpaths(g,v)),w.output||(w=u(g,v)),_.compileRe(w,v,x,S)},_.toRegex=(g,v)=>{try{const x=v||{};return new RegExp(g,x.flags||(x.nocase?"i":""))}catch(x){if(v&&v.debug===!0)throw x;return/$^/}},_.constants=h,o.exports=_},716:(o,i,c)=>{const l=c(96),{CHAR_ASTERISK:u,CHAR_AT:d,CHAR_BACKWARD_SLASH:h,CHAR_COMMA:m,CHAR_DOT:_,CHAR_EXCLAMATION_MARK:g,CHAR_FORWARD_SLASH:v,CHAR_LEFT_CURLY_BRACE:x,CHAR_LEFT_PARENTHESES:S,CHAR_LEFT_SQUARE_BRACKET:w,CHAR_PLUS:I,CHAR_QUESTION_MARK:P,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:N,CHAR_RIGHT_SQUARE_BRACKET:T}=c(154),O=D=>D===v||D===h,M=D=>{D.isPrefix!==!0&&(D.depth=D.isGlobstar?1/0:1)},z=(D,B)=>{const G=B||{},J=D.length-1,Y=G.parts===!0||G.scanToEnd===!0,X=[],Z=[],he=[];let fe=D,ee=-1,ie=0,_e=0,Ce=!1,ge=!1,we=!1,V=!1,oe=!1,F=!1,ce=!1,je=!1,Oe=!1,q=!1,$=0,Ie,ne,te={value:"",depth:0,isGlob:!1};const ke=()=>ee>=J,ct=()=>fe.charCodeAt(ee+1),Me=()=>(Ie=ne,fe.charCodeAt(++ee));for(;ee<J;){ne=Me();let De;if(ne===h){ce=te.backslashes=!0,ne=Me(),ne===x&&(F=!0);continue}if(F===!0||ne===x){for($++;ke()!==!0&&(ne=Me());){if(ne===h){ce=te.backslashes=!0,Me();continue}if(ne===x){$++;continue}if(F!==!0&&ne===_&&(ne=Me())===_){if(Ce=te.isBrace=!0,we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(F!==!0&&ne===m){if(Ce=te.isBrace=!0,we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===C&&($--,$===0)){F=!1,Ce=te.isBrace=!0,q=!0;break}}if(Y===!0)continue;break}if(ne===v){if(X.push(ee),Z.push(te),te={value:"",depth:0,isGlob:!1},q===!0)continue;if(Ie===_&&ee===ie+1){ie+=2;continue}_e=ee+1;continue}if(G.noext!==!0&&(ne===I||ne===d||ne===u||ne===P||ne===g)===!0&&ct()===S){if(we=te.isGlob=!0,V=te.isExtglob=!0,q=!0,ne===g&&ee===ie&&(Oe=!0),Y===!0){for(;ke()!==!0&&(ne=Me());){if(ne===h){ce=te.backslashes=!0,ne=Me();continue}if(ne===N){we=te.isGlob=!0,q=!0;break}}continue}break}if(ne===u){if(Ie===u&&(oe=te.isGlobstar=!0),we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===P){if(we=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===w){for(;ke()!==!0&&(De=Me());){if(De===h){ce=te.backslashes=!0,Me();continue}if(De===T){ge=te.isBracket=!0,we=te.isGlob=!0,q=!0;break}}if(Y===!0)continue;break}if(G.nonegate!==!0&&ne===g&&ee===ie){je=te.negated=!0,ie++;continue}if(G.noparen!==!0&&ne===S){if(we=te.isGlob=!0,Y===!0){for(;ke()!==!0&&(ne=Me());){if(ne===S){ce=te.backslashes=!0,ne=Me();continue}if(ne===N){q=!0;break}}continue}break}if(we===!0){if(q=!0,Y===!0)continue;break}}G.noext===!0&&(V=!1,we=!1);let Le=fe,tt="",We="";ie>0&&(tt=fe.slice(0,ie),fe=fe.slice(ie),_e-=ie),Le&&we===!0&&_e>0?(Le=fe.slice(0,_e),We=fe.slice(_e)):we===!0?(Le="",We=fe):Le=fe,Le&&Le!==""&&Le!=="/"&&Le!==fe&&O(Le.charCodeAt(Le.length-1))&&(Le=Le.slice(0,-1)),G.unescape===!0&&(We&&(We=l.removeBackslashes(We)),Le&&ce===!0&&(Le=l.removeBackslashes(Le)));const re={prefix:tt,input:D,start:ie,base:Le,glob:We,isBrace:Ce,isBracket:ge,isGlob:we,isExtglob:V,isGlobstar:oe,negated:je,negatedExtglob:Oe};if(G.tokens===!0&&(re.maxDepth=0,O(ne)||Z.push(te),re.tokens=Z),G.parts===!0||G.tokens===!0){let De;for(let $e=0;$e<X.length;$e++){const ae=De?De+1:ie,de=X[$e],Q=D.slice(ae,de);G.tokens&&($e===0&&ie!==0?(Z[$e].isPrefix=!0,Z[$e].value=tt):Z[$e].value=Q,M(Z[$e]),re.maxDepth+=Z[$e].depth),($e!==0||Q!=="")&&he.push(Q),De=de}if(De&&De+1<D.length){const $e=D.slice(De+1);he.push($e),G.tokens&&(Z[Z.length-1].value=$e,M(Z[Z.length-1]),re.maxDepth+=Z[Z.length-1].depth)}re.slashes=X,re.parts=he}return re};o.exports=z},96:(o,i,c)=>{const{REGEX_BACKSLASH:l,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:d,REGEX_SPECIAL_CHARS_GLOBAL:h}=c(154);i.isObject=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),i.hasRegexChars=m=>d.test(m),i.isRegexChar=m=>m.length===1&&i.hasRegexChars(m),i.escapeRegex=m=>m.replace(h,"\\$1"),i.toPosixSlashes=m=>m.replace(l,"/"),i.removeBackslashes=m=>m.replace(u,_=>_==="\\"?"":_),i.escapeLast=(m,_,g)=>{const v=m.lastIndexOf(_,g);return v===-1?m:m[v-1]==="\\"?i.escapeLast(m,_,v-1):`${m.slice(0,v)}\\${m.slice(v)}`},i.removePrefix=(m,_={})=>{let g=m;return g.startsWith("./")&&(g=g.slice(2),_.prefix="./"),g},i.wrapOutput=(m,_={},g={})=>{const v=g.contains?"":"^",x=g.contains?"":"$";let S=`${v}(?:${m})${x}`;return _.negated===!0&&(S=`(?:^(?!${S}).*$)`),S},i.basename=(m,{windows:_}={})=>{const g=m.split(_?/[\\/]/:"/"),v=g[g.length-1];return v===""?g[g.length-2]:v}}},t={};function r(o){var i=t[o];if(i!==void 0)return i.exports;var c=t[o]={exports:{}},l=!0;try{e[o](c,c.exports,r),l=!1}finally{l&&delete t[o]}return c.exports}typeof r<"u"&&(r.ab=__dirname+"/");var n=r(170);da.exports=n})()),da.exports}var td;function Qj(){return td||(td=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,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return n}});const r=Ym();function n(i,c){if(i.search!==void 0&&i.search!==c.search)return!1;var l;return!!(0,r.makeRe)((l=i.pathname)!=null?l:"**",{dot:!0}).test(c.pathname)}function o(i,c){if(!i)return!0;const l=new URL(c,"http://n");return i.some(u=>n(u,l))}}(ua)),ua}var fa={},rd;function Yj(){return rd||(rd=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,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return n}});const r=Ym();function n(i,c){if(i.protocol!==void 0){const u=c.protocol.slice(0,-1);if(i.protocol!==u)return!1}if(i.port!==void 0&&i.port!==c.port)return!1;if(i.hostname===void 0)throw new Error(`Pattern should define hostname but found
17
- `+JSON.stringify(i));if(!(0,r.makeRe)(i.hostname).test(c.hostname)||i.search!==void 0&&i.search!==c.search)return!1;var l;return!!(0,r.makeRe)((l=i.pathname)!=null?l:"**",{dot:!0}).test(c.pathname)}function o(i,c,l){return i.some(u=>l.hostname===u)||c.some(u=>n(u,l))}}(fa)),fa}var nd;function Xm(){return nd||(nd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=75;function r(o){let{config:i,src:c,width:l,quality:u}=o;var d;if(process.env.NODE_ENV!=="production"){const m=[];if(c||m.push("src"),l||m.push("width"),m.length>0)throw new Error("Next Image Optimization requires "+m.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:c,width:l,quality:u}));if(c.startsWith("//"))throw new Error('Failed to parse src "'+c+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(c.startsWith("/")&&i.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:_}=Qj();if(!_(i.localPatterns,c))throw new Error("Invalid src prop ("+c+") 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(!c.startsWith("/")&&(i.domains||i.remotePatterns)){let _;try{_=new URL(c)}catch(g){throw console.error(g),new Error('Failed to parse src "'+c+'" 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:g}=Yj();if(!g(i.domains,i.remotePatterns,_))throw new Error("Invalid src prop ("+c+') on `next/image`, hostname "'+_.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(u&&i.qualities&&!i.qualities.includes(u))throw new Error("Invalid quality prop ("+u+") 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 h=u||((d=i.qualities)==null?void 0:d.reduce((m,_)=>Math.abs(_-t)<Math.abs(m-t)?_:m))||t;return i.path+"?url="+encodeURIComponent(c)+"&w="+l+"&q="+h+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const n=r}(la)),la}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return P}});const r=Ct,n=_n,o=s,i=n._(j),c=r._(fc),l=r._(Gj()),u=Hc,d=ti,h=Kj(),m=ei,_=Vp(),g=r._(Xm()),v=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function x(C,N,T,O,M,z,D){const B=C==null?void 0:C.src;if(!C||C["data-loaded-src"]===B)return;C["data-loaded-src"]=B,("decode"in C?C.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!C.parentElement||!C.isConnected)){if(N!=="empty"&&M(!0),T!=null&&T.current){const J=new Event("load");Object.defineProperty(J,"target",{writable:!1,value:C});let Y=!1,X=!1;T.current({...J,nativeEvent:J,currentTarget:C,target:C,isDefaultPrevented:()=>Y,isPropagationStopped:()=>X,persist:()=>{},preventDefault:()=>{Y=!0,J.preventDefault()},stopPropagation:()=>{X=!0,J.stopPropagation()}})}if(O!=null&&O.current&&O.current(C),process.env.NODE_ENV!=="production"){const J=new URL(B,"http://n").searchParams.get("url")||B;if(C.getAttribute("data-nimg")==="fill"){if(!z&&(!D||D==="100vw")&&C.getBoundingClientRect().width/window.innerWidth<.6&&(D==="100vw"?(0,m.warnOnce)('Image with src "'+J+'" 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,m.warnOnce)('Image with src "'+J+'" 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')),C.parentElement){const{position:Z}=window.getComputedStyle(C.parentElement),he=["absolute","fixed","relative"];he.includes(Z)||(0,m.warnOnce)('Image with src "'+J+'" has "fill" and parent element with invalid "position". Provided "'+Z+'" should be one of '+he.map(String).join(",")+".")}C.height===0&&(0,m.warnOnce)('Image with src "'+J+'" 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 Y=C.height.toString()!==C.getAttribute("height"),X=C.width.toString()!==C.getAttribute("width");(Y&&!X||!Y&&X)&&(0,m.warnOnce)('Image with src "'+J+`" 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 S(C){return i.use?{fetchPriority:C}:{fetchpriority:C}}const w=(0,i.forwardRef)((C,N)=>{let{src:T,srcSet:O,sizes:M,height:z,width:D,decoding:B,className:G,style:J,fetchPriority:Y,placeholder:X,loading:Z,unoptimized:he,fill:fe,onLoadRef:ee,onLoadingCompleteRef:ie,setBlurComplete:_e,setShowAltText:Ce,sizesInput:ge,onLoad:we,onError:V,...oe}=C;return(0,o.jsx)("img",{...oe,...S(Y),loading:Z,width:D,height:z,decoding:B,"data-nimg":fe?"fill":"1",className:G,style:J,sizes:M,srcSet:O,src:T,ref:(0,i.useCallback)(F=>{N&&(typeof N=="function"?N(F):typeof N=="object"&&(N.current=F)),F&&(V&&(F.src=F.src),process.env.NODE_ENV!=="production"&&(T||console.error('Image is missing required "src" property:',F),F.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.')),F.complete&&x(F,X,ee,ie,_e,he,ge))},[T,X,ee,ie,_e,V,he,ge,N]),onLoad:F=>{const ce=F.currentTarget;x(ce,X,ee,ie,_e,he,ge)},onError:F=>{Ce(!0),X!=="empty"&&_e(!0),V&&V(F)}})});function I(C){let{isAppRouter:N,imgAttributes:T}=C;const O={as:"image",imageSrcSet:T.srcSet,imageSizes:T.sizes,crossOrigin:T.crossOrigin,referrerPolicy:T.referrerPolicy,...S(T.fetchPriority)};return N&&c.default.preload?(c.default.preload(T.src,O),null):(0,o.jsx)(l.default,{children:(0,o.jsx)("link",{rel:"preload",href:T.srcSet?void 0:T.src,...O},"__nimg-"+T.src+T.srcSet+T.sizes)})}const P=(0,i.forwardRef)((C,N)=>{const O=!(0,i.useContext)(_.RouterContext),M=(0,i.useContext)(h.ImageConfigContext),z=(0,i.useMemo)(()=>{var ie;const _e=v||M||d.imageConfigDefault,Ce=[..._e.deviceSizes,..._e.imageSizes].sort((V,oe)=>V-oe),ge=_e.deviceSizes.sort((V,oe)=>V-oe),we=(ie=_e.qualities)==null?void 0:ie.sort((V,oe)=>V-oe);return{..._e,allSizes:Ce,deviceSizes:ge,qualities:we}},[M]),{onLoad:D,onLoadingComplete:B}=C,G=(0,i.useRef)(D);(0,i.useEffect)(()=>{G.current=D},[D]);const J=(0,i.useRef)(B);(0,i.useEffect)(()=>{J.current=B},[B]);const[Y,X]=(0,i.useState)(!1),[Z,he]=(0,i.useState)(!1),{props:fe,meta:ee}=(0,u.getImgProps)(C,{defaultLoader:g.default,imgConf:z,blurComplete:Y,showAltText:Z});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w,{...fe,unoptimized:ee.unoptimized,placeholder:ee.placeholder,fill:ee.fill,onLoadRef:G,onLoadingCompleteRef:J,setBlurComplete:X,setShowAltText:he,sizesInput:C.sizes,ref:N}),ee.priority?(0,o.jsx)(I,{isAppRouter:O,imgAttributes:fe}):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)})(Ga,Ga.exports);var Xj=Ga.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}t(e,{default:function(){return l},getImageProps:function(){return c}});const r=Ct,n=Hc,o=Xj,i=r._(Xm());function c(u){const{props:d}=(0,n.getImgProps)(u,{defaultLoader:i.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[h,m]of Object.entries(d))m===void 0&&delete d[h];return{props:d}}const l=o.Image})(Gm);var Jj=Gm;const Is=U.getDefaultExportFromCjs(Jj),Zj=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,n=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?s.jsxs(Ot,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Be["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(Is,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(p.Icon,{size:"small",name:n})]}):s.jsxs("div",{className:Be["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(Is,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(p.Icon,{size:"small",name:n})]})},eS=({content:e,CONSTANTS:t})=>s.jsx("div",{className:Be["support-container"],children:e==null?void 0:e.map((r,n)=>s.jsxs("div",{"data-device":r.device,className:Be["support-section"],children:[s.jsxs("div",{className:Be["support-text"],children:[r.title&&s.jsx("h3",{children:r.title}),r.description&&s.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&s.jsx("div",{className:Be["support-items"],"data-gap":r.gap,children:r.items.map((o,i)=>s.jsx(Zj,{item:o,CONSTANTS:t},`footer-support-item-${i}`))})]},`footer-support-${n}`))}),tS=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:n,columnAlignContent:o,columnAlignItems:i,textAlignContent:c,textAlignItems:l,children:u})=>s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:n,alignItems:n},columnWrapper:{alignContent:o,alignItems:i}},children:s.jsxs(p.TextStructure.DivWrapper,{alignContent:c,alignItems:l,className:Be.footer__column,children:[s.jsxs("div",{className:t?Be.footer__columnTitleIcon:Be.footer__columnTitle,children:[s.jsx(p.Icon,{name:`${t}`,size:"small"}),e&&s.jsx("div",{children:e})]}),s.jsx("div",{className:Be.footer__columnContent,style:{maxWidth:`${r}px`},children:u})]})}),rS=({name:e,nameIcon:t,maxWidth:r,children:n,ICONS:o,...i})=>s.jsxs(p.Accordion.Wrapper,{className:Be.accordionWrapper,title:"accordion-wrapper",...i,children:[s.jsx(p.Accordion.Header,{id:(i==null?void 0:i.id)??"",className:Be.accordionHeader,closeIndicator:s.jsx(p.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:s.jsx(p.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:t?Be.accordionTextWrapper:"",children:[s.jsx(p.Icon,{name:`${t}`,size:"medium"}),s.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),s.jsx(p.Accordion.Body,{title:"accordion-body",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Be.footer__columnContent,style:{maxWidth:`${r}px`},children:n})})})]}),pa=e=>{const{isMobile:t}=xe();return t?s.jsx(rS,{...e}):s.jsx(tS,{...e})},xo=({type:e,children:t,className:r,collumnName:n,collumnNameIcon:o,icons:i,iconLink:c,iconSize:l,link:u,paymentDisclaimer:d,paymentTitle:h,rowAlignContent:m,columnAlignContent:_,columnAlignItems:g,textAlignContent:v,textAlignItems:x,...S})=>{let w;const{handleSelectContent:I}=Ee(),{nextimage:P}=Ae();switch(e){case"menu":w=s.jsx(Ot,{className:Be.footer__itemLink,href:u??"#",prefetch:!1,children:s.jsx("span",{onClick:()=>{I({content:`footer:${n}:${t}`})},children:t})});break;case"payment":w=s.jsxs("div",{className:p.helpers.classNameConcat(Be.payment,Be.footer__itemSmallText),...S,children:[d,s.jsxs("div",{className:p.helpers.classNameConcat(Be.footer__iconContainer,Be.footer__iconListSubHeader),children:[h,s.jsx("div",{className:Be.footer__iconList,children:i==null?void 0:i.map((C,N)=>s.jsx(P,{alt:C,src:`/assets/${C}.svg`,width:l??20,height:l??20},N))})]})]});break;case"social-media":w=s.jsx("div",{className:Be.footer__iconContainer,...S,children:s.jsx("div",{className:Be.footer__iconList,children:c==null?void 0:c.map((C,N)=>s.jsx(Ot,{prefetch:!1,href:C.link??"#",target:"_blank",children:s.jsx(p.Icon,{size:"medium",name:C.icon,onClick:()=>I({content:`footer:redes-sociais:${C.icon}`})})},N))})});break;default:w=s.jsx("div",{className:r,...S,children:t})}return s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:m,alignItems:m},columnWrapper:{alignContent:_,alignItems:g}},...S,children:s.jsx(p.TextStructure.DivWrapper,{alignContent:v,alignItems:x,className:p.helpers.classNameConcat(Be.footer__item,r),children:w})})},nS=({className:e,text:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Be.footer__legalInformation,e),children:s.jsx("span",{children:t})}),Jm=()=>{const{nextimage:e}=Ae();return s.jsx("div",{className:Be["footer--stamps"],children:s.jsx(e,{alt:"Empresa B",className:Be["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};Jm.displayName="Footer.Stamps";const Zm=({children:e,legalTextSlot:t,adornment:r,className:n,...o})=>{const{isMobile:i}=xe(),c=j.Children.toArray(e).filter(Boolean),l=c.length;return s.jsxs("div",{className:Be.footer__main,children:[(r==null?void 0:r.top)&&s.jsx("div",{className:Be.footer__top,children:r==null?void 0:r.top}),l>0&&s.jsx("div",{...o,className:p.helpers.classNameConcat(Be.footer__wrapper,n),children:c.map((u,d)=>s.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${i?1:"fit-content"})`},children:u},d))}),(r==null?void 0:r.bottom)&&s.jsx("div",{className:Be.footer__bottom,children:r.bottom}),t&&s.jsx("div",{className:Be.footer__legalText,children:t})]})};Zm.displayName="Footer.Wrapper";const e_=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:n,adornment:o,LEGAL_INFORMATION_TEXT:i,ICONS:c,className:l,hasFooterStamps:u})=>{var d;return s.jsxs(Zm,{className:l,adornment:o,legalTextSlot:s.jsx(nS,{text:i}),children:[Array.isArray(e.column)&&e.column.map((h,m)=>s.jsx(pa,{id:`${m}column-menu`,name:h.name,nameIcon:h.nameIcon,ICONS:c,children:h.items.map((_,g)=>s.jsx(xo,{type:"menu",link:_.link,collumnName:h.name,collumnNameIcon:h.nameIcon,children:_.text},g))},m)),t&&((d=t.acceptedFlags)==null?void 0:d.length)>0&&s.jsx(pa,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:c,children:s.jsx(xo,{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})}),s.jsxs(pa,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:c,children:[r!=null&&r.subTitle?s.jsx(xo,{children:r==null?void 0:r.subTitle}):null,s.jsx(xo,{type:"social-media",iconSize:24,iconLink:n}),u&&s.jsx(Jm,{})]})]})};e_.displayName="Footer";const sS=Object.freeze(Object.defineProperty({__proto__:null,Footer:e_,FooterSupport:eS},Symbol.toStringTag,{value:"Module"})),oS="_header_9xxjk_57",iS="_actions_9xxjk_131",aS="_breadcrumb_9xxjk_142",cS="_credits_9xxjk_157",lS="_pdplinks_9xxjk_185",uS="_similars_9xxjk_212",dS="_sizes_9xxjk_251",fS="_measurementTable_9xxjk_267",pS="_measurementHead_9xxjk_280",hS="_measurementRows_9xxjk_285",mS="_measurementRowsTitle_9xxjk_302",_S="_measurementRowsText_9xxjk_314",gS="_measurementImage_9xxjk_325",yS="_measurementImageContainer_9xxjk_328",vS="_measurementContent_9xxjk_337",xS="_measurementTitle_9xxjk_341",bS="_measurementClose_9xxjk_352",jS="_productref_9xxjk_417",SS="_slideOut_9xxjk_1",CS="_slideIn_9xxjk_1",wS="_content_9xxjk_397",ES="_pdp_9xxjk_185",PS="_divider_9xxjk_575",me={"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:oS,"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:iS,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:aS,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:cS,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:lS,"links-wrapper":"_links-wrapper_9xxjk_195",similars:uS,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:dS,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:fS,measurementHead:pS,measurementRows:hS,measurementRowsTitle:mS,measurementRowsText:_S,measurementImage:gS,measurementImageContainer:yS,measurementContent:vS,measurementTitle:xS,measurementClose:bS,"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:jS,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:SS,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:CS,content:wS,pdp:ES,"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:PS,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},IS=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:n}=xe(),{router:o}=Ae(),i=()=>{t&&o.push(t)},c=j.useRef(null);return s.jsx(p.ToggleStyle.Wrapper,{size:n?"medium":"small",style:{...r,border:`${c.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:i,active:c.current===t,children:e})},t_=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:n}=Et(),o=[{productId:e,slug:"",textureImage:(n==null?void 0:n.imageUrl)??"",textureAlt:(n==null?void 0:n.imageText)??""},...t];return s.jsx("div",{children:o.map((i,c)=>i.textureImage?s.jsxs(IS,{link:i.slug?i.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[s.jsx(p.ToggleStyle.DisabledAdornment,{}),s.jsx(p.ToggleStyle.Texture,{children:s.jsx(at.Image,{alt:i.textureAlt,src:i.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${c}`):null)})},NS=({children:e,productId:t,PDP_INFO:r,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{items:i,loadSimilars:c}=Lc(t,{filterTexture:n});return j.useEffect(()=>{c()},[c]),s.jsxs("div",{className:me.similars,children:[s.jsxs("div",{className:me["similars-info"],children:[s.jsx("span",{className:me["sections-title"],children:r.product.color_title}),e]}),s.jsx(t_,{productId:t,similars:i,TOGGLE_STYLE_MODIFIER:o})]})},RS=()=>{const{colorName:e}=Et();return s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:e.length===0?"":me["accessibility-info"],children:s.jsx("p",{children:e})})})},ri=({className:e,titleId:t})=>{var o,i,c;const{productName:r,tag:n}=Et();return s.jsxs("div",{className:p.helpers.classNameConcat(me.header,e),children:[n!=null&&n.commercial?s.jsx(p.Tag,{size:"small",title:(o=n.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(i=n.commercial)!=null&&i.icon?s.jsx(p.Icon,{name:n.commercial.icon}):null},children:(c=n.commercial)==null?void 0:c.value}):null,s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h1",{id:t,children:r})})})]})};ri.displayName="PDP.PDPHeader";const $c=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:n}=Et(),{count:o,value:i}=n,c=U.formatPriceToCurrency(r??0,!0),l=U.formatPriceToCurrency(t??0,!0),u=U.formatPriceToCurrency(i??0);return s.jsx(p.ProductInfo.Root,{size:"small",layout:e,children:s.jsxs(p.ProductInfo.Wrapper,{layout:e,size:"small",className:me["price-wrapper"],children:[s.jsx(p.ProductInfo.ValuesWrapper,{children:t!==r?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:c.toString(),size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:l.toString(),size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:l.toString(),size:"small"})}),o&&o>1&&i?s.jsx(p.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${u}`,size:"small"}):null]})})},Ka=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})=>{const o=Ds(),{productId:i,productData:c,price:l,listPrice:u,thumbImage:d,isKit:h}=Et(),{isMobile:m}=xe(),{addToCart:_}=Xe(),{sendDataLayerEvent:g}=Ee(),v=!h&&(!o.sku||!o.available),x=()=>{if(v&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:i}),_({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:i,texture:d==null?void 0:d.imageUrl}),g({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...c,price:l,listPrice:u}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return s.jsx(p.Button,{className:me["add-to-cart"],size:m?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:x,children:o.sku&&o.available?`${n.add_to_cart}`:`${n.select_size}`})},TS=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=xe(),n=Ds(),{sizesContainerRef:o}=Vd(),{structureRef:i}=Ze();return n.sku&&n.available?s.jsx(Ka,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):s.jsx(p.Button,{className:me["add-to-cart"],size:r?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&i.current&&window.document.body.scrollTo({top:o.current.offsetTop-i.current.offsetHeight,behavior:"smooth"})},children:n.sku&&n.available?t.add_to_cart:t.select_size})},bo=({value:e,label:t,suppressHydrationWarning:r=!1},n)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},i=n==="compact"?o:{...o,label:t};return s.jsx(p.Timer.Digit,{...i})},Uo=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:n,...o})=>{const[i,c]=j.useState(gp(new Ca.TZDate(Date.now(),n),new Ca.TZDate(e,n))),[l,u]=j.useState(!1);if(j.useEffect(()=>{u(!0);const g=setInterval(()=>{c(v=>v<=0?(clearInterval(g),0):v-1e3)},1e3);return()=>clearInterval(g)},[]),!l||i<=0)return s.jsx(s.Fragment,{});const d=ys(i,"days"),h=ys(i,"hours"),m=ys(i,"minutes"),_=ys(i);return s.jsxs(p.Timer.Root,{...o,children:[d?s.jsxs(s.Fragment,{children:[bo({value:d,label:"dias"},r),s.jsx(p.Timer.Separator,{})]}):null,bo({value:h,label:"horas"},r),s.jsx(p.Timer.Separator,{}),bo({value:m,label:"min"},r),s.jsx(p.Timer.Separator,{}),bo({value:_,label:"segs",suppressHydrationWarning:!0},r)]})},Wc=({TIME_ZONE:e})=>{const{tag:t}=Et(),r=t==null?void 0:t.flagGoldenPdp,n=j.useMemo(()=>{var o;if((o=r==null?void 0:r.tagImage)!=null&&o.includes("player.vimeo")){const i=r.tagImage.split("?")[1],c=i==null?void 0:i.split("&"),l=c==null?void 0:c.filter(d=>d.includes("loc")||d.includes("signature")||d.includes("user_id")),u=l==null?void 0:l.join("&");return`${r.tagImage.split("?")[0]}?${u}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?s.jsxs("div",{className:me["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"&&s.jsx("div",{className:me["golden-tag-video"],children:s.jsx(at.Video,{src:n,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),s.jsxs("div",{className:me["golden-tag-content"],children:[s.jsx("span",{className:me["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)&&s.jsx(Uo,{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};Wc.displayName="PDP.GoldenTag";const OS=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:n})=>{const{isMobile:o}=xe();return o?s.jsxs(p.Card,{className:me["bottom-navigation"],shadow:!0,style:{zIndex:n.pdp_bottom_navigation},children:[s.jsxs("div",{className:me["bottom-navigation__header"],children:[s.jsx(Wc,{TIME_ZONE:r}),s.jsxs("div",{className:me["bottom-navigation__header-content"],children:[s.jsx(ri,{}),s.jsx($c,{layout:"name-vertical"})]})]}),s.jsx(TS,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},AS=({children:e,setShowBottomNavigation:t})=>{const r=j.useRef(null),n=hc(r),o=j.useRef(n);return j.useEffect(()=>{var c;const{top:i}=((c=r.current)==null?void 0:c.getBoundingClientRect())??{top:0};o.current!==n&&i>0&&(t(!n),o.current=n)},[n]),s.jsx("div",{ref:r,style:{width:"100%"},children:e})},kS=({ICONS:e})=>{const{isMobile:t}=xe(),{price:r,listPrice:n,productData:o,productId:i}=Et(),{sendDataLayerEvent:c}=Ee(),l=ns(),{toggleProduct:u}=jn();return s.jsx(p.Button,{adornment:{start:s.jsx(p.Icon,{name:e[l.includes(i)?"favorite_true":"favorite_false"],size:"medium"})},className:me["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{u(i),c({functionKey:"productEvents",data:{event:l.includes(i)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:r,listPrice:n}}})}})},r_=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n,ICONS:o,TIME_ZONE:i,Z_INDEX_WAR:c})=>{const{isMobile:l}=xe(),[u,d]=j.useState(!0);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:me.actions,children:[l?s.jsx(AS,{setShowBottomNavigation:d,children:s.jsx(Ka,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})}):s.jsx(Ka,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n}),e&&s.jsx(kS,{ICONS:o})]}),l&&u&&s.jsx(OS,{addToCartBtnSize:r,BUY_BUTTON_LABELS:n,Z_INDEX_WAR:c,TIME_ZONE:i})]})},n_=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:n,productName:o}=Et(),i=c=>c.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return s.jsx(p.BreadCrumb.DivWrapper,{className:p.helpers.classNameConcat(me.breadcrumb,[t==="mobile"?me["breadcrumbs-mobile"]:me["breadcrumbs-desktop"],e]),children:s.jsxs(p.BreadCrumb.List,{children:[Array.isArray(n)&&n.map((c,l)=>{const u=i(n.slice(0,l+1).map(d=>d.replace(/\s/g,"-").toLowerCase()).join("/"));return s.jsx(p.BreadCrumb.Item,{adornment:{end:s.jsx(p.Icon,{name:r.arrow_right})},role:"listitem",children:s.jsx(Ot,{href:`/${u}`,children:c})},`pdp-breadcrumb-${u}-${l}`)}),s.jsx(p.BreadCrumb.Item,{role:"listitem",className:p.helpers.classNameConcat(me["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};n_.displayName="PDP.BreadCrumb";const s_=({className:e})=>{var n;const{tag:t}=Et(),r=t==null?void 0:t.flagPdp;return r&&((n=r==null?void 0:r.value)!=null&&n.length)?s.jsx(p.Tag,{className:p.helpers.classNameConcat(me.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?s.jsx(p.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}):s.jsx(s.Fragment,{})};s_.displayName="PDPCredits";const MS=()=>{const{descriptionContent:e,productReference:t}=Et(),[r,n]=j.useState("description");return s.jsxs(p.Tabs.Root,{className:me["tabs-root-modifier"],children:[s.jsx(p.Tabs.TabList,{className:me["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:i})=>s.jsx(p.Tabs.Item,{label:o,value:i,activeTab:r,onTabChange:n,size:"large",className:`${me["tabs-item-modifier"]} ${r===i?me["tabs-item-active"]:""}`},i))}),s.jsxs("div",{className:me["content-wrapper"],children:[r==="description"?s.jsx("div",{children:s.jsxs("span",{className:me.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:i})=>r===o?s.jsx(p.Tabs.Panel,{className:`${me["tabs-panel"]} ${r===o?me["tabs-panel-enter"]:me["tabs-panel-exit"]}`,children:s.jsx("div",{className:me.content,dangerouslySetInnerHTML:{__html:i}})},o):null)]})]})},LS=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:n})=>{const o=Ds(),{isMobile:i}=xe();return s.jsxs(s.Fragment,{children:[i?s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small"}):null,s.jsx(jm,{skuId:o.available?o.sku:"",size:i?r.inputSize.mobile:r.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:n.modal,currency:e}}),i?s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},sd=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:n})=>{const o=U.resizingImg(e.imageUrl,n.pdp),{nextimage:i}=Ae();return s.jsx(i,{src:o,alt:e.imageLabel,objectFit:"contain",...n.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},DS=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:n}=Ee(),o=j.useRef(!1);return s.jsx(at.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,n({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:r})},o_=({images:e,video:t,handleZoom:r,productName:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{var d,h;const{initialize:i,pagination:c,controller:l,itemsStyles:u}=p.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return s.jsxs(p.Carousel.Root,{innerRef:m=>{i(m)},className:me["gallery-carousel-modifier"],children:[s.jsx(p.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:s.jsx(p.Carousel.Bullets,{page:c.currentPage,total:e.length,onBulletClick:m=>l==null?void 0:l.navigateTo(m)})}),s.jsxs(p.Carousel.Body,{children:[s.jsx(p.Carousel.Item,{style:u,children:s.jsx(sd,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&s.jsx(p.Carousel.Item,{style:u,children:s.jsx(DS,{video:t,productName:n,...((d=e[1])==null?void 0:d.imageUrl)&&{poster:(h=e[1])==null?void 0:h.imageUrl}})},"PDP_gallery_video"),e.map((m,_)=>_===0?null:s.jsx(p.Carousel.Item,{style:u,children:s.jsx(sd,{image:m,index:_,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${_}`))]})]})};o_.displayName="PDP.Carousel";const FS="_thumbs_1954e_65",zS="_selected_1954e_92",qS="_carousel_1954e_164",BS="_bullets_1954e_201",it={"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:FS,selected:zS,"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:qS,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:BS,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},od=({onClose:e,ICONS:t})=>s.jsx("div",{className:`${it["button-close-container"]}`,children:s.jsx(p.Button,{iconNameStart:t.close,iconSize:"medium",className:`${it["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),US=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:it["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),i_=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:i}=Ae();let c=null;const l=j.useRef(null),{initialize:u,controller:d,pagination:h,itemsStyles:m}=p.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),_=v=>{d==null||d.navigateTo(v)},g=()=>{r(!0)};return j.useEffect(()=>{t(h.currentPage)},[h.currentPage,t]),s.jsxs(p.Carousel.Root,{innerRef:v=>{v&&!c&&(c=v,u(c))},className:it.carousel,children:[s.jsxs(p.Carousel.Controller,{className:it["carousel-controller"],children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>d==null?void 0:d.prevPage(),className:it["arrow-left"],adornment:{start:s.jsx(p.Icon,{name:n.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>d==null?void 0:d.nextPage(),className:it["arrow-right"],adornment:{start:s.jsx(p.Icon,{name:n.arrow_right})}})]}),s.jsx(p.Carousel.Body,{children:Array.isArray(e)&&e.map((v,x)=>s.jsx(p.Carousel.Item,{style:m,children:s.jsx(i,{...o.image_zoom.mobile,...x===0&&{priority:!0,loading:"eager"},ref:l,className:it.imageMobile,src:v.imageUrl,alt:v.imageText,quality:100,...x===0&&{onLoad:g}})},x))}),s.jsx(p.Carousel.Bullets,{className:it.bullets,page:h.currentPage,total:h.totalPages,onBulletClick:_})]})};i_.displayName="ImageZoom.Mobile.Carousel";const a_=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{tf();const{nextimage:n}=Ae();return s.jsx("div",{className:it["image-zoom--image"],ref:e,children:s.jsx(n,{...r.image_zoom.mobile,alt:t.imageText,className:it["image-zoom--image--img"],quality:100,src:t.imageUrl})})};a_.displayName="ImageZoom.ImageZoom";const c_=({loaded:e=!1})=>s.jsx("div",{className:it["zoom-popup"],"data-loaded":e,children:s.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[s.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"}),s.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"}),s.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"})]})});c_.displayName="ImageZoom.ZoomPopup";const l_=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,i]=j.useState(!1),[c,l]=j.useState(0),{containerRef:u,imgRef:d,scale:h}=rf({defaultScale:1,maxScale:3});return s.jsxs("div",{...n,className:it["image-mobile"],"data-disable-carrousel-pan":h>1,children:[s.jsx(c_,{loaded:o}),s.jsx(i_,{images:e,setCurrent:l,setFirstImgLoaded:i,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),s.jsx("div",{className:it["image-zoom--mobile"],ref:u,children:s.jsx(a_,{imgRef:d,image:e[c],PRODUCT_IMAGE_DIMENSIONS:r})})]})};l_.displayName="ImageZoom.ImageMobile";const HS=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:it["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),$S="_modal_1u87b_1",mr={modal:$S,"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 WS({headerTitle:e,isMobile:t,ICONS:r}){return s.jsx(p.Modal.Header,{navigation:"top",className:mr["modal-header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:t,children:[s.jsx("div",{className:mr["modal-header__title"],children:s.jsx(p.Modal.Title,{navigation:"top",className:mr["quick-shop__title"],title:e})}),s.jsx(p.Button,{className:mr["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const u_=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c})=>{const{sizes:l,productId:u,handleViewItemEvent:d}=Et(),h=j.useMemo(()=>l!=null&&l.length?lh({items:l,getLabel:C=>C.value,PLP_SIZE_ORDER:t}):[],[l]),{sizesContainerRef:m}=Vd(),{isMobile:_}=xe(),g=Ds(),v=jf(),{setValue:x}=vf(),{setValue:S}=vc(),w=j.useRef({}),[I,P]=j.useState(null);return s.jsxs("div",{ref:m,className:p.helpers.classNameConcat(me.sizes,"PDP_sizes"),children:[s.jsx("span",{className:me["sections-title"],children:e.product.size_title}),s.jsx("div",{children:h.map(C=>(!C.available&&!w.current[C.value]&&(w.current[C.value]={disable:!C.available,size:C.value,skuID:C.sku}),s.jsxs(p.ToggleSize.Wrapper,{size:_?"medium":"large",title:C.value,outOfStock:!C.available,onClick:()=>{C.available||(P({skuID:C.sku,size:C.value,disable:!0}),S(!0)),g.sku!==C.sku&&(x({...g,productId:u,name:C.name,size:C.value,sku:C.sku,sellerId:C.sellerId,sellerName:C.sellerName,available:C.available}),d({sku:C.sku,size:C.value}))},active:g.sku===C.sku,children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(p.ToggleSize.Text,{children:C==null?void 0:C.value})]},`sizes-${C.sku}-${C.value}`)))}),s.jsx(Nc,{open:v,setVisible:S,sku:I,setSku:P,skus:Object.values(w.current),ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c})]})},vs=({children:e,className:t,type:r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info-subsection"],[me[`subsection-${r}`],t]),children:e}),d_=({children:e,className:t})=>{const{structureRef:r,tipbarRef:n}=Ze(),o=j.useMemo(()=>{var l,u;const i=((l=r.current)==null?void 0:l.clientHeight)||0,c=((u=n.current)==null?void 0:u.clientHeight)||0;return i+c},[r,n]);return s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},f_=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=Et(),{items:n,loadSimilars:o}=Lc(r,{filterTexture:e});return j.useEffect(()=>{o()},[o]),s.jsxs("div",{className:me.similars,children:[s.jsx("span",{className:me["sections-title"],children:"Cor"}),s.jsx(t_,{productId:r,similars:n,TOGGLE_STYLE_MODIFIER:t})]})};f_.displayName="PDP.Info.Similars";const VS=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:i,PLP_SIZE_ORDER:c,PRODUCT_CARD_TEXTS:l,TEXTURE_IMAGE:u,TIME_ZONE:d,TOGGLE_STYLE_MODIFIER:h,Z_INDEX_WAR:m})=>s.jsx(p.Modal.Body,{className:mr["modal-product-body"],children:s.jsxs(d_,{className:mr["pdp-main__info-modifier"],children:[s.jsxs(vs,{type:"product-info",children:[s.jsx(ri,{}),s.jsx($c,{})]}),s.jsx(vs,{type:"similars",children:s.jsx(f_,{TEXTURE_IMAGE:u,TOGGLE_STYLE_MODIFIER:h})}),s.jsx(vs,{type:"sizes",children:s.jsx(u_,{ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:i,PLP_SIZE_ORDER:c,PRODUCT_CARD_TEXTS:l,Z_INDEX_WAR:m})}),s.jsx(vs,{type:"actions",children:s.jsx(r_,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:d,Z_INDEX_WAR:m})})]})});function GS({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...n}){const[o,i]=j.useState(!1),c=()=>i(l=>!l);return s.jsxs("div",{className:mr["quick-shop"],children:[s.jsx(p.Button,{onClick:c,size:"x-large",className:mr["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),s.jsxs(p.Modal.Root,{isOpen:o,setIsOpen:i,className:`${mr.modal} ${mr["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[s.jsx(WS,{headerTitle:t.title,ICONS:r}),s.jsx(VS,{callBackProductAdded:e,ICONS:r,...n})]})]})}const KS=({image:e})=>s.jsx(Is,{src:U.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:it.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),QS=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,i]=j.useState(!1),{nextimage:c}=Ae();return s.jsx("div",{...n,className:it["main-image-container"],children:s.jsxs("div",{className:it["image-desktop"],children:[!o&&s.jsx(KS,{image:e==null?void 0:e[t]}),s.jsx(c,{src:U.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:it.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{i(!0)}})]})})},YS=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:n}=Ae();return s.jsx("div",{className:it.thumbs,children:e.map((o,i)=>s.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(i),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&t(i)},className:i===r?it.selected:"",children:s.jsx(n,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},i))})},p_=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:i,...c})=>{const{isMobile:l}=xe(),[u,d]=j.useState(t),h=m=>{d(m)};return l?s.jsxs(HS,{Z_INDEX_WAR:i,children:[s.jsx(od,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(l_,{images:e,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})]}):s.jsxs(US,{Z_INDEX_WAR:i,children:[s.jsx(od,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(QS,{images:e,selectedImageIndex:u,onThumbnailClick:h,PRODUCT_IMAGE_DIMENSIONS:o},e[u].imageId??`${e[u].imageText}-${u}`),s.jsx(YS,{images:e,selectedImageIndex:u,onThumbnailClick:h}),s.jsx(GS,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:n,Z_INDEX_WAR:i,...c})]})};p_.displayName="ImageZoom";const XS=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:n,productName:o}=Et(),[i,c]=j.useState({show:!1,initialIndex:0});j.useEffect(()=>(i.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[i]);const l=u=>{c({show:!0,initialIndex:u})};return s.jsxs(s.Fragment,{children:[s.jsx(o_,{images:e,video:n,handleZoom:l,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),i.show&&s.jsx(p_,{images:e,initialSelectedImageIndex:i.initialIndex,setShowImageZoom:c,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},h_=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:n}=Et(),o=j.useMemo(()=>{const i=n.filter(c=>!e.includes(c.imageLabel));return i.length>0?i:n},[]);return s.jsx(XS,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};h_.displayName="PDP.Gallery";const JS=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:n})=>{const{allSizesAvailable:o,productId:i}=Et(),{setValue:c}=vc(),{sendDataLayerEvent:l}=Ee();return s.jsx("div",{className:p.helpers.classNameConcat(me.links,e),id:"pdp-container","data-product-id":i,children:s.jsxs("div",{className:me["links-wrapper"],children:[!o&&s.jsx(p.Button,{adornment:t?{start:s.jsx(p.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>c(!0),underline:!0,children:n.links_and_stepper.size_out_of_stock}),s.jsx(p.Button,{adornment:t?{start:s.jsx(p.Icon,{name:r.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var u,d;(d=window.SizebayParams)==null||d.openChart((u=window.SizebayParams)==null?void 0:u.id),l({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:n.links_and_stepper.size_table_title}),s.jsx(p.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var u,d;return(d=window.SizebayParams)==null?void 0:d.openVFR((u=window.SizebayParams)==null?void 0:u.id)},children:n.links_and_stepper.sizebay})]})})},ZS=({children:e})=>s.jsx("div",{className:me["pdp-main__info-main-content"],children:e}),eC=({head:e,className:t})=>s.jsx("thead",{className:t,children:s.jsx("tr",{children:e.map((r,n)=>s.jsx("th",{children:r},`head-title-${n}`))})}),tC=({rows:e,className:t})=>s.jsx("tbody",{className:t,children:e.map((r,n)=>s.jsx("tr",{children:r.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(i=>`${i.text}
18
- `):o).map((o,i)=>s.jsx("td",{children:o},`cell-content-${i}`))},`row-content-${n}`))}),rC="_tableContainer_1yxy2_1",nC={tableContainer:rC},sC=({children:e,className:t=""})=>s.jsx("table",{className:`${nC.tableContainer} ${t}`,children:e}),Mo={Head:eC,Rows:tC,Root:sC},oC=({title:e,text:t})=>s.jsxs("p",{className:me.measurementRowsText,children:[s.jsx("h1",{className:me.measurementRowsTitle,children:e}),t]}),iC=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const n=wf(),{setValue:o}=Ef();return s.jsx(p.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:n,className:me.measurementModal,children:s.jsx(p.Modal.Body,{children:s.jsxs("div",{className:me.measurementContainer,children:[s.jsx("h1",{className:me.measurementTitle,children:t.title}),s.jsxs("div",{className:me.measurementContent,children:[s.jsx("div",{className:me.measurementImageContainer,children:s.jsx(Is,{width:264,height:402,alt:"",className:me.measurementImage,src:t.bannerImage})}),s.jsxs(Mo.Root,{className:me.measurementTable,children:[s.jsx(Mo.Head,{className:me.measurementHead,head:t.head}),s.jsx(Mo.Rows,{className:me.measurementRows,rows:t.rows.map((i,c)=>[s.jsx(oC,{title:t.descriptions[c].title,text:t.descriptions[c].text},c),...i])})]})]}),s.jsx(p.Button,{onClick:()=>o(!1),className:me.measurementClose,variant:"tertiary",children:s.jsx(p.Icon,{name:e.close})})]})})},"minicart")},aC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__gallery-wrapper"],t),...r,children:e}),cC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me.pdp,t),...r,children:e}),lC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main"],t),...r,children:e}),uC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info-secondary-content"],t),...r,children:e}),dC={gallery:aC,pdp:cC,main:lC,secondary:uC},fC=({className:e,...t})=>s.jsx(p.Utils.Divider,{...t,className:p.helpers.classNameConcat(me.divider,e)}),pC=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:RS,Actions:r_,BreadCrumb:n_,Credits:s_,DescriptionsTabs:MS,Divider:fC,Freight:LS,Gallery:h_,GoldenTag:Wc,Header:ri,Links:JS,MainContent:ZS,MainInfo:d_,PDPSimilars:NS,Price:$c,ProductMeasurements:iC,Sizes:u_,SubSectionWrapper:vs,containers:dC},Symbol.toStringTag,{value:"Module"})),m_=(e,t)=>{const[r,n]=Om({items:e}),[o,i]=t.split(":").map(Number);return isNaN(o)||isNaN(i)?[r,n]:[r<o?r:o,n>i?n:i]},__=j.createContext({}),g_=({children:e,fetch:t,queryKey:r,options:n})=>{const{data:o,isLoading:i,isFetched:c,refetch:l,isRefetching:u,error:d}=zv({queryKey:r,queryFn:async()=>{const h=await t();if(!h.ok)throw new Error("[ROOT QUERY PROVIDER ERROR]: NOT LOAD!");return h.json()},...n});return s.jsx(__.Provider,{value:j.useMemo(()=>({data:o,refetch:l,isLoading:i,isFetched:c,isRefetching:u,isError:!!d}),[o,l,i,c,u,d]),children:e})},y_=()=>{const e=j.useContext(__);if(e===void 0)throw new Error("useProductsContext must be used within a useRootContext");return e},v_=j.createContext({}),hC=({children:e})=>{const{router:t}=Ae(),{constants:{PLP_SORT_DEFAULT:r}}=ut(),{reset:n}=Wr(),{searchParams:o}=ft(),{data:i,isLoading:c,...l}=y_(),u=j.useCallback((v,x)=>{if(x){if(v.key.toLocaleLowerCase()==="price"){const S=x.getAll("facets");x.delete("facets"),S.forEach(w=>{const[I]=w.split("/");I!==v.key&&x.append("facets",w)})}x.set("page","1"),n(),x.append("facets",`${v.key}/${v.value}`),t.push(`?${x.toString()}`)}},[t,n]),d=j.useCallback(()=>{const v=new URLSearchParams;v.set("sort",r),v.set("page","1"),n(),t.push(`?${v.toString()}`)},[t,n,r]),h=j.useCallback((v,x)=>{if(!x||!x.has&&!x.has("facets"))return;const S=x.getAll("facets");x.delete("facets"),x.set("page","1"),S.forEach(w=>{const[I,P]=w.split("/");(I!==v.key||P!==v.value)&&x.append("facets",w)}),n(),t.push(`?${x.toString()}`)},[t,n]),m=j.useCallback(v=>{const x=o?new URLSearchParams(o):new URLSearchParams;for(const[,S]of x.entries()){const[w,I]=S.split("/");if(w===v.key&&I===v.value)return h(v,x)}return u(v,x)},[u,h,o]),_=j.useCallback(v=>{const x=o?new URLSearchParams(o):new URLSearchParams;x.set("sort",v.replace("_",":")),t.push(`?${x.toString()}`)},[t,o]),g=i&&"data"in i?i.data:null;return s.jsx(v_.Provider,{value:{...l,breadcrumb:(g==null?void 0:g.breadcrumb)??[],deleteAllFacets:d,facets:(g==null?void 0:g.facets)??[],isLoading:c,selectedFacets:U.getFacetsActiveSearchParams(o),onToggleFacet:m,onSort:_},children:e})},x_=({children:e,enabled:t,...r})=>{const{state:n}=ft(),o=l=>l==="productclusterids"||l.startsWith("category-"),i=n.facets.filter(({key:l})=>o(l)),c=n.facets.map(l=>`${l.key}:${l.value}`).sort().join(",");return s.jsx(g_,{fetch:()=>U.fetchProxy("/_v/proxy/search/facets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,facets:i})}),queryKey:["facets",n.base,n.term,c],options:{enabled:t??!0,gcTime:1e3*60*30,refetchOnWindowFocus:!1,placeholderData:lv,staleTime:1e3*60*30},children:s.jsx(hC,{...r,children:e})})},Vc=()=>{const e=j.useContext(v_);if(e===void 0)throw new Error("use QueryFacetsContext must be used within a QueryFacetsProvider");return e},mC=()=>{var N;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:i},openFilters:c,setOpenFilters:l}=ut(),[u,d]=j.useState("10000:0"),{isMobile:h}=xe(),{sendDataLayerEvent:m}=Ee(),{state:_}=ft(),{breadcrumb:g,deleteAllFacets:v,facets:x,isLoading:S,onToggleFacet:w}=Vc(),I=j.useRef(""),P={isLast:!0,href:(N=_.term)!=null&&N.length?`/${_.term}`:"",name:_.term},C=U.filterNonRootFacets(_.facets,_==null?void 0:_.base);return j.useEffect(()=>{const T=x.find(({key:O})=>O==="price");if(T){const[O,M]=m_(T.values,u??"10000:0");d(`${O}:${M}`)}},[x,u,d]),j.useEffect(()=>{if(!C.length)return;const T=JSON.stringify(C);I.current!==T&&(I.current=T,m({functionKey:"filterEvent",data:{commonData:{selectedFacets:C}}}))},[C]),s.jsxs(pn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:g.length?g:[P],deleteAllFacets:v,filters:{facets:U.filterNonCategorySelected(x,_==null?void 0:_.base),selected:C},isMobile:h??!1,isLoading:S??!1,isOpen:c,price:u,onToggleFacet:w,setIsOpen:l,children:[s.jsx(pn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),s.jsx(pn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_SIZE_ORDER:i}})]})},b_=()=>typeof document>"u"?null:s.jsx(mC,{});b_.displayName="Filters";const _C=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{j.useEffect(()=>{var i;const n=new URLSearchParams(window.location.search).get("page");if(e){const[c,l]=((i=sessionStorage.getItem(t.key))==null?void 0:i.split("-"))??["0",null],u=sessionStorage.getItem(t.refer);c&&u==="true"&&(l===(n||"null")&&window.document.body.scrollTo({top:parseInt(c,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()}-${n}`)};return window.document.body.addEventListener("scroll",o,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",o)}},[e])},j_=j.createContext({}),gC=({callback:e,children:t})=>{const{data:r,isLoading:n,...o}=y_(),i=r&&"data"in r?r.data:null;return j.useEffect(()=>{i&&typeof e=="function"&&e({...i})},[i]),s.jsx(j_.Provider,{value:{...o,isLoading:n,products:(i==null?void 0:i.products)??[],pagination:(i==null?void 0:i.pagination)??qv,total:(i==null?void 0:i.pagination.count)??0},children:t})},Gc=({callback:e,children:t,forceUpdate:r,options:n,state:o,queryKey:i})=>s.jsx(g_,{fetch:()=>U.fetchProxy("/_v/proxy/search/product",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...o,forceUpdate:r})}),queryKey:i,options:n,children:s.jsx(gC,{callback:e,children:t})}),Us=()=>{const e=j.useContext(j_);if(e===void 0)throw new Error("useQueryProductsContext must be used within a QueryProductsProvider");return e},Kc=({total:e=0})=>{const{constants:{SEARCH_TOTAL_PORTAL_ID:t}}=ut();if(typeof window>"u")return null;const r=document.getElementById(t);return r?fc.createPortal(s.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};Kc.displayName="PDC.Grid.NavigationTotal";const yC=()=>{const{isMobile:e}=xe(),{constants:t,mainSeller:r}=ut(),{isLoading:n,products:o,pagination:{count:i}}=Us(),{ICONS:c,PLP_GRID_SCROLL_BACK:l,PLP_NOT_RESULT:u}=t;return _C({productCount:(o==null?void 0:o.length)??0,PLP_GRID_SCROLL_BACK:l}),o?s.jsxs(s.Fragment,{children:[s.jsx(nr.Products,{...t,isMobile:e??!1,items:o,StoreConfig_MainSellerId:r}),!o.length&&!n&&s.jsx(nr.Empty,{ICONS:c,PLP_NOT_RESULT:u}),s.jsx(Kc,{total:i})]}):null},S_=({infinite:e=!1})=>e?s.jsx(nr.InfiniteScroller,{}):s.jsx(yC,{});S_.displayName="Grid";const An=e=>({centro:"center",esquerda:"start",direita:"end"})[e],C_=({children:e,contentState:t,entityKey:r})=>{const{url:n}=t.getEntity(r).getData();return n?s.jsx(Ot,{href:n,children:e}):e},vC=(e,t,r)=>{e.findEntityRanges(n=>{const o=n.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},Qc=e=>{const t=new dn.CompositeDecorator([{strategy:vC,component:C_}]),r=dn.convertFromRaw(e);return dn.EditorState.createWithContent(r,t)},xC=e=>dn.convertFromRaw(e),w_=dn.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),id="superior-direita",jo="dentro-inferior-centro",bC="inferior-direita",ha="dentro-inferior-esquerda",E_=e=>({position:e===jo||e===ha?"absolute":"default",shouldRender:[id,jo,ha].includes(e)?"top":"bottom",alignItems:[jo].includes(e)?"center":[id,bC].includes(e)?"flex-end":"flex-start",left:e===ha?"16px":e===jo?"45%":"unset"}),jC=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Qc,EXTENDED_BLOCK_RENDER_MAP:w_,GET_CONTENT_STATE:xC,controllersPositionsAdapter:E_},Symbol.toStringTag,{value:"Module"}));function SC(e){return EC(e)||wC(e)||CC()}function CC(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function wC(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function EC(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function ad(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function cd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ad(r,!0).forEach(function(n){PC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ad(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IC(e,t){return TC(e)||RC(e,t)||NC()}function NC(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function RC(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var c=e[Symbol.iterator](),l;!(n=(l=c.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){o=!0,i=u}finally{try{!n&&c.return!=null&&c.return()}finally{if(o)throw i}}return r}function TC(e){if(Array.isArray(e))return e}function OC(e,t){if(e==null)return t;for(var r=IC(t,2),n=r[0],o=r[1],i=cd({},n),c=SC(o),l=0,u=Object.keys(e);l<u.length;l++){var d=u[l];if(n.hasOwnProperty(d)){var h=n[d];i[d]=cd({},h,{},e[d])}else i[d]=e[d],c.push(d)}return[i,c]}var ld={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};function ma(e){if(e==null)return e;for(var t={},r=!1,n=0,o=Object.keys(e);n<o.length;n++){var i=o[n],c=i;ld.hasOwnProperty(i)&&(c=ld[i],r=!0),t[c]=e[i]}return r?t:e}var AC=/^(moz|ms|o|webkit)-/,kC=/^\d+$/,MC=/([A-Z])/g,LC={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function DC(e){return e.replace(MC,"-$1").toLowerCase().replace(AC,"-$1-")}function FC(e,t){var r;return typeof t=="string"?r=kC.test(t):(r=!0,t=String(t)),!r||t==="0"||LC[e]===!0?t:t+"px"}function So(e){return Object.keys(e).map(function(t){var r=FC(t,e[t]),n=DC(t);return"".concat(n,": ").concat(r)}).join("; ")}var vt={UNSTYLED:"unstyled",HEADER_ONE:"header-one",HEADER_TWO:"header-two",HEADER_THREE:"header-three",HEADER_FOUR:"header-four",HEADER_FIVE:"header-five",HEADER_SIX:"header-six",UNORDERED_LIST_ITEM:"unordered-list-item",ORDERED_LIST_ITEM:"ordered-list-item",BLOCKQUOTE:"blockquote",PULLQUOTE:"pullquote",CODE:"code-block",ATOMIC:"atomic"},ts={LINK:"LINK",IMAGE:"IMAGE"},Hs={BOLD:"BOLD",CODE:"CODE",ITALIC:"ITALIC",STRIKETHROUGH:"STRIKETHROUGH",UNDERLINE:"UNDERLINE"},P_={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(U.commonjsGlobal,function(){var r=Array.prototype.slice;function n(a,f){f&&(a.prototype=Object.create(f.prototype)),a.prototype.constructor=a}function o(a){return u(a)?a:Ie(a)}n(i,o);function i(a){return d(a)?a:ne(a)}n(c,o);function c(a){return h(a)?a:te(a)}n(l,o);function l(a){return u(a)&&!m(a)?a:ke(a)}function u(a){return!!(a&&a[g])}function d(a){return!!(a&&a[v])}function h(a){return!!(a&&a[x])}function m(a){return d(a)||h(a)}function _(a){return!!(a&&a[S])}o.isIterable=u,o.isKeyed=d,o.isIndexed=h,o.isAssociative=m,o.isOrdered=_,o.Keyed=i,o.Indexed=c,o.Set=l;var g="@@__IMMUTABLE_ITERABLE__@@",v="@@__IMMUTABLE_KEYED__@@",x="@@__IMMUTABLE_INDEXED__@@",S="@@__IMMUTABLE_ORDERED__@@",w="delete",I=5,P=1<<I,C=P-1,N={},T={value:!1},O={value:!1};function M(a){return a.value=!1,a}function z(a){a&&(a.value=!0)}function D(){}function B(a,f){f=f||0;for(var y=Math.max(0,a.length-f),b=new Array(y),E=0;E<y;E++)b[E]=a[E+f];return b}function G(a){return a.size===void 0&&(a.size=a.__iterate(Y)),a.size}function J(a,f){if(typeof f!="number"){var y=f>>>0;if(""+y!==f||y===4294967295)return NaN;f=y}return f<0?G(a)+f:f}function Y(){return!0}function X(a,f,y){return(a===0||y!==void 0&&a<=-y)&&(f===void 0||y!==void 0&&f>=y)}function Z(a,f){return fe(a,f,0)}function he(a,f){return fe(a,f,f)}function fe(a,f,y){return a===void 0?y:a<0?Math.max(0,f+a):f===void 0?a:Math.min(f,a)}var ee=0,ie=1,_e=2,Ce=typeof Symbol=="function"&&Symbol.iterator,ge="@@iterator",we=Ce||ge;function V(a){this.next=a}V.prototype.toString=function(){return"[Iterator]"},V.KEYS=ee,V.VALUES=ie,V.ENTRIES=_e,V.prototype.inspect=V.prototype.toSource=function(){return this.toString()},V.prototype[we]=function(){return this};function oe(a,f,y,b){var E=a===0?f:a===1?y:[f,y];return b?b.value=E:b={value:E,done:!1},b}function F(){return{value:void 0,done:!0}}function ce(a){return!!q(a)}function je(a){return a&&typeof a.next=="function"}function Oe(a){var f=q(a);return f&&f.call(a)}function q(a){var f=a&&(Ce&&a[Ce]||a[ge]);if(typeof f=="function")return f}function $(a){return a&&typeof a.length=="number"}n(Ie,o);function Ie(a){return a==null?$e():u(a)?a.toSeq():Q(a)}Ie.of=function(){return Ie(arguments)},Ie.prototype.toSeq=function(){return this},Ie.prototype.toString=function(){return this.__toString("Seq {","}")},Ie.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Ie.prototype.__iterate=function(a,f){return ve(this,a,f,!0)},Ie.prototype.__iterator=function(a,f){return qe(this,a,f,!0)},n(ne,Ie);function ne(a){return a==null?$e().toKeyedSeq():u(a)?d(a)?a.toSeq():a.fromEntrySeq():ae(a)}ne.prototype.toKeyedSeq=function(){return this},n(te,Ie);function te(a){return a==null?$e():u(a)?d(a)?a.entrySeq():a.toIndexedSeq():de(a)}te.of=function(){return te(arguments)},te.prototype.toIndexedSeq=function(){return this},te.prototype.toString=function(){return this.__toString("Seq [","]")},te.prototype.__iterate=function(a,f){return ve(this,a,f,!1)},te.prototype.__iterator=function(a,f){return qe(this,a,f,!1)},n(ke,Ie);function ke(a){return(a==null?$e():u(a)?d(a)?a.entrySeq():a:de(a)).toSetSeq()}ke.of=function(){return ke(arguments)},ke.prototype.toSetSeq=function(){return this},Ie.isSeq=re,Ie.Keyed=ne,Ie.Set=ke,Ie.Indexed=te;var ct="@@__IMMUTABLE_SEQ__@@";Ie.prototype[ct]=!0,n(Me,te);function Me(a){this._array=a,this.size=a.length}Me.prototype.get=function(a,f){return this.has(a)?this._array[J(this,a)]:f},Me.prototype.__iterate=function(a,f){for(var y=this._array,b=y.length-1,E=0;E<=b;E++)if(a(y[f?b-E:E],E,this)===!1)return E+1;return E},Me.prototype.__iterator=function(a,f){var y=this._array,b=y.length-1,E=0;return new V(function(){return E>b?F():oe(a,E,y[f?b-E++:E++])})},n(Le,ne);function Le(a){var f=Object.keys(a);this._object=a,this._keys=f,this.size=f.length}Le.prototype.get=function(a,f){return f!==void 0&&!this.has(a)?f:this._object[a]},Le.prototype.has=function(a){return this._object.hasOwnProperty(a)},Le.prototype.__iterate=function(a,f){for(var y=this._object,b=this._keys,E=b.length-1,R=0;R<=E;R++){var A=b[f?E-R:R];if(a(y[A],A,this)===!1)return R+1}return R},Le.prototype.__iterator=function(a,f){var y=this._object,b=this._keys,E=b.length-1,R=0;return new V(function(){var A=b[f?E-R:R];return R++>E?F():oe(a,A,y[A])})},Le.prototype[S]=!0,n(tt,te);function tt(a){this._iterable=a,this.size=a.length||a.size}tt.prototype.__iterateUncached=function(a,f){if(f)return this.cacheResult().__iterate(a,f);var y=this._iterable,b=Oe(y),E=0;if(je(b))for(var R;!(R=b.next()).done&&a(R.value,E++,this)!==!1;);return E},tt.prototype.__iteratorUncached=function(a,f){if(f)return this.cacheResult().__iterator(a,f);var y=this._iterable,b=Oe(y);if(!je(b))return new V(F);var E=0;return new V(function(){var R=b.next();return R.done?R:oe(a,E++,R.value)})},n(We,te);function We(a){this._iterator=a,this._iteratorCache=[]}We.prototype.__iterateUncached=function(a,f){if(f)return this.cacheResult().__iterate(a,f);for(var y=this._iterator,b=this._iteratorCache,E=0;E<b.length;)if(a(b[E],E++,this)===!1)return E;for(var R;!(R=y.next()).done;){var A=R.value;if(b[E]=A,a(A,E++,this)===!1)break}return E},We.prototype.__iteratorUncached=function(a,f){if(f)return this.cacheResult().__iterator(a,f);var y=this._iterator,b=this._iteratorCache,E=0;return new V(function(){if(E>=b.length){var R=y.next();if(R.done)return R;b[E]=R.value}return oe(a,E,b[E++])})};function re(a){return!!(a&&a[ct])}var De;function $e(){return De||(De=new Me([]))}function ae(a){var f=Array.isArray(a)?new Me(a).fromEntrySeq():je(a)?new We(a).fromEntrySeq():ce(a)?new tt(a).fromEntrySeq():typeof a=="object"?new Le(a):void 0;if(!f)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+a);return f}function de(a){var f=se(a);if(!f)throw new TypeError("Expected Array or iterable object of values: "+a);return f}function Q(a){var f=se(a)||typeof a=="object"&&new Le(a);if(!f)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+a);return f}function se(a){return $(a)?new Me(a):je(a)?new We(a):ce(a)?new tt(a):void 0}function ve(a,f,y,b){var E=a._cache;if(E){for(var R=E.length-1,A=0;A<=R;A++){var L=E[y?R-A:A];if(f(L[1],b?L[0]:A,a)===!1)return A+1}return A}return a.__iterateUncached(f,y)}function qe(a,f,y,b){var E=a._cache;if(E){var R=E.length-1,A=0;return new V(function(){var L=E[y?R-A:A];return A++>R?F():oe(f,b?L[0]:A-1,L[1])})}return a.__iteratorUncached(f,y)}function Je(a,f){return f?Gr(f,a,"",{"":a}):Pr(a)}function Gr(a,f,y,b){return Array.isArray(f)?a.call(b,y,te(f).map(function(E,R){return Gr(a,E,R,f)})):rl(f)?a.call(b,y,ne(f).map(function(E,R){return Gr(a,E,R,f)})):f}function Pr(a){return Array.isArray(a)?te(a).map(Pr).toList():rl(a)?ne(a).map(Pr).toMap():a}function rl(a){return a&&(a.constructor===Object||a.constructor===void 0)}function rt(a,f){if(a===f||a!==a&&f!==f)return!0;if(!a||!f)return!1;if(typeof a.valueOf=="function"&&typeof f.valueOf=="function"){if(a=a.valueOf(),f=f.valueOf(),a===f||a!==a&&f!==f)return!0;if(!a||!f)return!1}return!!(typeof a.equals=="function"&&typeof f.equals=="function"&&a.equals(f))}function ii(a,f){if(a===f)return!0;if(!u(f)||a.size!==void 0&&f.size!==void 0&&a.size!==f.size||a.__hash!==void 0&&f.__hash!==void 0&&a.__hash!==f.__hash||d(a)!==d(f)||h(a)!==h(f)||_(a)!==_(f))return!1;if(a.size===0&&f.size===0)return!0;var y=!m(a);if(_(a)){var b=a.entries();return f.every(function(H,W){var K=b.next().value;return K&&rt(K[1],H)&&(y||rt(K[0],W))})&&b.next().done}var E=!1;if(a.size===void 0)if(f.size===void 0)typeof a.cacheResult=="function"&&a.cacheResult();else{E=!0;var R=a;a=f,f=R}var A=!0,L=f.__iterate(function(H,W){if(y?!a.has(H):E?!rt(H,a.get(W,N)):!rt(a.get(W,N),H))return A=!1,!1});return A&&a.size===L}n(_t,te);function _t(a,f){if(!(this instanceof _t))return new _t(a,f);if(this._value=a,this.size=f===void 0?1/0:Math.max(0,f),this.size===0){if(ai)return ai;ai=this}}_t.prototype.toString=function(){return this.size===0?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},_t.prototype.get=function(a,f){return this.has(a)?this._value:f},_t.prototype.includes=function(a){return rt(this._value,a)},_t.prototype.slice=function(a,f){var y=this.size;return X(a,f,y)?this:new _t(this._value,he(f,y)-Z(a,y))},_t.prototype.reverse=function(){return this},_t.prototype.indexOf=function(a){return rt(this._value,a)?0:-1},_t.prototype.lastIndexOf=function(a){return rt(this._value,a)?this.size:-1},_t.prototype.__iterate=function(a,f){for(var y=0;y<this.size;y++)if(a(this._value,y,this)===!1)return y+1;return y},_t.prototype.__iterator=function(a,f){var y=this,b=0;return new V(function(){return b<y.size?oe(a,b++,y._value):F()})},_t.prototype.equals=function(a){return a instanceof _t?rt(this._value,a._value):ii(a)};var ai;function Gs(a,f){if(!a)throw new Error(f)}n(gt,te);function gt(a,f,y){if(!(this instanceof gt))return new gt(a,f,y);if(Gs(y!==0,"Cannot step a Range by 0"),a=a||0,f===void 0&&(f=1/0),y=y===void 0?1:Math.abs(y),f<a&&(y=-y),this._start=a,this._end=f,this._step=y,this.size=Math.max(0,Math.ceil((f-a)/y-1)+1),this.size===0){if(ci)return ci;ci=this}}gt.prototype.toString=function(){return this.size===0?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},gt.prototype.get=function(a,f){return this.has(a)?this._start+J(this,a)*this._step:f},gt.prototype.includes=function(a){var f=(a-this._start)/this._step;return f>=0&&f<this.size&&f===Math.floor(f)},gt.prototype.slice=function(a,f){return X(a,f,this.size)?this:(a=Z(a,this.size),f=he(f,this.size),f<=a?new gt(0,0):new gt(this.get(a,this._end),this.get(f,this._end),this._step))},gt.prototype.indexOf=function(a){var f=a-this._start;if(f%this._step===0){var y=f/this._step;if(y>=0&&y<this.size)return y}return-1},gt.prototype.lastIndexOf=function(a){return this.indexOf(a)},gt.prototype.__iterate=function(a,f){for(var y=this.size-1,b=this._step,E=f?this._start+y*b:this._start,R=0;R<=y;R++){if(a(E,R,this)===!1)return R+1;E+=f?-b:b}return R},gt.prototype.__iterator=function(a,f){var y=this.size-1,b=this._step,E=f?this._start+y*b:this._start,R=0;return new V(function(){var A=E;return E+=f?-b:b,R>y?F():oe(a,R++,A)})},gt.prototype.equals=function(a){return a instanceof gt?this._start===a._start&&this._end===a._end&&this._step===a._step:ii(this,a)};var ci;n(Ir,o);function Ir(){throw TypeError("Abstract")}n(os,Ir);function os(){}n(Cn,Ir);function Cn(){}n(Ks,Ir);function Ks(){}Ir.Keyed=os,Ir.Indexed=Cn,Ir.Set=Ks;var is=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(f,y){f=f|0,y=y|0;var b=f&65535,E=y&65535;return b*E+((f>>>16)*E+b*(y>>>16)<<16>>>0)|0};function li(a){return a>>>1&1073741824|a&3221225471}function At(a){if(a===!1||a===null||a===void 0||typeof a.valueOf=="function"&&(a=a.valueOf(),a===!1||a===null||a===void 0))return 0;if(a===!0)return 1;var f=typeof a;if(f==="number"){var y=a|0;for(y!==a&&(y^=a*4294967295);a>4294967295;)a/=4294967295,y^=a;return li(y)}if(f==="string")return a.length>Xg?Kg(a):ui(a);if(typeof a.hashCode=="function")return a.hashCode();if(f==="object")return Qg(a);if(typeof a.toString=="function")return ui(a.toString());throw new Error("Value type "+f+" cannot be hashed.")}function Kg(a){var f=mi[a];return f===void 0&&(f=ui(a),hi===Jg&&(hi=0,mi={}),hi++,mi[a]=f),f}function ui(a){for(var f=0,y=0;y<a.length;y++)f=31*f+a.charCodeAt(y)|0;return li(f)}function Qg(a){var f;if(di&&(f=fi.get(a),f!==void 0)||(f=a[Kr],f!==void 0)||!sl&&(f=a.propertyIsEnumerable&&a.propertyIsEnumerable[Kr],f!==void 0||(f=Yg(a),f!==void 0)))return f;if(f=++pi,pi&1073741824&&(pi=0),di)fi.set(a,f);else{if(nl!==void 0&&nl(a)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(sl)Object.defineProperty(a,Kr,{enumerable:!1,configurable:!1,writable:!1,value:f});else if(a.propertyIsEnumerable!==void 0&&a.propertyIsEnumerable===a.constructor.prototype.propertyIsEnumerable)a.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},a.propertyIsEnumerable[Kr]=f;else if(a.nodeType!==void 0)a[Kr]=f;else throw new Error("Unable to set a non-enumerable property on object.")}return f}var nl=Object.isExtensible,sl=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function Yg(a){if(a&&a.nodeType>0)switch(a.nodeType){case 1:return a.uniqueID;case 9:return a.documentElement&&a.documentElement.uniqueID}}var di=typeof WeakMap=="function",fi;di&&(fi=new WeakMap);var pi=0,Kr="__immutablehash__";typeof Symbol=="function"&&(Kr=Symbol(Kr));var Xg=16,Jg=255,hi=0,mi={};function kt(a){Gs(a!==1/0,"Cannot perform this action with an infinite size.")}n(Fe,os);function Fe(a){return a==null?or():_i(a)&&!_(a)?a:or().withMutations(function(f){var y=i(a);kt(y.size),y.forEach(function(b,E){return f.set(E,b)})})}Fe.prototype.toString=function(){return this.__toString("Map {","}")},Fe.prototype.get=function(a,f){return this._root?this._root.get(0,void 0,a,f):f},Fe.prototype.set=function(a,f){return cl(this,a,f)},Fe.prototype.setIn=function(a,f){return this.updateIn(a,N,function(){return f})},Fe.prototype.remove=function(a){return cl(this,a,N)},Fe.prototype.deleteIn=function(a){return this.updateIn(a,function(){return N})},Fe.prototype.update=function(a,f,y){return arguments.length===1?a(this):this.updateIn([a],f,y)},Fe.prototype.updateIn=function(a,f,y){y||(y=f,f=void 0);var b=pl(this,kl(a),f,y);return b===N?void 0:b},Fe.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):or()},Fe.prototype.merge=function(){return Qs(this,void 0,arguments)},Fe.prototype.mergeWith=function(a){var f=r.call(arguments,1);return Qs(this,a,f)},Fe.prototype.mergeIn=function(a){var f=r.call(arguments,1);return this.updateIn(a,or(),function(y){return typeof y.merge=="function"?y.merge.apply(y,f):f[f.length-1]})},Fe.prototype.mergeDeep=function(){return Qs(this,ul,arguments)},Fe.prototype.mergeDeepWith=function(a){var f=r.call(arguments,1);return Qs(this,dl(a),f)},Fe.prototype.mergeDeepIn=function(a){var f=r.call(arguments,1);return this.updateIn(a,or(),function(y){return typeof y.mergeDeep=="function"?y.mergeDeep.apply(y,f):f[f.length-1]})},Fe.prototype.sort=function(a){return nt(Tn(this,a))},Fe.prototype.sortBy=function(a,f){return nt(Tn(this,f,a))},Fe.prototype.withMutations=function(a){var f=this.asMutable();return a(f),f.wasAltered()?f.__ensureOwner(this.__ownerID):this},Fe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new D)},Fe.prototype.asImmutable=function(){return this.__ensureOwner()},Fe.prototype.wasAltered=function(){return this.__altered},Fe.prototype.__iterator=function(a,f){return new gi(this,a,f)},Fe.prototype.__iterate=function(a,f){var y=this,b=0;return this._root&&this._root.iterate(function(E){return b++,a(E[1],E[0],y)},f),b},Fe.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?vi(this.size,this._root,a,this.__hash):(this.__ownerID=a,this.__altered=!1,this)};function _i(a){return!!(a&&a[ol])}Fe.isMap=_i;var ol="@@__IMMUTABLE_MAP__@@",Ne=Fe.prototype;Ne[ol]=!0,Ne[w]=Ne.remove,Ne.removeIn=Ne.deleteIn;function as(a,f){this.ownerID=a,this.entries=f}as.prototype.get=function(a,f,y,b){for(var E=this.entries,R=0,A=E.length;R<A;R++)if(rt(y,E[R][0]))return E[R][1];return b},as.prototype.update=function(a,f,y,b,E,R,A){for(var L=E===N,H=this.entries,W=0,K=H.length;W<K&&!rt(b,H[W][0]);W++);var le=W<K;if(le?H[W][1]===E:L)return this;if(z(A),(L||!le)&&z(R),!(L&&H.length===1)){if(!le&&!L&&H.length>=sy)return Zg(a,H,b,E);var pe=a&&a===this.ownerID,Se=pe?H:B(H);return le?L?W===K-1?Se.pop():Se[W]=Se.pop():Se[W]=[b,E]:Se.push([b,E]),pe?(this.entries=Se,this):new as(a,Se)}};function wn(a,f,y){this.ownerID=a,this.bitmap=f,this.nodes=y}wn.prototype.get=function(a,f,y,b){f===void 0&&(f=At(y));var E=1<<((a===0?f:f>>>a)&C),R=this.bitmap;return R&E?this.nodes[hl(R&E-1)].get(a+I,f,y,b):b},wn.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=At(b));var L=(f===0?y:y>>>f)&C,H=1<<L,W=this.bitmap,K=(W&H)!==0;if(!K&&E===N)return this;var le=hl(W&H-1),pe=this.nodes,Se=K?pe[le]:void 0,Pe=xi(Se,a,f+I,y,b,E,R,A);if(Pe===Se)return this;if(!K&&Pe&&pe.length>=oy)return ty(a,pe,W,L,Pe);if(K&&!Pe&&pe.length===2&&ll(pe[le^1]))return pe[le^1];if(K&&Pe&&pe.length===1&&ll(Pe))return Pe;var Qe=a&&a===this.ownerID,Yt=K?Pe?W:W^H:W|H,lr=K?Pe?ml(pe,le,Pe,Qe):ny(pe,le,Qe):ry(pe,le,Pe,Qe);return Qe?(this.bitmap=Yt,this.nodes=lr,this):new wn(a,Yt,lr)};function cs(a,f,y){this.ownerID=a,this.count=f,this.nodes=y}cs.prototype.get=function(a,f,y,b){f===void 0&&(f=At(y));var E=(a===0?f:f>>>a)&C,R=this.nodes[E];return R?R.get(a+I,f,y,b):b},cs.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=At(b));var L=(f===0?y:y>>>f)&C,H=E===N,W=this.nodes,K=W[L];if(H&&!K)return this;var le=xi(K,a,f+I,y,b,E,R,A);if(le===K)return this;var pe=this.count;if(!K)pe++;else if(!le&&(pe--,pe<iy))return ey(a,W,pe,L);var Se=a&&a===this.ownerID,Pe=ml(W,L,le,Se);return Se?(this.count=pe,this.nodes=Pe,this):new cs(a,pe,Pe)};function En(a,f,y){this.ownerID=a,this.keyHash=f,this.entries=y}En.prototype.get=function(a,f,y,b){for(var E=this.entries,R=0,A=E.length;R<A;R++)if(rt(y,E[R][0]))return E[R][1];return b},En.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=At(b));var L=E===N;if(y!==this.keyHash)return L?this:(z(A),z(R),bi(this,a,f,y,[b,E]));for(var H=this.entries,W=0,K=H.length;W<K&&!rt(b,H[W][0]);W++);var le=W<K;if(le?H[W][1]===E:L)return this;if(z(A),(L||!le)&&z(R),L&&K===2)return new vr(a,this.keyHash,H[W^1]);var pe=a&&a===this.ownerID,Se=pe?H:B(H);return le?L?W===K-1?Se.pop():Se[W]=Se.pop():Se[W]=[b,E]:Se.push([b,E]),pe?(this.entries=Se,this):new En(a,this.keyHash,Se)};function vr(a,f,y){this.ownerID=a,this.keyHash=f,this.entry=y}vr.prototype.get=function(a,f,y,b){return rt(y,this.entry[0])?this.entry[1]:b},vr.prototype.update=function(a,f,y,b,E,R,A){var L=E===N,H=rt(b,this.entry[0]);if(H?E===this.entry[1]:L)return this;if(z(A),L){z(R);return}return H?a&&a===this.ownerID?(this.entry[1]=E,this):new vr(a,this.keyHash,[b,E]):(z(R),bi(this,a,f,At(b),[b,E]))},as.prototype.iterate=En.prototype.iterate=function(a,f){for(var y=this.entries,b=0,E=y.length-1;b<=E;b++)if(a(y[f?E-b:b])===!1)return!1},wn.prototype.iterate=cs.prototype.iterate=function(a,f){for(var y=this.nodes,b=0,E=y.length-1;b<=E;b++){var R=y[f?E-b:b];if(R&&R.iterate(a,f)===!1)return!1}},vr.prototype.iterate=function(a,f){return a(this.entry)},n(gi,V);function gi(a,f,y){this._type=f,this._reverse=y,this._stack=a._root&&il(a._root)}gi.prototype.next=function(){for(var a=this._type,f=this._stack;f;){var y=f.node,b=f.index++,E;if(y.entry){if(b===0)return yi(a,y.entry)}else if(y.entries){if(E=y.entries.length-1,b<=E)return yi(a,y.entries[this._reverse?E-b:b])}else if(E=y.nodes.length-1,b<=E){var R=y.nodes[this._reverse?E-b:b];if(R){if(R.entry)return yi(a,R.entry);f=this._stack=il(R,f)}continue}f=this._stack=this._stack.__prev}return F()};function yi(a,f){return oe(a,f[0],f[1])}function il(a,f){return{node:a,index:0,__prev:f}}function vi(a,f,y,b){var E=Object.create(Ne);return E.size=a,E._root=f,E.__ownerID=y,E.__hash=b,E.__altered=!1,E}var al;function or(){return al||(al=vi(0))}function cl(a,f,y){var b,E;if(a._root){var R=M(T),A=M(O);if(b=xi(a._root,a.__ownerID,0,void 0,f,y,R,A),!A.value)return a;E=a.size+(R.value?y===N?-1:1:0)}else{if(y===N)return a;E=1,b=new as(a.__ownerID,[[f,y]])}return a.__ownerID?(a.size=E,a._root=b,a.__hash=void 0,a.__altered=!0,a):b?vi(E,b):or()}function xi(a,f,y,b,E,R,A,L){return a?a.update(f,y,b,E,R,A,L):R===N?a:(z(L),z(A),new vr(f,b,[E,R]))}function ll(a){return a.constructor===vr||a.constructor===En}function bi(a,f,y,b,E){if(a.keyHash===b)return new En(f,b,[a.entry,E]);var R=(y===0?a.keyHash:a.keyHash>>>y)&C,A=(y===0?b:b>>>y)&C,L,H=R===A?[bi(a,f,y+I,b,E)]:(L=new vr(f,b,E),R<A?[a,L]:[L,a]);return new wn(f,1<<R|1<<A,H)}function Zg(a,f,y,b){a||(a=new D);for(var E=new vr(a,At(y),[y,b]),R=0;R<f.length;R++){var A=f[R];E=E.update(a,0,void 0,A[0],A[1])}return E}function ey(a,f,y,b){for(var E=0,R=0,A=new Array(y),L=0,H=1,W=f.length;L<W;L++,H<<=1){var K=f[L];K!==void 0&&L!==b&&(E|=H,A[R++]=K)}return new wn(a,E,A)}function ty(a,f,y,b,E){for(var R=0,A=new Array(P),L=0;y!==0;L++,y>>>=1)A[L]=y&1?f[R++]:void 0;return A[b]=E,new cs(a,R+1,A)}function Qs(a,f,y){for(var b=[],E=0;E<y.length;E++){var R=y[E],A=i(R);u(R)||(A=A.map(function(L){return Je(L)})),b.push(A)}return fl(a,f,b)}function ul(a,f,y){return a&&a.mergeDeep&&u(f)?a.mergeDeep(f):rt(a,f)?a:f}function dl(a){return function(f,y,b){if(f&&f.mergeDeepWith&&u(y))return f.mergeDeepWith(a,y);var E=a(f,y,b);return rt(f,E)?f:E}}function fl(a,f,y){return y=y.filter(function(b){return b.size!==0}),y.length===0?a:a.size===0&&!a.__ownerID&&y.length===1?a.constructor(y[0]):a.withMutations(function(b){for(var E=f?function(A,L){b.update(L,N,function(H){return H===N?A:f(H,A,L)})}:function(A,L){b.set(L,A)},R=0;R<y.length;R++)y[R].forEach(E)})}function pl(a,f,y,b){var E=a===N,R=f.next();if(R.done){var A=E?y:a,L=b(A);return L===A?a:L}Gs(E||a&&a.set,"invalid keyPath");var H=R.value,W=E?N:a.get(H,N),K=pl(W,f,y,b);return K===W?a:K===N?a.remove(H):(E?or():a).set(H,K)}function hl(a){return a=a-(a>>1&1431655765),a=(a&858993459)+(a>>2&858993459),a=a+(a>>4)&252645135,a=a+(a>>8),a=a+(a>>16),a&127}function ml(a,f,y,b){var E=b?a:B(a);return E[f]=y,E}function ry(a,f,y,b){var E=a.length+1;if(b&&f+1===E)return a[f]=y,a;for(var R=new Array(E),A=0,L=0;L<E;L++)L===f?(R[L]=y,A=-1):R[L]=a[L+A];return R}function ny(a,f,y){var b=a.length-1;if(y&&f===b)return a.pop(),a;for(var E=new Array(b),R=0,A=0;A<b;A++)A===f&&(R=1),E[A]=a[A+R];return E}var sy=P/4,oy=P/2,iy=P/4;n(Ge,Cn);function Ge(a){var f=ji();if(a==null)return f;if(_l(a))return a;var y=c(a),b=y.size;return b===0?f:(kt(b),b>0&&b<P?us(0,b,I,null,new Nr(y.toArray())):f.withMutations(function(E){E.setSize(b),y.forEach(function(R,A){return E.set(A,R)})}))}Ge.of=function(){return this(arguments)},Ge.prototype.toString=function(){return this.__toString("List [","]")},Ge.prototype.get=function(a,f){if(a=J(this,a),a>=0&&a<this.size){a+=this._origin;var y=xl(this,a);return y&&y.array[a&C]}return f},Ge.prototype.set=function(a,f){return ay(this,a,f)},Ge.prototype.remove=function(a){return this.has(a)?a===0?this.shift():a===this.size-1?this.pop():this.splice(a,1):this},Ge.prototype.insert=function(a,f){return this.splice(a,0,f)},Ge.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=I,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ji()},Ge.prototype.push=function(){var a=arguments,f=this.size;return this.withMutations(function(y){Rr(y,0,f+a.length);for(var b=0;b<a.length;b++)y.set(f+b,a[b])})},Ge.prototype.pop=function(){return Rr(this,0,-1)},Ge.prototype.unshift=function(){var a=arguments;return this.withMutations(function(f){Rr(f,-a.length);for(var y=0;y<a.length;y++)f.set(y,a[y])})},Ge.prototype.shift=function(){return Rr(this,1)},Ge.prototype.merge=function(){return Ys(this,void 0,arguments)},Ge.prototype.mergeWith=function(a){var f=r.call(arguments,1);return Ys(this,a,f)},Ge.prototype.mergeDeep=function(){return Ys(this,ul,arguments)},Ge.prototype.mergeDeepWith=function(a){var f=r.call(arguments,1);return Ys(this,dl(a),f)},Ge.prototype.setSize=function(a){return Rr(this,0,a)},Ge.prototype.slice=function(a,f){var y=this.size;return X(a,f,y)?this:Rr(this,Z(a,y),he(f,y))},Ge.prototype.__iterator=function(a,f){var y=0,b=yl(this,f);return new V(function(){var E=b();return E===ls?F():oe(a,y++,E)})},Ge.prototype.__iterate=function(a,f){for(var y=0,b=yl(this,f),E;(E=b())!==ls&&a(E,y++,this)!==!1;);return y},Ge.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?us(this._origin,this._capacity,this._level,this._root,this._tail,a,this.__hash):(this.__ownerID=a,this)};function _l(a){return!!(a&&a[gl])}Ge.isList=_l;var gl="@@__IMMUTABLE_LIST__@@",xt=Ge.prototype;xt[gl]=!0,xt[w]=xt.remove,xt.setIn=Ne.setIn,xt.deleteIn=xt.removeIn=Ne.removeIn,xt.update=Ne.update,xt.updateIn=Ne.updateIn,xt.mergeIn=Ne.mergeIn,xt.mergeDeepIn=Ne.mergeDeepIn,xt.withMutations=Ne.withMutations,xt.asMutable=Ne.asMutable,xt.asImmutable=Ne.asImmutable,xt.wasAltered=Ne.wasAltered;function Nr(a,f){this.array=a,this.ownerID=f}Nr.prototype.removeBefore=function(a,f,y){if(y===f?1<<f:this.array.length===0)return this;var b=y>>>f&C;if(b>=this.array.length)return new Nr([],a);var E=b===0,R;if(f>0){var A=this.array[b];if(R=A&&A.removeBefore(a,f-I,y),R===A&&E)return this}if(E&&!R)return this;var L=Pn(this,a);if(!E)for(var H=0;H<b;H++)L.array[H]=void 0;return R&&(L.array[b]=R),L},Nr.prototype.removeAfter=function(a,f,y){if(y===(f?1<<f:0)||this.array.length===0)return this;var b=y-1>>>f&C;if(b>=this.array.length)return this;var E;if(f>0){var R=this.array[b];if(E=R&&R.removeAfter(a,f-I,y),E===R&&b===this.array.length-1)return this}var A=Pn(this,a);return A.array.splice(b+1),E&&(A.array[b]=E),A};var ls={};function yl(a,f){var y=a._origin,b=a._capacity,E=ds(b),R=a._tail;return A(a._root,a._level,0);function A(W,K,le){return K===0?L(W,le):H(W,K,le)}function L(W,K){var le=K===E?R&&R.array:W&&W.array,pe=K>y?0:y-K,Se=b-K;return Se>P&&(Se=P),function(){if(pe===Se)return ls;var Pe=f?--Se:pe++;return le&&le[Pe]}}function H(W,K,le){var pe,Se=W&&W.array,Pe=le>y?0:y-le>>K,Qe=(b-le>>K)+1;return Qe>P&&(Qe=P),function(){do{if(pe){var Yt=pe();if(Yt!==ls)return Yt;pe=null}if(Pe===Qe)return ls;var lr=f?--Qe:Pe++;pe=A(Se&&Se[lr],K-I,le+(lr<<K))}while(!0)}}}function us(a,f,y,b,E,R,A){var L=Object.create(xt);return L.size=f-a,L._origin=a,L._capacity=f,L._level=y,L._root=b,L._tail=E,L.__ownerID=R,L.__hash=A,L.__altered=!1,L}var vl;function ji(){return vl||(vl=us(0,0,I))}function ay(a,f,y){if(f=J(a,f),f!==f)return a;if(f>=a.size||f<0)return a.withMutations(function(A){f<0?Rr(A,f).set(0,y):Rr(A,0,f+1).set(f,y)});f+=a._origin;var b=a._tail,E=a._root,R=M(O);return f>=ds(a._capacity)?b=Si(b,a.__ownerID,0,f,y,R):E=Si(E,a.__ownerID,a._level,f,y,R),R.value?a.__ownerID?(a._root=E,a._tail=b,a.__hash=void 0,a.__altered=!0,a):us(a._origin,a._capacity,a._level,E,b):a}function Si(a,f,y,b,E,R){var A=b>>>y&C,L=a&&A<a.array.length;if(!L&&E===void 0)return a;var H;if(y>0){var W=a&&a.array[A],K=Si(W,f,y-I,b,E,R);return K===W?a:(H=Pn(a,f),H.array[A]=K,H)}return L&&a.array[A]===E?a:(z(R),H=Pn(a,f),E===void 0&&A===H.array.length-1?H.array.pop():H.array[A]=E,H)}function Pn(a,f){return f&&a&&f===a.ownerID?a:new Nr(a?a.array.slice():[],f)}function xl(a,f){if(f>=ds(a._capacity))return a._tail;if(f<1<<a._level+I){for(var y=a._root,b=a._level;y&&b>0;)y=y.array[f>>>b&C],b-=I;return y}}function Rr(a,f,y){f!==void 0&&(f=f|0),y!==void 0&&(y=y|0);var b=a.__ownerID||new D,E=a._origin,R=a._capacity,A=E+f,L=y===void 0?R:y<0?R+y:E+y;if(A===E&&L===R)return a;if(A>=L)return a.clear();for(var H=a._level,W=a._root,K=0;A+K<0;)W=new Nr(W&&W.array.length?[void 0,W]:[],b),H+=I,K+=1<<H;K&&(A+=K,E+=K,L+=K,R+=K);for(var le=ds(R),pe=ds(L);pe>=1<<H+I;)W=new Nr(W&&W.array.length?[W]:[],b),H+=I;var Se=a._tail,Pe=pe<le?xl(a,L-1):pe>le?new Nr([],b):Se;if(Se&&pe>le&&A<R&&Se.array.length){W=Pn(W,b);for(var Qe=W,Yt=H;Yt>I;Yt-=I){var lr=le>>>Yt&C;Qe=Qe.array[lr]=Pn(Qe.array[lr],b)}Qe.array[le>>>I&C]=Se}if(L<R&&(Pe=Pe&&Pe.removeAfter(b,0,L)),A>=pe)A-=pe,L-=pe,H=I,W=null,Pe=Pe&&Pe.removeBefore(b,0,A);else if(A>E||pe<le){for(K=0;W;){var no=A>>>H&C;if(no!==pe>>>H&C)break;no&&(K+=(1<<H)*no),H-=I,W=W.array[no]}W&&A>E&&(W=W.removeBefore(b,H,A-K)),W&&pe<le&&(W=W.removeAfter(b,H,pe-K)),K&&(A-=K,L-=K)}return a.__ownerID?(a.size=L-A,a._origin=A,a._capacity=L,a._level=H,a._root=W,a._tail=Pe,a.__hash=void 0,a.__altered=!0,a):us(A,L,H,W,Pe)}function Ys(a,f,y){for(var b=[],E=0,R=0;R<y.length;R++){var A=y[R],L=c(A);L.size>E&&(E=L.size),u(A)||(L=L.map(function(H){return Je(H)})),b.push(L)}return E>a.size&&(a=a.setSize(E)),fl(a,f,b)}function ds(a){return a<P?0:a-1>>>I<<I}n(nt,Fe);function nt(a){return a==null?Xs():bl(a)?a:Xs().withMutations(function(f){var y=i(a);kt(y.size),y.forEach(function(b,E){return f.set(E,b)})})}nt.of=function(){return this(arguments)},nt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},nt.prototype.get=function(a,f){var y=this._map.get(a);return y!==void 0?this._list.get(y)[1]:f},nt.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Xs()},nt.prototype.set=function(a,f){return Sl(this,a,f)},nt.prototype.remove=function(a){return Sl(this,a,N)},nt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},nt.prototype.__iterate=function(a,f){var y=this;return this._list.__iterate(function(b){return b&&a(b[1],b[0],y)},f)},nt.prototype.__iterator=function(a,f){return this._list.fromEntrySeq().__iterator(a,f)},nt.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map.__ensureOwner(a),y=this._list.__ensureOwner(a);return a?Ci(f,y,a,this.__hash):(this.__ownerID=a,this._map=f,this._list=y,this)};function bl(a){return _i(a)&&_(a)}nt.isOrderedMap=bl,nt.prototype[S]=!0,nt.prototype[w]=nt.prototype.remove;function Ci(a,f,y,b){var E=Object.create(nt.prototype);return E.size=a?a.size:0,E._map=a,E._list=f,E.__ownerID=y,E.__hash=b,E}var jl;function Xs(){return jl||(jl=Ci(or(),ji()))}function Sl(a,f,y){var b=a._map,E=a._list,R=b.get(f),A=R!==void 0,L,H;if(y===N){if(!A)return a;E.size>=P&&E.size>=b.size*2?(H=E.filter(function(W,K){return W!==void 0&&R!==K}),L=H.toKeyedSeq().map(function(W){return W[0]}).flip().toMap(),a.__ownerID&&(L.__ownerID=H.__ownerID=a.__ownerID)):(L=b.remove(f),H=R===E.size-1?E.pop():E.set(R,void 0))}else if(A){if(y===E.get(R)[1])return a;L=b,H=E.set(R,[f,y])}else L=b.set(f,E.size),H=E.set(E.size,[f,y]);return a.__ownerID?(a.size=L.size,a._map=L,a._list=H,a.__hash=void 0,a):Ci(L,H)}n(Bt,ne);function Bt(a,f){this._iter=a,this._useKeys=f,this.size=a.size}Bt.prototype.get=function(a,f){return this._iter.get(a,f)},Bt.prototype.has=function(a){return this._iter.has(a)},Bt.prototype.valueSeq=function(){return this._iter.valueSeq()},Bt.prototype.reverse=function(){var a=this,f=wi(this,!0);return this._useKeys||(f.valueSeq=function(){return a._iter.toSeq().reverse()}),f},Bt.prototype.map=function(a,f){var y=this,b=wl(this,a,f);return this._useKeys||(b.valueSeq=function(){return y._iter.toSeq().map(a,f)}),b},Bt.prototype.__iterate=function(a,f){var y=this,b;return this._iter.__iterate(this._useKeys?function(E,R){return a(E,R,y)}:(b=f?Tl(this):0,function(E){return a(E,f?--b:b++,y)}),f)},Bt.prototype.__iterator=function(a,f){if(this._useKeys)return this._iter.__iterator(a,f);var y=this._iter.__iterator(ie,f),b=f?Tl(this):0;return new V(function(){var E=y.next();return E.done?E:oe(a,f?--b:b++,E.value,E)})},Bt.prototype[S]=!0,n(In,te);function In(a){this._iter=a,this.size=a.size}In.prototype.includes=function(a){return this._iter.includes(a)},In.prototype.__iterate=function(a,f){var y=this,b=0;return this._iter.__iterate(function(E){return a(E,b++,y)},f)},In.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f),b=0;return new V(function(){var E=y.next();return E.done?E:oe(a,b++,E.value,E)})},n(Nn,ke);function Nn(a){this._iter=a,this.size=a.size}Nn.prototype.has=function(a){return this._iter.includes(a)},Nn.prototype.__iterate=function(a,f){var y=this;return this._iter.__iterate(function(b){return a(b,b,y)},f)},Nn.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f);return new V(function(){var b=y.next();return b.done?b:oe(a,b.value,b.value,b)})},n(Rn,ne);function Rn(a){this._iter=a,this.size=a.size}Rn.prototype.entrySeq=function(){return this._iter.toSeq()},Rn.prototype.__iterate=function(a,f){var y=this;return this._iter.__iterate(function(b){if(b){Rl(b);var E=u(b);return a(E?b.get(1):b[1],E?b.get(0):b[0],y)}},f)},Rn.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f);return new V(function(){for(;;){var b=y.next();if(b.done)return b;var E=b.value;if(E){Rl(E);var R=u(E);return oe(a,R?E.get(0):E[0],R?E.get(1):E[1],b)}}})},In.prototype.cacheResult=Bt.prototype.cacheResult=Nn.prototype.cacheResult=Rn.prototype.cacheResult=Ii;function Cl(a){var f=ir(a);return f._iter=a,f.size=a.size,f.flip=function(){return a},f.reverse=function(){var y=a.reverse.apply(this);return y.flip=function(){return a.reverse()},y},f.has=function(y){return a.includes(y)},f.includes=function(y){return a.has(y)},f.cacheResult=Ii,f.__iterateUncached=function(y,b){var E=this;return a.__iterate(function(R,A){return y(A,R,E)!==!1},b)},f.__iteratorUncached=function(y,b){if(y===_e){var E=a.__iterator(y,b);return new V(function(){var R=E.next();if(!R.done){var A=R.value[0];R.value[0]=R.value[1],R.value[1]=A}return R})}return a.__iterator(y===ie?ee:ie,b)},f}function wl(a,f,y){var b=ir(a);return b.size=a.size,b.has=function(E){return a.has(E)},b.get=function(E,R){var A=a.get(E,N);return A===N?R:f.call(y,A,E,a)},b.__iterateUncached=function(E,R){var A=this;return a.__iterate(function(L,H,W){return E(f.call(y,L,H,W),H,A)!==!1},R)},b.__iteratorUncached=function(E,R){var A=a.__iterator(_e,R);return new V(function(){var L=A.next();if(L.done)return L;var H=L.value,W=H[0];return oe(E,W,f.call(y,H[1],W,a),L)})},b}function wi(a,f){var y=ir(a);return y._iter=a,y.size=a.size,y.reverse=function(){return a},a.flip&&(y.flip=function(){var b=Cl(a);return b.reverse=function(){return a.flip()},b}),y.get=function(b,E){return a.get(f?b:-1-b,E)},y.has=function(b){return a.has(f?b:-1-b)},y.includes=function(b){return a.includes(b)},y.cacheResult=Ii,y.__iterate=function(b,E){var R=this;return a.__iterate(function(A,L){return b(A,L,R)},!E)},y.__iterator=function(b,E){return a.__iterator(b,!E)},y}function El(a,f,y,b){var E=ir(a);return b&&(E.has=function(R){var A=a.get(R,N);return A!==N&&!!f.call(y,A,R,a)},E.get=function(R,A){var L=a.get(R,N);return L!==N&&f.call(y,L,R,a)?L:A}),E.__iterateUncached=function(R,A){var L=this,H=0;return a.__iterate(function(W,K,le){if(f.call(y,W,K,le))return H++,R(W,b?K:H-1,L)},A),H},E.__iteratorUncached=function(R,A){var L=a.__iterator(_e,A),H=0;return new V(function(){for(;;){var W=L.next();if(W.done)return W;var K=W.value,le=K[0],pe=K[1];if(f.call(y,pe,le,a))return oe(R,b?le:H++,pe,W)}})},E}function cy(a,f,y){var b=Fe().asMutable();return a.__iterate(function(E,R){b.update(f.call(y,E,R,a),0,function(A){return A+1})}),b.asImmutable()}function ly(a,f,y){var b=d(a),E=(_(a)?nt():Fe()).asMutable();a.__iterate(function(A,L){E.update(f.call(y,A,L,a),function(H){return H=H||[],H.push(b?[L,A]:A),H})});var R=Ol(a);return E.map(function(A){return Ve(a,R(A))})}function Ei(a,f,y,b){var E=a.size;if(f!==void 0&&(f=f|0),y!==void 0&&(y=y|0),X(f,y,E))return a;var R=Z(f,E),A=he(y,E);if(R!==R||A!==A)return Ei(a.toSeq().cacheResult(),f,y,b);var L=A-R,H;L===L&&(H=L<0?0:L);var W=ir(a);return W.size=H===0?H:a.size&&H||void 0,!b&&re(a)&&H>=0&&(W.get=function(K,le){return K=J(this,K),K>=0&&K<H?a.get(K+R,le):le}),W.__iterateUncached=function(K,le){var pe=this;if(H===0)return 0;if(le)return this.cacheResult().__iterate(K,le);var Se=0,Pe=!0,Qe=0;return a.__iterate(function(Yt,lr){if(!(Pe&&(Pe=Se++<R)))return Qe++,K(Yt,b?lr:Qe-1,pe)!==!1&&Qe!==H}),Qe},W.__iteratorUncached=function(K,le){if(H!==0&&le)return this.cacheResult().__iterator(K,le);var pe=H!==0&&a.__iterator(K,le),Se=0,Pe=0;return new V(function(){for(;Se++<R;)pe.next();if(++Pe>H)return F();var Qe=pe.next();return b||K===ie?Qe:K===ee?oe(K,Pe-1,void 0,Qe):oe(K,Pe-1,Qe.value[1],Qe)})},W}function uy(a,f,y){var b=ir(a);return b.__iterateUncached=function(E,R){var A=this;if(R)return this.cacheResult().__iterate(E,R);var L=0;return a.__iterate(function(H,W,K){return f.call(y,H,W,K)&&++L&&E(H,W,A)}),L},b.__iteratorUncached=function(E,R){var A=this;if(R)return this.cacheResult().__iterator(E,R);var L=a.__iterator(_e,R),H=!0;return new V(function(){if(!H)return F();var W=L.next();if(W.done)return W;var K=W.value,le=K[0],pe=K[1];return f.call(y,pe,le,A)?E===_e?W:oe(E,le,pe,W):(H=!1,F())})},b}function Pl(a,f,y,b){var E=ir(a);return E.__iterateUncached=function(R,A){var L=this;if(A)return this.cacheResult().__iterate(R,A);var H=!0,W=0;return a.__iterate(function(K,le,pe){if(!(H&&(H=f.call(y,K,le,pe))))return W++,R(K,b?le:W-1,L)}),W},E.__iteratorUncached=function(R,A){var L=this;if(A)return this.cacheResult().__iterator(R,A);var H=a.__iterator(_e,A),W=!0,K=0;return new V(function(){var le,pe,Se;do{if(le=H.next(),le.done)return b||R===ie?le:R===ee?oe(R,K++,void 0,le):oe(R,K++,le.value[1],le);var Pe=le.value;pe=Pe[0],Se=Pe[1],W&&(W=f.call(y,Se,pe,L))}while(W);return R===_e?le:oe(R,pe,Se,le)})},E}function dy(a,f){var y=d(a),b=[a].concat(f).map(function(A){return u(A)?y&&(A=i(A)):A=y?ae(A):de(Array.isArray(A)?A:[A]),A}).filter(function(A){return A.size!==0});if(b.length===0)return a;if(b.length===1){var E=b[0];if(E===a||y&&d(E)||h(a)&&h(E))return E}var R=new Me(b);return y?R=R.toKeyedSeq():h(a)||(R=R.toSetSeq()),R=R.flatten(!0),R.size=b.reduce(function(A,L){if(A!==void 0){var H=L.size;if(H!==void 0)return A+H}},0),R}function Il(a,f,y){var b=ir(a);return b.__iterateUncached=function(E,R){var A=0,L=!1;function H(W,K){var le=this;W.__iterate(function(pe,Se){return(!f||K<f)&&u(pe)?H(pe,K+1):E(pe,y?Se:A++,le)===!1&&(L=!0),!L},R)}return H(a,0),A},b.__iteratorUncached=function(E,R){var A=a.__iterator(E,R),L=[],H=0;return new V(function(){for(;A;){var W=A.next();if(W.done!==!1){A=L.pop();continue}var K=W.value;if(E===_e&&(K=K[1]),(!f||L.length<f)&&u(K))L.push(A),A=K.__iterator(E,R);else return y?W:oe(E,H++,K,W)}return F()})},b}function fy(a,f,y){var b=Ol(a);return a.toSeq().map(function(E,R){return b(f.call(y,E,R,a))}).flatten(!0)}function py(a,f){var y=ir(a);return y.size=a.size&&a.size*2-1,y.__iterateUncached=function(b,E){var R=this,A=0;return a.__iterate(function(L,H){return(!A||b(f,A++,R)!==!1)&&b(L,A++,R)!==!1},E),A},y.__iteratorUncached=function(b,E){var R=a.__iterator(ie,E),A=0,L;return new V(function(){return(!L||A%2)&&(L=R.next(),L.done)?L:A%2?oe(b,A++,f):oe(b,A++,L.value,L)})},y}function Tn(a,f,y){f||(f=Al);var b=d(a),E=0,R=a.toSeq().map(function(A,L){return[L,A,E++,y?y(A,L,a):A]}).toArray();return R.sort(function(A,L){return f(A[3],L[3])||A[2]-L[2]}).forEach(b?function(A,L){R[L].length=2}:function(A,L){R[L]=A[1]}),b?ne(R):h(a)?te(R):ke(R)}function Js(a,f,y){if(f||(f=Al),y){var b=a.toSeq().map(function(E,R){return[E,y(E,R,a)]}).reduce(function(E,R){return Nl(f,E[1],R[1])?R:E});return b&&b[0]}else return a.reduce(function(E,R){return Nl(f,E,R)?R:E})}function Nl(a,f,y){var b=a(y,f);return b===0&&y!==f&&(y==null||y!==y)||b>0}function Pi(a,f,y){var b=ir(a);return b.size=new Me(y).map(function(E){return E.size}).min(),b.__iterate=function(E,R){for(var A=this.__iterator(ie,R),L,H=0;!(L=A.next()).done&&E(L.value,H++,this)!==!1;);return H},b.__iteratorUncached=function(E,R){var A=y.map(function(W){return W=o(W),Oe(R?W.reverse():W)}),L=0,H=!1;return new V(function(){var W;return H||(W=A.map(function(K){return K.next()}),H=W.some(function(K){return K.done})),H?F():oe(E,L++,f.apply(null,W.map(function(K){return K.value})))})},b}function Ve(a,f){return re(a)?f:a.constructor(f)}function Rl(a){if(a!==Object(a))throw new TypeError("Expected [K, V] tuple: "+a)}function Tl(a){return kt(a.size),G(a)}function Ol(a){return d(a)?i:h(a)?c:l}function ir(a){return Object.create((d(a)?ne:h(a)?te:ke).prototype)}function Ii(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Ie.prototype.cacheResult.call(this)}function Al(a,f){return a>f?1:a<f?-1:0}function kl(a){var f=Oe(a);if(!f){if(!$(a))throw new TypeError("Expected iterable or array-like: "+a);f=Oe(o(a))}return f}n(Mt,os);function Mt(a,f){var y,b=function(A){if(A instanceof b)return A;if(!(this instanceof b))return new b(A);if(!y){y=!0;var L=Object.keys(a);hy(E,L),E.size=L.length,E._name=f,E._keys=L,E._defaultValues=a}this._map=Fe(A)},E=b.prototype=Object.create(pt);return E.constructor=b,b}Mt.prototype.toString=function(){return this.__toString(Ml(this)+" {","}")},Mt.prototype.has=function(a){return this._defaultValues.hasOwnProperty(a)},Mt.prototype.get=function(a,f){if(!this.has(a))return f;var y=this._defaultValues[a];return this._map?this._map.get(a,y):y},Mt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var a=this.constructor;return a._empty||(a._empty=Zs(this,or()))},Mt.prototype.set=function(a,f){if(!this.has(a))throw new Error('Cannot set unknown key "'+a+'" on '+Ml(this));var y=this._map&&this._map.set(a,f);return this.__ownerID||y===this._map?this:Zs(this,y)},Mt.prototype.remove=function(a){if(!this.has(a))return this;var f=this._map&&this._map.remove(a);return this.__ownerID||f===this._map?this:Zs(this,f)},Mt.prototype.wasAltered=function(){return this._map.wasAltered()},Mt.prototype.__iterator=function(a,f){var y=this;return i(this._defaultValues).map(function(b,E){return y.get(E)}).__iterator(a,f)},Mt.prototype.__iterate=function(a,f){var y=this;return i(this._defaultValues).map(function(b,E){return y.get(E)}).__iterate(a,f)},Mt.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map&&this._map.__ensureOwner(a);return a?Zs(this,f,a):(this.__ownerID=a,this._map=f,this)};var pt=Mt.prototype;pt[w]=pt.remove,pt.deleteIn=pt.removeIn=Ne.removeIn,pt.merge=Ne.merge,pt.mergeWith=Ne.mergeWith,pt.mergeIn=Ne.mergeIn,pt.mergeDeep=Ne.mergeDeep,pt.mergeDeepWith=Ne.mergeDeepWith,pt.mergeDeepIn=Ne.mergeDeepIn,pt.setIn=Ne.setIn,pt.update=Ne.update,pt.updateIn=Ne.updateIn,pt.withMutations=Ne.withMutations,pt.asMutable=Ne.asMutable,pt.asImmutable=Ne.asImmutable;function Zs(a,f,y){var b=Object.create(Object.getPrototypeOf(a));return b._map=f,b.__ownerID=y,b}function Ml(a){return a._name||a.constructor.name||"Record"}function hy(a,f){try{f.forEach(my.bind(void 0,a))}catch{}}function my(a,f){Object.defineProperty(a,f,{get:function(){return this.get(f)},set:function(y){Gs(this.__ownerID,"Cannot set on an immutable record."),this.set(f,y)}})}n(Ke,Ks);function Ke(a){return a==null?Ti():Ni(a)&&!_(a)?a:Ti().withMutations(function(f){var y=l(a);kt(y.size),y.forEach(function(b){return f.add(b)})})}Ke.of=function(){return this(arguments)},Ke.fromKeys=function(a){return this(i(a).keySeq())},Ke.prototype.toString=function(){return this.__toString("Set {","}")},Ke.prototype.has=function(a){return this._map.has(a)},Ke.prototype.add=function(a){return Ri(this,this._map.set(a,!0))},Ke.prototype.remove=function(a){return Ri(this,this._map.remove(a))},Ke.prototype.clear=function(){return Ri(this,this._map.clear())},Ke.prototype.union=function(){var a=r.call(arguments,0);return a=a.filter(function(f){return f.size!==0}),a.length===0?this:this.size===0&&!this.__ownerID&&a.length===1?this.constructor(a[0]):this.withMutations(function(f){for(var y=0;y<a.length;y++)l(a[y]).forEach(function(b){return f.add(b)})})},Ke.prototype.intersect=function(){var a=r.call(arguments,0);if(a.length===0)return this;a=a.map(function(y){return l(y)});var f=this;return this.withMutations(function(y){f.forEach(function(b){a.every(function(E){return E.includes(b)})||y.remove(b)})})},Ke.prototype.subtract=function(){var a=r.call(arguments,0);if(a.length===0)return this;a=a.map(function(y){return l(y)});var f=this;return this.withMutations(function(y){f.forEach(function(b){a.some(function(E){return E.includes(b)})&&y.remove(b)})})},Ke.prototype.merge=function(){return this.union.apply(this,arguments)},Ke.prototype.mergeWith=function(a){var f=r.call(arguments,1);return this.union.apply(this,f)},Ke.prototype.sort=function(a){return ar(Tn(this,a))},Ke.prototype.sortBy=function(a,f){return ar(Tn(this,f,a))},Ke.prototype.wasAltered=function(){return this._map.wasAltered()},Ke.prototype.__iterate=function(a,f){var y=this;return this._map.__iterate(function(b,E){return a(E,E,y)},f)},Ke.prototype.__iterator=function(a,f){return this._map.map(function(y,b){return b}).__iterator(a,f)},Ke.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map.__ensureOwner(a);return a?this.__make(f,a):(this.__ownerID=a,this._map=f,this)};function Ni(a){return!!(a&&a[Ll])}Ke.isSet=Ni;var Ll="@@__IMMUTABLE_SET__@@",Lt=Ke.prototype;Lt[Ll]=!0,Lt[w]=Lt.remove,Lt.mergeDeep=Lt.merge,Lt.mergeDeepWith=Lt.mergeWith,Lt.withMutations=Ne.withMutations,Lt.asMutable=Ne.asMutable,Lt.asImmutable=Ne.asImmutable,Lt.__empty=Ti,Lt.__make=Dl;function Ri(a,f){return a.__ownerID?(a.size=f.size,a._map=f,a):f===a._map?a:f.size===0?a.__empty():a.__make(f)}function Dl(a,f){var y=Object.create(Lt);return y.size=a?a.size:0,y._map=a,y.__ownerID=f,y}var Fl;function Ti(){return Fl||(Fl=Dl(or()))}n(ar,Ke);function ar(a){return a==null?Oi():zl(a)?a:Oi().withMutations(function(f){var y=l(a);kt(y.size),y.forEach(function(b){return f.add(b)})})}ar.of=function(){return this(arguments)},ar.fromKeys=function(a){return this(i(a).keySeq())},ar.prototype.toString=function(){return this.__toString("OrderedSet {","}")};function zl(a){return Ni(a)&&_(a)}ar.isOrderedSet=zl;var eo=ar.prototype;eo[S]=!0,eo.__empty=Oi,eo.__make=ql;function ql(a,f){var y=Object.create(eo);return y.size=a?a.size:0,y._map=a,y.__ownerID=f,y}var Bl;function Oi(){return Bl||(Bl=ql(Xs()))}n(lt,Cn);function lt(a){return a==null?Ai():Ul(a)?a:Ai().unshiftAll(a)}lt.of=function(){return this(arguments)},lt.prototype.toString=function(){return this.__toString("Stack [","]")},lt.prototype.get=function(a,f){var y=this._head;for(a=J(this,a);y&&a--;)y=y.next;return y?y.value:f},lt.prototype.peek=function(){return this._head&&this._head.value},lt.prototype.push=function(){if(arguments.length===0)return this;for(var a=this.size+arguments.length,f=this._head,y=arguments.length-1;y>=0;y--)f={value:arguments[y],next:f};return this.__ownerID?(this.size=a,this._head=f,this.__hash=void 0,this.__altered=!0,this):fs(a,f)},lt.prototype.pushAll=function(a){if(a=c(a),a.size===0)return this;kt(a.size);var f=this.size,y=this._head;return a.reverse().forEach(function(b){f++,y={value:b,next:y}}),this.__ownerID?(this.size=f,this._head=y,this.__hash=void 0,this.__altered=!0,this):fs(f,y)},lt.prototype.pop=function(){return this.slice(1)},lt.prototype.unshift=function(){return this.push.apply(this,arguments)},lt.prototype.unshiftAll=function(a){return this.pushAll(a)},lt.prototype.shift=function(){return this.pop.apply(this,arguments)},lt.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ai()},lt.prototype.slice=function(a,f){if(X(a,f,this.size))return this;var y=Z(a,this.size),b=he(f,this.size);if(b!==this.size)return Cn.prototype.slice.call(this,a,f);for(var E=this.size-y,R=this._head;y--;)R=R.next;return this.__ownerID?(this.size=E,this._head=R,this.__hash=void 0,this.__altered=!0,this):fs(E,R)},lt.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?fs(this.size,this._head,a,this.__hash):(this.__ownerID=a,this.__altered=!1,this)},lt.prototype.__iterate=function(a,f){if(f)return this.reverse().__iterate(a);for(var y=0,b=this._head;b&&a(b.value,y++,this)!==!1;)b=b.next;return y},lt.prototype.__iterator=function(a,f){if(f)return this.reverse().__iterator(a);var y=0,b=this._head;return new V(function(){if(b){var E=b.value;return b=b.next,oe(a,y++,E)}return F()})};function Ul(a){return!!(a&&a[Hl])}lt.isStack=Ul;var Hl="@@__IMMUTABLE_STACK__@@",On=lt.prototype;On[Hl]=!0,On.withMutations=Ne.withMutations,On.asMutable=Ne.asMutable,On.asImmutable=Ne.asImmutable,On.wasAltered=Ne.wasAltered;function fs(a,f,y,b){var E=Object.create(On);return E.size=a,E._head=f,E.__ownerID=y,E.__hash=b,E.__altered=!1,E}var $l;function Ai(){return $l||($l=fs(0))}function cr(a,f){var y=function(b){a.prototype[b]=f[b]};return Object.keys(f).forEach(y),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(f).forEach(y),a}o.Iterator=V,cr(o,{toArray:function(){kt(this.size);var a=new Array(this.size||0);return this.valueSeq().__iterate(function(f,y){a[y]=f}),a},toIndexedSeq:function(){return new In(this)},toJS:function(){return this.toSeq().map(function(a){return a&&typeof a.toJS=="function"?a.toJS():a}).__toJS()},toJSON:function(){return this.toSeq().map(function(a){return a&&typeof a.toJSON=="function"?a.toJSON():a}).__toJS()},toKeyedSeq:function(){return new Bt(this,!0)},toMap:function(){return Fe(this.toKeyedSeq())},toObject:function(){kt(this.size);var a={};return this.__iterate(function(f,y){a[y]=f}),a},toOrderedMap:function(){return nt(this.toKeyedSeq())},toOrderedSet:function(){return ar(d(this)?this.valueSeq():this)},toSet:function(){return Ke(d(this)?this.valueSeq():this)},toSetSeq:function(){return new Nn(this)},toSeq:function(){return h(this)?this.toIndexedSeq():d(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return lt(d(this)?this.valueSeq():this)},toList:function(){return Ge(d(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(a,f){return this.size===0?a+f:a+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+f},concat:function(){var a=r.call(arguments,0);return Ve(this,dy(this,a))},includes:function(a){return this.some(function(f){return rt(f,a)})},entries:function(){return this.__iterator(_e)},every:function(a,f){kt(this.size);var y=!0;return this.__iterate(function(b,E,R){if(!a.call(f,b,E,R))return y=!1,!1}),y},filter:function(a,f){return Ve(this,El(this,a,f,!0))},find:function(a,f,y){var b=this.findEntry(a,f);return b?b[1]:y},findEntry:function(a,f){var y;return this.__iterate(function(b,E,R){if(a.call(f,b,E,R))return y=[E,b],!1}),y},findLastEntry:function(a,f){return this.toSeq().reverse().findEntry(a,f)},forEach:function(a,f){return kt(this.size),this.__iterate(f?a.bind(f):a)},join:function(a){kt(this.size),a=a!==void 0?""+a:",";var f="",y=!0;return this.__iterate(function(b){y?y=!1:f+=a,f+=b!=null?b.toString():""}),f},keys:function(){return this.__iterator(ee)},map:function(a,f){return Ve(this,wl(this,a,f))},reduce:function(a,f,y){kt(this.size);var b,E;return arguments.length<2?E=!0:b=f,this.__iterate(function(R,A,L){E?(E=!1,b=R):b=a.call(y,b,R,A,L)}),b},reduceRight:function(a,f,y){var b=this.toKeyedSeq().reverse();return b.reduce.apply(b,arguments)},reverse:function(){return Ve(this,wi(this,!0))},slice:function(a,f){return Ve(this,Ei(this,a,f,!0))},some:function(a,f){return!this.every(ro(a),f)},sort:function(a){return Ve(this,Tn(this,a))},values:function(){return this.__iterator(ie)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==void 0?this.size===0:!this.some(function(){return!0})},count:function(a,f){return G(a?this.toSeq().filter(a,f):this)},countBy:function(a,f){return cy(this,a,f)},equals:function(a){return ii(this,a)},entrySeq:function(){var a=this;if(a._cache)return new Me(a._cache);var f=a.toSeq().map(gy).toIndexedSeq();return f.fromEntrySeq=function(){return a.toSeq()},f},filterNot:function(a,f){return this.filter(ro(a),f)},findLast:function(a,f,y){return this.toKeyedSeq().reverse().find(a,f,y)},first:function(){return this.find(Y)},flatMap:function(a,f){return Ve(this,fy(this,a,f))},flatten:function(a){return Ve(this,Il(this,a,!0))},fromEntrySeq:function(){return new Rn(this)},get:function(a,f){return this.find(function(y,b){return rt(b,a)},void 0,f)},getIn:function(a,f){for(var y=this,b=kl(a),E;!(E=b.next()).done;){var R=E.value;if(y=y&&y.get?y.get(R,N):N,y===N)return f}return y},groupBy:function(a,f){return ly(this,a,f)},has:function(a){return this.get(a,N)!==N},hasIn:function(a){return this.getIn(a,N)!==N},isSubset:function(a){return a=typeof a.includes=="function"?a:o(a),this.every(function(f){return a.includes(f)})},isSuperset:function(a){return a=typeof a.isSubset=="function"?a:o(a),a.isSubset(this)},keySeq:function(){return this.toSeq().map(_y).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(a){return Js(this,a)},maxBy:function(a,f){return Js(this,f,a)},min:function(a){return Js(this,a?Wl(a):Gl)},minBy:function(a,f){return Js(this,f?Wl(f):Gl,a)},rest:function(){return this.slice(1)},skip:function(a){return this.slice(Math.max(0,a))},skipLast:function(a){return Ve(this,this.toSeq().reverse().skip(a).reverse())},skipWhile:function(a,f){return Ve(this,Pl(this,a,f,!0))},skipUntil:function(a,f){return this.skipWhile(ro(a),f)},sortBy:function(a,f){return Ve(this,Tn(this,f,a))},take:function(a){return this.slice(0,Math.max(0,a))},takeLast:function(a){return Ve(this,this.toSeq().reverse().take(a).reverse())},takeWhile:function(a,f){return Ve(this,uy(this,a,f))},takeUntil:function(a,f){return this.takeWhile(ro(a),f)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=vy(this))}});var yt=o.prototype;yt[g]=!0,yt[we]=yt.values,yt.__toJS=yt.toArray,yt.__toStringMapper=Vl,yt.inspect=yt.toSource=function(){return this.toString()},yt.chain=yt.flatMap,yt.contains=yt.includes,function(){try{Object.defineProperty(yt,"length",{get:function(){if(!o.noLengthWarning){var a;try{throw new Error}catch(f){a=f.stack}if(a.indexOf("_wrapObject")===-1)return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+a),this.size}}})}catch{}}(),cr(i,{flip:function(){return Ve(this,Cl(this))},findKey:function(a,f){var y=this.findEntry(a,f);return y&&y[0]},findLastKey:function(a,f){return this.toSeq().reverse().findKey(a,f)},keyOf:function(a){return this.findKey(function(f){return rt(f,a)})},lastKeyOf:function(a){return this.findLastKey(function(f){return rt(f,a)})},mapEntries:function(a,f){var y=this,b=0;return Ve(this,this.toSeq().map(function(E,R){return a.call(f,[R,E],b++,y)}).fromEntrySeq())},mapKeys:function(a,f){var y=this;return Ve(this,this.toSeq().flip().map(function(b,E){return a.call(f,b,E,y)}).flip())}});var to=i.prototype;to[v]=!0,to[we]=yt.entries,to.__toJS=yt.toObject,to.__toStringMapper=function(a,f){return JSON.stringify(f)+": "+Vl(a)},cr(c,{toKeyedSeq:function(){return new Bt(this,!1)},filter:function(a,f){return Ve(this,El(this,a,f,!1))},findIndex:function(a,f){var y=this.findEntry(a,f);return y?y[0]:-1},indexOf:function(a){var f=this.toKeyedSeq().keyOf(a);return f===void 0?-1:f},lastIndexOf:function(a){var f=this.toKeyedSeq().reverse().keyOf(a);return f===void 0?-1:f},reverse:function(){return Ve(this,wi(this,!1))},slice:function(a,f){return Ve(this,Ei(this,a,f,!1))},splice:function(a,f){var y=arguments.length;if(f=Math.max(f|0,0),y===0||y===2&&!f)return this;a=Z(a,a<0?this.count():this.size);var b=this.slice(0,a);return Ve(this,y===1?b:b.concat(B(arguments,2),this.slice(a+f)))},findLastIndex:function(a,f){var y=this.toKeyedSeq().findLastKey(a,f);return y===void 0?-1:y},first:function(){return this.get(0)},flatten:function(a){return Ve(this,Il(this,a,!1))},get:function(a,f){return a=J(this,a),a<0||this.size===1/0||this.size!==void 0&&a>this.size?f:this.find(function(y,b){return b===a},void 0,f)},has:function(a){return a=J(this,a),a>=0&&(this.size!==void 0?this.size===1/0||a<this.size:this.indexOf(a)!==-1)},interpose:function(a){return Ve(this,py(this,a))},interleave:function(){var a=[this].concat(B(arguments)),f=Pi(this.toSeq(),te.of,a),y=f.flatten(!0);return f.size&&(y.size=f.size*a.length),Ve(this,y)},last:function(){return this.get(-1)},skipWhile:function(a,f){return Ve(this,Pl(this,a,f,!1))},zip:function(){var a=[this].concat(B(arguments));return Ve(this,Pi(this,yy,a))},zipWith:function(a){var f=B(arguments);return f[0]=this,Ve(this,Pi(this,a,f))}}),c.prototype[x]=!0,c.prototype[S]=!0,cr(l,{get:function(a,f){return this.has(a)?a:f},includes:function(a){return this.has(a)},keySeq:function(){return this.valueSeq()}}),l.prototype.has=yt.includes,cr(ne,i.prototype),cr(te,c.prototype),cr(ke,l.prototype),cr(os,i.prototype),cr(Cn,c.prototype),cr(Ks,l.prototype);function _y(a,f){return f}function gy(a,f){return[f,a]}function ro(a){return function(){return!a.apply(this,arguments)}}function Wl(a){return function(){return-a.apply(this,arguments)}}function Vl(a){return typeof a=="string"?JSON.stringify(a):a}function yy(){return B(arguments)}function Gl(a,f){return a<f?1:a>f?-1:0}function vy(a){if(a.size===1/0)return 0;var f=_(a),y=d(a),b=f?1:0,E=a.__iterate(y?f?function(R,A){b=31*b+Kl(At(R),At(A))|0}:function(R,A){b=b+Kl(At(R),At(A))|0}:f?function(R){b=31*b+At(R)|0}:function(R){b=b+At(R)|0});return xy(E,b)}function xy(a,f){return f=is(f,3432918353),f=is(f<<15|f>>>-15,461845907),f=is(f<<13|f>>>-13,5),f=(f+3864292196|0)^a,f=is(f^f>>>16,2246822507),f=is(f^f>>>13,3266489909),f=li(f^f>>>16),f}function Kl(a,f){return a^f+2654435769+(a<<6)+(a>>2)|0}var by={Iterable:o,Seq:Ie,Collection:Ir,Map:Fe,OrderedMap:nt,List:Ge,Stack:lt,Set:Ke,OrderedSet:ar,Record:Mt,Range:gt,Repeat:_t,is:rt,fromJS:Je};return by})})(P_);var I_=P_.exports,_a=new I_.OrderedSet;function zC(e,t){for(var r=null,n=null,o=[],i=0,c=0,l=e.length;c<l;c++){n=r;var u=t.get(c);r=u?u.getEntity():null,c>0&&r!==n&&(o.push([n,ud(e.slice(i,c),t.slice(i,c))]),i=c)}return o.push([r,ud(e.slice(i),t.slice(i))]),o}function ud(e,t){for(var r=_a,n=_a,o=[],i=0,c=0,l=e.length;c<l;c++){n=r;var u=t.get(c);r=u?u.getStyle():_a,c>0&&!I_.is(r,n)&&(o.push([e.slice(i,c),n]),i=c)}return o.push([e.slice(i),r]),o}var Yr,Co,wo;function dd(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function Eo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dd(r,!0).forEach(function(n){ot(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dd(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ga(e,t){return UC(e)||BC(e,t)||qC()}function qC(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function BC(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var c=e[Symbol.iterator](),l;!(n=(l=c.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){o=!0,i=u}finally{try{!n&&c.return!=null&&c.return()}finally{if(o)throw i}}return r}function UC(e){if(Array.isArray(e))return e}function HC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $C(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WC(e,t,r){return t&&$C(e.prototype,t),e}function ot(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var N_=Hs.BOLD,Yc=Hs.CODE,R_=Hs.ITALIC,T_=Hs.STRIKETHROUGH,O_=Hs.UNDERLINE,VC=" ",A_="<br>",fd=/^data-([a-z0-9-]+)$/,GC=(Yr={},ot(Yr,N_,{element:"strong"}),ot(Yr,Yc,{element:"code"}),ot(Yr,R_,{element:"em"}),ot(Yr,T_,{element:"del"}),ot(Yr,O_,{element:"u"}),Yr),KC=[N_,R_,O_,T_,Yc],Po=(Co={},ot(Co,ts.LINK,{url:"href",href:"href",rel:"rel",target:"target",title:"title",className:"class"}),ot(Co,ts.IMAGE,{src:"src",height:"height",width:"width",alt:"alt",className:"class"}),Co),Io=(wo={},ot(wo,ts.LINK,function(e,t){for(var r=Po.hasOwnProperty(e)?Po[e]:{},n=t.getData(),o={},i=0,c=Object.keys(n);i<c.length;i++){var l=c[i],u=n[l];if(r.hasOwnProperty(l)){var d=r[l];o[d]=u}else fd.test(l)&&(o[l]=u)}return o}),ot(wo,ts.IMAGE,function(e,t){for(var r=Po.hasOwnProperty(e)?Po[e]:{},n=t.getData(),o={},i=0,c=Object.keys(n);i<c.length;i++){var l=c[i],u=n[l];if(r.hasOwnProperty(l)){var d=r[l];o[d]=u}else fd.test(l)&&(o[l]=u)}return o}),wo);function pd(e,t){switch(e){case vt.HEADER_ONE:return["h1"];case vt.HEADER_TWO:return["h2"];case vt.HEADER_THREE:return["h3"];case vt.HEADER_FOUR:return["h4"];case vt.HEADER_FIVE:return["h5"];case vt.HEADER_SIX:return["h6"];case vt.UNORDERED_LIST_ITEM:case vt.ORDERED_LIST_ITEM:return["li"];case vt.BLOCKQUOTE:return["blockquote"];case vt.CODE:return["pre","code"];case vt.ATOMIC:return["figure"];default:return t===null?[]:[t||"p"]}}function QC(e){switch(e){case vt.UNORDERED_LIST_ITEM:return"ul";case vt.ORDERED_LIST_ITEM:return"ol";default:return null}}var YC=function(){function e(t,r){HC(this,e),ot(this,"blocks",void 0),ot(this,"contentState",void 0),ot(this,"currentBlock",void 0),ot(this,"indentLevel",void 0),ot(this,"output",void 0),ot(this,"totalBlocks",void 0),ot(this,"wrapperTag",void 0),ot(this,"options",void 0),ot(this,"inlineStyles",void 0),ot(this,"inlineStyleFn",void 0),ot(this,"styleOrder",void 0),r==null&&(r={}),this.contentState=t,this.options=r;var n=OC(r.inlineStyles,[GC,KC]),o=ga(n,2),i=o[0],c=o[1];this.inlineStyles=i,this.inlineStyleFn=r.inlineStyleFn,this.styleOrder=c}return WC(e,[{key:"generate",value:function(){for(this.output=[],this.blocks=this.contentState.getBlocksAsArray(),this.totalBlocks=this.blocks.length,this.currentBlock=0,this.indentLevel=0,this.wrapperTag=null;this.currentBlock<this.totalBlocks;)this.processBlock();return this.closeWrapperTag(),this.output.join("").trim()}},{key:"processBlock",value:function(){var r=this.options,n=r.blockRenderers,o=r.defaultBlockTag,i=this.blocks[this.currentBlock],c=i.getType(),l=QC(c);this.wrapperTag!==l&&(this.wrapperTag&&this.closeWrapperTag(),l&&this.openWrapperTag(l)),this.indent();var u=n!=null&&n.hasOwnProperty(c)?n[c]:null,d=u?u(i):null;if(d!=null){this.output.push(d),this.output.push(`
19
- `),this.currentBlock+=1;return}this.writeStartTag(i,o),this.output.push(this.renderBlockContent(i));var h=this.getNextBlock();if(XC(c)&&h&&h.getDepth()===i.getDepth()+1){this.output.push(`
20
- `);var m=this.wrapperTag;this.wrapperTag=null,this.indentLevel+=1,this.currentBlock+=1,this.processBlocksAtDepth(h.getDepth()),this.wrapperTag=m,this.indentLevel-=1,this.indent()}else this.currentBlock+=1;this.writeEndTag(i,o)}},{key:"processBlocksAtDepth",value:function(r){for(var n=this.blocks[this.currentBlock];n&&n.getDepth()===r;)this.processBlock(),n=this.blocks[this.currentBlock];this.closeWrapperTag()}},{key:"getNextBlock",value:function(){return this.blocks[this.currentBlock+1]}},{key:"writeStartTag",value:function(r,n){var o=pd(r.getType(),n),i;if(this.options.blockStyleFn){var c=this.options.blockStyleFn(r)||{},l=c.attributes,u=c.style;if(l=ma(l),u!=null){var d=So(u);l=l==null?{style:d}:Eo({},l,{style:d})}i=kn(l)}else i="";var h=!0,m=!1,_=void 0;try{for(var g=o[Symbol.iterator](),v;!(h=(v=g.next()).done);h=!0){var x=v.value;this.output.push("<".concat(x).concat(i,">"))}}catch(S){m=!0,_=S}finally{try{!h&&g.return!=null&&g.return()}finally{if(m)throw _}}}},{key:"writeEndTag",value:function(r,n){var o=pd(r.getType(),n);if(o.length===1)this.output.push("</".concat(o[0],`>
16
+ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return c.default.cloneElement(T,{key:M})})}function w(P){let{children:C}=P;const N=(0,c.useContext)(u.AmpStateContext),T=(0,c.useContext)(d.HeadManagerContext);return(0,i.jsx)(l.default,{reduceComponentsToState:S,headManager:T,inAmpMode:(0,h.isInAmpMode)(N),children:C})}const I=w;(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)),vo.exports}var aa={},Ju;function Gj(){return Ju||(Ju=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return o}});const r=Ct._(j),n=ti,o=r.default.createContext(n.imageConfigDefault);process.env.NODE_ENV!=="production"&&(o.displayName="ImageConfigContext")}(aa)),aa}var ca={},la={},ua={exports:{}},Zu;function Jm(){return Zu||(Zu=1,(()=>{var e={170:(o,i,c)=>{const l=c(510),u=()=>{if(typeof navigator<"u"&&navigator.platform){const h=navigator.platform.toLowerCase();return h==="win32"||h==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function d(h,m,_=!1){return m&&(m.windows===null||m.windows===void 0)&&(m={...m,windows:u()}),l(h,m,_)}Object.assign(d,l),o.exports=d},154:o=>{const i="\\\\/",c=`[^${i}]`,l="\\.",u="\\+",d="\\?",h="\\/",m="(?=.)",_="[^/]",g=`(?:${h}|$)`,v=`(?:^|${h})`,x=`${l}{1,2}${g}`,S=`(?!${l})`,w=`(?!${v}${x})`,I=`(?!${l}{0,1}${g})`,P=`(?!${x})`,C=`[^.${h}]`,N=`${_}*?`,O={DOT_LITERAL:l,PLUS_LITERAL:u,QMARK_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:m,QMARK:_,END_ANCHOR:g,DOTS_SLASH:x,NO_DOT:S,NO_DOTS:w,NO_DOT_SLASH:I,NO_DOTS_SLASH:P,QMARK_NO_DOT:C,STAR:N,START_ANCHOR:v,SEP:"/"},M={...O,SLASH_LITERAL:`[${i}]`,QMARK:c,STAR:`${c}*?`,DOTS_SLASH:`${l}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${l})`,NO_DOTS:`(?!(?:^|[${i}])${l}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${l}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${l}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`,SEP:"\\"},z={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:z,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(D){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${D.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(D){return D===!0?M:O}}},697:(o,i,c)=>{const l=c(154),u=c(96),{MAX_LENGTH:d,POSIX_REGEX_SOURCE:h,REGEX_NON_SPECIAL_CHARS:m,REGEX_SPECIAL_CHARS_BACKREF:_,REPLACEMENTS:g}=l,v=(w,I)=>{if(typeof I.expandRange=="function")return I.expandRange(...w,I);w.sort();const P=`[${w.join("-")}]`;try{new RegExp(P)}catch{return w.map(N=>u.escapeRegex(N)).join("..")}return P},x=(w,I)=>`Missing ${w}: "${I}" - use "\\\\${I}" to match literal characters`,S=(w,I)=>{if(typeof w!="string")throw new TypeError("Expected a string");w=g[w]||w;const P={...I},C=typeof P.maxLength=="number"?Math.min(d,P.maxLength):d;let N=w.length;if(N>C)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${C}`);const T={type:"bos",value:"",output:P.prepend||""},O=[T],M=P.capture?"":"?:",z=l.globChars(P.windows),D=l.extglobChars(z),{DOT_LITERAL:B,PLUS_LITERAL:G,SLASH_LITERAL:J,ONE_CHAR:Y,DOTS_SLASH:X,NO_DOT:Z,NO_DOT_SLASH:he,NO_DOTS_SLASH:fe,QMARK:ee,QMARK_NO_DOT:ie,STAR:_e,START_ANCHOR:we}=z,ge=ae=>`(${M}(?:(?!${we}${ae.dot?X:B}).)*?)`,Ee=P.dot?"":Z,V=P.dot?ee:ie;let oe=P.bash===!0?ge(P):_e;P.capture&&(oe=`(${oe})`),typeof P.noext=="boolean"&&(P.noextglob=P.noext);const F={input:w,index:-1,start:0,dot:P.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:O};w=u.removePrefix(w,F),N=w.length;const ce=[],je=[],Oe=[];let q=T,$;const Ie=()=>F.index===N-1,ne=F.peek=(ae=1)=>w[F.index+ae],te=F.advance=()=>w[++F.index]||"",ke=()=>w.slice(F.index+1),ct=(ae="",de=0)=>{F.consumed+=ae,F.index+=de},Me=ae=>{F.output+=ae.output!=null?ae.output:ae.value,ct(ae.value)},Le=()=>{let ae=1;for(;ne()==="!"&&(ne(2)!=="("||ne(3)==="?");)te(),F.start++,ae++;return ae%2===0?!1:(F.negated=!0,F.start++,!0)},tt=ae=>{F[ae]++,Oe.push(ae)},We=ae=>{F[ae]--,Oe.pop()},re=ae=>{if(q.type==="globstar"){const de=F.braces>0&&(ae.type==="comma"||ae.type==="brace"),Q=ae.extglob===!0||ce.length&&(ae.type==="pipe"||ae.type==="paren");ae.type!=="slash"&&ae.type!=="paren"&&!de&&!Q&&(F.output=F.output.slice(0,-q.output.length),q.type="star",q.value="*",q.output=oe,F.output+=q.output)}if(ce.length&&ae.type!=="paren"&&(ce[ce.length-1].inner+=ae.value),(ae.value||ae.output)&&Me(ae),q&&q.type==="text"&&ae.type==="text"){q.output=(q.output||q.value)+ae.value,q.value+=ae.value;return}ae.prev=q,O.push(ae),q=ae},De=(ae,de)=>{const Q={...D[de],conditions:1,inner:""};Q.prev=q,Q.parens=F.parens,Q.output=F.output;const se=(P.capture?"(":"")+Q.open;tt("parens"),re({type:ae,value:de,output:F.output?"":Y}),re({type:"paren",extglob:!0,value:te(),output:se}),ce.push(Q)},$e=ae=>{let de=ae.close+(P.capture?")":""),Q;if(ae.type==="negate"){let se=oe;if(ae.inner&&ae.inner.length>1&&ae.inner.includes("/")&&(se=ge(P)),(se!==oe||Ie()||/^\)+$/.test(ke()))&&(de=ae.close=`)$))${se}`),ae.inner.includes("*")&&(Q=ke())&&/^\.[^\\/.]+$/.test(Q)){const ve=S(Q,{...I,fastpaths:!1}).output;de=ae.close=`)${ve})${se})`}ae.prev.type==="bos"&&(F.negatedExtglob=!0)}re({type:"paren",extglob:!0,value:$,output:de}),We("parens")};if(P.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(w)){let ae=!1,de=w.replace(_,(Q,se,ve,qe,Je,Gr)=>qe==="\\"?(ae=!0,Q):qe==="?"?se?se+qe+(Je?ee.repeat(Je.length):""):Gr===0?V+(Je?ee.repeat(Je.length):""):ee.repeat(ve.length):qe==="."?B.repeat(ve.length):qe==="*"?se?se+qe+(Je?oe:""):oe:se?Q:`\\${Q}`);return ae===!0&&(P.unescape===!0?de=de.replace(/\\/g,""):de=de.replace(/\\+/g,Q=>Q.length%2===0?"\\\\":Q?"\\":"")),de===w&&P.contains===!0?(F.output=w,F):(F.output=u.wrapOutput(de,F,I),F)}for(;!Ie();){if($=te(),$==="\0")continue;if($==="\\"){const Q=ne();if(Q==="/"&&P.bash!==!0||Q==="."||Q===";")continue;if(!Q){$+="\\",re({type:"text",value:$});continue}const se=/^\\+/.exec(ke());let ve=0;if(se&&se[0].length>2&&(ve=se[0].length,F.index+=ve,ve%2!==0&&($+="\\")),P.unescape===!0?$=te():$+=te(),F.brackets===0){re({type:"text",value:$});continue}}if(F.brackets>0&&($!=="]"||q.value==="["||q.value==="[^")){if(P.posix!==!1&&$===":"){const Q=q.value.slice(1);if(Q.includes("[")&&(q.posix=!0,Q.includes(":"))){const se=q.value.lastIndexOf("["),ve=q.value.slice(0,se),qe=q.value.slice(se+2),Je=h[qe];if(Je){q.value=ve+Je,F.backtrack=!0,te(),!T.output&&O.indexOf(q)===1&&(T.output=Y);continue}}}($==="["&&ne()!==":"||$==="-"&&ne()==="]")&&($=`\\${$}`),$==="]"&&(q.value==="["||q.value==="[^")&&($=`\\${$}`),P.posix===!0&&$==="!"&&q.value==="["&&($="^"),q.value+=$,Me({value:$});continue}if(F.quotes===1&&$!=='"'){$=u.escapeRegex($),q.value+=$,Me({value:$});continue}if($==='"'){F.quotes=F.quotes===1?0:1,P.keepQuotes===!0&&re({type:"text",value:$});continue}if($==="("){tt("parens"),re({type:"paren",value:$});continue}if($===")"){if(F.parens===0&&P.strictBrackets===!0)throw new SyntaxError(x("opening","("));const Q=ce[ce.length-1];if(Q&&F.parens===Q.parens+1){$e(ce.pop());continue}re({type:"paren",value:$,output:F.parens?")":"\\)"}),We("parens");continue}if($==="["){if(P.nobracket===!0||!ke().includes("]")){if(P.nobracket!==!0&&P.strictBrackets===!0)throw new SyntaxError(x("closing","]"));$=`\\${$}`}else tt("brackets");re({type:"bracket",value:$});continue}if($==="]"){if(P.nobracket===!0||q&&q.type==="bracket"&&q.value.length===1){re({type:"text",value:$,output:`\\${$}`});continue}if(F.brackets===0){if(P.strictBrackets===!0)throw new SyntaxError(x("opening","["));re({type:"text",value:$,output:`\\${$}`});continue}We("brackets");const Q=q.value.slice(1);if(q.posix!==!0&&Q[0]==="^"&&!Q.includes("/")&&($=`/${$}`),q.value+=$,Me({value:$}),P.literalBrackets===!1||u.hasRegexChars(Q))continue;const se=u.escapeRegex(q.value);if(F.output=F.output.slice(0,-q.value.length),P.literalBrackets===!0){F.output+=se,q.value=se;continue}q.value=`(${M}${se}|${q.value})`,F.output+=q.value;continue}if($==="{"&&P.nobrace!==!0){tt("braces");const Q={type:"brace",value:$,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};je.push(Q),re(Q);continue}if($==="}"){const Q=je[je.length-1];if(P.nobrace===!0||!Q){re({type:"text",value:$,output:$});continue}let se=")";if(Q.dots===!0){const ve=O.slice(),qe=[];for(let Je=ve.length-1;Je>=0&&(O.pop(),ve[Je].type!=="brace");Je--)ve[Je].type!=="dots"&&qe.unshift(ve[Je].value);se=v(qe,P),F.backtrack=!0}if(Q.comma!==!0&&Q.dots!==!0){const ve=F.output.slice(0,Q.outputIndex),qe=F.tokens.slice(Q.tokensIndex);Q.value=Q.output="\\{",$=se="\\}",F.output=ve;for(const Je of qe)F.output+=Je.output||Je.value}re({type:"brace",value:$,output:se}),We("braces"),je.pop();continue}if($==="|"){ce.length>0&&ce[ce.length-1].conditions++,re({type:"text",value:$});continue}if($===","){let Q=$;const se=je[je.length-1];se&&Oe[Oe.length-1]==="braces"&&(se.comma=!0,Q="|"),re({type:"comma",value:$,output:Q});continue}if($==="/"){if(q.type==="dot"&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",O.pop(),q=T;continue}re({type:"slash",value:$,output:J});continue}if($==="."){if(F.braces>0&&q.type==="dot"){q.value==="."&&(q.output=B);const Q=je[je.length-1];q.type="dots",q.output+=$,q.value+=$,Q.dots=!0;continue}if(F.braces+F.parens===0&&q.type!=="bos"&&q.type!=="slash"){re({type:"text",value:$,output:B});continue}re({type:"dot",value:$,output:B});continue}if($==="?"){if(!(q&&q.value==="(")&&P.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){De("qmark",$);continue}if(q&&q.type==="paren"){const se=ne();let ve=$;(q.value==="("&&!/[!=<:]/.test(se)||se==="<"&&!/<([!=]|\w+>)/.test(ke()))&&(ve=`\\${$}`),re({type:"text",value:$,output:ve});continue}if(P.dot!==!0&&(q.type==="slash"||q.type==="bos")){re({type:"qmark",value:$,output:ie});continue}re({type:"qmark",value:$,output:ee});continue}if($==="!"){if(P.noextglob!==!0&&ne()==="("&&(ne(2)!=="?"||!/[!=<:]/.test(ne(3)))){De("negate",$);continue}if(P.nonegate!==!0&&F.index===0){Le();continue}}if($==="+"){if(P.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){De("plus",$);continue}if(q&&q.value==="("||P.regex===!1){re({type:"plus",value:$,output:G});continue}if(q&&(q.type==="bracket"||q.type==="paren"||q.type==="brace")||F.parens>0){re({type:"plus",value:$});continue}re({type:"plus",value:G});continue}if($==="@"){if(P.noextglob!==!0&&ne()==="("&&ne(2)!=="?"){re({type:"at",extglob:!0,value:$,output:""});continue}re({type:"text",value:$});continue}if($!=="*"){($==="$"||$==="^")&&($=`\\${$}`);const Q=m.exec(ke());Q&&($+=Q[0],F.index+=Q[0].length),re({type:"text",value:$});continue}if(q&&(q.type==="globstar"||q.star===!0)){q.type="star",q.star=!0,q.value+=$,q.output=oe,F.backtrack=!0,F.globstar=!0,ct($);continue}let ae=ke();if(P.noextglob!==!0&&/^\([^?]/.test(ae)){De("star",$);continue}if(q.type==="star"){if(P.noglobstar===!0){ct($);continue}const Q=q.prev,se=Q.prev,ve=Q.type==="slash"||Q.type==="bos",qe=se&&(se.type==="star"||se.type==="globstar");if(P.bash===!0&&(!ve||ae[0]&&ae[0]!=="/")){re({type:"star",value:$,output:""});continue}const Je=F.braces>0&&(Q.type==="comma"||Q.type==="brace"),Gr=ce.length&&(Q.type==="pipe"||Q.type==="paren");if(!ve&&Q.type!=="paren"&&!Je&&!Gr){re({type:"star",value:$,output:""});continue}for(;ae.slice(0,3)==="/**";){const Pr=w[F.index+4];if(Pr&&Pr!=="/")break;ae=ae.slice(3),ct("/**",3)}if(Q.type==="bos"&&Ie()){q.type="globstar",q.value+=$,q.output=ge(P),F.output=q.output,F.globstar=!0,ct($);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&!qe&&Ie()){F.output=F.output.slice(0,-(Q.output+q.output).length),Q.output=`(?:${Q.output}`,q.type="globstar",q.output=ge(P)+(P.strictSlashes?")":"|$)"),q.value+=$,F.globstar=!0,F.output+=Q.output+q.output,ct($);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&ae[0]==="/"){const Pr=ae[1]!==void 0?"|$":"";F.output=F.output.slice(0,-(Q.output+q.output).length),Q.output=`(?:${Q.output}`,q.type="globstar",q.output=`${ge(P)}${J}|${J}${Pr})`,q.value+=$,F.output+=Q.output+q.output,F.globstar=!0,ct($+te()),re({type:"slash",value:"/",output:""});continue}if(Q.type==="bos"&&ae[0]==="/"){q.type="globstar",q.value+=$,q.output=`(?:^|${J}|${ge(P)}${J})`,F.output=q.output,F.globstar=!0,ct($+te()),re({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-q.output.length),q.type="globstar",q.output=ge(P),q.value+=$,F.output+=q.output,F.globstar=!0,ct($);continue}const de={type:"star",value:$,output:oe};if(P.bash===!0){de.output=".*?",(q.type==="bos"||q.type==="slash")&&(de.output=Ee+de.output),re(de);continue}if(q&&(q.type==="bracket"||q.type==="paren")&&P.regex===!0){de.output=$,re(de);continue}(F.index===F.start||q.type==="slash"||q.type==="dot")&&(q.type==="dot"?(F.output+=he,q.output+=he):P.dot===!0?(F.output+=fe,q.output+=fe):(F.output+=Ee,q.output+=Ee),ne()!=="*"&&(F.output+=Y,q.output+=Y)),re(de)}for(;F.brackets>0;){if(P.strictBrackets===!0)throw new SyntaxError(x("closing","]"));F.output=u.escapeLast(F.output,"["),We("brackets")}for(;F.parens>0;){if(P.strictBrackets===!0)throw new SyntaxError(x("closing",")"));F.output=u.escapeLast(F.output,"("),We("parens")}for(;F.braces>0;){if(P.strictBrackets===!0)throw new SyntaxError(x("closing","}"));F.output=u.escapeLast(F.output,"{"),We("braces")}if(P.strictSlashes!==!0&&(q.type==="star"||q.type==="bracket")&&re({type:"maybe_slash",value:"",output:`${J}?`}),F.backtrack===!0){F.output="";for(const ae of F.tokens)F.output+=ae.output!=null?ae.output:ae.value,ae.suffix&&(F.output+=ae.suffix)}return F};S.fastpaths=(w,I)=>{const P={...I},C=typeof P.maxLength=="number"?Math.min(d,P.maxLength):d,N=w.length;if(N>C)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${C}`);w=g[w]||w;const{DOT_LITERAL:T,SLASH_LITERAL:O,ONE_CHAR:M,DOTS_SLASH:z,NO_DOT:D,NO_DOTS:B,NO_DOTS_SLASH:G,STAR:J,START_ANCHOR:Y}=l.globChars(P.windows),X=P.dot?B:D,Z=P.dot?G:D,he=P.capture?"":"?:",fe={negated:!1,prefix:""};let ee=P.bash===!0?".*?":J;P.capture&&(ee=`(${ee})`);const ie=Ee=>Ee.noglobstar===!0?ee:`(${he}(?:(?!${Y}${Ee.dot?z:T}).)*?)`,_e=Ee=>{switch(Ee){case"*":return`${X}${M}${ee}`;case".*":return`${T}${M}${ee}`;case"*.*":return`${X}${ee}${T}${M}${ee}`;case"*/*":return`${X}${ee}${O}${M}${Z}${ee}`;case"**":return X+ie(P);case"**/*":return`(?:${X}${ie(P)}${O})?${Z}${M}${ee}`;case"**/*.*":return`(?:${X}${ie(P)}${O})?${Z}${ee}${T}${M}${ee}`;case"**/.*":return`(?:${X}${ie(P)}${O})?${T}${M}${ee}`;default:{const V=/^(.*?)\.(\w+)$/.exec(Ee);if(!V)return;const oe=_e(V[1]);return oe?oe+T+V[2]:void 0}}},we=u.removePrefix(w,fe);let ge=_e(we);return ge&&P.strictSlashes!==!0&&(ge+=`${O}?`),ge},o.exports=S},510:(o,i,c)=>{const l=c(716),u=c(697),d=c(96),h=c(154),m=g=>g&&typeof g=="object"&&!Array.isArray(g),_=(g,v,x=!1)=>{if(Array.isArray(g)){const O=g.map(z=>_(z,v,x));return z=>{for(const D of O){const B=D(z);if(B)return B}return!1}}const S=m(g)&&g.tokens&&g.input;if(g===""||typeof g!="string"&&!S)throw new TypeError("Expected pattern to be a non-empty string");const w=v||{},I=w.windows,P=S?_.compileRe(g,v):_.makeRe(g,v,!1,!0),C=P.state;delete P.state;let N=()=>!1;if(w.ignore){const O={...v,ignore:null,onMatch:null,onResult:null};N=_(w.ignore,O,x)}const T=(O,M=!1)=>{const{isMatch:z,match:D,output:B}=_.test(O,P,v,{glob:g,posix:I}),G={glob:g,state:C,regex:P,posix:I,input:O,output:B,match:D,isMatch:z};return typeof w.onResult=="function"&&w.onResult(G),z===!1?(G.isMatch=!1,M?G:!1):N(O)?(typeof w.onIgnore=="function"&&w.onIgnore(G),G.isMatch=!1,M?G:!1):(typeof w.onMatch=="function"&&w.onMatch(G),M?G:!0)};return x&&(T.state=C),T};_.test=(g,v,x,{glob:S,posix:w}={})=>{if(typeof g!="string")throw new TypeError("Expected input to be a string");if(g==="")return{isMatch:!1,output:""};const I=x||{},P=I.format||(w?d.toPosixSlashes:null);let C=g===S,N=C&&P?P(g):g;return C===!1&&(N=P?P(g):g,C=N===S),(C===!1||I.capture===!0)&&(I.matchBase===!0||I.basename===!0?C=_.matchBase(g,v,x,w):C=v.exec(N)),{isMatch:!!C,match:C,output:N}},_.matchBase=(g,v,x)=>(v instanceof RegExp?v:_.makeRe(v,x)).test(d.basename(g)),_.isMatch=(g,v,x)=>_(v,x)(g),_.parse=(g,v)=>Array.isArray(g)?g.map(x=>_.parse(x,v)):u(g,{...v,fastpaths:!1}),_.scan=(g,v)=>l(g,v),_.compileRe=(g,v,x=!1,S=!1)=>{if(x===!0)return g.output;const w=v||{},I=w.contains?"":"^",P=w.contains?"":"$";let C=`${I}(?:${g.output})${P}`;g&&g.negated===!0&&(C=`^(?!${C}).*$`);const N=_.toRegex(C,v);return S===!0&&(N.state=g),N},_.makeRe=(g,v={},x=!1,S=!1)=>{if(!g||typeof g!="string")throw new TypeError("Expected a non-empty string");let w={negated:!1,fastpaths:!0};return v.fastpaths!==!1&&(g[0]==="."||g[0]==="*")&&(w.output=u.fastpaths(g,v)),w.output||(w=u(g,v)),_.compileRe(w,v,x,S)},_.toRegex=(g,v)=>{try{const x=v||{};return new RegExp(g,x.flags||(x.nocase?"i":""))}catch(x){if(v&&v.debug===!0)throw x;return/$^/}},_.constants=h,o.exports=_},716:(o,i,c)=>{const l=c(96),{CHAR_ASTERISK:u,CHAR_AT:d,CHAR_BACKWARD_SLASH:h,CHAR_COMMA:m,CHAR_DOT:_,CHAR_EXCLAMATION_MARK:g,CHAR_FORWARD_SLASH:v,CHAR_LEFT_CURLY_BRACE:x,CHAR_LEFT_PARENTHESES:S,CHAR_LEFT_SQUARE_BRACKET:w,CHAR_PLUS:I,CHAR_QUESTION_MARK:P,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:N,CHAR_RIGHT_SQUARE_BRACKET:T}=c(154),O=D=>D===v||D===h,M=D=>{D.isPrefix!==!0&&(D.depth=D.isGlobstar?1/0:1)},z=(D,B)=>{const G=B||{},J=D.length-1,Y=G.parts===!0||G.scanToEnd===!0,X=[],Z=[],he=[];let fe=D,ee=-1,ie=0,_e=0,we=!1,ge=!1,Ee=!1,V=!1,oe=!1,F=!1,ce=!1,je=!1,Oe=!1,q=!1,$=0,Ie,ne,te={value:"",depth:0,isGlob:!1};const ke=()=>ee>=J,ct=()=>fe.charCodeAt(ee+1),Me=()=>(Ie=ne,fe.charCodeAt(++ee));for(;ee<J;){ne=Me();let De;if(ne===h){ce=te.backslashes=!0,ne=Me(),ne===x&&(F=!0);continue}if(F===!0||ne===x){for($++;ke()!==!0&&(ne=Me());){if(ne===h){ce=te.backslashes=!0,Me();continue}if(ne===x){$++;continue}if(F!==!0&&ne===_&&(ne=Me())===_){if(we=te.isBrace=!0,Ee=te.isGlob=!0,q=!0,Y===!0)continue;break}if(F!==!0&&ne===m){if(we=te.isBrace=!0,Ee=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===C&&($--,$===0)){F=!1,we=te.isBrace=!0,q=!0;break}}if(Y===!0)continue;break}if(ne===v){if(X.push(ee),Z.push(te),te={value:"",depth:0,isGlob:!1},q===!0)continue;if(Ie===_&&ee===ie+1){ie+=2;continue}_e=ee+1;continue}if(G.noext!==!0&&(ne===I||ne===d||ne===u||ne===P||ne===g)===!0&&ct()===S){if(Ee=te.isGlob=!0,V=te.isExtglob=!0,q=!0,ne===g&&ee===ie&&(Oe=!0),Y===!0){for(;ke()!==!0&&(ne=Me());){if(ne===h){ce=te.backslashes=!0,ne=Me();continue}if(ne===N){Ee=te.isGlob=!0,q=!0;break}}continue}break}if(ne===u){if(Ie===u&&(oe=te.isGlobstar=!0),Ee=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===P){if(Ee=te.isGlob=!0,q=!0,Y===!0)continue;break}if(ne===w){for(;ke()!==!0&&(De=Me());){if(De===h){ce=te.backslashes=!0,Me();continue}if(De===T){ge=te.isBracket=!0,Ee=te.isGlob=!0,q=!0;break}}if(Y===!0)continue;break}if(G.nonegate!==!0&&ne===g&&ee===ie){je=te.negated=!0,ie++;continue}if(G.noparen!==!0&&ne===S){if(Ee=te.isGlob=!0,Y===!0){for(;ke()!==!0&&(ne=Me());){if(ne===S){ce=te.backslashes=!0,ne=Me();continue}if(ne===N){q=!0;break}}continue}break}if(Ee===!0){if(q=!0,Y===!0)continue;break}}G.noext===!0&&(V=!1,Ee=!1);let Le=fe,tt="",We="";ie>0&&(tt=fe.slice(0,ie),fe=fe.slice(ie),_e-=ie),Le&&Ee===!0&&_e>0?(Le=fe.slice(0,_e),We=fe.slice(_e)):Ee===!0?(Le="",We=fe):Le=fe,Le&&Le!==""&&Le!=="/"&&Le!==fe&&O(Le.charCodeAt(Le.length-1))&&(Le=Le.slice(0,-1)),G.unescape===!0&&(We&&(We=l.removeBackslashes(We)),Le&&ce===!0&&(Le=l.removeBackslashes(Le)));const re={prefix:tt,input:D,start:ie,base:Le,glob:We,isBrace:we,isBracket:ge,isGlob:Ee,isExtglob:V,isGlobstar:oe,negated:je,negatedExtglob:Oe};if(G.tokens===!0&&(re.maxDepth=0,O(ne)||Z.push(te),re.tokens=Z),G.parts===!0||G.tokens===!0){let De;for(let $e=0;$e<X.length;$e++){const ae=De?De+1:ie,de=X[$e],Q=D.slice(ae,de);G.tokens&&($e===0&&ie!==0?(Z[$e].isPrefix=!0,Z[$e].value=tt):Z[$e].value=Q,M(Z[$e]),re.maxDepth+=Z[$e].depth),($e!==0||Q!=="")&&he.push(Q),De=de}if(De&&De+1<D.length){const $e=D.slice(De+1);he.push($e),G.tokens&&(Z[Z.length-1].value=$e,M(Z[Z.length-1]),re.maxDepth+=Z[Z.length-1].depth)}re.slashes=X,re.parts=he}return re};o.exports=z},96:(o,i,c)=>{const{REGEX_BACKSLASH:l,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:d,REGEX_SPECIAL_CHARS_GLOBAL:h}=c(154);i.isObject=m=>m!==null&&typeof m=="object"&&!Array.isArray(m),i.hasRegexChars=m=>d.test(m),i.isRegexChar=m=>m.length===1&&i.hasRegexChars(m),i.escapeRegex=m=>m.replace(h,"\\$1"),i.toPosixSlashes=m=>m.replace(l,"/"),i.removeBackslashes=m=>m.replace(u,_=>_==="\\"?"":_),i.escapeLast=(m,_,g)=>{const v=m.lastIndexOf(_,g);return v===-1?m:m[v-1]==="\\"?i.escapeLast(m,_,v-1):`${m.slice(0,v)}\\${m.slice(v)}`},i.removePrefix=(m,_={})=>{let g=m;return g.startsWith("./")&&(g=g.slice(2),_.prefix="./"),g},i.wrapOutput=(m,_={},g={})=>{const v=g.contains?"":"^",x=g.contains?"":"$";let S=`${v}(?:${m})${x}`;return _.negated===!0&&(S=`(?:^(?!${S}).*$)`),S},i.basename=(m,{windows:_}={})=>{const g=m.split(_?/[\\/]/:"/"),v=g[g.length-1];return v===""?g[g.length-2]:v}}},t={};function r(o){var i=t[o];if(i!==void 0)return i.exports;var c=t[o]={exports:{}},l=!0;try{e[o](c,c.exports,r),l=!1}finally{l&&delete t[o]}return c.exports}typeof r<"u"&&(r.ab=__dirname+"/");var n=r(170);ua.exports=n})()),ua.exports}var ed;function Kj(){return ed||(ed=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,{hasLocalMatch:function(){return o},matchLocalPattern:function(){return n}});const r=Jm();function n(i,c){if(i.search!==void 0&&i.search!==c.search)return!1;var l;return!!(0,r.makeRe)((l=i.pathname)!=null?l:"**",{dot:!0}).test(c.pathname)}function o(i,c){if(!i)return!0;const l=new URL(c,"http://n");return i.some(u=>n(u,l))}}(la)),la}var da={},td;function Qj(){return td||(td=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,{hasRemoteMatch:function(){return o},matchRemotePattern:function(){return n}});const r=Jm();function n(i,c){if(i.protocol!==void 0){const u=c.protocol.slice(0,-1);if(i.protocol!==u)return!1}if(i.port!==void 0&&i.port!==c.port)return!1;if(i.hostname===void 0)throw new Error(`Pattern should define hostname but found
17
+ `+JSON.stringify(i));if(!(0,r.makeRe)(i.hostname).test(c.hostname)||i.search!==void 0&&i.search!==c.search)return!1;var l;return!!(0,r.makeRe)((l=i.pathname)!=null?l:"**",{dot:!0}).test(c.pathname)}function o(i,c,l){return i.some(u=>l.hostname===u)||c.some(u=>n(u,l))}}(da)),da}var rd;function Zm(){return rd||(rd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=75;function r(o){let{config:i,src:c,width:l,quality:u}=o;var d;if(process.env.NODE_ENV!=="production"){const m=[];if(c||m.push("src"),l||m.push("width"),m.length>0)throw new Error("Next Image Optimization requires "+m.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:c,width:l,quality:u}));if(c.startsWith("//"))throw new Error('Failed to parse src "'+c+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(c.startsWith("/")&&i.localPatterns&&process.env.NODE_ENV!=="test"&&process.env.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:_}=Kj();if(!_(i.localPatterns,c))throw new Error("Invalid src prop ("+c+") 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(!c.startsWith("/")&&(i.domains||i.remotePatterns)){let _;try{_=new URL(c)}catch(g){throw console.error(g),new Error('Failed to parse src "'+c+'" 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:g}=Qj();if(!g(i.domains,i.remotePatterns,_))throw new Error("Invalid src prop ("+c+') on `next/image`, hostname "'+_.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(u&&i.qualities&&!i.qualities.includes(u))throw new Error("Invalid quality prop ("+u+") 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 h=u||((d=i.qualities)==null?void 0:d.reduce((m,_)=>Math.abs(_-t)<Math.abs(m-t)?_:m))||t;return i.path+"?url="+encodeURIComponent(c)+"&w="+l+"&q="+h+(process.env.NEXT_DEPLOYMENT_ID?"&dpl="+process.env.NEXT_DEPLOYMENT_ID:"")}r.__next_img_default=!0;const n=r}(ca)),ca}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return P}});const r=Ct,n=_n,o=s,i=n._(j),c=r._(dc),l=r._(Vj()),u=$c,d=ti,h=Gj(),m=ei,_=Wp(),g=r._(Zm()),v=process.env.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function x(C,N,T,O,M,z,D){const B=C==null?void 0:C.src;if(!C||C["data-loaded-src"]===B)return;C["data-loaded-src"]=B,("decode"in C?C.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!C.parentElement||!C.isConnected)){if(N!=="empty"&&M(!0),T!=null&&T.current){const J=new Event("load");Object.defineProperty(J,"target",{writable:!1,value:C});let Y=!1,X=!1;T.current({...J,nativeEvent:J,currentTarget:C,target:C,isDefaultPrevented:()=>Y,isPropagationStopped:()=>X,persist:()=>{},preventDefault:()=>{Y=!0,J.preventDefault()},stopPropagation:()=>{X=!0,J.stopPropagation()}})}if(O!=null&&O.current&&O.current(C),process.env.NODE_ENV!=="production"){const J=new URL(B,"http://n").searchParams.get("url")||B;if(C.getAttribute("data-nimg")==="fill"){if(!z&&(!D||D==="100vw")&&C.getBoundingClientRect().width/window.innerWidth<.6&&(D==="100vw"?(0,m.warnOnce)('Image with src "'+J+'" 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,m.warnOnce)('Image with src "'+J+'" 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')),C.parentElement){const{position:Z}=window.getComputedStyle(C.parentElement),he=["absolute","fixed","relative"];he.includes(Z)||(0,m.warnOnce)('Image with src "'+J+'" has "fill" and parent element with invalid "position". Provided "'+Z+'" should be one of '+he.map(String).join(",")+".")}C.height===0&&(0,m.warnOnce)('Image with src "'+J+'" 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 Y=C.height.toString()!==C.getAttribute("height"),X=C.width.toString()!==C.getAttribute("width");(Y&&!X||!Y&&X)&&(0,m.warnOnce)('Image with src "'+J+`" 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 S(C){return i.use?{fetchPriority:C}:{fetchpriority:C}}const w=(0,i.forwardRef)((C,N)=>{let{src:T,srcSet:O,sizes:M,height:z,width:D,decoding:B,className:G,style:J,fetchPriority:Y,placeholder:X,loading:Z,unoptimized:he,fill:fe,onLoadRef:ee,onLoadingCompleteRef:ie,setBlurComplete:_e,setShowAltText:we,sizesInput:ge,onLoad:Ee,onError:V,...oe}=C;return(0,o.jsx)("img",{...oe,...S(Y),loading:Z,width:D,height:z,decoding:B,"data-nimg":fe?"fill":"1",className:G,style:J,sizes:M,srcSet:O,src:T,ref:(0,i.useCallback)(F=>{N&&(typeof N=="function"?N(F):typeof N=="object"&&(N.current=F)),F&&(V&&(F.src=F.src),process.env.NODE_ENV!=="production"&&(T||console.error('Image is missing required "src" property:',F),F.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.')),F.complete&&x(F,X,ee,ie,_e,he,ge))},[T,X,ee,ie,_e,V,he,ge,N]),onLoad:F=>{const ce=F.currentTarget;x(ce,X,ee,ie,_e,he,ge)},onError:F=>{we(!0),X!=="empty"&&_e(!0),V&&V(F)}})});function I(C){let{isAppRouter:N,imgAttributes:T}=C;const O={as:"image",imageSrcSet:T.srcSet,imageSizes:T.sizes,crossOrigin:T.crossOrigin,referrerPolicy:T.referrerPolicy,...S(T.fetchPriority)};return N&&c.default.preload?(c.default.preload(T.src,O),null):(0,o.jsx)(l.default,{children:(0,o.jsx)("link",{rel:"preload",href:T.srcSet?void 0:T.src,...O},"__nimg-"+T.src+T.srcSet+T.sizes)})}const P=(0,i.forwardRef)((C,N)=>{const O=!(0,i.useContext)(_.RouterContext),M=(0,i.useContext)(h.ImageConfigContext),z=(0,i.useMemo)(()=>{var ie;const _e=v||M||d.imageConfigDefault,we=[..._e.deviceSizes,..._e.imageSizes].sort((V,oe)=>V-oe),ge=_e.deviceSizes.sort((V,oe)=>V-oe),Ee=(ie=_e.qualities)==null?void 0:ie.sort((V,oe)=>V-oe);return{..._e,allSizes:we,deviceSizes:ge,qualities:Ee}},[M]),{onLoad:D,onLoadingComplete:B}=C,G=(0,i.useRef)(D);(0,i.useEffect)(()=>{G.current=D},[D]);const J=(0,i.useRef)(B);(0,i.useEffect)(()=>{J.current=B},[B]);const[Y,X]=(0,i.useState)(!1),[Z,he]=(0,i.useState)(!1),{props:fe,meta:ee}=(0,u.getImgProps)(C,{defaultLoader:g.default,imgConf:z,blurComplete:Y,showAltText:Z});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w,{...fe,unoptimized:ee.unoptimized,placeholder:ee.placeholder,fill:ee.fill,onLoadRef:G,onLoadingCompleteRef:J,setBlurComplete:X,setShowAltText:he,sizesInput:C.sizes,ref:N}),ee.priority?(0,o.jsx)(I,{isAppRouter:O,imgAttributes:fe}):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)})(Va,Va.exports);var Yj=Va.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}t(e,{default:function(){return l},getImageProps:function(){return c}});const r=Ct,n=$c,o=Yj,i=r._(Zm());function c(u){const{props:d}=(0,n.getImgProps)(u,{defaultLoader:i.default,imgConf:process.env.__NEXT_IMAGE_OPTS});for(const[h,m]of Object.entries(d))m===void 0&&delete d[h];return{props:d}}const l=o.Image})(Qm);var Xj=Qm;const Ns=U.getDefaultExportFromCjs(Xj),Jj=({item:e,CONSTANTS:t})=>{const r=e.icon?t.PAYMENT_FLAGS.includes(e.icon)?"payment":"social":null,n=r==="payment"?t.PAYMENT_FLAGS_DICTIONARY[e.icon]:e.icon;return e.link?s.jsxs(Ot,{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Be["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(Ns,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(p.Icon,{size:"small",name:n})]}):s.jsxs("div",{className:Be["support-item"],children:[e.image&&s.jsx("img",{src:e.image,alt:"",loading:"lazy"}),r==="payment"?s.jsx(Ns,{alt:n,src:`/assets/${n}.svg`,width:20,height:20}):s.jsx(p.Icon,{size:"small",name:n})]})},Zj=({content:e,CONSTANTS:t})=>s.jsx("div",{className:Be["support-container"],children:e==null?void 0:e.map((r,n)=>s.jsxs("div",{"data-device":r.device,className:Be["support-section"],children:[s.jsxs("div",{className:Be["support-text"],children:[r.title&&s.jsx("h3",{children:r.title}),r.description&&s.jsx("p",{children:r.description})]}),Array.isArray(r.items)&&r.items.length&&s.jsx("div",{className:Be["support-items"],"data-gap":r.gap,children:r.items.map((o,i)=>s.jsx(Jj,{item:o,CONSTANTS:t},`footer-support-item-${i}`))})]},`footer-support-${n}`))}),eS=({name:e,nameIcon:t,maxWidth:r,rowAlignContent:n,columnAlignContent:o,columnAlignItems:i,textAlignContent:c,textAlignItems:l,children:u})=>s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:n,alignItems:n},columnWrapper:{alignContent:o,alignItems:i}},children:s.jsxs(p.TextStructure.DivWrapper,{alignContent:c,alignItems:l,className:Be.footer__column,children:[s.jsxs("div",{className:t?Be.footer__columnTitleIcon:Be.footer__columnTitle,children:[s.jsx(p.Icon,{name:`${t}`,size:"small"}),e&&s.jsx("div",{children:e})]}),s.jsx("div",{className:Be.footer__columnContent,style:{maxWidth:`${r}px`},children:u})]})}),tS=({name:e,nameIcon:t,maxWidth:r,children:n,ICONS:o,...i})=>s.jsxs(p.Accordion.Wrapper,{className:Be.accordionWrapper,title:"accordion-wrapper",...i,children:[s.jsx(p.Accordion.Header,{id:(i==null?void 0:i.id)??"",className:Be.accordionHeader,closeIndicator:s.jsx(p.Icon,{name:o.arrow_up,size:"medium"}),openIndicator:s.jsx(p.Icon,{name:o.arrow_down,size:"medium"}),title:"accordion-header",children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:t?Be.accordionTextWrapper:"",children:[s.jsx(p.Icon,{name:`${t}`,size:"medium"}),s.jsx("h2",{className:"typography-style-body-md",children:e})]})})}),s.jsx(p.Accordion.Body,{title:"accordion-body",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Be.footer__columnContent,style:{maxWidth:`${r}px`},children:n})})})]}),fa=e=>{const{isMobile:t}=xe();return t?s.jsx(tS,{...e}):s.jsx(eS,{...e})},xo=({type:e,children:t,className:r,collumnName:n,collumnNameIcon:o,icons:i,iconLink:c,iconSize:l,link:u,paymentDisclaimer:d,paymentTitle:h,rowAlignContent:m,columnAlignContent:_,columnAlignItems:g,textAlignContent:v,textAlignItems:x,...S})=>{let w;const{handleSelectContent:I}=Ce(),{nextimage:P}=Ae();switch(e){case"menu":w=s.jsx(Ot,{className:Be.footer__itemLink,href:u??"#",prefetch:!1,children:s.jsx("span",{onClick:()=>{I({content:`footer:${n}:${t}`})},children:t})});break;case"payment":w=s.jsxs("div",{className:p.helpers.classNameConcat(Be.payment,Be.footer__itemSmallText),...S,children:[d,s.jsxs("div",{className:p.helpers.classNameConcat(Be.footer__iconContainer,Be.footer__iconListSubHeader),children:[h,s.jsx("div",{className:Be.footer__iconList,children:i==null?void 0:i.map((C,N)=>s.jsx(P,{alt:C,src:`/assets/${C}.svg`,width:l??20,height:l??20},N))})]})]});break;case"social-media":w=s.jsx("div",{className:Be.footer__iconContainer,...S,children:s.jsx("div",{className:Be.footer__iconList,children:c==null?void 0:c.map((C,N)=>s.jsx(Ot,{prefetch:!1,href:C.link??"#",target:"_blank",children:s.jsx(p.Icon,{size:"medium",name:C.icon,onClick:()=>I({content:`footer:redes-sociais:${C.icon}`})})},N))})});break;default:w=s.jsx("div",{className:r,...S,children:t})}return s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:m,alignItems:m},columnWrapper:{alignContent:_,alignItems:g}},...S,children:s.jsx(p.TextStructure.DivWrapper,{alignContent:v,alignItems:x,className:p.helpers.classNameConcat(Be.footer__item,r),children:w})})},rS=({className:e,text:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Be.footer__legalInformation,e),children:s.jsx("span",{children:t})}),e_=()=>{const{nextimage:e}=Ae();return s.jsx("div",{className:Be["footer--stamps"],children:s.jsx(e,{alt:"Empresa B",className:Be["footer--stamps--company"],src:"/images/Footer/new_certfB.png",width:56,height:64})})};e_.displayName="Footer.Stamps";const t_=({children:e,legalTextSlot:t,adornment:r,className:n,...o})=>{const{isMobile:i}=xe(),c=j.Children.toArray(e).filter(Boolean),l=c.length;return s.jsxs("div",{className:Be.footer__main,children:[(r==null?void 0:r.top)&&s.jsx("div",{className:Be.footer__top,children:r==null?void 0:r.top}),l>0&&s.jsx("div",{...o,className:p.helpers.classNameConcat(Be.footer__wrapper,n),children:c.map((u,d)=>s.jsx("div",{style:{flexGrow:1,maxWidth:`calc(100% / ${i?1:"fit-content"})`},children:u},d))}),(r==null?void 0:r.bottom)&&s.jsx("div",{className:Be.footer__bottom,children:r.bottom}),t&&s.jsx("div",{className:Be.footer__legalText,children:t})]})};t_.displayName="Footer.Wrapper";const r_=({data:{links:{links:e}},payments:t,socialInfo:r,socialMedias:n,adornment:o,LEGAL_INFORMATION_TEXT:i,ICONS:c,className:l,hasFooterStamps:u})=>{var d;return s.jsxs(t_,{className:l,adornment:o,legalTextSlot:s.jsx(rS,{text:i}),children:[Array.isArray(e.column)&&e.column.map((h,m)=>s.jsx(fa,{id:`${m}column-menu`,name:h.name,nameIcon:h.nameIcon,ICONS:c,children:h.items.map((_,g)=>s.jsx(xo,{type:"menu",link:_.link,collumnName:h.name,collumnNameIcon:h.nameIcon,children:_.text},g))},m)),t&&((d=t.acceptedFlags)==null?void 0:d.length)>0&&s.jsx(fa,{id:"payment-column",name:t==null?void 0:t.title,nameIcon:t==null?void 0:t.titleIcon,maxWidth:150,ICONS:c,children:s.jsx(xo,{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})}),s.jsxs(fa,{id:"social-media-column",name:r==null?void 0:r.title,ICONS:c,children:[r!=null&&r.subTitle?s.jsx(xo,{children:r==null?void 0:r.subTitle}):null,s.jsx(xo,{type:"social-media",iconSize:24,iconLink:n}),u&&s.jsx(e_,{})]})]})};r_.displayName="Footer";const nS=Object.freeze(Object.defineProperty({__proto__:null,Footer:r_,FooterSupport:Zj},Symbol.toStringTag,{value:"Module"})),sS="_header_9xxjk_57",oS="_actions_9xxjk_131",iS="_breadcrumb_9xxjk_142",aS="_credits_9xxjk_157",cS="_pdplinks_9xxjk_185",lS="_similars_9xxjk_212",uS="_sizes_9xxjk_251",dS="_measurementTable_9xxjk_267",fS="_measurementHead_9xxjk_280",pS="_measurementRows_9xxjk_285",hS="_measurementRowsTitle_9xxjk_302",mS="_measurementRowsText_9xxjk_314",_S="_measurementImage_9xxjk_325",gS="_measurementImageContainer_9xxjk_328",yS="_measurementContent_9xxjk_337",vS="_measurementTitle_9xxjk_341",xS="_measurementClose_9xxjk_352",bS="_productref_9xxjk_417",jS="_slideOut_9xxjk_1",SS="_slideIn_9xxjk_1",CS="_content_9xxjk_397",wS="_pdp_9xxjk_185",ES="_divider_9xxjk_575",me={"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:sS,"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:oS,"add-to-cart":"_add-to-cart_9xxjk_138",breadcrumb:iS,"breadcrumb--active":"_breadcrumb--active_9xxjk_147",credits:aS,"gallery-carousel-modifier":"_gallery-carousel-modifier_9xxjk_162",pdplinks:cS,"links-wrapper":"_links-wrapper_9xxjk_195",similars:lS,"similars-info":"_similars-info_9xxjk_224","toggle-style-modifier":"_toggle-style-modifier_9xxjk_233","accessibility-info":"_accessibility-info_9xxjk_237",sizes:uS,"price-wrapper":"_price-wrapper_9xxjk_263",measurementTable:dS,measurementHead:fS,measurementRows:pS,measurementRowsTitle:hS,measurementRowsText:mS,measurementImage:_S,measurementImageContainer:gS,measurementContent:yS,measurementTitle:vS,measurementClose:xS,"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:bS,"tabs-panel":"_tabs-panel_9xxjk_428","tabs-panel-exit":"_tabs-panel-exit_9xxjk_434",slideOut:jS,"tabs-panel-enter":"_tabs-panel-enter_9xxjk_438",slideIn:SS,content:CS,pdp:wS,"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:ES,"breadcrumbs-desktop":"_breadcrumbs-desktop_9xxjk_580","breadcrumbs-mobile":"_breadcrumbs-mobile_9xxjk_589"},PS=({children:e,link:t,TOGGLE_STYLE_MODIFIER:r})=>{const{isMobile:n}=xe(),{router:o}=Ae(),i=()=>{t&&o.push(t)},c=j.useRef(null);return s.jsx(p.ToggleStyle.Wrapper,{size:n?"medium":"small",style:{...r,border:`${c.current===t?"2":"1"}`,overflow:"hidden",padding:"0"},onClick:i,active:c.current===t,children:e})},n_=({productId:e,similars:t,TOGGLE_STYLE_MODIFIER:r})=>{const{thumbImage:n}=Et(),o=[{productId:e,slug:"",textureImage:(n==null?void 0:n.imageUrl)??"",textureAlt:(n==null?void 0:n.imageText)??""},...t];return s.jsx("div",{children:o.map((i,c)=>i.textureImage?s.jsxs(PS,{link:i.slug?i.slug:null,TOGGLE_STYLE_MODIFIER:r,children:[s.jsx(p.ToggleStyle.DisabledAdornment,{}),s.jsx(p.ToggleStyle.Texture,{children:s.jsx(at.Image,{alt:i.textureAlt,src:i.textureImage,height:34,width:34,style:{borderRadius:0,height:"100%"}})})]},`similars-item-${c}`):null)})},IS=({children:e,productId:t,PDP_INFO:r,TEXTURE_IMAGE:n,TOGGLE_STYLE_MODIFIER:o})=>{const{items:i,loadSimilars:c}=Lc(t,{filterTexture:n});return j.useEffect(()=>{c()},[c]),s.jsxs("div",{className:me.similars,children:[s.jsxs("div",{className:me["similars-info"],children:[s.jsx("span",{className:me["sections-title"],children:r.product.color_title}),e]}),s.jsx(n_,{productId:t,similars:i,TOGGLE_STYLE_MODIFIER:o})]})},NS=()=>{const{colorName:e}=Et();return s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:e.length===0?"":me["accessibility-info"],children:s.jsx("p",{children:e})})})},ri=({className:e,titleId:t})=>{var o,i,c;const{productName:r,tag:n}=Et();return s.jsxs("div",{className:p.helpers.classNameConcat(me.header,e),children:[n!=null&&n.commercial?s.jsx(p.Tag,{size:"small",title:(o=n.commercial)==null?void 0:o.value,variant:"quaternary",adornment:{start:(i=n.commercial)!=null&&i.icon?s.jsx(p.Icon,{name:n.commercial.icon}):null},children:(c=n.commercial)==null?void 0:c.value}):null,s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h1",{id:t,children:r})})})]})};ri.displayName="PDP.PDPHeader";const Wc=({layout:e="horizontal"})=>{const{price:t,listPrice:r,installments:n}=Et(),{count:o,value:i}=n,c=U.formatPriceToCurrency(r??0,!0),l=U.formatPriceToCurrency(t??0,!0),u=U.formatPriceToCurrency(i??0);return s.jsx(p.ProductInfo.Root,{size:"small",layout:e,children:s.jsxs(p.ProductInfo.Wrapper,{layout:e,size:"small",className:me["price-wrapper"],children:[s.jsx(p.ProductInfo.ValuesWrapper,{children:t!==r?s.jsxs(s.Fragment,{children:[s.jsx(p.ProductInfo.Price,{label:"originalPrice",value:c.toString(),size:"small"}),s.jsx(p.ProductInfo.Price,{label:"discountPrice",value:l.toString(),size:"small"})]}):s.jsx(p.ProductInfo.Price,{label:"defaultPrice",value:l.toString(),size:"small"})}),o&&o>1&&i?s.jsx(p.ProductInfo.Price,{label:"installment",value:`ou ${o}x ${u}`,size:"small"}):null]})})},Ga=({onAddCallBack:e,onDisabledClickCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})=>{const o=Fs(),{productId:i,productData:c,price:l,listPrice:u,thumbImage:d,isKit:h}=Et(),{isMobile:m}=xe(),{addToCart:_}=Xe(),{sendDataLayerEvent:g}=Ce(),v=!h&&(!o.sku||!o.available),x=()=>{if(v&&typeof t=="function"){t();return}typeof e=="function"&&e({id:o.sku,quantity:o.quantity,seller:o.sellerId,sku:i}),_({id:o.sku,quantity:o.quantity,seller:o.sellerId},{id:i,texture:d==null?void 0:d.imageUrl}),g({functionKey:"skuEvents",data:{event:"add_to_cart",commonData:{products:[{...c,price:l,listPrice:u}]},supportData:{selectedSkus:[o]},customData:{quantity:o.quantity}}})};return s.jsx(p.Button,{className:me["add-to-cart"],size:m?(r==null?void 0:r.mobile)??"large":(r==null?void 0:r.desktop)??"x-large",onClick:x,children:o.sku&&o.available?`${n.add_to_cart}`:`${n.select_size}`})},RS=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t})=>{const{isMobile:r}=xe(),n=Fs(),{sizesContainerRef:o}=Wd(),{structureRef:i}=Ze();return n.sku&&n.available?s.jsx(Ga,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t}):s.jsx(p.Button,{className:me["add-to-cart"],size:r?(e==null?void 0:e.mobile)??"large":(e==null?void 0:e.desktop)??"x-large",onClick:()=>{o.current&&i.current&&window.document.body.scrollTo({top:o.current.offsetTop-i.current.offsetHeight,behavior:"smooth"})},children:n.sku&&n.available?t.add_to_cart:t.select_size})},bo=({value:e,label:t,suppressHydrationWarning:r=!1},n)=>{const o={value:e,...r&&{suppressHydrationWarning:!0}},i=n==="compact"?o:{...o,label:t};return s.jsx(p.Timer.Digit,{...i})},Uo=({dateEnd:e,dateInit:t,type:r="default",TIME_ZONE:n,...o})=>{const[i,c]=j.useState(_p(new Sa.TZDate(Date.now(),n),new Sa.TZDate(e,n))),[l,u]=j.useState(!1);if(j.useEffect(()=>{u(!0);const g=setInterval(()=>{c(v=>v<=0?(clearInterval(g),0):v-1e3)},1e3);return()=>clearInterval(g)},[]),!l||i<=0)return s.jsx(s.Fragment,{});const d=vs(i,"days"),h=vs(i,"hours"),m=vs(i,"minutes"),_=vs(i);return s.jsxs(p.Timer.Root,{...o,children:[d?s.jsxs(s.Fragment,{children:[bo({value:d,label:"dias"},r),s.jsx(p.Timer.Separator,{})]}):null,bo({value:h,label:"horas"},r),s.jsx(p.Timer.Separator,{}),bo({value:m,label:"min"},r),s.jsx(p.Timer.Separator,{}),bo({value:_,label:"segs",suppressHydrationWarning:!0},r)]})},Vc=({TIME_ZONE:e})=>{const{tag:t}=Et(),r=t==null?void 0:t.flagGoldenPdp,n=j.useMemo(()=>{var o;if((o=r==null?void 0:r.tagImage)!=null&&o.includes("player.vimeo")){const i=r.tagImage.split("?")[1],c=i==null?void 0:i.split("&"),l=c==null?void 0:c.filter(d=>d.includes("loc")||d.includes("signature")||d.includes("user_id")),u=l==null?void 0:l.join("&");return`${r.tagImage.split("?")[0]}?${u}`}return r==null?void 0:r.tagImage},[r==null?void 0:r.tagImage]);return r!=null&&r.enableTag?s.jsxs("div",{className:me["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"&&s.jsx("div",{className:me["golden-tag-video"],children:s.jsx(at.Video,{src:n,autoPlay:!0,muted:!0,loop:!0,playsInline:!0})}),s.jsxs("div",{className:me["golden-tag-content"],children:[s.jsx("span",{className:me["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)&&s.jsx(Uo,{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};Vc.displayName="PDP.GoldenTag";const TS=({addToCartBtnSize:e,BUY_BUTTON_LABELS:t,TIME_ZONE:r,Z_INDEX_WAR:n})=>{const{isMobile:o}=xe();return o?s.jsxs(p.Card,{className:me["bottom-navigation"],shadow:!0,style:{zIndex:n.pdp_bottom_navigation},children:[s.jsxs("div",{className:me["bottom-navigation__header"],children:[s.jsx(Vc,{TIME_ZONE:r}),s.jsxs("div",{className:me["bottom-navigation__header-content"],children:[s.jsx(ri,{}),s.jsx(Wc,{layout:"name-vertical"})]})]}),s.jsx(RS,{addToCartBtnSize:e,BUY_BUTTON_LABELS:t})]}):null},OS=({children:e,setShowBottomNavigation:t})=>{const r=j.useRef(null),n=pc(r),o=j.useRef(n);return j.useEffect(()=>{var c;const{top:i}=((c=r.current)==null?void 0:c.getBoundingClientRect())??{top:0};o.current!==n&&i>0&&(t(!n),o.current=n)},[n]),s.jsx("div",{ref:r,style:{width:"100%"},children:e})},AS=({ICONS:e})=>{const{isMobile:t}=xe(),{price:r,listPrice:n,productData:o,productId:i}=Et(),{sendDataLayerEvent:c}=Ce(),l=ns(),{toggleProduct:u}=jn();return s.jsx(p.Button,{adornment:{start:s.jsx(p.Icon,{name:e[l.includes(i)?"favorite_true":"favorite_false"],size:"medium"})},className:me["add-to-wishlist"],size:t?"medium":"x-large",variant:"tertiary",onClick:()=>{u(i),c({functionKey:"productEvents",data:{event:l.includes(i)?"remove_from_wishlist":"add_to_wishlist",outsideEcommerceData:{region:"PDP"},commonData:{...o,price:r,listPrice:n}}})}})},s_=({showWishlist:e=!0,callBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n,ICONS:o,TIME_ZONE:i,Z_INDEX_WAR:c})=>{const{isMobile:l}=xe(),[u,d]=j.useState(!0);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:me.actions,children:[l?s.jsx(OS,{setShowBottomNavigation:d,children:s.jsx(Ga,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n})}):s.jsx(Ga,{onAddCallBack:t,addToCartBtnSize:r,BUY_BUTTON_LABELS:n}),e&&s.jsx(AS,{ICONS:o})]}),l&&u&&s.jsx(TS,{addToCartBtnSize:r,BUY_BUTTON_LABELS:n,Z_INDEX_WAR:c,TIME_ZONE:i})]})},o_=({className:e,device:t,ICONS:r})=>{const{breadcrumbList:n,productName:o}=Et(),i=c=>c.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return s.jsx(p.BreadCrumb.DivWrapper,{className:p.helpers.classNameConcat(me.breadcrumb,[t==="mobile"?me["breadcrumbs-mobile"]:me["breadcrumbs-desktop"],e]),children:s.jsxs(p.BreadCrumb.List,{children:[Array.isArray(n)&&n.map((c,l)=>{const u=i(n.slice(0,l+1).map(d=>d.replace(/\s/g,"-").toLowerCase()).join("/"));return s.jsx(p.BreadCrumb.Item,{adornment:{end:s.jsx(p.Icon,{name:r.arrow_right})},role:"listitem",children:s.jsx(Ot,{href:`/${u}`,children:c})},`pdp-breadcrumb-${u}-${l}`)}),s.jsx(p.BreadCrumb.Item,{role:"listitem",className:p.helpers.classNameConcat(me["breadcrumb--active"],e),children:o},"pdp-breadcrumb-productName")]})})};o_.displayName="PDP.BreadCrumb";const i_=({className:e})=>{var n;const{tag:t}=Et(),r=t==null?void 0:t.flagPdp;return r&&((n=r==null?void 0:r.value)!=null&&n.length)?s.jsx(p.Tag,{className:p.helpers.classNameConcat(me.credits,e),variant:"tertiary",title:r==null?void 0:r.value,size:"small",adornment:{start:r!=null&&r.enableIcon&&(r!=null&&r.icon)?s.jsx(p.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}):s.jsx(s.Fragment,{})};i_.displayName="PDPCredits";const kS=()=>{const{descriptionContent:e,productReference:t}=Et(),[r,n]=j.useState("description");return s.jsxs(p.Tabs.Root,{className:me["tabs-root-modifier"],children:[s.jsx(p.Tabs.TabList,{className:me["tabs-list-modifier"],children:e==null?void 0:e.map(({label:o,value:i})=>s.jsx(p.Tabs.Item,{label:o,value:i,activeTab:r,onTabChange:n,size:"large",className:`${me["tabs-item-modifier"]} ${r===i?me["tabs-item-active"]:""}`},i))}),s.jsxs("div",{className:me["content-wrapper"],children:[r==="description"?s.jsx("div",{children:s.jsxs("span",{className:me.productref,children:["Ref:",t]})}):"",e==null?void 0:e.map(({value:o,content:i})=>r===o?s.jsx(p.Tabs.Panel,{className:`${me["tabs-panel"]} ${r===o?me["tabs-panel-enter"]:me["tabs-panel-exit"]}`,children:s.jsx("div",{className:me.content,dangerouslySetInnerHTML:{__html:i}})},o):null)]})]})},MS=({CURRENCY:e,DELIVERY_INFO_BOXES_ALLOWED:t,FREIGHT_CALCULATION:r,Z_INDEX_WAR:n})=>{const o=Fs(),{isMobile:i}=xe();return s.jsxs(s.Fragment,{children:[i?s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small"}):null,s.jsx(Cm,{skuId:o.available?o.sku:"",size:i?r.inputSize.mobile:r.inputSize.desktop,quantity:o.quantity,sellerId:o.sellerId,seller:o.sellerName,local:"PDP",CONSTANTS_PROPS:{freightConfig:r,deliveryInfoBoxesAllowed:t,toolTipZIndex:n.modal,currency:e}}),i?s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small"}):null]})},nd=({image:e,index:t,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:n})=>{const o=U.resizingImg(e.imageUrl,n.pdp),{nextimage:i}=Ae();return s.jsx(i,{src:o,alt:e.imageLabel,objectFit:"contain",...n.pdp,...t<=1&&{priority:!0,loading:"eager"},onClick:()=>{r(t)}},t)},LS=({video:e,productName:t,poster:r})=>{const{sendDataLayerEvent:n}=Ce(),o=j.useRef(!1);return s.jsx(at.Video,{src:e,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{zIndex:-1,aspectRatio:"2/3"},onPlaying:()=>{o.current||(o.current=!0,n({functionKey:"readyEvents",data:{event:"video_start",readyData:{product:t}}}))},poster:r})},a_=({images:e,video:t,handleZoom:r,productName:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{var d,h;const{initialize:i,pagination:c,controller:l,itemsStyles:u}=p.Carousel.useCarousel({gap:0,itemsPerPage:1,loop:!1,direction:"row"});return s.jsxs(p.Carousel.Root,{innerRef:m=>{i(m)},className:me["gallery-carousel-modifier"],children:[s.jsx(p.Carousel.Controller,{position:"absolute",top:"24px",bottom:"unset",left:"16px",children:s.jsx(p.Carousel.Bullets,{page:c.currentPage,total:e.length,onBulletClick:m=>l==null?void 0:l.navigateTo(m)})}),s.jsxs(p.Carousel.Body,{children:[s.jsx(p.Carousel.Item,{style:u,children:s.jsx(nd,{image:e[0],index:0,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},"PDP_gallery_0"),t&&s.jsx(p.Carousel.Item,{style:u,children:s.jsx(LS,{video:t,productName:n,...((d=e[1])==null?void 0:d.imageUrl)&&{poster:(h=e[1])==null?void 0:h.imageUrl}})},"PDP_gallery_video"),e.map((m,_)=>_===0?null:s.jsx(p.Carousel.Item,{style:u,children:s.jsx(nd,{image:m,index:_,handleZoom:r,PRODUCT_IMAGE_DIMENSIONS:o})},`PDP_gallery_${_}`))]})]})};a_.displayName="PDP.Carousel";const DS="_thumbs_1954e_65",FS="_selected_1954e_92",zS="_carousel_1954e_164",qS="_bullets_1954e_201",it={"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:DS,selected:FS,"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:zS,"carousel-controller":"_carousel-controller_1954e_169","arrow-left":"_arrow-left_1954e_179","arrow-right":"_arrow-right_1954e_180",bullets:qS,"zoom-popup":"_zoom-popup_1954e_212","image-zoom--mobile":"_image-zoom--mobile_1954e_252","image-zoom--image--img":"_image-zoom--image--img_1954e_282"},sd=({onClose:e,ICONS:t})=>s.jsx("div",{className:`${it["button-close-container"]}`,children:s.jsx(p.Button,{iconNameStart:t.close,iconSize:"medium",className:`${it["button-close"]}`,variant:"tertiary",state:"default",size:"medium",onClick:e,style:{textDecoration:"none"}})}),BS=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:it["image-zoom-wrapper-desktop"],style:{zIndex:t.pdp_image_zoom},children:e}),c_=({images:e,setCurrent:t,setFirstImgLoaded:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})=>{const{nextimage:i}=Ae();let c=null;const l=j.useRef(null),{initialize:u,controller:d,pagination:h,itemsStyles:m}=p.Carousel.useCarousel({itemsPerPage:1,gap:10,loop:!1,direction:"row"}),_=v=>{d==null||d.navigateTo(v)},g=()=>{r(!0)};return j.useEffect(()=>{t(h.currentPage)},[h.currentPage,t]),s.jsxs(p.Carousel.Root,{innerRef:v=>{v&&!c&&(c=v,u(c))},className:it.carousel,children:[s.jsxs(p.Carousel.Controller,{className:it["carousel-controller"],children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>d==null?void 0:d.prevPage(),className:it["arrow-left"],adornment:{start:s.jsx(p.Icon,{name:n.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>d==null?void 0:d.nextPage(),className:it["arrow-right"],adornment:{start:s.jsx(p.Icon,{name:n.arrow_right})}})]}),s.jsx(p.Carousel.Body,{children:Array.isArray(e)&&e.map((v,x)=>s.jsx(p.Carousel.Item,{style:m,children:s.jsx(i,{...o.image_zoom.mobile,...x===0&&{priority:!0,loading:"eager"},ref:l,className:it.imageMobile,src:v.imageUrl,alt:v.imageText,quality:100,...x===0&&{onLoad:g}})},x))}),s.jsx(p.Carousel.Bullets,{className:it.bullets,page:h.currentPage,total:h.totalPages,onBulletClick:_})]})};c_.displayName="ImageZoom.Mobile.Carousel";const l_=({imgRef:e,image:t,PRODUCT_IMAGE_DIMENSIONS:r})=>{ef();const{nextimage:n}=Ae();return s.jsx("div",{className:it["image-zoom--image"],ref:e,children:s.jsx(n,{...r.image_zoom.mobile,alt:t.imageText,className:it["image-zoom--image--img"],quality:100,src:t.imageUrl})})};l_.displayName="ImageZoom.ImageZoom";const u_=({loaded:e=!1})=>s.jsx("div",{className:it["zoom-popup"],"data-loaded":e,children:s.jsxs("svg",{width:"38",height:"39",viewBox:"0 0 38 39",xmlns:"http://www.w3.org/2000/svg",children:[s.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"}),s.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"}),s.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"})]})});u_.displayName="ImageZoom.ZoomPopup";const d_=({images:e,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,i]=j.useState(!1),[c,l]=j.useState(0),{containerRef:u,imgRef:d,scale:h}=tf({defaultScale:1,maxScale:3});return s.jsxs("div",{...n,className:it["image-mobile"],"data-disable-carrousel-pan":h>1,children:[s.jsx(u_,{loaded:o}),s.jsx(c_,{images:e,setCurrent:l,setFirstImgLoaded:i,ICONS:t,PRODUCT_IMAGE_DIMENSIONS:r}),s.jsx("div",{className:it["image-zoom--mobile"],ref:u,children:s.jsx(l_,{imgRef:d,image:e[c],PRODUCT_IMAGE_DIMENSIONS:r})})]})};d_.displayName="ImageZoom.ImageMobile";const US=({children:e,Z_INDEX_WAR:t,...r})=>s.jsx("div",{...r,className:it["image-zoom-wrapper-mobile"],style:{zIndex:t.pdp_image_zoom},children:e}),HS="_modal_1u87b_1",mr={modal:HS,"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 $S({headerTitle:e,isMobile:t,ICONS:r}){return s.jsx(p.Modal.Header,{navigation:"top",className:mr["modal-header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:t,children:[s.jsx("div",{className:mr["modal-header__title"],children:s.jsx(p.Modal.Title,{navigation:"top",className:mr["quick-shop__title"],title:e})}),s.jsx(p.Button,{className:mr["modal-header__close-button"],"data-close":!0,iconNameStart:r.close,size:"small",variant:"tertiary"})]})})}const f_=({PDP_INFO:e,PLP_SIZE_ORDER:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c})=>{const{sizes:l,productId:u,handleViewItemEvent:d}=Et(),h=j.useMemo(()=>l!=null&&l.length?dh({items:l,getLabel:C=>C.value,PLP_SIZE_ORDER:t}):[],[l]),{sizesContainerRef:m}=Wd(),{isMobile:_}=xe(),g=Fs(),v=bf(),{setValue:x}=yf(),{setValue:S}=yc(),w=j.useRef({}),[I,P]=j.useState(null);return s.jsxs("div",{ref:m,className:p.helpers.classNameConcat(me.sizes,"PDP_sizes"),children:[s.jsx("span",{className:me["sections-title"],children:e.product.size_title}),s.jsx("div",{children:h.map(C=>(!C.available&&!w.current[C.value]&&(w.current[C.value]={disable:!C.available,size:C.value,skuID:C.sku}),s.jsxs(p.ToggleSize.Wrapper,{size:_?"medium":"large",title:C.value,outOfStock:!C.available,onClick:()=>{C.available||(P({skuID:C.sku,size:C.value,disable:!0}),S(!0)),g.sku!==C.sku&&(x({...g,productId:u,name:C.name,size:C.value,sku:C.sku,sellerId:C.sellerId,sellerName:C.sellerName,available:C.available}),d({sku:C.sku,size:C.value}))},active:g.sku===C.sku,children:[s.jsx(p.ToggleSize.DisabledAdornment,{title:"disabled-adornment-texture"}),s.jsx(p.ToggleSize.Text,{children:C==null?void 0:C.value})]},`sizes-${C.sku}-${C.value}`)))}),s.jsx(Ic,{open:v,setVisible:S,sku:I,setSku:P,skus:Object.values(w.current),ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PRODUCT_CARD_TEXTS:i,Z_INDEX_WAR:c})]})},xs=({children:e,className:t,type:r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info-subsection"],[me[`subsection-${r}`],t]),children:e}),p_=({children:e,className:t})=>{const{structureRef:r,tipbarRef:n}=Ze(),o=j.useMemo(()=>{var l,u;const i=((l=r.current)==null?void 0:l.clientHeight)||0,c=((u=n.current)==null?void 0:u.clientHeight)||0;return i+c},[r,n]);return s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info"],t),id:"pdpmaininfo",style:{top:o},children:e})},h_=({TEXTURE_IMAGE:e,TOGGLE_STYLE_MODIFIER:t})=>{const{productId:r}=Et(),{items:n,loadSimilars:o}=Lc(r,{filterTexture:e});return j.useEffect(()=>{o()},[o]),s.jsxs("div",{className:me.similars,children:[s.jsx("span",{className:me["sections-title"],children:"Cor"}),s.jsx(n_,{productId:r,similars:n,TOGGLE_STYLE_MODIFIER:t})]})};h_.displayName="PDP.Info.Similars";const WS=({callBackProductAdded:e,BUY_BUTTON_LABELS:t,ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:i,PLP_SIZE_ORDER:c,PRODUCT_CARD_TEXTS:l,TEXTURE_IMAGE:u,TIME_ZONE:d,TOGGLE_STYLE_MODIFIER:h,Z_INDEX_WAR:m})=>s.jsx(p.Modal.Body,{className:mr["modal-product-body"],children:s.jsxs(p_,{className:mr["pdp-main__info-modifier"],children:[s.jsxs(xs,{type:"product-info",children:[s.jsx(ri,{}),s.jsx(Wc,{})]}),s.jsx(xs,{type:"similars",children:s.jsx(h_,{TEXTURE_IMAGE:u,TOGGLE_STYLE_MODIFIER:h})}),s.jsx(xs,{type:"sizes",children:s.jsx(f_,{ICONS:r,NEWSLETTER_CONFIGS:n,NOTIFY_INFO:o,PDP_INFO:i,PLP_SIZE_ORDER:c,PRODUCT_CARD_TEXTS:l,Z_INDEX_WAR:m})}),s.jsx(xs,{type:"actions",children:s.jsx(s_,{showWishlist:!1,callBack:e,addToCartBtnSize:{mobile:"medium",desktop:"large"},BUY_BUTTON_LABELS:t,ICONS:r,TIME_ZONE:d,Z_INDEX_WAR:m})})]})});function VS({callBackProductAdded:e,QUICKSHOP:t,ICONS:r,...n}){const[o,i]=j.useState(!1),c=()=>i(l=>!l);return s.jsxs("div",{className:mr["quick-shop"],children:[s.jsx(p.Button,{onClick:c,size:"x-large",className:mr["shop-bag"],iconNameStart:r.bag,iconSize:"medium"}),s.jsxs(p.Modal.Root,{isOpen:o,setIsOpen:i,className:`${mr.modal} ${mr["quick-shop__modal"]}`,style:{position:"fixed",height:"100svh",width:"100%",top:0,zIndex:1e3,bottom:"unset",overflowY:"hidden"},variant:"sideRight",children:[s.jsx($S,{headerTitle:t.title,ICONS:r}),s.jsx(WS,{callBackProductAdded:e,ICONS:r,...n})]})]})}const GS=({image:e})=>s.jsx(Ns,{src:U.resizingImg(e.imageUrl,{width:50,height:75})||"",alt:e.imageText,className:it.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:10,style:{position:"absolute",inset:0,filter:"blur(10px)"}}),KS=({images:e,selectedImageIndex:t,PRODUCT_IMAGE_DIMENSIONS:r,...n})=>{const[o,i]=j.useState(!1),{nextimage:c}=Ae();return s.jsx("div",{...n,className:it["main-image-container"],children:s.jsxs("div",{className:it["image-desktop"],children:[!o&&s.jsx(GS,{image:e==null?void 0:e[t]}),s.jsx(c,{src:U.resizingImg(e==null?void 0:e[t].imageUrl,{...r.image_zoom.desktop})||"",alt:e==null?void 0:e[t].imageText,className:it.mainImage,layout:"fill",objectFit:"cover",priority:!0,quality:100,onLoad:()=>{i(!0)}})]})})},QS=({images:e,onThumbnailClick:t,selectedImageIndex:r})=>{const{nextimage:n}=Ae();return s.jsx("div",{className:it.thumbs,children:e.map((o,i)=>s.jsx("div",{role:"button",tabIndex:0,onClick:()=>t(i),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&t(i)},className:i===r?it.selected:"",children:s.jsx(n,{src:o.imageUrl,alt:o.imageText,layout:"responsive",width:100,height:100,objectFit:"cover",priority:!1})},i))})},m_=({images:e,initialSelectedImageIndex:t=0,setShowImageZoom:r,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o,Z_INDEX_WAR:i,...c})=>{const{isMobile:l}=xe(),[u,d]=j.useState(t),h=m=>{d(m)};return l?s.jsxs(US,{Z_INDEX_WAR:i,children:[s.jsx(sd,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(d_,{images:e,ICONS:n,PRODUCT_IMAGE_DIMENSIONS:o})]}):s.jsxs(BS,{Z_INDEX_WAR:i,children:[s.jsx(sd,{onClose:()=>r({show:!1,initialIndex:0}),ICONS:n}),s.jsx(KS,{images:e,selectedImageIndex:u,onThumbnailClick:h,PRODUCT_IMAGE_DIMENSIONS:o},e[u].imageId??`${e[u].imageText}-${u}`),s.jsx(QS,{images:e,selectedImageIndex:u,onThumbnailClick:h}),s.jsx(VS,{callBackProductAdded:()=>{r({initialIndex:0,show:!1})},ICONS:n,Z_INDEX_WAR:i,...c})]})};m_.displayName="ImageZoom";const YS=({productImgs:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{video:n,productName:o}=Et(),[i,c]=j.useState({show:!1,initialIndex:0});j.useEffect(()=>(i.show?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>{document.body.classList.remove("no-scroll")}),[i]);const l=u=>{c({show:!0,initialIndex:u})};return s.jsxs(s.Fragment,{children:[s.jsx(a_,{images:e,video:n,handleZoom:l,productName:o,PRODUCT_IMAGE_DIMENSIONS:t}),i.show&&s.jsx(m_,{images:e,initialSelectedImageIndex:i.initialIndex,setShowImageZoom:c,PRODUCT_IMAGE_DIMENSIONS:t,...r})]})},__=({TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})=>{const{images:n}=Et(),o=j.useMemo(()=>{const i=n.filter(c=>!e.includes(c.imageLabel));return i.length>0?i:n},[]);return s.jsx(YS,{productImgs:o,TEXTURE_IMAGE:e,PRODUCT_IMAGE_DIMENSIONS:t,...r})};__.displayName="PDP.Gallery";const XS=({className:e,hasIcons:t=!0,ICONS:r,PDP_INFO:n})=>{const{allSizesAvailable:o,productId:i}=Et(),{setValue:c}=yc(),{sendDataLayerEvent:l}=Ce();return s.jsx("div",{className:p.helpers.classNameConcat(me.links,e),id:"pdp-container","data-product-id":i,children:s.jsxs("div",{className:me["links-wrapper"],children:[!o&&s.jsx(p.Button,{adornment:t?{start:s.jsx(p.Icon,{name:r.product})}:{},size:"x-small",variant:"tertiary",onClick:()=>c(!0),underline:!0,children:n.links_and_stepper.size_out_of_stock}),s.jsx(p.Button,{adornment:t?{start:s.jsx(p.Icon,{name:r.ruler})}:{},size:"x-small",variant:"tertiary",underline:!0,onClick:()=>{var u,d;(d=window.SizebayParams)==null||d.openChart((u=window.SizebayParams)==null?void 0:u.id),l({functionKey:"readyEvents",data:{event:"select_content",readyData:{content_type:"pdp:guia-de-medidas"}}})},children:n.links_and_stepper.size_table_title}),s.jsx(p.Button,{size:"x-small",variant:"tertiary",className:"sizebay",underline:!0,onClick:()=>{var u,d;return(d=window.SizebayParams)==null?void 0:d.openVFR((u=window.SizebayParams)==null?void 0:u.id)},children:n.links_and_stepper.sizebay})]})})},JS=({children:e})=>s.jsx("div",{className:me["pdp-main__info-main-content"],children:e}),ZS=({head:e,className:t})=>s.jsx("thead",{className:t,children:s.jsx("tr",{children:e.map((r,n)=>s.jsx("th",{children:r},`head-title-${n}`))})}),eC=({rows:e,className:t})=>s.jsx("tbody",{className:t,children:e.map((r,n)=>s.jsx("tr",{children:r.map(o=>typeof o=="string"&&o.includes("blocks")?JSON.parse(o).blocks.map(i=>`${i.text}
18
+ `):o).map((o,i)=>s.jsx("td",{children:o},`cell-content-${i}`))},`row-content-${n}`))}),tC="_tableContainer_1yxy2_1",rC={tableContainer:tC},nC=({children:e,className:t=""})=>s.jsx("table",{className:`${rC.tableContainer} ${t}`,children:e}),Mo={Head:ZS,Rows:eC,Root:nC},sC=({title:e,text:t})=>s.jsxs("p",{className:me.measurementRowsText,children:[s.jsx("h1",{className:me.measurementRowsTitle,children:e}),t]}),oC=({ICONS:e,SIZES:t,Z_INDEX_WAR:r})=>{const n=Cf(),{setValue:o}=wf();return s.jsx(p.Modal.Root,{isMobile:!0,style:{zIndex:r.modal},setIsOpen:o,isOpen:n,className:me.measurementModal,children:s.jsx(p.Modal.Body,{children:s.jsxs("div",{className:me.measurementContainer,children:[s.jsx("h1",{className:me.measurementTitle,children:t.title}),s.jsxs("div",{className:me.measurementContent,children:[s.jsx("div",{className:me.measurementImageContainer,children:s.jsx(Ns,{width:264,height:402,alt:"",className:me.measurementImage,src:t.bannerImage})}),s.jsxs(Mo.Root,{className:me.measurementTable,children:[s.jsx(Mo.Head,{className:me.measurementHead,head:t.head}),s.jsx(Mo.Rows,{className:me.measurementRows,rows:t.rows.map((i,c)=>[s.jsx(sC,{title:t.descriptions[c].title,text:t.descriptions[c].text},c),...i])})]})]}),s.jsx(p.Button,{onClick:()=>o(!1),className:me.measurementClose,variant:"tertiary",children:s.jsx(p.Icon,{name:e.close})})]})})},"minicart")},iC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__gallery-wrapper"],t),...r,children:e}),aC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me.pdp,t),...r,children:e}),cC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main"],t),...r,children:e}),lC=({children:e,className:t,...r})=>s.jsx("div",{className:p.helpers.classNameConcat(me["pdp-main__info-secondary-content"],t),...r,children:e}),uC={gallery:iC,pdp:aC,main:cC,secondary:lC},dC=({className:e,...t})=>s.jsx(p.Utils.Divider,{...t,className:p.helpers.classNameConcat(me.divider,e)}),fC=Object.freeze(Object.defineProperty({__proto__:null,AccessibilityInfo:NS,Actions:s_,BreadCrumb:o_,Credits:i_,DescriptionsTabs:kS,Divider:dC,Freight:MS,Gallery:__,GoldenTag:Vc,Header:ri,Links:XS,MainContent:JS,MainInfo:p_,PDPSimilars:IS,Price:Wc,ProductMeasurements:oC,Sizes:f_,SubSectionWrapper:xs,containers:uC},Symbol.toStringTag,{value:"Module"})),g_=(e,t)=>{const[r,n]=km({items:e}),[o,i]=t.split(":").map(Number);return isNaN(o)||isNaN(i)?[r,n]:[r<o?r:o,n>i?n:i]},y_=j.createContext({}),pC=({children:e})=>{const{router:t}=Ae(),{constants:{PLP_SORT_DEFAULT:r}}=ut(),{reset:n}=Wr(),{searchParams:o}=ft(),{data:i,isLoading:c,...l}=sh(),u=j.useCallback((v,x)=>{if(x){if(v.key.toLocaleLowerCase()==="price"){const S=x.getAll("facets");x.delete("facets"),S.forEach(w=>{const[I]=w.split("/");I!==v.key&&x.append("facets",w)})}x.set("page","1"),n(),x.append("facets",`${v.key}/${v.value}`),t.push(`?${x.toString()}`)}},[t,n]),d=j.useCallback(()=>{const v=new URLSearchParams;v.set("sort",r),v.set("page","1"),n(),t.push(`?${v.toString()}`)},[t,n,r]),h=j.useCallback((v,x)=>{if(!x||!x.has&&!x.has("facets"))return;const S=x.getAll("facets");x.delete("facets"),x.set("page","1"),S.forEach(w=>{const[I,P]=w.split("/");(I!==v.key||P!==v.value)&&x.append("facets",w)}),n(),t.push(`?${x.toString()}`)},[t,n]),m=j.useCallback(v=>{const x=o?new URLSearchParams(o):new URLSearchParams;for(const[,S]of x.entries()){const[w,I]=S.split("/");if(w===v.key&&I===v.value)return h(v,x)}return u(v,x)},[u,h,o]),_=j.useCallback(v=>{const x=o?new URLSearchParams(o):new URLSearchParams;x.set("sort",v.replace("_",":")),t.push(`?${x.toString()}`)},[t,o]),g=i&&"data"in i?i.data:null;return s.jsx(y_.Provider,{value:{...l,breadcrumb:(g==null?void 0:g.breadcrumb)??[],deleteAllFacets:d,facets:(g==null?void 0:g.facets)??[],isLoading:c,selectedFacets:U.getFacetsActiveSearchParams(o),onToggleFacet:m,onSort:_},children:e})},v_=({children:e,enabled:t,...r})=>{const{state:n}=ft(),o=l=>l==="productclusterids"||l.startsWith("category-"),i=n.facets.filter(({key:l})=>o(l)),c=n.facets.map(l=>`${l.key}:${l.value}`).sort().join(",");return s.jsx(nh,{fetch:()=>U.fetchProxy("/_v/proxy/search/facets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,facets:i})}),queryKey:["facets",n.base,n.term,c],options:{enabled:t??!0,gcTime:1e3*60*30,refetchOnWindowFocus:!1,placeholderData:av,staleTime:1e3*60*30},children:s.jsx(pC,{...r,children:e})})},Gc=()=>{const e=j.useContext(y_);if(e===void 0)throw new Error("use QueryFacetsContext must be used within a QueryFacetsProvider");return e},hC=()=>{var N;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:i},openFilters:c,setOpenFilters:l}=ut(),[u,d]=j.useState("10000:0"),{isMobile:h}=xe(),{sendDataLayerEvent:m}=Ce(),{state:_}=ft(),{breadcrumb:g,deleteAllFacets:v,facets:x,isLoading:S,onToggleFacet:w}=Gc(),I=j.useRef(""),P={isLast:!0,href:(N=_.term)!=null&&N.length?`/${_.term}`:"",name:_.term},C=U.filterNonRootFacets(_.facets,_==null?void 0:_.base);return j.useEffect(()=>{const T=x.find(({key:O})=>O==="price");if(T){const[O,M]=g_(T.values,u??"10000:0");d(`${O}:${M}`)}},[x,u,d]),j.useEffect(()=>{if(!C.length)return;const T=JSON.stringify(C);I.current!==T&&(I.current=T,m({functionKey:"filterEvent",data:{commonData:{selectedFacets:C}}}))},[C]),s.jsxs(pn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:g.length?g:[P],deleteAllFacets:v,filters:{facets:U.filterNonCategorySelected(x,_==null?void 0:_.base),selected:C},isMobile:h??!1,isLoading:S??!1,isOpen:c,price:u,onToggleFacet:w,setIsOpen:l,children:[s.jsx(pn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),s.jsx(pn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_SIZE_ORDER:i}})]})},x_=()=>typeof document>"u"?null:s.jsx(hC,{});x_.displayName="Filters";const mC=({productCount:e,PLP_GRID_SCROLL_BACK:t})=>{j.useEffect(()=>{var i;const n=new URLSearchParams(window.location.search).get("page");if(e){const[c,l]=((i=sessionStorage.getItem(t.key))==null?void 0:i.split("-"))??["0",null],u=sessionStorage.getItem(t.refer);c&&u==="true"&&(l===(n||"null")&&window.document.body.scrollTo({top:parseInt(c,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()}-${n}`)};return window.document.body.addEventListener("scroll",o,{passive:!0}),()=>{window.document.body.removeEventListener("scroll",o)}},[e])},Kc=({total:e=0})=>{const{constants:{SEARCH_TOTAL_PORTAL_ID:t}}=ut();if(typeof window>"u")return null;const r=document.getElementById(t);return r?dc.createPortal(s.jsxs("span",{children:["[",e,"] produto",e>1?"s":""]}),r):null};Kc.displayName="PDC.Grid.NavigationTotal";const _C=()=>{const{isMobile:e}=xe(),{constants:t,mainSeller:r}=ut(),{isLoading:n,products:o,pagination:{count:i}}=os(),{ICONS:c,PLP_GRID_SCROLL_BACK:l,PLP_NOT_RESULT:u}=t;return mC({productCount:(o==null?void 0:o.length)??0,PLP_GRID_SCROLL_BACK:l}),o?s.jsxs(s.Fragment,{children:[s.jsx(nr.Products,{...t,isMobile:e??!1,items:o,StoreConfig_MainSellerId:r}),!o.length&&!n&&s.jsx(nr.Empty,{ICONS:c,PLP_NOT_RESULT:u}),s.jsx(Kc,{total:i})]}):null},b_=({infinite:e=!1})=>e?s.jsx(nr.InfiniteScroller,{}):s.jsx(_C,{});b_.displayName="Grid";const An=e=>({centro:"center",esquerda:"start",direita:"end"})[e],j_=({children:e,contentState:t,entityKey:r})=>{const{url:n}=t.getEntity(r).getData();return n?s.jsx(Ot,{href:n,children:e}):e},gC=(e,t,r)=>{e.findEntityRanges(n=>{const o=n.getEntity();return o===null?!1:r.getEntity(o).getType()==="LINK"},t)},Qc=e=>{const t=new dn.CompositeDecorator([{strategy:gC,component:j_}]),r=dn.convertFromRaw(e);return dn.EditorState.createWithContent(r,t)},yC=e=>dn.convertFromRaw(e),S_=dn.DefaultDraftBlockRenderMap.set("unstyled",{element:"div",aliasedElements:["div"]}),od="superior-direita",jo="dentro-inferior-centro",vC="inferior-direita",pa="dentro-inferior-esquerda",C_=e=>({position:e===jo||e===pa?"absolute":"default",shouldRender:[od,jo,pa].includes(e)?"top":"bottom",alignItems:[jo].includes(e)?"center":[od,vC].includes(e)?"flex-end":"flex-start",left:e===pa?"16px":e===jo?"45%":"unset"}),xC=Object.freeze(Object.defineProperty({__proto__:null,CREATE_CONTENT:Qc,EXTENDED_BLOCK_RENDER_MAP:S_,GET_CONTENT_STATE:yC,controllersPositionsAdapter:C_},Symbol.toStringTag,{value:"Module"}));function bC(e){return CC(e)||SC(e)||jC()}function jC(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function SC(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function CC(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function id(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function ad(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?id(r,!0).forEach(function(n){wC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):id(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EC(e,t){return NC(e)||IC(e,t)||PC()}function PC(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function IC(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var c=e[Symbol.iterator](),l;!(n=(l=c.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){o=!0,i=u}finally{try{!n&&c.return!=null&&c.return()}finally{if(o)throw i}}return r}function NC(e){if(Array.isArray(e))return e}function RC(e,t){if(e==null)return t;for(var r=EC(t,2),n=r[0],o=r[1],i=ad({},n),c=bC(o),l=0,u=Object.keys(e);l<u.length;l++){var d=u[l];if(n.hasOwnProperty(d)){var h=n[d];i[d]=ad({},h,{},e[d])}else i[d]=e[d],c.push(d)}return[i,c]}var cd={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};function ha(e){if(e==null)return e;for(var t={},r=!1,n=0,o=Object.keys(e);n<o.length;n++){var i=o[n],c=i;cd.hasOwnProperty(i)&&(c=cd[i],r=!0),t[c]=e[i]}return r?t:e}var TC=/^(moz|ms|o|webkit)-/,OC=/^\d+$/,AC=/([A-Z])/g,kC={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function MC(e){return e.replace(AC,"-$1").toLowerCase().replace(TC,"-$1-")}function LC(e,t){var r;return typeof t=="string"?r=OC.test(t):(r=!0,t=String(t)),!r||t==="0"||kC[e]===!0?t:t+"px"}function So(e){return Object.keys(e).map(function(t){var r=LC(t,e[t]),n=MC(t);return"".concat(n,": ").concat(r)}).join("; ")}var vt={UNSTYLED:"unstyled",HEADER_ONE:"header-one",HEADER_TWO:"header-two",HEADER_THREE:"header-three",HEADER_FOUR:"header-four",HEADER_FIVE:"header-five",HEADER_SIX:"header-six",UNORDERED_LIST_ITEM:"unordered-list-item",ORDERED_LIST_ITEM:"ordered-list-item",BLOCKQUOTE:"blockquote",PULLQUOTE:"pullquote",CODE:"code-block",ATOMIC:"atomic"},ts={LINK:"LINK",IMAGE:"IMAGE"},Hs={BOLD:"BOLD",CODE:"CODE",ITALIC:"ITALIC",STRIKETHROUGH:"STRIKETHROUGH",UNDERLINE:"UNDERLINE"},w_={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(U.commonjsGlobal,function(){var r=Array.prototype.slice;function n(a,f){f&&(a.prototype=Object.create(f.prototype)),a.prototype.constructor=a}function o(a){return u(a)?a:Ie(a)}n(i,o);function i(a){return d(a)?a:ne(a)}n(c,o);function c(a){return h(a)?a:te(a)}n(l,o);function l(a){return u(a)&&!m(a)?a:ke(a)}function u(a){return!!(a&&a[g])}function d(a){return!!(a&&a[v])}function h(a){return!!(a&&a[x])}function m(a){return d(a)||h(a)}function _(a){return!!(a&&a[S])}o.isIterable=u,o.isKeyed=d,o.isIndexed=h,o.isAssociative=m,o.isOrdered=_,o.Keyed=i,o.Indexed=c,o.Set=l;var g="@@__IMMUTABLE_ITERABLE__@@",v="@@__IMMUTABLE_KEYED__@@",x="@@__IMMUTABLE_INDEXED__@@",S="@@__IMMUTABLE_ORDERED__@@",w="delete",I=5,P=1<<I,C=P-1,N={},T={value:!1},O={value:!1};function M(a){return a.value=!1,a}function z(a){a&&(a.value=!0)}function D(){}function B(a,f){f=f||0;for(var y=Math.max(0,a.length-f),b=new Array(y),E=0;E<y;E++)b[E]=a[E+f];return b}function G(a){return a.size===void 0&&(a.size=a.__iterate(Y)),a.size}function J(a,f){if(typeof f!="number"){var y=f>>>0;if(""+y!==f||y===4294967295)return NaN;f=y}return f<0?G(a)+f:f}function Y(){return!0}function X(a,f,y){return(a===0||y!==void 0&&a<=-y)&&(f===void 0||y!==void 0&&f>=y)}function Z(a,f){return fe(a,f,0)}function he(a,f){return fe(a,f,f)}function fe(a,f,y){return a===void 0?y:a<0?Math.max(0,f+a):f===void 0?a:Math.min(f,a)}var ee=0,ie=1,_e=2,we=typeof Symbol=="function"&&Symbol.iterator,ge="@@iterator",Ee=we||ge;function V(a){this.next=a}V.prototype.toString=function(){return"[Iterator]"},V.KEYS=ee,V.VALUES=ie,V.ENTRIES=_e,V.prototype.inspect=V.prototype.toSource=function(){return this.toString()},V.prototype[Ee]=function(){return this};function oe(a,f,y,b){var E=a===0?f:a===1?y:[f,y];return b?b.value=E:b={value:E,done:!1},b}function F(){return{value:void 0,done:!0}}function ce(a){return!!q(a)}function je(a){return a&&typeof a.next=="function"}function Oe(a){var f=q(a);return f&&f.call(a)}function q(a){var f=a&&(we&&a[we]||a[ge]);if(typeof f=="function")return f}function $(a){return a&&typeof a.length=="number"}n(Ie,o);function Ie(a){return a==null?$e():u(a)?a.toSeq():Q(a)}Ie.of=function(){return Ie(arguments)},Ie.prototype.toSeq=function(){return this},Ie.prototype.toString=function(){return this.__toString("Seq {","}")},Ie.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Ie.prototype.__iterate=function(a,f){return ve(this,a,f,!0)},Ie.prototype.__iterator=function(a,f){return qe(this,a,f,!0)},n(ne,Ie);function ne(a){return a==null?$e().toKeyedSeq():u(a)?d(a)?a.toSeq():a.fromEntrySeq():ae(a)}ne.prototype.toKeyedSeq=function(){return this},n(te,Ie);function te(a){return a==null?$e():u(a)?d(a)?a.entrySeq():a.toIndexedSeq():de(a)}te.of=function(){return te(arguments)},te.prototype.toIndexedSeq=function(){return this},te.prototype.toString=function(){return this.__toString("Seq [","]")},te.prototype.__iterate=function(a,f){return ve(this,a,f,!1)},te.prototype.__iterator=function(a,f){return qe(this,a,f,!1)},n(ke,Ie);function ke(a){return(a==null?$e():u(a)?d(a)?a.entrySeq():a:de(a)).toSetSeq()}ke.of=function(){return ke(arguments)},ke.prototype.toSetSeq=function(){return this},Ie.isSeq=re,Ie.Keyed=ne,Ie.Set=ke,Ie.Indexed=te;var ct="@@__IMMUTABLE_SEQ__@@";Ie.prototype[ct]=!0,n(Me,te);function Me(a){this._array=a,this.size=a.length}Me.prototype.get=function(a,f){return this.has(a)?this._array[J(this,a)]:f},Me.prototype.__iterate=function(a,f){for(var y=this._array,b=y.length-1,E=0;E<=b;E++)if(a(y[f?b-E:E],E,this)===!1)return E+1;return E},Me.prototype.__iterator=function(a,f){var y=this._array,b=y.length-1,E=0;return new V(function(){return E>b?F():oe(a,E,y[f?b-E++:E++])})},n(Le,ne);function Le(a){var f=Object.keys(a);this._object=a,this._keys=f,this.size=f.length}Le.prototype.get=function(a,f){return f!==void 0&&!this.has(a)?f:this._object[a]},Le.prototype.has=function(a){return this._object.hasOwnProperty(a)},Le.prototype.__iterate=function(a,f){for(var y=this._object,b=this._keys,E=b.length-1,R=0;R<=E;R++){var A=b[f?E-R:R];if(a(y[A],A,this)===!1)return R+1}return R},Le.prototype.__iterator=function(a,f){var y=this._object,b=this._keys,E=b.length-1,R=0;return new V(function(){var A=b[f?E-R:R];return R++>E?F():oe(a,A,y[A])})},Le.prototype[S]=!0,n(tt,te);function tt(a){this._iterable=a,this.size=a.length||a.size}tt.prototype.__iterateUncached=function(a,f){if(f)return this.cacheResult().__iterate(a,f);var y=this._iterable,b=Oe(y),E=0;if(je(b))for(var R;!(R=b.next()).done&&a(R.value,E++,this)!==!1;);return E},tt.prototype.__iteratorUncached=function(a,f){if(f)return this.cacheResult().__iterator(a,f);var y=this._iterable,b=Oe(y);if(!je(b))return new V(F);var E=0;return new V(function(){var R=b.next();return R.done?R:oe(a,E++,R.value)})},n(We,te);function We(a){this._iterator=a,this._iteratorCache=[]}We.prototype.__iterateUncached=function(a,f){if(f)return this.cacheResult().__iterate(a,f);for(var y=this._iterator,b=this._iteratorCache,E=0;E<b.length;)if(a(b[E],E++,this)===!1)return E;for(var R;!(R=y.next()).done;){var A=R.value;if(b[E]=A,a(A,E++,this)===!1)break}return E},We.prototype.__iteratorUncached=function(a,f){if(f)return this.cacheResult().__iterator(a,f);var y=this._iterator,b=this._iteratorCache,E=0;return new V(function(){if(E>=b.length){var R=y.next();if(R.done)return R;b[E]=R.value}return oe(a,E,b[E++])})};function re(a){return!!(a&&a[ct])}var De;function $e(){return De||(De=new Me([]))}function ae(a){var f=Array.isArray(a)?new Me(a).fromEntrySeq():je(a)?new We(a).fromEntrySeq():ce(a)?new tt(a).fromEntrySeq():typeof a=="object"?new Le(a):void 0;if(!f)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+a);return f}function de(a){var f=se(a);if(!f)throw new TypeError("Expected Array or iterable object of values: "+a);return f}function Q(a){var f=se(a)||typeof a=="object"&&new Le(a);if(!f)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+a);return f}function se(a){return $(a)?new Me(a):je(a)?new We(a):ce(a)?new tt(a):void 0}function ve(a,f,y,b){var E=a._cache;if(E){for(var R=E.length-1,A=0;A<=R;A++){var L=E[y?R-A:A];if(f(L[1],b?L[0]:A,a)===!1)return A+1}return A}return a.__iterateUncached(f,y)}function qe(a,f,y,b){var E=a._cache;if(E){var R=E.length-1,A=0;return new V(function(){var L=E[y?R-A:A];return A++>R?F():oe(f,b?L[0]:A-1,L[1])})}return a.__iteratorUncached(f,y)}function Je(a,f){return f?Gr(f,a,"",{"":a}):Pr(a)}function Gr(a,f,y,b){return Array.isArray(f)?a.call(b,y,te(f).map(function(E,R){return Gr(a,E,R,f)})):rl(f)?a.call(b,y,ne(f).map(function(E,R){return Gr(a,E,R,f)})):f}function Pr(a){return Array.isArray(a)?te(a).map(Pr).toList():rl(a)?ne(a).map(Pr).toMap():a}function rl(a){return a&&(a.constructor===Object||a.constructor===void 0)}function rt(a,f){if(a===f||a!==a&&f!==f)return!0;if(!a||!f)return!1;if(typeof a.valueOf=="function"&&typeof f.valueOf=="function"){if(a=a.valueOf(),f=f.valueOf(),a===f||a!==a&&f!==f)return!0;if(!a||!f)return!1}return!!(typeof a.equals=="function"&&typeof f.equals=="function"&&a.equals(f))}function ii(a,f){if(a===f)return!0;if(!u(f)||a.size!==void 0&&f.size!==void 0&&a.size!==f.size||a.__hash!==void 0&&f.__hash!==void 0&&a.__hash!==f.__hash||d(a)!==d(f)||h(a)!==h(f)||_(a)!==_(f))return!1;if(a.size===0&&f.size===0)return!0;var y=!m(a);if(_(a)){var b=a.entries();return f.every(function(H,W){var K=b.next().value;return K&&rt(K[1],H)&&(y||rt(K[0],W))})&&b.next().done}var E=!1;if(a.size===void 0)if(f.size===void 0)typeof a.cacheResult=="function"&&a.cacheResult();else{E=!0;var R=a;a=f,f=R}var A=!0,L=f.__iterate(function(H,W){if(y?!a.has(H):E?!rt(H,a.get(W,N)):!rt(a.get(W,N),H))return A=!1,!1});return A&&a.size===L}n(_t,te);function _t(a,f){if(!(this instanceof _t))return new _t(a,f);if(this._value=a,this.size=f===void 0?1/0:Math.max(0,f),this.size===0){if(ai)return ai;ai=this}}_t.prototype.toString=function(){return this.size===0?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},_t.prototype.get=function(a,f){return this.has(a)?this._value:f},_t.prototype.includes=function(a){return rt(this._value,a)},_t.prototype.slice=function(a,f){var y=this.size;return X(a,f,y)?this:new _t(this._value,he(f,y)-Z(a,y))},_t.prototype.reverse=function(){return this},_t.prototype.indexOf=function(a){return rt(this._value,a)?0:-1},_t.prototype.lastIndexOf=function(a){return rt(this._value,a)?this.size:-1},_t.prototype.__iterate=function(a,f){for(var y=0;y<this.size;y++)if(a(this._value,y,this)===!1)return y+1;return y},_t.prototype.__iterator=function(a,f){var y=this,b=0;return new V(function(){return b<y.size?oe(a,b++,y._value):F()})},_t.prototype.equals=function(a){return a instanceof _t?rt(this._value,a._value):ii(a)};var ai;function Gs(a,f){if(!a)throw new Error(f)}n(gt,te);function gt(a,f,y){if(!(this instanceof gt))return new gt(a,f,y);if(Gs(y!==0,"Cannot step a Range by 0"),a=a||0,f===void 0&&(f=1/0),y=y===void 0?1:Math.abs(y),f<a&&(y=-y),this._start=a,this._end=f,this._step=y,this.size=Math.max(0,Math.ceil((f-a)/y-1)+1),this.size===0){if(ci)return ci;ci=this}}gt.prototype.toString=function(){return this.size===0?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},gt.prototype.get=function(a,f){return this.has(a)?this._start+J(this,a)*this._step:f},gt.prototype.includes=function(a){var f=(a-this._start)/this._step;return f>=0&&f<this.size&&f===Math.floor(f)},gt.prototype.slice=function(a,f){return X(a,f,this.size)?this:(a=Z(a,this.size),f=he(f,this.size),f<=a?new gt(0,0):new gt(this.get(a,this._end),this.get(f,this._end),this._step))},gt.prototype.indexOf=function(a){var f=a-this._start;if(f%this._step===0){var y=f/this._step;if(y>=0&&y<this.size)return y}return-1},gt.prototype.lastIndexOf=function(a){return this.indexOf(a)},gt.prototype.__iterate=function(a,f){for(var y=this.size-1,b=this._step,E=f?this._start+y*b:this._start,R=0;R<=y;R++){if(a(E,R,this)===!1)return R+1;E+=f?-b:b}return R},gt.prototype.__iterator=function(a,f){var y=this.size-1,b=this._step,E=f?this._start+y*b:this._start,R=0;return new V(function(){var A=E;return E+=f?-b:b,R>y?F():oe(a,R++,A)})},gt.prototype.equals=function(a){return a instanceof gt?this._start===a._start&&this._end===a._end&&this._step===a._step:ii(this,a)};var ci;n(Ir,o);function Ir(){throw TypeError("Abstract")}n(is,Ir);function is(){}n(Cn,Ir);function Cn(){}n(Ks,Ir);function Ks(){}Ir.Keyed=is,Ir.Indexed=Cn,Ir.Set=Ks;var as=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(f,y){f=f|0,y=y|0;var b=f&65535,E=y&65535;return b*E+((f>>>16)*E+b*(y>>>16)<<16>>>0)|0};function li(a){return a>>>1&1073741824|a&3221225471}function At(a){if(a===!1||a===null||a===void 0||typeof a.valueOf=="function"&&(a=a.valueOf(),a===!1||a===null||a===void 0))return 0;if(a===!0)return 1;var f=typeof a;if(f==="number"){var y=a|0;for(y!==a&&(y^=a*4294967295);a>4294967295;)a/=4294967295,y^=a;return li(y)}if(f==="string")return a.length>Qg?Vg(a):ui(a);if(typeof a.hashCode=="function")return a.hashCode();if(f==="object")return Gg(a);if(typeof a.toString=="function")return ui(a.toString());throw new Error("Value type "+f+" cannot be hashed.")}function Vg(a){var f=mi[a];return f===void 0&&(f=ui(a),hi===Yg&&(hi=0,mi={}),hi++,mi[a]=f),f}function ui(a){for(var f=0,y=0;y<a.length;y++)f=31*f+a.charCodeAt(y)|0;return li(f)}function Gg(a){var f;if(di&&(f=fi.get(a),f!==void 0)||(f=a[Kr],f!==void 0)||!sl&&(f=a.propertyIsEnumerable&&a.propertyIsEnumerable[Kr],f!==void 0||(f=Kg(a),f!==void 0)))return f;if(f=++pi,pi&1073741824&&(pi=0),di)fi.set(a,f);else{if(nl!==void 0&&nl(a)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(sl)Object.defineProperty(a,Kr,{enumerable:!1,configurable:!1,writable:!1,value:f});else if(a.propertyIsEnumerable!==void 0&&a.propertyIsEnumerable===a.constructor.prototype.propertyIsEnumerable)a.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},a.propertyIsEnumerable[Kr]=f;else if(a.nodeType!==void 0)a[Kr]=f;else throw new Error("Unable to set a non-enumerable property on object.")}return f}var nl=Object.isExtensible,sl=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function Kg(a){if(a&&a.nodeType>0)switch(a.nodeType){case 1:return a.uniqueID;case 9:return a.documentElement&&a.documentElement.uniqueID}}var di=typeof WeakMap=="function",fi;di&&(fi=new WeakMap);var pi=0,Kr="__immutablehash__";typeof Symbol=="function"&&(Kr=Symbol(Kr));var Qg=16,Yg=255,hi=0,mi={};function kt(a){Gs(a!==1/0,"Cannot perform this action with an infinite size.")}n(Fe,is);function Fe(a){return a==null?or():_i(a)&&!_(a)?a:or().withMutations(function(f){var y=i(a);kt(y.size),y.forEach(function(b,E){return f.set(E,b)})})}Fe.prototype.toString=function(){return this.__toString("Map {","}")},Fe.prototype.get=function(a,f){return this._root?this._root.get(0,void 0,a,f):f},Fe.prototype.set=function(a,f){return cl(this,a,f)},Fe.prototype.setIn=function(a,f){return this.updateIn(a,N,function(){return f})},Fe.prototype.remove=function(a){return cl(this,a,N)},Fe.prototype.deleteIn=function(a){return this.updateIn(a,function(){return N})},Fe.prototype.update=function(a,f,y){return arguments.length===1?a(this):this.updateIn([a],f,y)},Fe.prototype.updateIn=function(a,f,y){y||(y=f,f=void 0);var b=pl(this,kl(a),f,y);return b===N?void 0:b},Fe.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):or()},Fe.prototype.merge=function(){return Qs(this,void 0,arguments)},Fe.prototype.mergeWith=function(a){var f=r.call(arguments,1);return Qs(this,a,f)},Fe.prototype.mergeIn=function(a){var f=r.call(arguments,1);return this.updateIn(a,or(),function(y){return typeof y.merge=="function"?y.merge.apply(y,f):f[f.length-1]})},Fe.prototype.mergeDeep=function(){return Qs(this,ul,arguments)},Fe.prototype.mergeDeepWith=function(a){var f=r.call(arguments,1);return Qs(this,dl(a),f)},Fe.prototype.mergeDeepIn=function(a){var f=r.call(arguments,1);return this.updateIn(a,or(),function(y){return typeof y.mergeDeep=="function"?y.mergeDeep.apply(y,f):f[f.length-1]})},Fe.prototype.sort=function(a){return nt(Tn(this,a))},Fe.prototype.sortBy=function(a,f){return nt(Tn(this,f,a))},Fe.prototype.withMutations=function(a){var f=this.asMutable();return a(f),f.wasAltered()?f.__ensureOwner(this.__ownerID):this},Fe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new D)},Fe.prototype.asImmutable=function(){return this.__ensureOwner()},Fe.prototype.wasAltered=function(){return this.__altered},Fe.prototype.__iterator=function(a,f){return new gi(this,a,f)},Fe.prototype.__iterate=function(a,f){var y=this,b=0;return this._root&&this._root.iterate(function(E){return b++,a(E[1],E[0],y)},f),b},Fe.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?vi(this.size,this._root,a,this.__hash):(this.__ownerID=a,this.__altered=!1,this)};function _i(a){return!!(a&&a[ol])}Fe.isMap=_i;var ol="@@__IMMUTABLE_MAP__@@",Ne=Fe.prototype;Ne[ol]=!0,Ne[w]=Ne.remove,Ne.removeIn=Ne.deleteIn;function cs(a,f){this.ownerID=a,this.entries=f}cs.prototype.get=function(a,f,y,b){for(var E=this.entries,R=0,A=E.length;R<A;R++)if(rt(y,E[R][0]))return E[R][1];return b},cs.prototype.update=function(a,f,y,b,E,R,A){for(var L=E===N,H=this.entries,W=0,K=H.length;W<K&&!rt(b,H[W][0]);W++);var le=W<K;if(le?H[W][1]===E:L)return this;if(z(A),(L||!le)&&z(R),!(L&&H.length===1)){if(!le&&!L&&H.length>=ry)return Xg(a,H,b,E);var pe=a&&a===this.ownerID,Se=pe?H:B(H);return le?L?W===K-1?Se.pop():Se[W]=Se.pop():Se[W]=[b,E]:Se.push([b,E]),pe?(this.entries=Se,this):new cs(a,Se)}};function wn(a,f,y){this.ownerID=a,this.bitmap=f,this.nodes=y}wn.prototype.get=function(a,f,y,b){f===void 0&&(f=At(y));var E=1<<((a===0?f:f>>>a)&C),R=this.bitmap;return R&E?this.nodes[hl(R&E-1)].get(a+I,f,y,b):b},wn.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=At(b));var L=(f===0?y:y>>>f)&C,H=1<<L,W=this.bitmap,K=(W&H)!==0;if(!K&&E===N)return this;var le=hl(W&H-1),pe=this.nodes,Se=K?pe[le]:void 0,Pe=xi(Se,a,f+I,y,b,E,R,A);if(Pe===Se)return this;if(!K&&Pe&&pe.length>=ny)return Zg(a,pe,W,L,Pe);if(K&&!Pe&&pe.length===2&&ll(pe[le^1]))return pe[le^1];if(K&&Pe&&pe.length===1&&ll(Pe))return Pe;var Qe=a&&a===this.ownerID,Yt=K?Pe?W:W^H:W|H,lr=K?Pe?ml(pe,le,Pe,Qe):ty(pe,le,Qe):ey(pe,le,Pe,Qe);return Qe?(this.bitmap=Yt,this.nodes=lr,this):new wn(a,Yt,lr)};function ls(a,f,y){this.ownerID=a,this.count=f,this.nodes=y}ls.prototype.get=function(a,f,y,b){f===void 0&&(f=At(y));var E=(a===0?f:f>>>a)&C,R=this.nodes[E];return R?R.get(a+I,f,y,b):b},ls.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=At(b));var L=(f===0?y:y>>>f)&C,H=E===N,W=this.nodes,K=W[L];if(H&&!K)return this;var le=xi(K,a,f+I,y,b,E,R,A);if(le===K)return this;var pe=this.count;if(!K)pe++;else if(!le&&(pe--,pe<sy))return Jg(a,W,pe,L);var Se=a&&a===this.ownerID,Pe=ml(W,L,le,Se);return Se?(this.count=pe,this.nodes=Pe,this):new ls(a,pe,Pe)};function En(a,f,y){this.ownerID=a,this.keyHash=f,this.entries=y}En.prototype.get=function(a,f,y,b){for(var E=this.entries,R=0,A=E.length;R<A;R++)if(rt(y,E[R][0]))return E[R][1];return b},En.prototype.update=function(a,f,y,b,E,R,A){y===void 0&&(y=At(b));var L=E===N;if(y!==this.keyHash)return L?this:(z(A),z(R),bi(this,a,f,y,[b,E]));for(var H=this.entries,W=0,K=H.length;W<K&&!rt(b,H[W][0]);W++);var le=W<K;if(le?H[W][1]===E:L)return this;if(z(A),(L||!le)&&z(R),L&&K===2)return new vr(a,this.keyHash,H[W^1]);var pe=a&&a===this.ownerID,Se=pe?H:B(H);return le?L?W===K-1?Se.pop():Se[W]=Se.pop():Se[W]=[b,E]:Se.push([b,E]),pe?(this.entries=Se,this):new En(a,this.keyHash,Se)};function vr(a,f,y){this.ownerID=a,this.keyHash=f,this.entry=y}vr.prototype.get=function(a,f,y,b){return rt(y,this.entry[0])?this.entry[1]:b},vr.prototype.update=function(a,f,y,b,E,R,A){var L=E===N,H=rt(b,this.entry[0]);if(H?E===this.entry[1]:L)return this;if(z(A),L){z(R);return}return H?a&&a===this.ownerID?(this.entry[1]=E,this):new vr(a,this.keyHash,[b,E]):(z(R),bi(this,a,f,At(b),[b,E]))},cs.prototype.iterate=En.prototype.iterate=function(a,f){for(var y=this.entries,b=0,E=y.length-1;b<=E;b++)if(a(y[f?E-b:b])===!1)return!1},wn.prototype.iterate=ls.prototype.iterate=function(a,f){for(var y=this.nodes,b=0,E=y.length-1;b<=E;b++){var R=y[f?E-b:b];if(R&&R.iterate(a,f)===!1)return!1}},vr.prototype.iterate=function(a,f){return a(this.entry)},n(gi,V);function gi(a,f,y){this._type=f,this._reverse=y,this._stack=a._root&&il(a._root)}gi.prototype.next=function(){for(var a=this._type,f=this._stack;f;){var y=f.node,b=f.index++,E;if(y.entry){if(b===0)return yi(a,y.entry)}else if(y.entries){if(E=y.entries.length-1,b<=E)return yi(a,y.entries[this._reverse?E-b:b])}else if(E=y.nodes.length-1,b<=E){var R=y.nodes[this._reverse?E-b:b];if(R){if(R.entry)return yi(a,R.entry);f=this._stack=il(R,f)}continue}f=this._stack=this._stack.__prev}return F()};function yi(a,f){return oe(a,f[0],f[1])}function il(a,f){return{node:a,index:0,__prev:f}}function vi(a,f,y,b){var E=Object.create(Ne);return E.size=a,E._root=f,E.__ownerID=y,E.__hash=b,E.__altered=!1,E}var al;function or(){return al||(al=vi(0))}function cl(a,f,y){var b,E;if(a._root){var R=M(T),A=M(O);if(b=xi(a._root,a.__ownerID,0,void 0,f,y,R,A),!A.value)return a;E=a.size+(R.value?y===N?-1:1:0)}else{if(y===N)return a;E=1,b=new cs(a.__ownerID,[[f,y]])}return a.__ownerID?(a.size=E,a._root=b,a.__hash=void 0,a.__altered=!0,a):b?vi(E,b):or()}function xi(a,f,y,b,E,R,A,L){return a?a.update(f,y,b,E,R,A,L):R===N?a:(z(L),z(A),new vr(f,b,[E,R]))}function ll(a){return a.constructor===vr||a.constructor===En}function bi(a,f,y,b,E){if(a.keyHash===b)return new En(f,b,[a.entry,E]);var R=(y===0?a.keyHash:a.keyHash>>>y)&C,A=(y===0?b:b>>>y)&C,L,H=R===A?[bi(a,f,y+I,b,E)]:(L=new vr(f,b,E),R<A?[a,L]:[L,a]);return new wn(f,1<<R|1<<A,H)}function Xg(a,f,y,b){a||(a=new D);for(var E=new vr(a,At(y),[y,b]),R=0;R<f.length;R++){var A=f[R];E=E.update(a,0,void 0,A[0],A[1])}return E}function Jg(a,f,y,b){for(var E=0,R=0,A=new Array(y),L=0,H=1,W=f.length;L<W;L++,H<<=1){var K=f[L];K!==void 0&&L!==b&&(E|=H,A[R++]=K)}return new wn(a,E,A)}function Zg(a,f,y,b,E){for(var R=0,A=new Array(P),L=0;y!==0;L++,y>>>=1)A[L]=y&1?f[R++]:void 0;return A[b]=E,new ls(a,R+1,A)}function Qs(a,f,y){for(var b=[],E=0;E<y.length;E++){var R=y[E],A=i(R);u(R)||(A=A.map(function(L){return Je(L)})),b.push(A)}return fl(a,f,b)}function ul(a,f,y){return a&&a.mergeDeep&&u(f)?a.mergeDeep(f):rt(a,f)?a:f}function dl(a){return function(f,y,b){if(f&&f.mergeDeepWith&&u(y))return f.mergeDeepWith(a,y);var E=a(f,y,b);return rt(f,E)?f:E}}function fl(a,f,y){return y=y.filter(function(b){return b.size!==0}),y.length===0?a:a.size===0&&!a.__ownerID&&y.length===1?a.constructor(y[0]):a.withMutations(function(b){for(var E=f?function(A,L){b.update(L,N,function(H){return H===N?A:f(H,A,L)})}:function(A,L){b.set(L,A)},R=0;R<y.length;R++)y[R].forEach(E)})}function pl(a,f,y,b){var E=a===N,R=f.next();if(R.done){var A=E?y:a,L=b(A);return L===A?a:L}Gs(E||a&&a.set,"invalid keyPath");var H=R.value,W=E?N:a.get(H,N),K=pl(W,f,y,b);return K===W?a:K===N?a.remove(H):(E?or():a).set(H,K)}function hl(a){return a=a-(a>>1&1431655765),a=(a&858993459)+(a>>2&858993459),a=a+(a>>4)&252645135,a=a+(a>>8),a=a+(a>>16),a&127}function ml(a,f,y,b){var E=b?a:B(a);return E[f]=y,E}function ey(a,f,y,b){var E=a.length+1;if(b&&f+1===E)return a[f]=y,a;for(var R=new Array(E),A=0,L=0;L<E;L++)L===f?(R[L]=y,A=-1):R[L]=a[L+A];return R}function ty(a,f,y){var b=a.length-1;if(y&&f===b)return a.pop(),a;for(var E=new Array(b),R=0,A=0;A<b;A++)A===f&&(R=1),E[A]=a[A+R];return E}var ry=P/4,ny=P/2,sy=P/4;n(Ge,Cn);function Ge(a){var f=ji();if(a==null)return f;if(_l(a))return a;var y=c(a),b=y.size;return b===0?f:(kt(b),b>0&&b<P?ds(0,b,I,null,new Nr(y.toArray())):f.withMutations(function(E){E.setSize(b),y.forEach(function(R,A){return E.set(A,R)})}))}Ge.of=function(){return this(arguments)},Ge.prototype.toString=function(){return this.__toString("List [","]")},Ge.prototype.get=function(a,f){if(a=J(this,a),a>=0&&a<this.size){a+=this._origin;var y=xl(this,a);return y&&y.array[a&C]}return f},Ge.prototype.set=function(a,f){return oy(this,a,f)},Ge.prototype.remove=function(a){return this.has(a)?a===0?this.shift():a===this.size-1?this.pop():this.splice(a,1):this},Ge.prototype.insert=function(a,f){return this.splice(a,0,f)},Ge.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=I,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ji()},Ge.prototype.push=function(){var a=arguments,f=this.size;return this.withMutations(function(y){Rr(y,0,f+a.length);for(var b=0;b<a.length;b++)y.set(f+b,a[b])})},Ge.prototype.pop=function(){return Rr(this,0,-1)},Ge.prototype.unshift=function(){var a=arguments;return this.withMutations(function(f){Rr(f,-a.length);for(var y=0;y<a.length;y++)f.set(y,a[y])})},Ge.prototype.shift=function(){return Rr(this,1)},Ge.prototype.merge=function(){return Ys(this,void 0,arguments)},Ge.prototype.mergeWith=function(a){var f=r.call(arguments,1);return Ys(this,a,f)},Ge.prototype.mergeDeep=function(){return Ys(this,ul,arguments)},Ge.prototype.mergeDeepWith=function(a){var f=r.call(arguments,1);return Ys(this,dl(a),f)},Ge.prototype.setSize=function(a){return Rr(this,0,a)},Ge.prototype.slice=function(a,f){var y=this.size;return X(a,f,y)?this:Rr(this,Z(a,y),he(f,y))},Ge.prototype.__iterator=function(a,f){var y=0,b=yl(this,f);return new V(function(){var E=b();return E===us?F():oe(a,y++,E)})},Ge.prototype.__iterate=function(a,f){for(var y=0,b=yl(this,f),E;(E=b())!==us&&a(E,y++,this)!==!1;);return y},Ge.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?ds(this._origin,this._capacity,this._level,this._root,this._tail,a,this.__hash):(this.__ownerID=a,this)};function _l(a){return!!(a&&a[gl])}Ge.isList=_l;var gl="@@__IMMUTABLE_LIST__@@",xt=Ge.prototype;xt[gl]=!0,xt[w]=xt.remove,xt.setIn=Ne.setIn,xt.deleteIn=xt.removeIn=Ne.removeIn,xt.update=Ne.update,xt.updateIn=Ne.updateIn,xt.mergeIn=Ne.mergeIn,xt.mergeDeepIn=Ne.mergeDeepIn,xt.withMutations=Ne.withMutations,xt.asMutable=Ne.asMutable,xt.asImmutable=Ne.asImmutable,xt.wasAltered=Ne.wasAltered;function Nr(a,f){this.array=a,this.ownerID=f}Nr.prototype.removeBefore=function(a,f,y){if(y===f?1<<f:this.array.length===0)return this;var b=y>>>f&C;if(b>=this.array.length)return new Nr([],a);var E=b===0,R;if(f>0){var A=this.array[b];if(R=A&&A.removeBefore(a,f-I,y),R===A&&E)return this}if(E&&!R)return this;var L=Pn(this,a);if(!E)for(var H=0;H<b;H++)L.array[H]=void 0;return R&&(L.array[b]=R),L},Nr.prototype.removeAfter=function(a,f,y){if(y===(f?1<<f:0)||this.array.length===0)return this;var b=y-1>>>f&C;if(b>=this.array.length)return this;var E;if(f>0){var R=this.array[b];if(E=R&&R.removeAfter(a,f-I,y),E===R&&b===this.array.length-1)return this}var A=Pn(this,a);return A.array.splice(b+1),E&&(A.array[b]=E),A};var us={};function yl(a,f){var y=a._origin,b=a._capacity,E=fs(b),R=a._tail;return A(a._root,a._level,0);function A(W,K,le){return K===0?L(W,le):H(W,K,le)}function L(W,K){var le=K===E?R&&R.array:W&&W.array,pe=K>y?0:y-K,Se=b-K;return Se>P&&(Se=P),function(){if(pe===Se)return us;var Pe=f?--Se:pe++;return le&&le[Pe]}}function H(W,K,le){var pe,Se=W&&W.array,Pe=le>y?0:y-le>>K,Qe=(b-le>>K)+1;return Qe>P&&(Qe=P),function(){do{if(pe){var Yt=pe();if(Yt!==us)return Yt;pe=null}if(Pe===Qe)return us;var lr=f?--Qe:Pe++;pe=A(Se&&Se[lr],K-I,le+(lr<<K))}while(!0)}}}function ds(a,f,y,b,E,R,A){var L=Object.create(xt);return L.size=f-a,L._origin=a,L._capacity=f,L._level=y,L._root=b,L._tail=E,L.__ownerID=R,L.__hash=A,L.__altered=!1,L}var vl;function ji(){return vl||(vl=ds(0,0,I))}function oy(a,f,y){if(f=J(a,f),f!==f)return a;if(f>=a.size||f<0)return a.withMutations(function(A){f<0?Rr(A,f).set(0,y):Rr(A,0,f+1).set(f,y)});f+=a._origin;var b=a._tail,E=a._root,R=M(O);return f>=fs(a._capacity)?b=Si(b,a.__ownerID,0,f,y,R):E=Si(E,a.__ownerID,a._level,f,y,R),R.value?a.__ownerID?(a._root=E,a._tail=b,a.__hash=void 0,a.__altered=!0,a):ds(a._origin,a._capacity,a._level,E,b):a}function Si(a,f,y,b,E,R){var A=b>>>y&C,L=a&&A<a.array.length;if(!L&&E===void 0)return a;var H;if(y>0){var W=a&&a.array[A],K=Si(W,f,y-I,b,E,R);return K===W?a:(H=Pn(a,f),H.array[A]=K,H)}return L&&a.array[A]===E?a:(z(R),H=Pn(a,f),E===void 0&&A===H.array.length-1?H.array.pop():H.array[A]=E,H)}function Pn(a,f){return f&&a&&f===a.ownerID?a:new Nr(a?a.array.slice():[],f)}function xl(a,f){if(f>=fs(a._capacity))return a._tail;if(f<1<<a._level+I){for(var y=a._root,b=a._level;y&&b>0;)y=y.array[f>>>b&C],b-=I;return y}}function Rr(a,f,y){f!==void 0&&(f=f|0),y!==void 0&&(y=y|0);var b=a.__ownerID||new D,E=a._origin,R=a._capacity,A=E+f,L=y===void 0?R:y<0?R+y:E+y;if(A===E&&L===R)return a;if(A>=L)return a.clear();for(var H=a._level,W=a._root,K=0;A+K<0;)W=new Nr(W&&W.array.length?[void 0,W]:[],b),H+=I,K+=1<<H;K&&(A+=K,E+=K,L+=K,R+=K);for(var le=fs(R),pe=fs(L);pe>=1<<H+I;)W=new Nr(W&&W.array.length?[W]:[],b),H+=I;var Se=a._tail,Pe=pe<le?xl(a,L-1):pe>le?new Nr([],b):Se;if(Se&&pe>le&&A<R&&Se.array.length){W=Pn(W,b);for(var Qe=W,Yt=H;Yt>I;Yt-=I){var lr=le>>>Yt&C;Qe=Qe.array[lr]=Pn(Qe.array[lr],b)}Qe.array[le>>>I&C]=Se}if(L<R&&(Pe=Pe&&Pe.removeAfter(b,0,L)),A>=pe)A-=pe,L-=pe,H=I,W=null,Pe=Pe&&Pe.removeBefore(b,0,A);else if(A>E||pe<le){for(K=0;W;){var no=A>>>H&C;if(no!==pe>>>H&C)break;no&&(K+=(1<<H)*no),H-=I,W=W.array[no]}W&&A>E&&(W=W.removeBefore(b,H,A-K)),W&&pe<le&&(W=W.removeAfter(b,H,pe-K)),K&&(A-=K,L-=K)}return a.__ownerID?(a.size=L-A,a._origin=A,a._capacity=L,a._level=H,a._root=W,a._tail=Pe,a.__hash=void 0,a.__altered=!0,a):ds(A,L,H,W,Pe)}function Ys(a,f,y){for(var b=[],E=0,R=0;R<y.length;R++){var A=y[R],L=c(A);L.size>E&&(E=L.size),u(A)||(L=L.map(function(H){return Je(H)})),b.push(L)}return E>a.size&&(a=a.setSize(E)),fl(a,f,b)}function fs(a){return a<P?0:a-1>>>I<<I}n(nt,Fe);function nt(a){return a==null?Xs():bl(a)?a:Xs().withMutations(function(f){var y=i(a);kt(y.size),y.forEach(function(b,E){return f.set(E,b)})})}nt.of=function(){return this(arguments)},nt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},nt.prototype.get=function(a,f){var y=this._map.get(a);return y!==void 0?this._list.get(y)[1]:f},nt.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Xs()},nt.prototype.set=function(a,f){return Sl(this,a,f)},nt.prototype.remove=function(a){return Sl(this,a,N)},nt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},nt.prototype.__iterate=function(a,f){var y=this;return this._list.__iterate(function(b){return b&&a(b[1],b[0],y)},f)},nt.prototype.__iterator=function(a,f){return this._list.fromEntrySeq().__iterator(a,f)},nt.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map.__ensureOwner(a),y=this._list.__ensureOwner(a);return a?Ci(f,y,a,this.__hash):(this.__ownerID=a,this._map=f,this._list=y,this)};function bl(a){return _i(a)&&_(a)}nt.isOrderedMap=bl,nt.prototype[S]=!0,nt.prototype[w]=nt.prototype.remove;function Ci(a,f,y,b){var E=Object.create(nt.prototype);return E.size=a?a.size:0,E._map=a,E._list=f,E.__ownerID=y,E.__hash=b,E}var jl;function Xs(){return jl||(jl=Ci(or(),ji()))}function Sl(a,f,y){var b=a._map,E=a._list,R=b.get(f),A=R!==void 0,L,H;if(y===N){if(!A)return a;E.size>=P&&E.size>=b.size*2?(H=E.filter(function(W,K){return W!==void 0&&R!==K}),L=H.toKeyedSeq().map(function(W){return W[0]}).flip().toMap(),a.__ownerID&&(L.__ownerID=H.__ownerID=a.__ownerID)):(L=b.remove(f),H=R===E.size-1?E.pop():E.set(R,void 0))}else if(A){if(y===E.get(R)[1])return a;L=b,H=E.set(R,[f,y])}else L=b.set(f,E.size),H=E.set(E.size,[f,y]);return a.__ownerID?(a.size=L.size,a._map=L,a._list=H,a.__hash=void 0,a):Ci(L,H)}n(Bt,ne);function Bt(a,f){this._iter=a,this._useKeys=f,this.size=a.size}Bt.prototype.get=function(a,f){return this._iter.get(a,f)},Bt.prototype.has=function(a){return this._iter.has(a)},Bt.prototype.valueSeq=function(){return this._iter.valueSeq()},Bt.prototype.reverse=function(){var a=this,f=wi(this,!0);return this._useKeys||(f.valueSeq=function(){return a._iter.toSeq().reverse()}),f},Bt.prototype.map=function(a,f){var y=this,b=wl(this,a,f);return this._useKeys||(b.valueSeq=function(){return y._iter.toSeq().map(a,f)}),b},Bt.prototype.__iterate=function(a,f){var y=this,b;return this._iter.__iterate(this._useKeys?function(E,R){return a(E,R,y)}:(b=f?Tl(this):0,function(E){return a(E,f?--b:b++,y)}),f)},Bt.prototype.__iterator=function(a,f){if(this._useKeys)return this._iter.__iterator(a,f);var y=this._iter.__iterator(ie,f),b=f?Tl(this):0;return new V(function(){var E=y.next();return E.done?E:oe(a,f?--b:b++,E.value,E)})},Bt.prototype[S]=!0,n(In,te);function In(a){this._iter=a,this.size=a.size}In.prototype.includes=function(a){return this._iter.includes(a)},In.prototype.__iterate=function(a,f){var y=this,b=0;return this._iter.__iterate(function(E){return a(E,b++,y)},f)},In.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f),b=0;return new V(function(){var E=y.next();return E.done?E:oe(a,b++,E.value,E)})},n(Nn,ke);function Nn(a){this._iter=a,this.size=a.size}Nn.prototype.has=function(a){return this._iter.includes(a)},Nn.prototype.__iterate=function(a,f){var y=this;return this._iter.__iterate(function(b){return a(b,b,y)},f)},Nn.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f);return new V(function(){var b=y.next();return b.done?b:oe(a,b.value,b.value,b)})},n(Rn,ne);function Rn(a){this._iter=a,this.size=a.size}Rn.prototype.entrySeq=function(){return this._iter.toSeq()},Rn.prototype.__iterate=function(a,f){var y=this;return this._iter.__iterate(function(b){if(b){Rl(b);var E=u(b);return a(E?b.get(1):b[1],E?b.get(0):b[0],y)}},f)},Rn.prototype.__iterator=function(a,f){var y=this._iter.__iterator(ie,f);return new V(function(){for(;;){var b=y.next();if(b.done)return b;var E=b.value;if(E){Rl(E);var R=u(E);return oe(a,R?E.get(0):E[0],R?E.get(1):E[1],b)}}})},In.prototype.cacheResult=Bt.prototype.cacheResult=Nn.prototype.cacheResult=Rn.prototype.cacheResult=Ii;function Cl(a){var f=ir(a);return f._iter=a,f.size=a.size,f.flip=function(){return a},f.reverse=function(){var y=a.reverse.apply(this);return y.flip=function(){return a.reverse()},y},f.has=function(y){return a.includes(y)},f.includes=function(y){return a.has(y)},f.cacheResult=Ii,f.__iterateUncached=function(y,b){var E=this;return a.__iterate(function(R,A){return y(A,R,E)!==!1},b)},f.__iteratorUncached=function(y,b){if(y===_e){var E=a.__iterator(y,b);return new V(function(){var R=E.next();if(!R.done){var A=R.value[0];R.value[0]=R.value[1],R.value[1]=A}return R})}return a.__iterator(y===ie?ee:ie,b)},f}function wl(a,f,y){var b=ir(a);return b.size=a.size,b.has=function(E){return a.has(E)},b.get=function(E,R){var A=a.get(E,N);return A===N?R:f.call(y,A,E,a)},b.__iterateUncached=function(E,R){var A=this;return a.__iterate(function(L,H,W){return E(f.call(y,L,H,W),H,A)!==!1},R)},b.__iteratorUncached=function(E,R){var A=a.__iterator(_e,R);return new V(function(){var L=A.next();if(L.done)return L;var H=L.value,W=H[0];return oe(E,W,f.call(y,H[1],W,a),L)})},b}function wi(a,f){var y=ir(a);return y._iter=a,y.size=a.size,y.reverse=function(){return a},a.flip&&(y.flip=function(){var b=Cl(a);return b.reverse=function(){return a.flip()},b}),y.get=function(b,E){return a.get(f?b:-1-b,E)},y.has=function(b){return a.has(f?b:-1-b)},y.includes=function(b){return a.includes(b)},y.cacheResult=Ii,y.__iterate=function(b,E){var R=this;return a.__iterate(function(A,L){return b(A,L,R)},!E)},y.__iterator=function(b,E){return a.__iterator(b,!E)},y}function El(a,f,y,b){var E=ir(a);return b&&(E.has=function(R){var A=a.get(R,N);return A!==N&&!!f.call(y,A,R,a)},E.get=function(R,A){var L=a.get(R,N);return L!==N&&f.call(y,L,R,a)?L:A}),E.__iterateUncached=function(R,A){var L=this,H=0;return a.__iterate(function(W,K,le){if(f.call(y,W,K,le))return H++,R(W,b?K:H-1,L)},A),H},E.__iteratorUncached=function(R,A){var L=a.__iterator(_e,A),H=0;return new V(function(){for(;;){var W=L.next();if(W.done)return W;var K=W.value,le=K[0],pe=K[1];if(f.call(y,pe,le,a))return oe(R,b?le:H++,pe,W)}})},E}function iy(a,f,y){var b=Fe().asMutable();return a.__iterate(function(E,R){b.update(f.call(y,E,R,a),0,function(A){return A+1})}),b.asImmutable()}function ay(a,f,y){var b=d(a),E=(_(a)?nt():Fe()).asMutable();a.__iterate(function(A,L){E.update(f.call(y,A,L,a),function(H){return H=H||[],H.push(b?[L,A]:A),H})});var R=Ol(a);return E.map(function(A){return Ve(a,R(A))})}function Ei(a,f,y,b){var E=a.size;if(f!==void 0&&(f=f|0),y!==void 0&&(y=y|0),X(f,y,E))return a;var R=Z(f,E),A=he(y,E);if(R!==R||A!==A)return Ei(a.toSeq().cacheResult(),f,y,b);var L=A-R,H;L===L&&(H=L<0?0:L);var W=ir(a);return W.size=H===0?H:a.size&&H||void 0,!b&&re(a)&&H>=0&&(W.get=function(K,le){return K=J(this,K),K>=0&&K<H?a.get(K+R,le):le}),W.__iterateUncached=function(K,le){var pe=this;if(H===0)return 0;if(le)return this.cacheResult().__iterate(K,le);var Se=0,Pe=!0,Qe=0;return a.__iterate(function(Yt,lr){if(!(Pe&&(Pe=Se++<R)))return Qe++,K(Yt,b?lr:Qe-1,pe)!==!1&&Qe!==H}),Qe},W.__iteratorUncached=function(K,le){if(H!==0&&le)return this.cacheResult().__iterator(K,le);var pe=H!==0&&a.__iterator(K,le),Se=0,Pe=0;return new V(function(){for(;Se++<R;)pe.next();if(++Pe>H)return F();var Qe=pe.next();return b||K===ie?Qe:K===ee?oe(K,Pe-1,void 0,Qe):oe(K,Pe-1,Qe.value[1],Qe)})},W}function cy(a,f,y){var b=ir(a);return b.__iterateUncached=function(E,R){var A=this;if(R)return this.cacheResult().__iterate(E,R);var L=0;return a.__iterate(function(H,W,K){return f.call(y,H,W,K)&&++L&&E(H,W,A)}),L},b.__iteratorUncached=function(E,R){var A=this;if(R)return this.cacheResult().__iterator(E,R);var L=a.__iterator(_e,R),H=!0;return new V(function(){if(!H)return F();var W=L.next();if(W.done)return W;var K=W.value,le=K[0],pe=K[1];return f.call(y,pe,le,A)?E===_e?W:oe(E,le,pe,W):(H=!1,F())})},b}function Pl(a,f,y,b){var E=ir(a);return E.__iterateUncached=function(R,A){var L=this;if(A)return this.cacheResult().__iterate(R,A);var H=!0,W=0;return a.__iterate(function(K,le,pe){if(!(H&&(H=f.call(y,K,le,pe))))return W++,R(K,b?le:W-1,L)}),W},E.__iteratorUncached=function(R,A){var L=this;if(A)return this.cacheResult().__iterator(R,A);var H=a.__iterator(_e,A),W=!0,K=0;return new V(function(){var le,pe,Se;do{if(le=H.next(),le.done)return b||R===ie?le:R===ee?oe(R,K++,void 0,le):oe(R,K++,le.value[1],le);var Pe=le.value;pe=Pe[0],Se=Pe[1],W&&(W=f.call(y,Se,pe,L))}while(W);return R===_e?le:oe(R,pe,Se,le)})},E}function ly(a,f){var y=d(a),b=[a].concat(f).map(function(A){return u(A)?y&&(A=i(A)):A=y?ae(A):de(Array.isArray(A)?A:[A]),A}).filter(function(A){return A.size!==0});if(b.length===0)return a;if(b.length===1){var E=b[0];if(E===a||y&&d(E)||h(a)&&h(E))return E}var R=new Me(b);return y?R=R.toKeyedSeq():h(a)||(R=R.toSetSeq()),R=R.flatten(!0),R.size=b.reduce(function(A,L){if(A!==void 0){var H=L.size;if(H!==void 0)return A+H}},0),R}function Il(a,f,y){var b=ir(a);return b.__iterateUncached=function(E,R){var A=0,L=!1;function H(W,K){var le=this;W.__iterate(function(pe,Se){return(!f||K<f)&&u(pe)?H(pe,K+1):E(pe,y?Se:A++,le)===!1&&(L=!0),!L},R)}return H(a,0),A},b.__iteratorUncached=function(E,R){var A=a.__iterator(E,R),L=[],H=0;return new V(function(){for(;A;){var W=A.next();if(W.done!==!1){A=L.pop();continue}var K=W.value;if(E===_e&&(K=K[1]),(!f||L.length<f)&&u(K))L.push(A),A=K.__iterator(E,R);else return y?W:oe(E,H++,K,W)}return F()})},b}function uy(a,f,y){var b=Ol(a);return a.toSeq().map(function(E,R){return b(f.call(y,E,R,a))}).flatten(!0)}function dy(a,f){var y=ir(a);return y.size=a.size&&a.size*2-1,y.__iterateUncached=function(b,E){var R=this,A=0;return a.__iterate(function(L,H){return(!A||b(f,A++,R)!==!1)&&b(L,A++,R)!==!1},E),A},y.__iteratorUncached=function(b,E){var R=a.__iterator(ie,E),A=0,L;return new V(function(){return(!L||A%2)&&(L=R.next(),L.done)?L:A%2?oe(b,A++,f):oe(b,A++,L.value,L)})},y}function Tn(a,f,y){f||(f=Al);var b=d(a),E=0,R=a.toSeq().map(function(A,L){return[L,A,E++,y?y(A,L,a):A]}).toArray();return R.sort(function(A,L){return f(A[3],L[3])||A[2]-L[2]}).forEach(b?function(A,L){R[L].length=2}:function(A,L){R[L]=A[1]}),b?ne(R):h(a)?te(R):ke(R)}function Js(a,f,y){if(f||(f=Al),y){var b=a.toSeq().map(function(E,R){return[E,y(E,R,a)]}).reduce(function(E,R){return Nl(f,E[1],R[1])?R:E});return b&&b[0]}else return a.reduce(function(E,R){return Nl(f,E,R)?R:E})}function Nl(a,f,y){var b=a(y,f);return b===0&&y!==f&&(y==null||y!==y)||b>0}function Pi(a,f,y){var b=ir(a);return b.size=new Me(y).map(function(E){return E.size}).min(),b.__iterate=function(E,R){for(var A=this.__iterator(ie,R),L,H=0;!(L=A.next()).done&&E(L.value,H++,this)!==!1;);return H},b.__iteratorUncached=function(E,R){var A=y.map(function(W){return W=o(W),Oe(R?W.reverse():W)}),L=0,H=!1;return new V(function(){var W;return H||(W=A.map(function(K){return K.next()}),H=W.some(function(K){return K.done})),H?F():oe(E,L++,f.apply(null,W.map(function(K){return K.value})))})},b}function Ve(a,f){return re(a)?f:a.constructor(f)}function Rl(a){if(a!==Object(a))throw new TypeError("Expected [K, V] tuple: "+a)}function Tl(a){return kt(a.size),G(a)}function Ol(a){return d(a)?i:h(a)?c:l}function ir(a){return Object.create((d(a)?ne:h(a)?te:ke).prototype)}function Ii(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Ie.prototype.cacheResult.call(this)}function Al(a,f){return a>f?1:a<f?-1:0}function kl(a){var f=Oe(a);if(!f){if(!$(a))throw new TypeError("Expected iterable or array-like: "+a);f=Oe(o(a))}return f}n(Mt,is);function Mt(a,f){var y,b=function(A){if(A instanceof b)return A;if(!(this instanceof b))return new b(A);if(!y){y=!0;var L=Object.keys(a);fy(E,L),E.size=L.length,E._name=f,E._keys=L,E._defaultValues=a}this._map=Fe(A)},E=b.prototype=Object.create(pt);return E.constructor=b,b}Mt.prototype.toString=function(){return this.__toString(Ml(this)+" {","}")},Mt.prototype.has=function(a){return this._defaultValues.hasOwnProperty(a)},Mt.prototype.get=function(a,f){if(!this.has(a))return f;var y=this._defaultValues[a];return this._map?this._map.get(a,y):y},Mt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var a=this.constructor;return a._empty||(a._empty=Zs(this,or()))},Mt.prototype.set=function(a,f){if(!this.has(a))throw new Error('Cannot set unknown key "'+a+'" on '+Ml(this));var y=this._map&&this._map.set(a,f);return this.__ownerID||y===this._map?this:Zs(this,y)},Mt.prototype.remove=function(a){if(!this.has(a))return this;var f=this._map&&this._map.remove(a);return this.__ownerID||f===this._map?this:Zs(this,f)},Mt.prototype.wasAltered=function(){return this._map.wasAltered()},Mt.prototype.__iterator=function(a,f){var y=this;return i(this._defaultValues).map(function(b,E){return y.get(E)}).__iterator(a,f)},Mt.prototype.__iterate=function(a,f){var y=this;return i(this._defaultValues).map(function(b,E){return y.get(E)}).__iterate(a,f)},Mt.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map&&this._map.__ensureOwner(a);return a?Zs(this,f,a):(this.__ownerID=a,this._map=f,this)};var pt=Mt.prototype;pt[w]=pt.remove,pt.deleteIn=pt.removeIn=Ne.removeIn,pt.merge=Ne.merge,pt.mergeWith=Ne.mergeWith,pt.mergeIn=Ne.mergeIn,pt.mergeDeep=Ne.mergeDeep,pt.mergeDeepWith=Ne.mergeDeepWith,pt.mergeDeepIn=Ne.mergeDeepIn,pt.setIn=Ne.setIn,pt.update=Ne.update,pt.updateIn=Ne.updateIn,pt.withMutations=Ne.withMutations,pt.asMutable=Ne.asMutable,pt.asImmutable=Ne.asImmutable;function Zs(a,f,y){var b=Object.create(Object.getPrototypeOf(a));return b._map=f,b.__ownerID=y,b}function Ml(a){return a._name||a.constructor.name||"Record"}function fy(a,f){try{f.forEach(py.bind(void 0,a))}catch{}}function py(a,f){Object.defineProperty(a,f,{get:function(){return this.get(f)},set:function(y){Gs(this.__ownerID,"Cannot set on an immutable record."),this.set(f,y)}})}n(Ke,Ks);function Ke(a){return a==null?Ti():Ni(a)&&!_(a)?a:Ti().withMutations(function(f){var y=l(a);kt(y.size),y.forEach(function(b){return f.add(b)})})}Ke.of=function(){return this(arguments)},Ke.fromKeys=function(a){return this(i(a).keySeq())},Ke.prototype.toString=function(){return this.__toString("Set {","}")},Ke.prototype.has=function(a){return this._map.has(a)},Ke.prototype.add=function(a){return Ri(this,this._map.set(a,!0))},Ke.prototype.remove=function(a){return Ri(this,this._map.remove(a))},Ke.prototype.clear=function(){return Ri(this,this._map.clear())},Ke.prototype.union=function(){var a=r.call(arguments,0);return a=a.filter(function(f){return f.size!==0}),a.length===0?this:this.size===0&&!this.__ownerID&&a.length===1?this.constructor(a[0]):this.withMutations(function(f){for(var y=0;y<a.length;y++)l(a[y]).forEach(function(b){return f.add(b)})})},Ke.prototype.intersect=function(){var a=r.call(arguments,0);if(a.length===0)return this;a=a.map(function(y){return l(y)});var f=this;return this.withMutations(function(y){f.forEach(function(b){a.every(function(E){return E.includes(b)})||y.remove(b)})})},Ke.prototype.subtract=function(){var a=r.call(arguments,0);if(a.length===0)return this;a=a.map(function(y){return l(y)});var f=this;return this.withMutations(function(y){f.forEach(function(b){a.some(function(E){return E.includes(b)})&&y.remove(b)})})},Ke.prototype.merge=function(){return this.union.apply(this,arguments)},Ke.prototype.mergeWith=function(a){var f=r.call(arguments,1);return this.union.apply(this,f)},Ke.prototype.sort=function(a){return ar(Tn(this,a))},Ke.prototype.sortBy=function(a,f){return ar(Tn(this,f,a))},Ke.prototype.wasAltered=function(){return this._map.wasAltered()},Ke.prototype.__iterate=function(a,f){var y=this;return this._map.__iterate(function(b,E){return a(E,E,y)},f)},Ke.prototype.__iterator=function(a,f){return this._map.map(function(y,b){return b}).__iterator(a,f)},Ke.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var f=this._map.__ensureOwner(a);return a?this.__make(f,a):(this.__ownerID=a,this._map=f,this)};function Ni(a){return!!(a&&a[Ll])}Ke.isSet=Ni;var Ll="@@__IMMUTABLE_SET__@@",Lt=Ke.prototype;Lt[Ll]=!0,Lt[w]=Lt.remove,Lt.mergeDeep=Lt.merge,Lt.mergeDeepWith=Lt.mergeWith,Lt.withMutations=Ne.withMutations,Lt.asMutable=Ne.asMutable,Lt.asImmutable=Ne.asImmutable,Lt.__empty=Ti,Lt.__make=Dl;function Ri(a,f){return a.__ownerID?(a.size=f.size,a._map=f,a):f===a._map?a:f.size===0?a.__empty():a.__make(f)}function Dl(a,f){var y=Object.create(Lt);return y.size=a?a.size:0,y._map=a,y.__ownerID=f,y}var Fl;function Ti(){return Fl||(Fl=Dl(or()))}n(ar,Ke);function ar(a){return a==null?Oi():zl(a)?a:Oi().withMutations(function(f){var y=l(a);kt(y.size),y.forEach(function(b){return f.add(b)})})}ar.of=function(){return this(arguments)},ar.fromKeys=function(a){return this(i(a).keySeq())},ar.prototype.toString=function(){return this.__toString("OrderedSet {","}")};function zl(a){return Ni(a)&&_(a)}ar.isOrderedSet=zl;var eo=ar.prototype;eo[S]=!0,eo.__empty=Oi,eo.__make=ql;function ql(a,f){var y=Object.create(eo);return y.size=a?a.size:0,y._map=a,y.__ownerID=f,y}var Bl;function Oi(){return Bl||(Bl=ql(Xs()))}n(lt,Cn);function lt(a){return a==null?Ai():Ul(a)?a:Ai().unshiftAll(a)}lt.of=function(){return this(arguments)},lt.prototype.toString=function(){return this.__toString("Stack [","]")},lt.prototype.get=function(a,f){var y=this._head;for(a=J(this,a);y&&a--;)y=y.next;return y?y.value:f},lt.prototype.peek=function(){return this._head&&this._head.value},lt.prototype.push=function(){if(arguments.length===0)return this;for(var a=this.size+arguments.length,f=this._head,y=arguments.length-1;y>=0;y--)f={value:arguments[y],next:f};return this.__ownerID?(this.size=a,this._head=f,this.__hash=void 0,this.__altered=!0,this):ps(a,f)},lt.prototype.pushAll=function(a){if(a=c(a),a.size===0)return this;kt(a.size);var f=this.size,y=this._head;return a.reverse().forEach(function(b){f++,y={value:b,next:y}}),this.__ownerID?(this.size=f,this._head=y,this.__hash=void 0,this.__altered=!0,this):ps(f,y)},lt.prototype.pop=function(){return this.slice(1)},lt.prototype.unshift=function(){return this.push.apply(this,arguments)},lt.prototype.unshiftAll=function(a){return this.pushAll(a)},lt.prototype.shift=function(){return this.pop.apply(this,arguments)},lt.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ai()},lt.prototype.slice=function(a,f){if(X(a,f,this.size))return this;var y=Z(a,this.size),b=he(f,this.size);if(b!==this.size)return Cn.prototype.slice.call(this,a,f);for(var E=this.size-y,R=this._head;y--;)R=R.next;return this.__ownerID?(this.size=E,this._head=R,this.__hash=void 0,this.__altered=!0,this):ps(E,R)},lt.prototype.__ensureOwner=function(a){return a===this.__ownerID?this:a?ps(this.size,this._head,a,this.__hash):(this.__ownerID=a,this.__altered=!1,this)},lt.prototype.__iterate=function(a,f){if(f)return this.reverse().__iterate(a);for(var y=0,b=this._head;b&&a(b.value,y++,this)!==!1;)b=b.next;return y},lt.prototype.__iterator=function(a,f){if(f)return this.reverse().__iterator(a);var y=0,b=this._head;return new V(function(){if(b){var E=b.value;return b=b.next,oe(a,y++,E)}return F()})};function Ul(a){return!!(a&&a[Hl])}lt.isStack=Ul;var Hl="@@__IMMUTABLE_STACK__@@",On=lt.prototype;On[Hl]=!0,On.withMutations=Ne.withMutations,On.asMutable=Ne.asMutable,On.asImmutable=Ne.asImmutable,On.wasAltered=Ne.wasAltered;function ps(a,f,y,b){var E=Object.create(On);return E.size=a,E._head=f,E.__ownerID=y,E.__hash=b,E.__altered=!1,E}var $l;function Ai(){return $l||($l=ps(0))}function cr(a,f){var y=function(b){a.prototype[b]=f[b]};return Object.keys(f).forEach(y),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(f).forEach(y),a}o.Iterator=V,cr(o,{toArray:function(){kt(this.size);var a=new Array(this.size||0);return this.valueSeq().__iterate(function(f,y){a[y]=f}),a},toIndexedSeq:function(){return new In(this)},toJS:function(){return this.toSeq().map(function(a){return a&&typeof a.toJS=="function"?a.toJS():a}).__toJS()},toJSON:function(){return this.toSeq().map(function(a){return a&&typeof a.toJSON=="function"?a.toJSON():a}).__toJS()},toKeyedSeq:function(){return new Bt(this,!0)},toMap:function(){return Fe(this.toKeyedSeq())},toObject:function(){kt(this.size);var a={};return this.__iterate(function(f,y){a[y]=f}),a},toOrderedMap:function(){return nt(this.toKeyedSeq())},toOrderedSet:function(){return ar(d(this)?this.valueSeq():this)},toSet:function(){return Ke(d(this)?this.valueSeq():this)},toSetSeq:function(){return new Nn(this)},toSeq:function(){return h(this)?this.toIndexedSeq():d(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return lt(d(this)?this.valueSeq():this)},toList:function(){return Ge(d(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(a,f){return this.size===0?a+f:a+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+f},concat:function(){var a=r.call(arguments,0);return Ve(this,ly(this,a))},includes:function(a){return this.some(function(f){return rt(f,a)})},entries:function(){return this.__iterator(_e)},every:function(a,f){kt(this.size);var y=!0;return this.__iterate(function(b,E,R){if(!a.call(f,b,E,R))return y=!1,!1}),y},filter:function(a,f){return Ve(this,El(this,a,f,!0))},find:function(a,f,y){var b=this.findEntry(a,f);return b?b[1]:y},findEntry:function(a,f){var y;return this.__iterate(function(b,E,R){if(a.call(f,b,E,R))return y=[E,b],!1}),y},findLastEntry:function(a,f){return this.toSeq().reverse().findEntry(a,f)},forEach:function(a,f){return kt(this.size),this.__iterate(f?a.bind(f):a)},join:function(a){kt(this.size),a=a!==void 0?""+a:",";var f="",y=!0;return this.__iterate(function(b){y?y=!1:f+=a,f+=b!=null?b.toString():""}),f},keys:function(){return this.__iterator(ee)},map:function(a,f){return Ve(this,wl(this,a,f))},reduce:function(a,f,y){kt(this.size);var b,E;return arguments.length<2?E=!0:b=f,this.__iterate(function(R,A,L){E?(E=!1,b=R):b=a.call(y,b,R,A,L)}),b},reduceRight:function(a,f,y){var b=this.toKeyedSeq().reverse();return b.reduce.apply(b,arguments)},reverse:function(){return Ve(this,wi(this,!0))},slice:function(a,f){return Ve(this,Ei(this,a,f,!0))},some:function(a,f){return!this.every(ro(a),f)},sort:function(a){return Ve(this,Tn(this,a))},values:function(){return this.__iterator(ie)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==void 0?this.size===0:!this.some(function(){return!0})},count:function(a,f){return G(a?this.toSeq().filter(a,f):this)},countBy:function(a,f){return iy(this,a,f)},equals:function(a){return ii(this,a)},entrySeq:function(){var a=this;if(a._cache)return new Me(a._cache);var f=a.toSeq().map(my).toIndexedSeq();return f.fromEntrySeq=function(){return a.toSeq()},f},filterNot:function(a,f){return this.filter(ro(a),f)},findLast:function(a,f,y){return this.toKeyedSeq().reverse().find(a,f,y)},first:function(){return this.find(Y)},flatMap:function(a,f){return Ve(this,uy(this,a,f))},flatten:function(a){return Ve(this,Il(this,a,!0))},fromEntrySeq:function(){return new Rn(this)},get:function(a,f){return this.find(function(y,b){return rt(b,a)},void 0,f)},getIn:function(a,f){for(var y=this,b=kl(a),E;!(E=b.next()).done;){var R=E.value;if(y=y&&y.get?y.get(R,N):N,y===N)return f}return y},groupBy:function(a,f){return ay(this,a,f)},has:function(a){return this.get(a,N)!==N},hasIn:function(a){return this.getIn(a,N)!==N},isSubset:function(a){return a=typeof a.includes=="function"?a:o(a),this.every(function(f){return a.includes(f)})},isSuperset:function(a){return a=typeof a.isSubset=="function"?a:o(a),a.isSubset(this)},keySeq:function(){return this.toSeq().map(hy).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(a){return Js(this,a)},maxBy:function(a,f){return Js(this,f,a)},min:function(a){return Js(this,a?Wl(a):Gl)},minBy:function(a,f){return Js(this,f?Wl(f):Gl,a)},rest:function(){return this.slice(1)},skip:function(a){return this.slice(Math.max(0,a))},skipLast:function(a){return Ve(this,this.toSeq().reverse().skip(a).reverse())},skipWhile:function(a,f){return Ve(this,Pl(this,a,f,!0))},skipUntil:function(a,f){return this.skipWhile(ro(a),f)},sortBy:function(a,f){return Ve(this,Tn(this,f,a))},take:function(a){return this.slice(0,Math.max(0,a))},takeLast:function(a){return Ve(this,this.toSeq().reverse().take(a).reverse())},takeWhile:function(a,f){return Ve(this,cy(this,a,f))},takeUntil:function(a,f){return this.takeWhile(ro(a),f)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=gy(this))}});var yt=o.prototype;yt[g]=!0,yt[Ee]=yt.values,yt.__toJS=yt.toArray,yt.__toStringMapper=Vl,yt.inspect=yt.toSource=function(){return this.toString()},yt.chain=yt.flatMap,yt.contains=yt.includes,function(){try{Object.defineProperty(yt,"length",{get:function(){if(!o.noLengthWarning){var a;try{throw new Error}catch(f){a=f.stack}if(a.indexOf("_wrapObject")===-1)return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+a),this.size}}})}catch{}}(),cr(i,{flip:function(){return Ve(this,Cl(this))},findKey:function(a,f){var y=this.findEntry(a,f);return y&&y[0]},findLastKey:function(a,f){return this.toSeq().reverse().findKey(a,f)},keyOf:function(a){return this.findKey(function(f){return rt(f,a)})},lastKeyOf:function(a){return this.findLastKey(function(f){return rt(f,a)})},mapEntries:function(a,f){var y=this,b=0;return Ve(this,this.toSeq().map(function(E,R){return a.call(f,[R,E],b++,y)}).fromEntrySeq())},mapKeys:function(a,f){var y=this;return Ve(this,this.toSeq().flip().map(function(b,E){return a.call(f,b,E,y)}).flip())}});var to=i.prototype;to[v]=!0,to[Ee]=yt.entries,to.__toJS=yt.toObject,to.__toStringMapper=function(a,f){return JSON.stringify(f)+": "+Vl(a)},cr(c,{toKeyedSeq:function(){return new Bt(this,!1)},filter:function(a,f){return Ve(this,El(this,a,f,!1))},findIndex:function(a,f){var y=this.findEntry(a,f);return y?y[0]:-1},indexOf:function(a){var f=this.toKeyedSeq().keyOf(a);return f===void 0?-1:f},lastIndexOf:function(a){var f=this.toKeyedSeq().reverse().keyOf(a);return f===void 0?-1:f},reverse:function(){return Ve(this,wi(this,!1))},slice:function(a,f){return Ve(this,Ei(this,a,f,!1))},splice:function(a,f){var y=arguments.length;if(f=Math.max(f|0,0),y===0||y===2&&!f)return this;a=Z(a,a<0?this.count():this.size);var b=this.slice(0,a);return Ve(this,y===1?b:b.concat(B(arguments,2),this.slice(a+f)))},findLastIndex:function(a,f){var y=this.toKeyedSeq().findLastKey(a,f);return y===void 0?-1:y},first:function(){return this.get(0)},flatten:function(a){return Ve(this,Il(this,a,!1))},get:function(a,f){return a=J(this,a),a<0||this.size===1/0||this.size!==void 0&&a>this.size?f:this.find(function(y,b){return b===a},void 0,f)},has:function(a){return a=J(this,a),a>=0&&(this.size!==void 0?this.size===1/0||a<this.size:this.indexOf(a)!==-1)},interpose:function(a){return Ve(this,dy(this,a))},interleave:function(){var a=[this].concat(B(arguments)),f=Pi(this.toSeq(),te.of,a),y=f.flatten(!0);return f.size&&(y.size=f.size*a.length),Ve(this,y)},last:function(){return this.get(-1)},skipWhile:function(a,f){return Ve(this,Pl(this,a,f,!1))},zip:function(){var a=[this].concat(B(arguments));return Ve(this,Pi(this,_y,a))},zipWith:function(a){var f=B(arguments);return f[0]=this,Ve(this,Pi(this,a,f))}}),c.prototype[x]=!0,c.prototype[S]=!0,cr(l,{get:function(a,f){return this.has(a)?a:f},includes:function(a){return this.has(a)},keySeq:function(){return this.valueSeq()}}),l.prototype.has=yt.includes,cr(ne,i.prototype),cr(te,c.prototype),cr(ke,l.prototype),cr(is,i.prototype),cr(Cn,c.prototype),cr(Ks,l.prototype);function hy(a,f){return f}function my(a,f){return[f,a]}function ro(a){return function(){return!a.apply(this,arguments)}}function Wl(a){return function(){return-a.apply(this,arguments)}}function Vl(a){return typeof a=="string"?JSON.stringify(a):a}function _y(){return B(arguments)}function Gl(a,f){return a<f?1:a>f?-1:0}function gy(a){if(a.size===1/0)return 0;var f=_(a),y=d(a),b=f?1:0,E=a.__iterate(y?f?function(R,A){b=31*b+Kl(At(R),At(A))|0}:function(R,A){b=b+Kl(At(R),At(A))|0}:f?function(R){b=31*b+At(R)|0}:function(R){b=b+At(R)|0});return yy(E,b)}function yy(a,f){return f=as(f,3432918353),f=as(f<<15|f>>>-15,461845907),f=as(f<<13|f>>>-13,5),f=(f+3864292196|0)^a,f=as(f^f>>>16,2246822507),f=as(f^f>>>13,3266489909),f=li(f^f>>>16),f}function Kl(a,f){return a^f+2654435769+(a<<6)+(a>>2)|0}var vy={Iterable:o,Seq:Ie,Collection:Ir,Map:Fe,OrderedMap:nt,List:Ge,Stack:lt,Set:Ke,OrderedSet:ar,Record:Mt,Range:gt,Repeat:_t,is:rt,fromJS:Je};return vy})})(w_);var E_=w_.exports,ma=new E_.OrderedSet;function DC(e,t){for(var r=null,n=null,o=[],i=0,c=0,l=e.length;c<l;c++){n=r;var u=t.get(c);r=u?u.getEntity():null,c>0&&r!==n&&(o.push([n,ld(e.slice(i,c),t.slice(i,c))]),i=c)}return o.push([r,ld(e.slice(i),t.slice(i))]),o}function ld(e,t){for(var r=ma,n=ma,o=[],i=0,c=0,l=e.length;c<l;c++){n=r;var u=t.get(c);r=u?u.getStyle():ma,c>0&&!E_.is(r,n)&&(o.push([e.slice(i,c),n]),i=c)}return o.push([e.slice(i),r]),o}var Yr,Co,wo;function ud(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r}function Eo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ud(r,!0).forEach(function(n){ot(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ud(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _a(e,t){return qC(e)||zC(e,t)||FC()}function FC(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function zC(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var c=e[Symbol.iterator](),l;!(n=(l=c.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){o=!0,i=u}finally{try{!n&&c.return!=null&&c.return()}finally{if(o)throw i}}return r}function qC(e){if(Array.isArray(e))return e}function BC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function HC(e,t,r){return t&&UC(e.prototype,t),e}function ot(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var P_=Hs.BOLD,Yc=Hs.CODE,I_=Hs.ITALIC,N_=Hs.STRIKETHROUGH,R_=Hs.UNDERLINE,$C=" ",T_="<br>",dd=/^data-([a-z0-9-]+)$/,WC=(Yr={},ot(Yr,P_,{element:"strong"}),ot(Yr,Yc,{element:"code"}),ot(Yr,I_,{element:"em"}),ot(Yr,N_,{element:"del"}),ot(Yr,R_,{element:"u"}),Yr),VC=[P_,I_,R_,N_,Yc],Po=(Co={},ot(Co,ts.LINK,{url:"href",href:"href",rel:"rel",target:"target",title:"title",className:"class"}),ot(Co,ts.IMAGE,{src:"src",height:"height",width:"width",alt:"alt",className:"class"}),Co),Io=(wo={},ot(wo,ts.LINK,function(e,t){for(var r=Po.hasOwnProperty(e)?Po[e]:{},n=t.getData(),o={},i=0,c=Object.keys(n);i<c.length;i++){var l=c[i],u=n[l];if(r.hasOwnProperty(l)){var d=r[l];o[d]=u}else dd.test(l)&&(o[l]=u)}return o}),ot(wo,ts.IMAGE,function(e,t){for(var r=Po.hasOwnProperty(e)?Po[e]:{},n=t.getData(),o={},i=0,c=Object.keys(n);i<c.length;i++){var l=c[i],u=n[l];if(r.hasOwnProperty(l)){var d=r[l];o[d]=u}else dd.test(l)&&(o[l]=u)}return o}),wo);function fd(e,t){switch(e){case vt.HEADER_ONE:return["h1"];case vt.HEADER_TWO:return["h2"];case vt.HEADER_THREE:return["h3"];case vt.HEADER_FOUR:return["h4"];case vt.HEADER_FIVE:return["h5"];case vt.HEADER_SIX:return["h6"];case vt.UNORDERED_LIST_ITEM:case vt.ORDERED_LIST_ITEM:return["li"];case vt.BLOCKQUOTE:return["blockquote"];case vt.CODE:return["pre","code"];case vt.ATOMIC:return["figure"];default:return t===null?[]:[t||"p"]}}function GC(e){switch(e){case vt.UNORDERED_LIST_ITEM:return"ul";case vt.ORDERED_LIST_ITEM:return"ol";default:return null}}var KC=function(){function e(t,r){BC(this,e),ot(this,"blocks",void 0),ot(this,"contentState",void 0),ot(this,"currentBlock",void 0),ot(this,"indentLevel",void 0),ot(this,"output",void 0),ot(this,"totalBlocks",void 0),ot(this,"wrapperTag",void 0),ot(this,"options",void 0),ot(this,"inlineStyles",void 0),ot(this,"inlineStyleFn",void 0),ot(this,"styleOrder",void 0),r==null&&(r={}),this.contentState=t,this.options=r;var n=RC(r.inlineStyles,[WC,VC]),o=_a(n,2),i=o[0],c=o[1];this.inlineStyles=i,this.inlineStyleFn=r.inlineStyleFn,this.styleOrder=c}return HC(e,[{key:"generate",value:function(){for(this.output=[],this.blocks=this.contentState.getBlocksAsArray(),this.totalBlocks=this.blocks.length,this.currentBlock=0,this.indentLevel=0,this.wrapperTag=null;this.currentBlock<this.totalBlocks;)this.processBlock();return this.closeWrapperTag(),this.output.join("").trim()}},{key:"processBlock",value:function(){var r=this.options,n=r.blockRenderers,o=r.defaultBlockTag,i=this.blocks[this.currentBlock],c=i.getType(),l=GC(c);this.wrapperTag!==l&&(this.wrapperTag&&this.closeWrapperTag(),l&&this.openWrapperTag(l)),this.indent();var u=n!=null&&n.hasOwnProperty(c)?n[c]:null,d=u?u(i):null;if(d!=null){this.output.push(d),this.output.push(`
19
+ `),this.currentBlock+=1;return}this.writeStartTag(i,o),this.output.push(this.renderBlockContent(i));var h=this.getNextBlock();if(QC(c)&&h&&h.getDepth()===i.getDepth()+1){this.output.push(`
20
+ `);var m=this.wrapperTag;this.wrapperTag=null,this.indentLevel+=1,this.currentBlock+=1,this.processBlocksAtDepth(h.getDepth()),this.wrapperTag=m,this.indentLevel-=1,this.indent()}else this.currentBlock+=1;this.writeEndTag(i,o)}},{key:"processBlocksAtDepth",value:function(r){for(var n=this.blocks[this.currentBlock];n&&n.getDepth()===r;)this.processBlock(),n=this.blocks[this.currentBlock];this.closeWrapperTag()}},{key:"getNextBlock",value:function(){return this.blocks[this.currentBlock+1]}},{key:"writeStartTag",value:function(r,n){var o=fd(r.getType(),n),i;if(this.options.blockStyleFn){var c=this.options.blockStyleFn(r)||{},l=c.attributes,u=c.style;if(l=ha(l),u!=null){var d=So(u);l=l==null?{style:d}:Eo({},l,{style:d})}i=kn(l)}else i="";var h=!0,m=!1,_=void 0;try{for(var g=o[Symbol.iterator](),v;!(h=(v=g.next()).done);h=!0){var x=v.value;this.output.push("<".concat(x).concat(i,">"))}}catch(S){m=!0,_=S}finally{try{!h&&g.return!=null&&g.return()}finally{if(m)throw _}}}},{key:"writeEndTag",value:function(r,n){var o=fd(r.getType(),n);if(o.length===1)this.output.push("</".concat(o[0],`>
21
21
  `));else{var i=[],c=!0,l=!1,u=void 0;try{for(var d=o[Symbol.iterator](),h;!(c=(h=d.next()).done);c=!0){var m=h.value;i.unshift("</".concat(m,">"))}}catch(_){l=!0,u=_}finally{try{!c&&d.return!=null&&d.return()}finally{if(l)throw u}}this.output.push(i.join("")+`
22
22
  `)}}},{key:"openWrapperTag",value:function(r){this.wrapperTag=r,this.indent(),this.output.push("<".concat(r,`>
23
23
  `)),this.indentLevel+=1}},{key:"closeWrapperTag",value:function(){var r=this.wrapperTag;r&&(this.indentLevel-=1,this.indent(),this.output.push("</".concat(r,`>
24
- `)),this.wrapperTag=null)}},{key:"indent",value:function(){this.output.push(VC.repeat(this.indentLevel))}},{key:"withCustomInlineStyles",value:function(r,n){if(!this.inlineStyleFn)return r;var o=this.inlineStyleFn(n);if(!o)return r;var i=o.element,c=i===void 0?"span":i,l=o.attributes,u=o.style,d=kn(Eo({},l,{style:u&&So(u)}));return"<".concat(c).concat(d,">").concat(r,"</").concat(c,">")}},{key:"renderBlockContent",value:function(r){var n=this,o=r.getType(),i=r.getText();if(i==="")return A_;i=this.preserveWhitespace(i);var c=r.getCharacterList(),l=zC(i,c);return l.map(function(u){var d=ga(u,2),h=d[0],m=d[1],_=m.map(function(D){var B=ga(D,2),G=B[0],J=B[1],Y=JC(G),X=!0,Z=!1,he=void 0;try{for(var fe=n.styleOrder[Symbol.iterator](),ee;!(X=(ee=fe.next()).done);X=!0){var ie=ee.value;if(!(ie===Yc&&o===vt.CODE)&&J.has(ie)){var _e=n.inlineStyles[ie],Ce=_e.element,ge=_e.attributes,we=_e.style;if(Ce==null&&(Ce="span"),ge=ma(ge),we!=null){var V=So(we);ge=ge==null?{style:V}:Eo({},ge,{style:V})}var oe=kn(ge);Y="<".concat(Ce).concat(oe,">").concat(Y,"</").concat(Ce,">")}}}catch(F){Z=!0,he=F}finally{try{!X&&fe.return!=null&&fe.return()}finally{if(Z)throw he}}return n.withCustomInlineStyles(Y,J)}).join(""),g=h?n.contentState.getEntity(h):null,v=g==null?null:g.getType().toUpperCase(),x;if(g!=null&&n.options.entityStyleFn&&(x=n.options.entityStyleFn(g))){var S=x,w=S.element,I=S.attributes,P=S.style;if(w==null&&(w="span"),I=ma(I),P!=null){var C=So(P);I=I==null?{style:C}:Eo({},I,{style:C})}var N=kn(I);return"<".concat(w).concat(N,">").concat(_,"</").concat(w,">")}else if(v!=null&&v===ts.LINK){var T=Io.hasOwnProperty(v)?Io[v](v,g):null,O=kn(T);return"<a".concat(O,">").concat(_,"</a>")}else if(v!=null&&v===ts.IMAGE){var M=Io.hasOwnProperty(v)?Io[v](v,g):null,z=kn(M);return"<img".concat(z,"/>")}else return _}).join("")}},{key:"preserveWhitespace",value:function(r){for(var n=r.length,o=new Array(n),i=0;i<n;i++)r[i]===" "&&(i===0||i===n-1||r[i-1]===" ")?o[i]=" ":o[i]=r[i];return o.join("")}}]),e}();function kn(e){if(e==null)return"";for(var t=[],r=0,n=Object.keys(e);r<n.length;r++){var o=n[r],i=e[o];i!=null&&t.push(" ".concat(o,'="').concat(ZC(i+""),'"'))}return t.join("")}function XC(e){switch(e){case vt.UNORDERED_LIST_ITEM:case vt.ORDERED_LIST_ITEM:return!0;default:return!1}}function JC(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split(" ").join("&nbsp;").split(`
25
- `).join(A_+`
26
- `)}function ZC(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")}function ew(e,t){return new YC(e,t).generate()}const hd=e=>{const r=Qc(JSON.parse(e)).getCurrentContent();return ew(r)},tw=({expanded:e,content:t})=>{const r=t.textStructureReduced?hd(t.textStructureReduced):null,n=t.showTextStructureExpander&&t.textStructure?hd(t.textStructure):null;return s.jsxs("details",{open:e,children:[r&&s.jsx("summary",{onClick:o=>o.preventDefault(),dangerouslySetInnerHTML:{__html:r}}),n&&s.jsx("div",{dangerouslySetInnerHTML:{__html:n}})]})},rw="_textContentWrapper_176ht_5",nw="_textContentSection_176ht_13",Qa={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:rw,textContentSection:nw},k_=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var i;const[n,o]=j.useState(!1);return s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:An(e.textStructureAlignment),alignItems:An(e.textStructureAlignment)},columnWrapper:{alignContent:An(e.textStructureAlignment),alignItems:An(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?s.jsx(p.Button,{variant:"tertiary",adornment:{end:s.jsx(p.Icon,{name:n?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(c=>!c),size:"small",children:n?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):s.jsx(s.Fragment,{})},children:s.jsxs(p.Utils.Column,{className:Qa.textContentWrapper,style:{alignItems:An(e.textStructureAlignment)},children:[s.jsx(p.TextStructure.DivWrapper,{style:{textAlign:An(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?s.jsx(tw,{content:e,expanded:n}):s.jsx(s.Fragment,{})}),e.textStructureButtonLabel?s.jsx(wt,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Qa["link-modifier"],adornments:(i=e.textStructureButtonIcon)!=null&&i.length&&e.enableIcon?{end:s.jsx(p.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):s.jsx(s.Fragment,{})]})})},sw=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],md=e=>({centro:"center",esquerda:"start",direita:"end"})[e],_d={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},gd=({data:e,videoUrl:t,priority:r,videoRef:n,ICONS:o,TEXTCONTENT_EXPANDED:i,TIME_ZONE:c,className:l,...u})=>{const{video:d,image:h,imageHref:m,imageOpacity:_,altImage:g,backgroundColor:v,position:x,contentAlignment:S,showTimer:w,contentOrder:I,timerMode:P,timerEnd:C,timerInit:N,textStructure:T,textStructureReduced:O}=e.banner,M=(m==null?void 0:m.trim())||(h==null?void 0:h.trim())||null,{nextimage:z}=Ae();return s.jsxs(p.Banner.Container,{...u,children:[s.jsxs(p.Banner.ImageWrapper,{className:_d["banner-image-wrapper-modifier"],style:_?{background:v}:void 0,children:[d&&s.jsx(at.Video,{videoRef:n,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),M&&!(d!=null&&d.length)&&s.jsx(z,{src:M,width:"1920",height:"1080",alt:g??h??"",...r?{priority:r}:{},style:_?{opacity:"0"}:void 0}),!h&&!(d!=null&&d.length)&&s.jsx("div",{style:{background:v}})]}),w||O||T?s.jsx(p.Banner.Slot,{...sw(x??"centro"),className:p.helpers.classNameConcat(_d["content-modifier"],l),style:{textAlign:md(S)},children:s.jsxs(p.Utils.Column,{gap:"16px",alignItems:md(S),children:[w&&I==="timer-first"&&s.jsx(Uo,{mode:P??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:N?new Date(N):new Date,TIME_ZONE:c}),s.jsx(k_,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:i}),w&&I!=="timer-first"&&s.jsx(Uo,{mode:P??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:N?new Date(N):new Date,TIME_ZONE:c})]})}):s.jsx(s.Fragment,{})]})};class Qt extends j.Component{constructor(){super(...arguments);Qr(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,n){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:",n),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:n,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:n}}const $s=({data:e,className:t,priority:r,creative:n,name:o,...i})=>{const{handleSelectPromotionEvent:c,currentLocalRef:l}=Ee(),{banner:{promotion_name:u},index:d,componentIndex:h}=e,m=typeof d=="number"?`:${d+1}`:"",_={creative_name:n,creative_slot:`${n}-${l.current}:${h+1}${m}`,promotion_id:e.banner.href,promotion_name:u},g=j.useRef(null),v=j.useMemo(()=>{var S;if((S=e.banner.video)!=null&&S.includes("player.vimeo")){const w=e.banner.video.split("?")[1],I=w==null?void 0:w.split("&"),P=I==null?void 0:I.filter(N=>N.includes("loc")||N.includes("signature")||N.includes("user_id")),C=P==null?void 0:P.join("&");return`${e.banner.video.split("?")[0]}?${C}`}return e.banner.video},[e]),x=()=>{var S;(S=g.current)!=null&&S.paused&&g.current.play()};return s.jsx(Qt,{name:o,children:s.jsx(Yo,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{..._,index:d}}}},observerOptions:{delay:100,...v&&{threshold:.1}},...v&&{callBackWhenVisible:x},children:e.banner.href?s.jsx(Ot,{href:e.banner.href,onClick:()=>{c({updatePromotionRef:!0,promotion:_,index:d})},children:s.jsx(gd,{data:e,videoUrl:v,priority:r,videoRef:g,className:t,...i})}):s.jsx(gd,{data:e,videoUrl:v,priority:r,videoRef:g,className:t,...i})})})},Xc=e=>s.jsx(Qt,{name:e.name,children:s.jsx($s,{...e})}),M_=({columns:e,gap:t,className:r})=>{const{isMobile:n}=xe(),{banners:o}=Bs(),{constants:{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}}=ut();return Array.isArray(o)?o.map((d,h)=>j.createElement(Ft.Banner,{...d,columns:d.columns,gap:t,isMobile:n??!1,key:`${d.position_grid}-${h}`,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c},s.jsx($s,{name:"Banner Carousel",data:{banner:d,componentIndex:h},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r}))):null};M_.displayName="PDC.InfiniteScroller.Banners";const L_=({page:e,...t})=>{var c;const{rootRef:r}=Ze(),{gap:n,updateParamPage:o}=Vr(),{element:i}=$o({callback:()=>o(e.page),options:{threshold:0}});return s.jsx("div",{...t,id:`pdc-scroll-infinite-${e==null?void 0:e.page}`,className:St["pdc--infinite--loader"],"data-page":e.page,ref:i,style:{top:(Number(((c=r==null?void 0:r.current)==null?void 0:c.offsetHeight)??0)+n*2)*-1}})};L_.displayName="PDC.Page.Anchor";const D_=e=>{var n;const{gap:t}=Vr(),{rootRef:r}=Ze();return s.jsx("div",{...e,className:St["pdc--infinite--card--anchor-pdp"],style:{top:(Number(((n=r==null?void 0:r.current)==null?void 0:n.offsetHeight)??0)+t*2)*-1}})};D_.displayName="PDC.Page.AnchorPDP";const F_=({first:e,gap:t,empty:r=!1,isMobile:n=!1,item:o,index:i,order:c,page:l,showVideo:u=!1})=>{const{handleNotify:d}=Vr(),{getAvailableProductTag:h}=Cr(),{constants:m,mainSeller:_}=ut(),{load:g}=Wr(),v=h(o==null?void 0:o.cluster.highlights);if(r)return;const{BUY_BUTTON_LABELS:x,MAIN_IMAGE:S,PLP_GRID_SCROLL_BACK:w,PLP_INFINITE_SCROLL:I,PLP_PRODUCT_SIMILAR_DELAY:P,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:C,PLP_SIZE_ORDER:N,PRODUCT_CARD_IMAGE_ASPECT_RATIO:T,PRODUCT_CARD_TEXTS:O,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:M,PRODUCT_IMAGE_DIMENSIONS:z,SECOND_IMAGE:D,TEXTURE_IMAGE:B,Z_INDEX_WAR:G,ICONS:J}=m;return s.jsxs(Ft.Card,{"data-skeleton":o.id==="skeleton",className:St["pdc--infinite--card--disabled"],gap:t,isMobile:n??!1,item:o,order:c,tag:v,index:i,setSkuSelected:d,showVideo:u,CONSTANTS:{BUY_BUTTON_LABELS:x,MAIN_IMAGE:S,PLP_GRID_SCROLL_BACK:w,PLP_INFINITE_SCROLL:I,PLP_PRODUCT_SIMILAR_DELAY:P,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:C,PLP_SIZE_ORDER:N,PRODUCT_CARD_IMAGE_ASPECT_RATIO:T,PRODUCT_CARD_TEXTS:O,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:M,PRODUCT_IMAGE_DIMENSIONS:z,SECOND_IMAGE:D,StoreConfig_MainSellerId:_,TEXTURE_IMAGE:B,Z_INDEX_WAR:G,ICONS:J},children:[s.jsx(Ss.AnchorPDP,{}),e&&l&&s.jsx(Ss.Anchor,{page:l}),g&&l&&!(l!=null&&l.loading)?s.jsx(Ss.Loader,{page:l}):null]})};F_.displayName="PDC.Page.Card";const z_=({type:e="default",page:t,...r})=>{const{updateProducts:n}=Wr(),{element:o}=$o({callback:()=>{t.loading||n(t.page)},onEnterViewportOnce:!0,options:{threshold:[.2,.5]}});return s.jsx("div",{...r,className:St[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:o})};z_.displayName="PDC.Page.Loader";const q_=({nextPage:e=!1,page:t,total:r,...n})=>{const{addNewPage:o}=Vr(),{element:i}=$o({callback:()=>{o(t,r,e)},onEnterViewportOnce:!0,options:{threshold:[.1,.5]}});return e===!0&&t.loading===!0?s.jsx("div",{...n,className:St["pdc--infinite--next-page--card"],"data-next-page":!0,ref:i}):null};q_.displayName="PDC.Page.NextPage";const Ss={Anchor:L_,AnchorPDP:D_,Card:F_,Loader:z_,NextPage:q_},ow=({page:e})=>{const{isMobile:t}=xe(),{gap:r,columns:n}=Vr(),{isLoading:o,pagination:i,products:c}=Us(),{load:l,products:u,trimPages:d,setLoad:h}=Wr(),{constants:{ICONS:m,PLP_NOT_RESULT:_,ITEMS_PER_PAGE:g}}=ut(),{count:v,nextPage:x,total:S}=i,w=(e.page-1)*24;j.useEffect(()=>{o||h(!0)},[o,h]),j.useEffect(()=>{!o&&c.length===0&&e.loading&&e.page>S&&e.page>1&&d(S)},[o,e,c,S,d]);const I=e.page===S?v-g*(e.page-1):g,P=c.length>0?c:Array.from({length:I},()=>Gf()),C=Yf(P.map(T=>T.node),n),N=l&&e.page===1&&!o&&i.total===0;return s.jsxs(s.Fragment,{children:[e.page===1&&s.jsx(Kc,{total:(i==null?void 0:i.count)??0}),N&&s.jsx(nr.Empty,{ICONS:m,PLP_NOT_RESULT:_}),Array.isArray(P)?P.map((T,O)=>{const M=u[w+O]+1;return s.jsx(Ss.Card,{empty:e.loading&&e.page===1&&!o&&!c.length,first:O===0,gap:r,index:O,item:T.node,isMobile:t??!1,order:M,page:e,showVideo:C.indexOf(O)!==-1},M)}):null,l&&!o&&x&&c.length>0&&s.jsx(Ss.NextPage,{page:e,nextPage:x,total:S})]})},B_=({page:e})=>{const{state:t}=ft(),{sendDataLayerEvent:r}=Ee(),n=j.useCallback(o=>{r({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o.products}}})},[r,t==null?void 0:t.query]);return s.jsx(Gc,{callback:n,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:s.jsx(ow,{page:e})})};B_.displayName="PDC.Page";const iw=()=>{var P;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:i},openFilters:c,setOpenFilters:l}=ut(),[u,d]=j.useState("10000:0"),{isMobile:h}=xe(),{state:m}=ft(),{breadcrumb:_,deleteAllFacets:g,facets:v,isLoading:x,onToggleFacet:S}=Vc(),w={isLast:!0,href:(P=m.term)!=null&&P.length?`/${m.term}`:"",name:m.term},I=U.filterNonRootFacets(m.facets,m==null?void 0:m.base);return j.useEffect(()=>{const C=v.find(({key:N})=>N==="price");if(C){const[N,T]=m_(C.values,u??"10000:0");d(`${N}:${T}`)}},[v,u,d]),s.jsxs(pn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:_.length?_:[w],deleteAllFacets:g,filters:{facets:U.filterNonCategorySelected(v,m==null?void 0:m.base),selected:I},isMobile:h??!1,isLoading:x??!1,isOpen:c,price:u,onToggleFacet:S,setIsOpen:l,children:[s.jsx(pn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),s.jsx(pn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_SIZE_ORDER:i}})]})},U_=({sort:e,...t})=>{const{load:r}=Wr();return s.jsxs(x_,{...t,enabled:r,children:[s.jsx(nr.Navigation,{}),s.jsx(iw,{})]})};U_.displayName="PDC.INFINITE-SCROLLER.FILTERS";const aw=({load:e,PLP_GRID_SCROLL_BACK:t})=>{const r=j.useRef(!1);j.useEffect(()=>{if(e&&!r.current){const n=sessionStorage.getItem(t.refer),o=sessionStorage.getItem(t.order);if(n==="true"){const i=document.querySelector(`[data-order="${o}"] > [class*="anchor-pdp"]`);i&&(i.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0),sessionStorage.setItem(t.refer,"false")}else{const i=document.querySelectorAll('[id*="pdc-scroll-infinite"]');if(i.length>0){const c=i[i.length-1];i.length>1&&c.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0}}}if(!e&&r.current){r.current=!1;const n=document.querySelector("body > main");n&&n.scrollIntoView({behavior:"instant",block:"start"})}},[e])},cw=e=>{const{constants:{PLP_GRID_SCROLL_BACK:t,ITEMS_PER_PAGE:r}}=ut(),{gap:n,columns:o}=Vr(),{load:i,pages:c}=Wr();return aw({load:i,PLP_GRID_SCROLL_BACK:t}),s.jsx("div",{className:St["pdc--grid--content"],children:s.jsxs(Ft.Root,{children:[Array.isArray(c)&&c.map(l=>s.jsx(B_,{count:r,page:l},l.page)),s.jsx(M_,{columns:o,count:r,gap:n})]})})},H_=e=>{const{state:t}=ft(),{banners:r}=Bs(),{columns:n}=Vr(),{constants:{ITEMS_PER_PAGE:o,PLP_SORT_DEFAULT:i}}=ut(),{createPagesScroll:c}=Wr(),l=j.useRef(!1);return j.useEffect(()=>{if(l.current)return;const u=Vo(r,50,n,o);c(t.page,u),l.current=!0},[]),s.jsxs(dp,{banners:r,children:[s.jsx(U_,{state:t,sort:i}),s.jsx(cw,{})]})};H_.displayName="PDC.InfiniteScroller";const $_=()=>{const{state:e}=ft(),{constants:{Z_INDEX_WAR:t},setOpenFilters:r}=ut(),{selectedFacets:n,onToggleFacet:o,onSort:i}=Vc(),c=U.filterNonRootFacets(n,e==null?void 0:e.base);return s.jsx($r.Root,{onSort:i,setOpenFilters:r,style:{zIndex:t.plp_navigation},children:s.jsx($r.Selected,{callback:o,selected:c})})};$_.displayName="Navigation";const Ya=({currentPage:e,callback:t,type:r,...n})=>s.jsx(p.Button,{...n,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});Ya.displayName="Arrow";const Xa=({active:e,prev:t,ellipses:r,page:n,selectedPage:o})=>s.jsxs(s.Fragment,{children:[r&&t&&s.jsx(p.Button,{size:"large",variant:"tertiary",children:"..."}),e&&s.jsx(p.Pagination.Item,{isActive:!1,index:n,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(n)},children:n}),r&&!t&&s.jsx(p.Button,{size:"large",variant:"tertiary",children:"..."})]});Xa.displayName="PageEllipses";const W_=({children:e,endPage:t,page:r,total:n,selectedPage:o,ITEMS_PER_SECTION:i})=>s.jsxs(s.Fragment,{children:[s.jsx(Xa,{active:r>=i&&n>i,selectedPage:o,currentPage:r,prev:!1,ellipses:r>i&&n>i,page:1}),e,s.jsx(Xa,{active:n-r>1&&n!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<n-1,page:n})]});W_.displayName="Pagination.Layout";const lw=(e,t,r)=>{const n=new URLSearchParams(r);return n.set(e,t),n.toString()},uw=(e,t)=>{const r=[];for(let n=e;n<=t;n++)r.push(n);return r},dw=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:n})=>{const o=t>=n?n:t,i=Math.max(1,e===o?o-r+1:e-Math.floor(r/2)),c=Math.min(o,i+r-1);return{startPage:i,endPage:c,totalPages:o}},V_=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:n})=>{const{router:o,pathname:i}=Ae();return Array.isArray(t)?t.map(c=>s.jsx(p.Pagination.Item,{isActive:e===c,index:c,variant:e===c?n.active:n.default,onClick:()=>o.push(`${i}?${lw("page",c.toString(),r)}`),children:c},c)):null};V_.displayName="Pages";const Jc=({query:e,type:t="default",searchParams:r,ITEMS_DEFAULT_SORT:n,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l,...u})=>{const{router:d,pathname:h}=Ae(),{state:{page:m=1}}=ft(),{pagination:{total:_}}=Us(),{endPage:g,totalPages:v,startPage:x}=dw({currentPage:m,total:_,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:c}),S=I=>{const P=I.toString(),C=new URLSearchParams(r.toString());t==="default"&&C.set("page",P),t==="search"&&(C.set("query",e??""),C.set("count",i.toString()),C.set("page",P),n&&C.set("sort",n.replace("_",":")));const T=`${t==="search"?"/search":h}?${C.toString()}`;d.push(T)},w=I=>{S(I==="prev"?m-1:m+1)};return _?s.jsx("div",{...u,className:St["pdc--pagination"],children:s.jsx(p.Pagination.Wrapper,{adornment:{start:s.jsx(Ya,{callback:w,currentPage:m,disabled:m<2,type:"left"}),end:s.jsx(Ya,{callback:w,currentPage:m,disabled:m>=v,type:"right"})},children:s.jsx(W_,{endPage:g,page:m,selectedPage:S,total:_,ITEMS_PER_SECTION:o,children:s.jsx(V_,{currentPage:m,pages:uw(x,g),searchParams:r,VARIANT_PAGINATION:l})})})}):null};Jc.displayName="Pagination";const G_=({gap:e,isMobile:t,className:r})=>{const{state:n}=ft(),{banners:o}=Bs(),{constants:i}=ut(),{ICONS:c,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,TEXTCONTENT_EXPANDED:u,TIME_ZONE:d}=i,h=o.filter(m=>Jf(m.position_grid,n.page,(n==null?void 0:n.count)??1));return Array.isArray(h)?h.map((m,_)=>s.jsx(Ft.Banner,{columns:m.columns,gap:e,isMobile:t,position_grid:m.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,children:s.jsx($s,{name:"Banner Carousel",data:{banner:m,componentIndex:_},creative:"banner_grid",ICONS:c,TEXTCONTENT_EXPANDED:u,TIME_ZONE:d,className:r})},m.position_grid)):null};G_.displayName="PDC.Grid.Banners";const K_=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:I,Z_INDEX_WAR:P})=>{const{banners:C}=Bs(),{getAvailableProductTag:N}=Cr(),{state:T}=ft(),[O,M]=j.useState(!1),[z,D]=j.useState(null),[B,G]=j.useState([]),J=j.useCallback((fe,ee)=>{const ie=ee?zs([ee]):null;G(fe),D(ie!=null&&ie.length?ie[0]:null),M(!0)},[]),Y=e?8:16,X=(T.page-1)*((T==null?void 0:T.count)??1),Z=Ft.helpers.createGridPosAndVideo(t,C,e?2:4,T.page),he=Vo(C,T.page,e?2:4);return s.jsxs(s.Fragment,{children:[s.jsxs(Ft.Root,{children:[Array.isArray(t)&&t.map((fe,ee)=>{var _e;const ie=N(fe.node.cluster.highlights);return s.jsx(Ft.Card,{gap:Y,isMobile:e??!1,item:fe.node,order:he.products[X+ee]+1,tag:ie,index:ee,setSkuSelected:J,showVideo:(_e=Z[ee])==null?void 0:_e.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:I,Z_INDEX_WAR:P,ICONS:n}},fe.node.sku)}),t.length>0&&s.jsx(G_,{gap:Y,isMobile:e??!1})]}),s.jsx(qs,{open:O,sku:z,skus:B,setSku:D,setVisible:M,ICONS:n,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PRODUCT_CARD_TEXTS:g,Z_INDEX_WAR:P})]})};K_.displayName="PDC.Products";const nr={Empty:Dc,Filters:b_,Grid:S_,InfiniteScroller:H_,Spinner:Fc,Navigation:$_,Notification:qs,Pagination:Jc,Products:K_},Q_=({className:e})=>{const{constants:t}=ut(),{state:r,searchParams:n}=ft(),{sendDataLayerEvent:o}=Ee(),i=j.useCallback(_=>{o({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:_.products}}})},[o]),{ITEMS_DEFAULT_SORT:c,ITEMS_PER_SECTION:l,ITEMS_PER_PAGE:u,PLP_INFINITE_SCROLL:d,SEARCH_PAGE_ITEM_THRESHOLD:h,VARIANT_PAGINATION:m}=t;return s.jsx("div",{className:p.helpers.classNameConcat(St.pdc,e),children:d===!0?s.jsx("div",{className:St["pdc--grid"],children:s.jsx(nr.Grid,{infinite:!0})}):s.jsxs(s.Fragment,{children:[s.jsxs(x_,{state:r,children:[s.jsx(nr.Navigation,{}),s.jsx(nr.Filters,{})]}),s.jsxs(Gc,{callback:i,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:[s.jsx("div",{className:St["pdc--grid"],children:s.jsx("div",{className:St["pdc--grid--content"],children:s.jsx(nr.Grid,{})})}),s.jsx(nr.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:c,ITEMS_PER_SECTION:l,ITEMS_PER_PAGE:u,SEARCH_PAGE_ITEM_THRESHOLD:h,VARIANT_PAGINATION:m})]})]})})};Q_.displayName="Templates.PDC";const Y_=j.createContext({}),fw=({children:e,...t})=>s.jsx(Y_.Provider,{value:t,children:e}),ni=()=>{const e=j.useContext(Y_);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},pw="_grid_e75z7_21",hw="_navigation_e75z7_44",mw="_spinner_e75z7_70",_w="_sort_e75z7_76",Hr={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:pw,"grid-header":"_grid-header_e75z7_37",navigation:hw,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:mw,sort:_w,"search-result":"_search-result_e75z7_91"},X_=({term:e})=>{const{router:t}=Ae(),{SEARCH_RESULT:r,ICONS:n}=ni(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return s.jsxs("div",{className:Hr["rearch-result--empty"],children:[s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),s.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),s.jsx(p.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:s.jsx(p.Icon,{name:n.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};X_.displayName="RearchResult.Empty";const gw=e=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),s.jsx(p.Spinner,{className:Hr.spinner})]}),yw=(e,t,r)=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),s.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),J_=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:n}=ni();return s.jsx(p.TextStructure.DivWrapper,{children:e?gw(n):yw(t,n,r)})};J_.displayName="Search.Loading";const vw=({term:e})=>{const[t,r]=j.useState(!1),{router:n}=Ae(),{searchParams:o}=ft(),{ITEMS_DEFAULT_SORT:i,ITEMS_PER_PAGE:c,ICONS:l}=ni(),u=d=>{U.navigateToSearchPage(n,e,c,1,d??i)};return s.jsx("div",{className:Hr.sort,children:s.jsx(Zo,{handleSelectValue:d=>u(d??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:l})})},xw=({query:e})=>{const{isLoading:t,products:r,pagination:n}=Us();return s.jsxs("div",{className:Hr["grid-header"],children:[s.jsxs("div",{className:Hr.navigation,children:[!t&&(r!=null&&r.length)?s.jsx(vw,{term:e}):null,s.jsx(p.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?s.jsx("div",{className:Hr["result-disclaimer"],children:s.jsx(J_,{term:e,isLoading:t,quantity:n.count})}):null]})},Z_=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:I,Z_INDEX_WAR:P})=>{const{getAvailableProductTag:C}=Cr(),{state:N}=ft(),[T,O]=j.useState(!1),[M,z]=j.useState(null),[D,B]=j.useState([]),G=j.useCallback((Z,he)=>{const fe=he?zs([he]):null;B(Z),z(fe!=null&&fe.length?fe[0]:null),O(!0)},[]),J=e?8:16,Y=(N.page-1)*((N==null?void 0:N.count)??1),X=Ft.helpers.createGridPosAndVideo(t,[],e?2:4,N.page);return s.jsxs(s.Fragment,{children:[s.jsx(Ft.Root,{children:Array.isArray(t)&&t.map((Z,he)=>{var ee,ie;const fe=C(Z.node.cluster.highlights);return s.jsx(Ft.Card,{gap:J,isMobile:e??!1,item:Z.node,order:Y+(((ee=X[he])==null?void 0:ee.position)??0),tag:fe,index:he,setSkuSelected:G,showVideo:(ie=X[he])==null?void 0:ie.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:I,Z_INDEX_WAR:P,ICONS:n}},Z.node.sku)})}),s.jsx(qs,{open:T,sku:M,skus:D,setSku:z,setVisible:O,ICONS:n,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PRODUCT_CARD_TEXTS:g,Z_INDEX_WAR:P})]})};Z_.displayName="PDC.Products";const eg=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:n,pagination:o}=Us(),{searchParams:i}=ft(),c=ni(),l=j.useMemo(()=>!r&&n.length>0&&o.count>0,[r,n.length,o.count]);return s.jsxs("div",{className:Hr.grid,children:[l&&s.jsx(xw,{query:t}),!r&&(n!=null&&n.length)?s.jsx(Z_,{...c,isMobile:e??!1,items:n}):null,(n==null?void 0:n.length)===0&&!r?s.jsx(X_,{term:t}):null,l&&s.jsx(Jc,{searchParams:i,...c})]})};eg.displayName="SearchResultContent";const bw=({className:e})=>{const{state:t}=ft(),{sendDataLayerEvent:r}=Ee(),{isMobile:n}=xe(),o=j.useCallback(i=>{var c;r({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t==null?void 0:t.query,search_found:((c=i==null?void 0:i.products)==null?void 0:c.length)>0}}})},[r,t==null?void 0:t.query]);return s.jsx(Gc,{callback:i=>o(i),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:s.jsx("div",{className:p.helpers.classNameConcat(Hr["search-result"],e),children:s.jsx(eg,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},jw=new Uf,tg=({className:e,searchParams:t,CONSTANTS:r})=>{const n=new URLSearchParams(t??""),o=String((n==null?void 0:n.get("query"))??""),i=Number((n==null?void 0:n.get("count"))??0),c=Number((n==null?void 0:n.get("page"))??0),l=String((n==null?void 0:n.get("sort"))??"");return s.jsx($f,{client:jw,children:s.jsx(fw,{...r,children:s.jsx(Sc,{state:{sort:l,query:o,base:"",facets:[],term:o,page:c,count:i},searchParams:n,children:s.jsx(bw,{className:e})})})})};tg.displayName="Search";const Sw=({page:e,data:t})=>{const{pathname:r}=Ae(),n=j.useRef(null),{sendDataLayerEvent:o,currentLocalRef:i,itemListRef:c,promotionEventRef:l}=Ee();return j.useEffect(()=>{const u=ep("login_event")||"{}",d=JSON.parse(u);if(d.name||d.method){const h=new Date(0);o({functionKey:"readyEvents",data:{event:d.name,readyData:{method:d.method}}}),Pc("login_event","",{expires:h})}},[]),j.useEffect(()=>{if(n.current===r)return;n.current=r;let u={};switch(e){case"PDP":{const h=t,m={};if(!h){u={page_category:"pdp"};break}h.items.forEach(({itemId:_,sellers:g})=>m[_]=g[0].commertialOffer.AvailableQuantity),u={page_category:"pdp",seller_ids:h.items.map(({sellers:_})=>_[0].sellerId).join(),skuStocks:m,product_reference_id:h.productReference};break}case"PDC":{const{page_category:h,page_departament:m,id:_,name:g}=Xd(),v=g,x=_;u={page_category:"lista_produtos",...m&&{page_departament:m}},c.current={item_list_name:r==="/search"?"busca":v??void 0,item_list_id:r==="/search"?void 0:x??void 0},m&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:h,page_departament:m}}});break}default:u={page_category:e},l.current={},c.current={};break}const d={region:e,...u};i.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...d}},timeout:0})},[r]),null};var Ja={exports:{}},No={exports:{}},yd;function Cw(){return yd||(yd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}r(t,{DOMAttributeNames:function(){return n},default:function(){return l},isEqualNode:function(){return i}});const n={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(u){let{type:d,props:h}=u;const m=document.createElement(d);for(const v in h){if(!h.hasOwnProperty(v)||v==="children"||v==="dangerouslySetInnerHTML"||h[v]===void 0)continue;const x=n[v]||v.toLowerCase();d==="script"&&(x==="async"||x==="defer"||x==="noModule")?m[x]=!!h[v]:m.setAttribute(x,h[v])}const{children:_,dangerouslySetInnerHTML:g}=h;return g?m.innerHTML=g.__html||"":_&&(m.textContent=typeof _=="string"?_:Array.isArray(_)?_.join(""):""),m}function i(u,d){if(u instanceof HTMLElement&&d instanceof HTMLElement){const h=d.getAttribute("nonce");if(h&&!u.getAttribute("nonce")){const m=d.cloneNode(!0);return m.setAttribute("nonce",""),m.nonce=h,h===u.nonce&&u.isEqualNode(m)}}return u.isEqualNode(d)}let c;process.env.__NEXT_STRICT_NEXT_HEAD?c=(u,d)=>{const h=document.querySelector("head");if(!h)return;const m=h.querySelectorAll('meta[name="next-head"]')||[],_=[];if(u==="meta"){const x=h.querySelector("meta[charset]");x&&_.push(x)}for(let x=0;x<m.length;x++){var g;const w=m[x].nextSibling;(w==null||(g=w.tagName)==null?void 0:g.toLowerCase())===u&&_.push(w)}const v=d.map(o).filter(x=>{for(let S=0,w=_.length;S<w;S++){const I=_[S];if(i(I,x))return _.splice(S,1),!1}return!0});_.forEach(x=>{var S;const w=x.previousSibling;if(w&&w.getAttribute("name")==="next-head"){var I;(I=x.parentNode)==null||I.removeChild(w)}(S=x.parentNode)==null||S.removeChild(x)}),v.forEach(x=>{var S;const w=document.createElement("meta");w.name="next-head",w.content="1",((S=x.tagName)==null?void 0:S.toLowerCase())==="meta"&&x.getAttribute("charset")||h.appendChild(w),h.appendChild(x)})}:c=(u,d)=>{const h=document.getElementsByTagName("head")[0],m=h.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!m){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const _=Number(m.content),g=[];for(let S=0,w=m.previousElementSibling;S<_;S++,w=(w==null?void 0:w.previousElementSibling)||null){var v;(w==null||(v=w.tagName)==null?void 0:v.toLowerCase())===u&&g.push(w)}const x=d.map(o).filter(S=>{for(let w=0,I=g.length;w<I;w++){const P=g[w];if(i(P,S))return g.splice(w,1),!1}return!0});g.forEach(S=>{var w;return(w=S.parentNode)==null?void 0:w.removeChild(S)}),x.forEach(S=>h.insertBefore(S,m)),m.content=(_-g.length+x.length).toString()};function l(){return{mountedInstances:new Set,updateHead:u=>{const d={};u.forEach(_=>{if(_.type==="link"&&_.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+_.props["data-href"]+'"]'))return;_.props.href=_.props["data-href"],_.props["data-href"]=void 0}const g=d[_.type]||[];g.push(_),d[_.type]=g});const h=d.title?d.title[0]:null;let m="";if(h){const{children:_}=h.props;m=typeof _=="string"?_:Array.isArray(_)?_.join(""):""}m!==document.title&&(document.title=m),["meta","base","link","style","script"].forEach(_=>{c(_,d[_]||[])})}}}(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)}(No,No.exports)),No.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(T,O){for(var M in O)Object.defineProperty(T,M,{enumerable:!0,get:O[M]})}r(t,{default:function(){return N},handleClientScriptLoad:function(){return S},initScriptLoader:function(){return P}});const n=Ct,o=_n,i=s,c=n._(fc),l=o._(j),u=Qm(),d=Cw(),h=Kp(),m=new Map,_=new Set,g=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],v=T=>{if(c.default.preinit){T.forEach(O=>{c.default.preinit(O,{as:"style"})});return}if(typeof window<"u"){let O=document.head;T.forEach(M=>{let z=document.createElement("link");z.type="text/css",z.rel="stylesheet",z.href=M,O.appendChild(z)})}},x=T=>{const{src:O,id:M,onLoad:z=()=>{},onReady:D=null,dangerouslySetInnerHTML:B,children:G="",strategy:J="afterInteractive",onError:Y,stylesheets:X}=T,Z=M||O;if(Z&&_.has(Z))return;if(m.has(O)){_.add(Z),m.get(O).then(z,Y);return}const he=()=>{D&&D(),_.add(Z)},fe=document.createElement("script"),ee=new Promise((ie,_e)=>{fe.addEventListener("load",function(Ce){ie(),z&&z.call(this,Ce),he()}),fe.addEventListener("error",function(Ce){_e(Ce)})}).catch(function(ie){Y&&Y(ie)});B?(fe.innerHTML=B.__html||"",he()):G?(fe.textContent=typeof G=="string"?G:Array.isArray(G)?G.join(""):"",he()):O&&(fe.src=O,m.set(O,ee));for(const[ie,_e]of Object.entries(T)){if(_e===void 0||g.includes(ie))continue;const Ce=d.DOMAttributeNames[ie]||ie.toLowerCase();fe.setAttribute(Ce,_e)}J==="worker"&&fe.setAttribute("type","text/partytown"),fe.setAttribute("data-nscript",J),X&&v(X),document.body.appendChild(fe)};function S(T){const{strategy:O="afterInteractive"}=T;O==="lazyOnload"?window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>x(T))}):x(T)}function w(T){document.readyState==="complete"?(0,h.requestIdleCallback)(()=>x(T)):window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>x(T))})}function I(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(O=>{const M=O.id||O.getAttribute("src");_.add(M)})}function P(T){T.forEach(S),I()}function C(T){const{id:O,src:M="",onLoad:z=()=>{},onReady:D=null,strategy:B="afterInteractive",onError:G,stylesheets:J,...Y}=T,{updateScripts:X,scripts:Z,getIsSsr:he,appDir:fe,nonce:ee}=(0,l.useContext)(u.HeadManagerContext),ie=(0,l.useRef)(!1);(0,l.useEffect)(()=>{const Ce=O||M;ie.current||(D&&Ce&&_.has(Ce)&&D(),ie.current=!0)},[D,O,M]);const _e=(0,l.useRef)(!1);if((0,l.useEffect)(()=>{_e.current||(B==="afterInteractive"?x(T):B==="lazyOnload"&&w(T),_e.current=!0)},[T,B]),(B==="beforeInteractive"||B==="worker")&&(X?(Z[B]=(Z[B]||[]).concat([{id:O,src:M,onLoad:z,onReady:D,onError:G,...Y}]),X(Z)):he&&he()?_.add(O||M):he&&!he()&&x(T)),fe){if(J&&J.forEach(Ce=>{c.default.preinit(Ce,{as:"style"})}),B==="beforeInteractive")return M?(c.default.preload(M,Y.integrity?{as:"script",integrity:Y.integrity,nonce:ee,crossOrigin:Y.crossOrigin}:{as:"script",nonce:ee,crossOrigin:Y.crossOrigin}),(0,i.jsx)("script",{nonce:ee,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([M,{...Y,id:O}])+")"}})):(Y.dangerouslySetInnerHTML&&(Y.children=Y.dangerouslySetInnerHTML.__html,delete Y.dangerouslySetInnerHTML),(0,i.jsx)("script",{nonce:ee,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...Y,id:O}])+")"}}));B==="afterInteractive"&&M&&c.default.preload(M,Y.integrity?{as:"script",integrity:Y.integrity,nonce:ee,crossOrigin:Y.crossOrigin}:{as:"script",nonce:ee,crossOrigin:Y.crossOrigin})}return null}Object.defineProperty(C,"__nextScript",{value:!0});const N=C;(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)})(Ja,Ja.exports);var ww=Ja.exports,Ew=ww;const Zc=U.getDefaultExportFromCjs(Ew),Pw=({children:e,ONE_TRUST:t})=>s.jsxs(s.Fragment,{children:[s.jsx(Zc,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Iw=Wh(()=>Promise.resolve(Pw),{ssr:!1}),Nw="_lgpd_vffd3_82",Rw="_success_vffd3_248",Tw="_error_vffd3_312",Ye={"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:Nw,"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:Rw,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:Tw,"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"},rg=({invalid_message:e,master_data_field:t,placeholder:r,required:n=!1,CONSTANTS:o})=>{const{isMobile:i}=xe(),{inputsStatus:c,setInputsStatus:l,setFormStatus:u,variant:d}=Rc();return s.jsx(p.TextField.Structure,{className:`${Ye["textfield-structure-modifier"]} ${d}`,input:s.jsx(p.TextField.Input,{mode:"simple",label:r,sizeVariant:i?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${Ye["input-wrapper-modifier"]} ${d}`,feedback:c[t]==="required"?"error":c[t],onChange:()=>{c[t]!=="none"&&(l(h=>({...h,[t]:"none"})),u("idle"))},required:n}),supportText:c[t]==="error"||c[t]==="required"?s.jsx("div",{className:d==="horizontal"?Ye["support-text-modifier"]:"",children:s.jsx(p.TextField.SupportText,{text:c[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};rg.displayName="Newsletter.Input";const ng=({formStatus:e,fields:t,CONSTANTS:r})=>s.jsxs(s.Fragment,{children:[Array.isArray(t)&&t.map((n,o)=>s.jsx(rg,{invalid_message:n.invalid_message,master_data_field:n.master_data_field,placeholder:n.placeholder,required:n.required,type:n.type,CONSTANTS:r},`nt-field-${n.master_data_field}-${o}`)),e==="error"&&s.jsx("div",{className:Ye.error,children:s.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});ng.displayName="Newsletter.FormFields";const sg=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:n}=xe();return s.jsxs(p.Button,{...r,className:Ye["submit-btn"],disabled:e==="success",size:n?"medium":"large",children:[s.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&s.jsx(p.Spinner,{className:Ye["loading-spinner"],size:"small"})]})};sg.displayName="Newsletter.SubmitButton";const og=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:n})=>{const o=i=>{i.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return s.jsxs(s.Fragment,{children:[s.jsx(p.Checkbox,{adornment:s.jsx(p.Icon,{name:n.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:n.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:Ye["terms-and-conditions-checkbox"]}),t==="unchecked"&&s.jsx("div",{className:Ye["terms-and-conditions-unchecked"],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:n.ICONS.alert_circle,size:"small"})},children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{children:n.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};og.displayName="Newsletter.Terms";const ig=({title:e,description:t,CONSTANTS:r})=>s.jsx("div",{className:Ye.success,children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:Ye["text-structure-modifier"],children:[s.jsxs("div",{className:Ye["success-title"],children:[s.jsx(p.Icon,{name:r.ICONS.check_circle,size:"medium"}),s.jsx("h3",{children:e})]}),s.jsx("p",{children:t})]})})});ig.displayName="Newsletter.Success";const ag=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:n,lgpdLinkLable:o,lgpdLink:i,variant:c,CONSTANTS:l})=>{const{checkboxRef:u,fields:d,formStatus:h,hasTermsAndConditions:m,handleClickToSubmit:_,handleSubmit:g,setFormStatus:v}=Rc();return s.jsx(s.Fragment,{children:h==="success"?s.jsx(ig,{description:l.NEWSLETTER_CONFIGS.messages.success_description,title:l.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:l}):s.jsxs(s.Fragment,{children:[s.jsxs("form",{className:Ye["form-wrapper"],onSubmit:x=>g(x,e,t),children:[s.jsx(ng,{formStatus:h,fields:d,CONSTANTS:l}),m&&s.jsx(og,{checkboxRef:u,formStatus:h,setFormStatus:v,CONSTANTS:l}),s.jsx(sg,{formStatus:h,type:"submit",variant:"primary",onClick:_,CONSTANTS:l})]}),(r||c==="vertical")&&s.jsxs("div",{className:Ye.lgpd,children:[n&&s.jsx("p",{children:n}),o&&s.jsx(wt,{href:i,children:o})]})]})})};ag.displayName="Newsletter.Form";const Ow=["horizontal","vertical"],el=({className:e,description:t,formPayloadOptionals:r,fields:n,masterDataEntity:o,masterDataEmailField:i,masterDataNameField:c,banner:l,altBanner:u,bannerBackground:d,termsDescription:h,lgpdLinkLable:m,lgpdLink:_,title:g,variant:v,borderTop:x,borderBottom:S,CONSTANTS:w,actionName:I="cadastrou-newsletter",originName:P="",...C})=>{if(!i||!c)return null;const N=p.helpers.ValidateProp({fieldTypes:Ow,property:v,fallback:"horizontal"});return s.jsxs("div",{className:l?d?Ye["banner-background"]:Ye["newsletter-wrapper"]:"",children:[l&&s.jsx(p.Banner.Container,{className:Ye["banner-container"],children:s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{src:l,alt:u,width:"1920",height:"500"})})}),s.jsx("div",{className:l?Ye["newsletter-provider-wrapper"+(d?"-background":"")]:"",children:s.jsx(jp,{dito:{actionName:I,originName:P},fields:n,masterDataEmailField:i,masterDataNameField:c,variant:N,CONSTANTS:w,children:s.jsx("div",{...C,className:p.helpers.classNameConcat(Ye["newsletter-root"+(l||N==="vertical"?"-banner":"")],[x&&Ye["has-border-top"],S&&Ye["has-border-bottom"],e].filter(Boolean)),"data-variant":N,children:s.jsxs("div",{className:l||N==="vertical"?Ye["newsletter-container-banner"]:Ye["newsletter-container"],children:[s.jsxs("div",{className:Ye["content-text"],children:[s.jsx("h2",{children:g}),s.jsx("p",{children:t}),!l&&N==="horizontal"&&s.jsxs("div",{className:Ye.lgpd,children:[s.jsx("p",{children:h}),m&&s.jsx(wt,{target:"_blank",href:_,children:m})]})]}),s.jsx(ag,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:w,banner:l,lgpdLink:_,lgpdLinkLable:m,termsDescription:h,variant:N})]})})})})]})};el.displayName="Newsletter";const cg=({children:e,...t})=>s.jsx("div",{...t,children:e});cg.displayName="CallToAction";const Aw="_wrapper_aejhu_1",kw="_body_aejhu_8",Ho={wrapper:Aw,body:kw,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},Mw=({children:e,className:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Ho.wrapper,t),children:e}),Lw=({data:e,ICONS:t})=>{const[r,n]=j.useState(null),o=c=>{n(l=>l===c?null:c)},{router:i}=Ae();return s.jsx("div",{className:p.helpers.classNameConcat(Ho.body),children:Array.isArray(e)&&(e==null?void 0:e.map((c,l)=>{var m;const u=r===c.id,d=c.buttonHref&&c.buttonHref!=="#",h=c.buttonHref&&c.type==="button"&&d?{onClick:()=>{var _;if((_=c.buttonHref)!=null&&_.startsWith("/")){i.push(c.buttonHref);return}window.open(c.buttonHref,"_blank")}}:{};return s.jsx("div",{children:c.type==="button"?s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{variant:"tertiary",mode:c.buttonMode??"default",size:c.buttonSize??"medium",iconNameStart:t[c.buttonIcon]??c.buttonIcon,...h,style:{marginTop:16},children:c.buttonLabel}),s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):s.jsxs(p.Accordion.Wrapper,{className:p.helpers.classNameConcat(Ho["accordion-modifier"]),children:[s.jsx(p.Accordion.Header,{id:`${l}-${c.title}`,closeIndicator:u?s.jsx(p.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:u?void 0:s.jsx(p.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(c.id),children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-sm",children:c.title})})})}),s.jsx(p.Accordion.Body,{title:"accordion-body",children:s.jsx(p.TextStructure.Root,{children:u&&s.jsxs(p.TextStructure.DivWrapper,{children:[c.subtitle?s.jsx("h3",{className:"typography-style-body-md",children:c.subtitle}):s.jsx(s.Fragment,{}),s.jsx("p",{className:"typography-style-caption",children:c.description}),c.buttonLabel&&c.buttonHref?s.jsx(wt,{href:c.buttonHref??"#",mode:c.buttonMode??"default",size:c.buttonSize??"medium",adornments:(m=c.buttonIcon)!=null&&m.length?{end:s.jsx(p.Icon,{name:t[c.buttonIcon]??c.buttonIcon})}:void 0,children:c.buttonLabel}):s.jsx(s.Fragment,{})]})})})]})},c.id)}))})},Dw=({className:e,data:t,ICONS:r,...n})=>{const[o,i]=j.useState(!1),[c,l]=j.useState(null);j.useEffect(()=>{!o&&!c&&t&&l(t)},[o,c]);const u=j.useCallback(()=>{i(d=>!d)},[]);return c?s.jsxs(Mw,{...n,className:e,children:[s.jsx("div",{className:Ho["wrapper-body"],hidden:!o,children:o&&s.jsx(Lw,{data:c.content,ICONS:r})}),s.jsx(cg,{children:s.jsx("div",{onClick:u,children:o?s.jsx(p.Button,{iconNameEnd:r.close,size:(c==null?void 0:c.helpButtonSize)??"x-large"}):s.jsx(p.Button,{iconNameStart:(c==null?void 0:c.iconLabel)??r.help,size:(c==null?void 0:c.helpButtonSize)??"x-large",children:c==null?void 0:c.label})})})]}):s.jsx(s.Fragment,{})},Fw="_formContainer_zwlly_1",zw="_formFieldGroup_zwlly_6",qw="_formFieldGroupName_zwlly_10",Bw="_formFieldWrapper_zwlly_20",Uw="_formFieldInput_zwlly_30",Hw="_success_zwlly_73",$w="_button_zwlly_110",Ww="_error_zwlly_114",gr={formContainer:Fw,formFieldGroup:zw,formFieldGroupName:qw,formFieldWrapper:Bw,formFieldInput:Uw,success:Hw,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:$w,error:Ww},Vw=({group:e,children:t,className:r})=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:p.helpers.classNameConcat(gr.formFieldGroup,r),children:[s.jsx("h1",{className:gr.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)}),lg=j.createContext({});function ug({children:e,groups:t,masterDataEntity:r,postFn:n,actionName:o="",originName:i="",POPUP_SUBMITTED_STORAGE:c}){const[l,u]=j.useState(!1),[d,h]=j.useState({}),[m,_]=j.useState([]),[g,v]=j.useState("idle"),[x,S]=j.useState(""),w=({target:{name:P,value:C}})=>{h({...d,[P]:C})},I=P=>{P.preventDefault(),n({body:{masterDataEntity:r,payload:d}}).then(async({Message:C})=>{if(C){const T=C.match(/'(.*?[^\\])'/g)||[];var N="-";for(const O of T){const M=O.substring(1,O.length-1),D=t.flatMap(B=>B.fields).find(({name:B})=>B===M);S(M),D&&(N=D.name)}return v("error"),_([N])}if(d.email){const T=await vp(d.email||""),O=new Date().toISOString();xp([{user_id:T,timestamp:O,type:"IDENTIFY",traits:{id:T,created_at:O,name:d.name,email:d.email,phone:d==null?void 0:d.phone}},{action:o,timestamp:O,type:"TRACK",user_id:T,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:d.email,nome:d.name,origem:i,...d}}}])}return window.localStorage.setItem(c,"true"),h({}),u(!0),v("success"),_([])})};return s.jsx(lg.Provider,{value:{formErrors:m,handleInputChange:w,submitForm:I,formData:d,status:g,fieldMessage:x,success:l,setSuccess:u},children:e})}function si(){return j.useContext(lg)}const Gw=({fields:e,className:t})=>{const{formData:r,handleInputChange:n,formErrors:o}=si();return s.jsx("div",{className:p.helpers.classNameConcat(gr.formFieldWrapper,t),children:e.map(({label:i,name:c,required:l,width:u="medium"})=>s.jsx(p.TextField.Input,{label:`${i}${l?"*":""}`,title:c,value:r[c]||"",name:c,sizeVariant:"large",onChange:n,required:l,feedback:o.includes(c)?"error":"none",className:gr.formFieldInput,"data-inputsize":u},c))})},Kw=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=Ae();return s.jsxs("div",{className:gr.success,children:[s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t.check_circle,size:"medium"})},children:s.jsx(p.TextStructure.DivWrapper,{className:gr["text-structure-modifier"],children:s.jsx("p",{children:e.successMessage})})}),s.jsx(p.Button,{size:"large",onClick:()=>r.push("/"),className:gr.button,children:e.returnButton})]})},Qw=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=si();return s.jsx("div",{className:gr.error,children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t.delete_circle,size:"small"})},children:s.jsx(p.TextStructure.DivWrapper,{className:gr["text-structure-modifier"],children:s.jsxs("p",{children:[e.errorMessage,r]})})})})},Yw=({children:e,className:t,ICONS:r,FORM_CONFIGS:n})=>{const{submitForm:o,status:i}=si();return s.jsx("form",{onSubmit:o,className:p.helpers.classNameConcat(gr.formContainer,t),children:i==="success"?s.jsx(Kw,{ICONS:r,FORM_CONFIGS:n}):s.jsxs(s.Fragment,{children:[e,i==="error"&&s.jsx(Qw,{ICONS:r,FORM_CONFIGS:n})]})})},Xw=e=>{const{children:t,className:r}=e;return s.jsx(ug,{...e,children:s.jsx(Yw,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Bn={Root:Xw,FieldGroup:Vw,FieldWrapper:Gw},Jw="_button_1e35m_39",Xr={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Jw,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Zw({content:e,sections:t,FORM_CONFIGS:r,ICONS:n,postFn:o,POPUP_SUBMITTED_STORAGE:i}){var u;const{isMobile:c}=xe(),l=((u=t.find(({name:d})=>d==="Form"))==null?void 0:u.data)||{};return s.jsx("div",{children:s.jsxs(p.Banner.Container,{className:Xr["banner-container"],children:[s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{className:Xr["banner-background"],src:c?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),s.jsxs(Bn.Root,{postFn:o,ICONS:n,FORM_CONFIGS:r,groups:l.groups||[],masterDataEntity:l.masterDataEntity||"",className:Xr["form-root"],POPUP_SUBMITTED_STORAGE:i,children:[l.groups.map(d=>s.jsx(Bn.FieldGroup,{group:d,children:s.jsx(Bn.FieldWrapper,{fields:d.fields,className:Xr["form-fied-wrapper"]})},d.groupLabel)),s.jsxs("div",{children:[s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),s.jsx("div",{className:Xr["button-wrapper"],children:s.jsx("div",{className:Xr["button-frame"],children:s.jsx(p.Button,{size:"large",type:"submit",className:Xr.button,children:e.buttonLabel})})})]})]})]})})}const e0="_content_1jj9i_36",t0="_trends_1jj9i_47",r0="_modal_1jj9i_1",zt={"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:e0,trends:t0,"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:r0,"search-modal__modal":"_search-modal__modal_1jj9i_100"},dg=j.createContext({}),n0=({children:e,term:t})=>{const[r,n]=j.useState([]),[o,i]=j.useState(!1);return j.useEffect(()=>{if(!t){n([]);return}(async()=>{i(!0);try{const l=await U.fetchProxy("/_v/proxy/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:u}=await l.json();n((u==null?void 0:u.searches)||[])}catch(l){console.error("Erro ao buscar sugestões:",l)}})()},[t]),s.jsx(dg.Provider,{value:j.useMemo(()=>({suggestedTerms:r,loading:o,setLoading:i}),[r,o]),children:e})},s0=({children:e,...t})=>s.jsx(n0,{...t,children:e}),o0=()=>{const e=j.useContext(dg);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},ya=(e,t,r=24,n=1,o="release:desc")=>{const i=`/search?query=${t??""}&count=${r}&page=${n}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(i)},fg=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:n,handleClose:o,setTerm:i,ICONS:c,ITEMS_DEFAULT_SORT:l,ITEMS_PER_PAGE:u,SEARCH_MODAL:d})=>{const[h,m]=j.useState(""),{suggestedTerms:_,loading:g,setLoading:v}=o0(),{router:x}=Ae(),S=j.useRef(null),w=C=>{m(C.target.value),clearTimeout(S.current),C.target.value.length>2&&(i(C.target.value),S.current=setTimeout(()=>{i(C.target.value),v(!1)},2e3))},I=C=>{C.key==="Enter"&&(h==null?void 0:h.length)>2&&(o(),ya(x,h,u,1,l))},P=C=>{o(),ya(x,C,u,1,l)};return j.useEffect(()=>{if(clearTimeout(S.current),h.length<=2||_.length>0){v(!1);return}return v(!0),S.current=setTimeout(()=>{ya(x,h,u,1,l),v(!1),o()},2e3),()=>{clearTimeout(S.current)}},[h,_]),s.jsx(p.DropDown.AutoComplete,{className:zt["modal-auto-complete"],onKeyDown:I,onInputChange:w,placeholder:e,stopClickPropagation:!1,adornment:{end:g?s.jsx(p.Spinner,{size:"small"}):s.jsx(p.Button,{variant:"tertiary",size:"small",iconNameStart:c.search,onClick:()=>{P(h)},disabled:!(h.length>2)})},children:(_==null?void 0:_.length)>0&&s.jsx(s.Fragment,{children:(_==null?void 0:_.length)>0&&(h==null?void 0:h.length)>2?s.jsx(p.DropDown.AutoCompleteList,{className:zt["modal-auto-complete__dropdown"],seeAll:s.jsx("span",{onClick:()=>P(h),children:n+h}),children:_.map((C,N)=>s.jsx(p.DropDown.ListItemWithLink,{children:s.jsx(wt,{href:`/search?query=${C.term}&count=${u}&page=1`,size:"x-small",title:C.term,disableUnderline:!0,disablePadding:!1,onClick:T=>{T.preventDefault(),o()},children:C.term})},`key-${C.term}-${N}`))}):!g&&(h==null?void 0:h.length)>3&&(_==null?void 0:_.length)===0&&s.jsxs(p.DropDown.AutoCompleteList,{className:zt["modal-search-empty"],children:[s.jsx(p.DropDown.NotResults,{description:r,title:t}),s.jsx(p.Button,{className:"all-terms",onClick:()=>{o(),x.push(d.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:d.EMPTY.ALL_TERMS_LABEL,adornment:{end:s.jsx(p.Icon,{name:c.arrow_right,size:"medium"})},children:d.EMPTY.ALL_TERMS_LABEL})]})})})};fg.displayName="SearchModal.AutoComplete";function i0({title:e,ICONS:t}){const{isMobile:r}=xe();return s.jsx(p.Modal.Header,{navigation:"top",className:zt["modal-header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(p.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(p.Modal.Title,{navigation:"top",className:zt["search-modal__title"],title:e}),s.jsx(p.Button,{className:zt["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const pg=j.createContext({searches:[],isLoading:!1,error:null});let va=null;const a0=({children:e})=>{const[t,r]=j.useState([]),[n,o]=j.useState(!0),[i,c]=j.useState(null);return j.useEffect(()=>{(async()=>{try{if(o(!0),va){r(va),o(!1);return}const u=await U.fetchProxy("/_v/proxy/search/topSearch");if(!u.ok)throw new Error(`Erro ao buscar os dados: ${u.status}`);const h=(await u.json()).data.searches||[];va=h,r(h)}catch(u){c(u instanceof Error?u.message:"Erro desconhecido")}finally{o(!1)}})()},[]),s.jsx(pg.Provider,{value:j.useMemo(()=>({searches:t,isLoading:n,error:i}),[t,n,i]),children:e})},c0=()=>{const e=j.useContext(pg);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},l0=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:n,handleClose:o,ICONS:i,ITEMS_PER_PAGE:c})=>{const{searches:l,isLoading:u}=c0(),{router:d}=Ae(),h=Array.isArray(l)?l:[];return s.jsx(s.Fragment,{children:!u&&h.length>0?s.jsx(p.ComponentList.Structure,{className:zt.trends,title:e,children:s.jsxs("div",{className:zt["trends-content"],children:[s.jsx(p.ComponentList.List,{columns:1,children:h.slice(0,n).map((m,_)=>s.jsx(p.ComponentList.ListItem,{className:zt["trends-item"],children:s.jsx(wt,{href:`/search?query=${m.term}&count=${c}&page=1`,size:"x-small",adornments:{end:s.jsx(p.Icon,{name:i.arrow_right,size:"x-small"})},disableUnderline:!0,title:m.term,onClick:()=>o(),children:m.term})},`list-item-${_}`))}),s.jsx(p.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),d.push(r)},adornment:{end:s.jsx(p.Icon,{name:i.arrow_right,size:"x-small"})},children:t})]})}):null})};function u0({SectionZone:e}){var n;const[t,r]=j.useState(null);return j.useEffect(()=>{(async()=>{try{const i=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!i.ok)return;const c=await i.json();r(c)}catch(i){console.error("[CMS FETCH ERROR]",i)}})()},[]),s.jsx("div",{className:zt.content,children:t!==null&&s.jsx(e,{data:((n=t[0])==null?void 0:n.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const hg=({className:e,trends:t,CONSTANTS:r,SectionZone:n})=>{const[o,i]=j.useState(""),{isMobile:c}=xe(),l=_f(),{setValue:u}=Wo(),{SEARCH_MODAL:d,ICONS:h,ITEMS_PER_PAGE:m,ITEMS_DEFAULT_SORT:_}=r;return s.jsxs(p.Modal.Root,{isMobile:c??!1,variant:c?"sideBottom":"sideRight",isOpen:l,setIsOpen:u,className:`${zt.modal} ${zt["search-modal__modal"]} ${e??""}`,children:[s.jsx(i0,{title:d.HEADER.TITLE,ICONS:h}),s.jsxs(p.Modal.Body,{className:zt["modal-content-body"],children:[s.jsx(s0,{term:o,children:s.jsx(fg,{placeholder:d.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:d.EMPTY.NOT_FOUND,noResultsLabel:d.EMPTY.NOT_FOUND_P,noResultsTermUrl:d.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:d.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>u(!1),setTerm:i,ICONS:h,ITEMS_DEFAULT_SORT:_,ITEMS_PER_PAGE:m,SEARCH_MODAL:d})}),t?s.jsx(a0,{children:s.jsx(l0,{title:d.TRENDS.TITLE,allTermsUrl:d.TRENDS.ALL_TERMS_URL,allTermsLabel:d.TRENDS.ALL_TERMS_LABEL,qtyTrends:d.TRENDS.QTY_TERMS,handleClose:()=>u(!1),ICONS:h,ITEMS_PER_PAGE:m})}):null,s.jsx(u0,{SectionZone:n})]})]})};hg.displayName="SearchModal";const Gt={"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"},mg=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:n,selectedStore:o}=Go();return s.jsx(p.Card,{padding:"small",shadow:!0,className:Gt["store--wrapper"],children:o?s.jsxs(s.Fragment,{children:[s.jsx(_r.ReturnButton,{ICONS:t,children:e}),s.jsx(_r.Details,{ICONS:t,showVendor:r,store:n==null?void 0:n.find(i=>i.nome===o)})]}):s.jsx(_r.Select,{ICONS:t})})};mg.displayName="LPStores.Content";const xs=({title:e,text:t,type:r,...n})=>s.jsx(p.TextStructure.DivWrapper,{...n,children:r==="title"?s.jsx("h4",{className:Gt["store--details--title"],children:e}):s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:Gt["store--details--subtitle"],children:e}),s.jsx("p",{className:Gt["store--details--text"],children:t})]})});xs.displayName="LPStores.Details";const _g=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return s.jsxs(p.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(p.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:s.jsx(p.Icon,{name:t.arrow_up,size:"small"}),openIndicator:s.jsx(p.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{gap:0,children:s.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),s.jsx(p.Accordion.Body,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Gt["store--details--vendor"],children:r.map((n,o)=>s.jsx("p",{className:"typography-style-body-sm",children:n.trim()},o))})})})]})};_g.displayName="LPStores.Details";const gg=({store:e,showVendor:t,ICONS:r})=>s.jsxs("div",{className:Gt["store--details"],children:[s.jsx(xs,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),s.jsx(xs,{title:"Endereço",text:String(e.endereco)}),e.telefone&&s.jsx(xs,{title:"Telefone",text:String(e.telefone)}),e.horario&&s.jsx(xs,{title:"Horário de funcionamento",text:String(e.horario)}),t&&s.jsx(_g,{ICONS:r,vendor:String(e.vendedoras)})]});gg.displayName="LPStores.Details";const yg=({ICONS:e,arrowDownIcon:t=s.jsx(p.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=s.jsx(p.Icon,{name:e.arrow_up,size:"small"}),list:n,selectText:o,...i})=>s.jsx(p.DropDown.DefaultDropDown,{...i,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:o,sizeVariant:"large",children:s.jsx(p.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(n)&&(n==null?void 0:n.map(c=>s.jsx(p.DropDown.ListItem,{value:c,children:c},c.replace(/\s/g,""))))})});yg.displayName="LPStores.DropDown";const vg=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=Go(),n=()=>{typeof r=="function"&&r()};return s.jsxs("button",{"aria-label":String(e),className:Gt["store--return-button"],onClick:n,onKeyDown:n,children:[s.jsx(p.Icon,{name:t.arrow_left,size:"small"}),e]})};vg.displayName="LPStores.ReturnButton";const xg=({children:e,data:t})=>s.jsx(Cp,{data:t,children:e});xg.displayName="LPStores.Root";const bg=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:n})=>{const{isMobile:o}=xe();return s.jsxs("section",{className:Gt["store--section"],children:[s.jsx(Is,{src:o?n:r,alt:t,fill:!0,className:Gt["store--section--img"]}),e]})};bg.displayName="LPStores.Section";const jg=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:n,handleSelectStore:o}=Go(),i=new Set(t.map(l=>l.cidade)),c=Array.from(i).filter(l=>typeof l=="string");return s.jsxs("div",{className:Gt["store--select"],children:[s.jsx(_r.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:c,defaultValue:n==null?void 0:n[0].cidade,ICONS:e}),s.jsx(_r.DropDown,{"data-selected-city":!!n,selectText:"Selecione a loja",handleSelectedValue:o,list:n?n==null?void 0:n.map(l=>String(l.nome)):[],ICONS:e},n==null?void 0:n[0].cidade)]})};jg.displayName="LPStores.Select";const Sg=({children:e})=>s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Gt["store--page-title"],children:s.jsx("h2",{className:Gt["store--page-title--title"],children:e})})});Sg.displayName="LPStores.Title";const _r={Content:mg,Details:gg,DropDown:yg,ReturnButton:vg,Root:xg,Section:bg,Select:jg,Title:Sg};var Cg={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 d0(e,t,r){const n=t.window,o=Object.assign({},t);if(delete o.window,n){n.dataLayer=n.dataLayer||[],n.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function f0(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 wg=[["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 p0(e,t,r){f0({id:e,custom_data:t},"#00c851",r)}var h0={DataLayer:d0,Dito:p0};async function m0(e,t){const r=Cg[e];r&&await Promise.allSettled(r.destinations.map(async n=>{try{await h0[n](e.toLowerCase(),t,n)}catch(o){console.error(`[DT] Failed to send ${e} to ${n}:`,o)}}))}async function _0(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 g0(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Eg(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 y0(e){const t=Eg(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 n=await r.json();return(n==null?void 0:n[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function Pg(e,t){var r,n,o,i;const c=(n=(r=e==null?void 0:e.shippingData)==null?void 0:r.logisticsInfo)==null?void 0:n.find(u=>u.itemId===t.id),l=(o=c==null?void 0:c.slas)==null?void 0:o.find(u=>u.id===c.selectedSla);return(i=l==null?void 0:l.pickupStoreInfo)!=null&&i.friendlyName?`retirada em loja: ${l.pickupStoreInfo.friendlyName}`:l!=null&&l.name?`Receba em casa: ${l.name}`:null}async function Ig(e){var t,r;const n=await _0(e.productId||e.productID||e.item_group_id);return n.length&&(r=(t=n[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function oi(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function vn(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 n=r();if(n!=null)return n}return null}function Ws(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,n,o,i,c;return(c=(i=(o=(n=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:n.call(r,">"))==null?void 0:o[1])==null?void 0:i.trim)==null?void 0:c.call(i)},()=>e.item_category2];for(const r of t){const n=r();if(n!=null)return n}return null}function Ng(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 v0={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function vd(e){if(!e)return null;const t=e.toLowerCase().trim();return v0[t]||null}function yr(e){var t;let r=[];if(Array.isArray(e)&&e.every(i=>typeof i=="string"))r=e;else if(Array.isArray(e))r=e.map(i=>{var c;return((c=i.additionalInfo)==null?void 0:c.brandName)||i.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"?vd(e):null;const n=r.map(vd).filter(i=>i!==null),o=[...new Set(n)].sort();return o.length>0?o.join("_"):null}function x0(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return yr(r)}function b0(e){var t;const{item:r}=e;return yr(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function j0(e,t){if(e!=null&&e.brand)return yr(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 x0(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return b0(e);default:return null}}async function S0(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async n=>{var o,i,c;return{item_id:n.productId,item_category2:Ws(n),item_category4:Ng(n),item_shipping_tier:Pg(e.orderForm,n),price:parseFloat((n.price/100).toFixed(2))||0,quantity:n.quantity||1,item_ref:n.refId||null,item_brand:yr((o=n.additionalInfo)==null?void 0:o.brandName)||((i=n.additionalInfo)==null?void 0:i.brandName)||null,item_sku:await Ig(n)||n.id||null,item_name:n.name||n.id||null,item_category:vn(n)||null,item_variant:n.skuName.split(/[-/]/)[0].trim(),item_variant2:((c=n.skuName.split(/[-/]/).pop())==null?void 0:c.trim())||"",discount:oi(n)}})):[]}async function C0(e,t){var r,n,o;const{item:i,orderForm:c}=e;return[{index:0,quantity:1,item_id:i.productId||i.item_group_id||i.sku||null,item_category2:Ws(i),item_category4:Ng(i),item_shipping_tier:t==="REMOVE_FROM_CART"?Pg(c,i):null,price:i.listPrice||parseFloat((i.price/100).toFixed(2))||0,item_ref:i.refId||i.item_ref||(i==null?void 0:i.additionalProperty.find(l=>l.name==="RefId").value)||null,item_brand:((r=i.additionalInfo)==null?void 0:r.brandName)||i.item_brand||i.brand.name||null,item_sku:i.sku||i.id||i.item_id||await Ig(i)||null,item_name:i.name||i.item_name||null,item_category:vn(i)||null,item_variant:(i.skuName||i.item_variant||i.name).split(/[-/]/)[0].trim()||null,item_variant2:i.size||((n=i==null?void 0:i.itemAttributes)==null?void 0:n.size)||((o=(i.skuName||i.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:oi(i),item_list_name:vn(i)||null,item_url:i.item_url||null}]}async function w0(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,n,o,i,c;return{price:((r=t==null?void 0:t.price)==null?void 0:r.list)||(t==null?void 0:t.price)||((n=t==null?void 0:t.offers)==null?void 0:n.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(l=>l.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:yr((o=t==null?void 0:t.brand)==null?void 0:o.name)||yr(e.brand)||yr(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)||((i=t==null?void 0:t.seo)==null?void 0:i.title)||null,item_category:vn(t)||null,item_variant:((c=t==null?void 0:t.name)==null?void 0:c.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:Ws(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:oi(t)||null,item_list_name:(e==null?void 0:e.itemListName)||vn(t)||null}})}async function E0(e){var t,r,n;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(i=>i.name==="RefId").value||null,item_brand:yr(o.brand.name)||yr(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:vn(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:Ws(o)||((n=(r=o==null?void 0:o.category)==null?void 0:r.split(">")[1])==null?void 0:n.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:oi(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 P0(e){var t;if(!g0(e==null?void 0:e.bannerUrl))return[];const n=await y0(e==null?void 0:e.bannerUrl),o=n==null?void 0:n.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:Eg(e==null?void 0:e.bannerUrl),item_brand:yr(n.brand)||null,item_name:(n==null?void 0:n.productName)||(n==null?void 0:n.alternateName)||(n==null?void 0:n.item_name)||null,item_category:vn(n)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:Ws(n)||null,item_id:(n==null?void 0:n.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function I0(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 S0(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return C0(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return w0(e);case"VIEW_ITEM":return E0(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return P0(e);default:return null}}function N0(e){var t,r,n;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],i=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!o.length||!i.length)return null;const c=o.find(m=>m==null?void 0:m.paymentSystem)||o[0],l=String((c==null?void 0:c.paymentSystem)||"").trim();if(!l)return null;const u=i.find(m=>String(m.id)===l),d=((n=u==null?void 0:u.name)==null?void 0:n.toLowerCase())||"",h=wg.find(([m])=>d.includes(m));return h?h[1]:null}function R0(e){var t,r,n,o;if(!e.orderForm)return null;const i=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!i.length)return null;const c=((r=i[0])==null?void 0:r.payments)||[];if(!c.length)return null;const l=((o=(n=c[0])==null?void 0:n.paymentSystemName)==null?void 0:o.toLowerCase())||"",u=wg.find(([d])=>l.includes(d));return u?u[1]:null}function T0(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return N0(e);case"PURCHASE":case"CUSTOM_PURCHASE":return R0(e);default:return null}}var O0={brand:j0,items:I0,payment_type:T0,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 i=`${o}/_v/user-info`,c=await fetch(i,{method:"POST",body:JSON.stringify({email:e.userEmail})});return c.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await c.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,n,o,i;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((n=(r=e.item)==null?void 0:r.offers)==null?void 0:n.priceCurrency)||"BRL":((i=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:i.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,n;const i=(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).find(c=>c.id==="Discounts");return i?Math.abs(i.value)/100:0},subtotal:(e,t)=>{var r,n;return(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).filter(c=>c.id==="Items").reduce((c,l)=>c+(l.value||0),0)/100||0},coupon_message:(e,t)=>{var r;if(e.couponMessage)return e.couponMessage;const n=((r=e.orderForm)==null?void 0:r.messages)||[];if(n.length===0)return null;const o=n.filter(i=>i.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(i=>i.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var r,n;return e.appliedCoupon||((n=(r=e==null?void 0:e.orderForm)==null?void 0:r.marketingData)==null?void 0:n.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 n=e.orderForm;return n?(((r=n.shippingData)==null?void 0:r.logisticsInfo)||[]).some(c=>{var l;return(l=c.slas)==null?void 0:l.some(u=>u.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const r=e.orderForm;if(!r)return null;const n={};for(const i of r.shippingData.logisticsInfo){const c=r.items[i.itemIndex];if(c)for(const l of i.slas){const u=l.name;n[u]||(n[u]={shipping_tier:l.name,delivery_time:parseInt(l.shippingEstimate),shipping:parseFloat((l.price/100).toFixed(1)),line_items:[]}),n[u].line_items.push(c.id)}}return Object.values(n).map(i=>({shipping:i.shipping,shipping_tier:i.shipping_tier,delivery_time:i.delivery_time,line_items:i.line_items.join(",")}))||null},shipping:(e,t)=>{var r,n,o;return((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).reduce((c,l)=>{var u,d;const h=(u=l.slas)==null?void 0:u.find(m=>m.id===l.selectedSla);return c+((d=h==null?void 0:h.price)!=null?d:0)},0)},shipping_tier:(e,t)=>{var r,n,o,i;const l=((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).find(_=>_.selectedSla);if(!l)return null;const u=(i=l.slas)==null?void 0:i.find(_=>_.id===l.selectedSla);if(!u)return null;const{deliveryChannel:d,name:h,pickupStoreInfo:m}=u;return d==="pickup-in-point"?`retirada em loja${m!=null&&m.friendlyName?`: ${m.friendlyName}`:""}`:d==="delivery"?`receba em casa${h?`: ${h}`:""}`:null},transaction_id:(e,t)=>{var r,n;return((n=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:n.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function A0(e={},t){const r=Cg[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async o=>{const i=O0[o];return typeof i!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await i(e,t)]}))):void 0}async function k0(e,t={}){try{const r=await A0(t,e);return await m0(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}var Za={exports:{}},Rg={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{PathParamsContext:function(){return i},PathnameContext:function(){return o},SearchParamsContext:function(){return n}});const r=j,n=(0,r.createContext)(null),o=(0,r.createContext)(null),i=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(n.displayName="SearchParamsContext",o.displayName="PathnameContext",i.displayName="PathParamsContext")})(Rg);var ec={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(n){return Array.isArray(n)?n[1]:n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(ec,ec.exports);var M0=ec.exports,tc={exports:{}},rc={exports:{}},nc={exports:{}},sc={exports:{}},Ro={exports:{}},xd;function tl(){return xd||(xd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return i}});const r=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}const o=globalThis.AsyncLocalStorage;function i(){return o?new o:new n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Ro,Ro.exports)),Ro.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,tl().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)})(sc,sc.exports);var L0=sc.exports;(function(e,t){"TURBOPACK { transition: next-shared }";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,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return n.requestAsyncStorage}});const n=L0;function o(i){const c=n.requestAsyncStorage.getStore();if(c)return c;throw new Error("`"+i+"` 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)})(nc,nc.exports);var D0=nc.exports,oc={exports:{}},ic={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,tl().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)})(ic,ic.exports);var F0=ic.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=F0;(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)})(oc,oc.exports);var z0=oc.exports,ac={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r;(function(n){n[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.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)})(ac,ac.exports);var q0=ac.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(x,S){for(var w in S)Object.defineProperty(x,w,{enumerable:!0,get:S[w]})}r(t,{RedirectType:function(){return l},getRedirectError:function(){return u},getRedirectStatusCodeFromError:function(){return v},getRedirectTypeFromError:function(){return g},getURLFromRedirectError:function(){return _},isRedirectError:function(){return m},permanentRedirect:function(){return h},redirect:function(){return d}});const n=D0,o=z0,i=q0,c="NEXT_REDIRECT";var l;(function(x){x.push="push",x.replace="replace"})(l||(l={}));function u(x,S,w){w===void 0&&(w=i.RedirectStatusCode.TemporaryRedirect);const I=new Error(c);I.digest=c+";"+S+";"+x+";"+w+";";const P=n.requestAsyncStorage.getStore();return P&&(I.mutableCookies=P.mutableCookies),I}function d(x,S){S===void 0&&(S="replace");const w=o.actionAsyncStorage.getStore();throw u(x,S,w!=null&&w.isAction?i.RedirectStatusCode.SeeOther:i.RedirectStatusCode.TemporaryRedirect)}function h(x,S){S===void 0&&(S="replace");const w=o.actionAsyncStorage.getStore();throw u(x,S,w!=null&&w.isAction?i.RedirectStatusCode.SeeOther:i.RedirectStatusCode.PermanentRedirect)}function m(x){if(typeof x!="object"||x===null||!("digest"in x)||typeof x.digest!="string")return!1;const[S,w,I,P]=x.digest.split(";",4),C=Number(P);return S===c&&(w==="replace"||w==="push")&&typeof I=="string"&&!isNaN(C)&&C in i.RedirectStatusCode}function _(x){return m(x)?x.digest.split(";",3)[2]:null}function g(x){if(!m(x))throw new Error("Not a redirect error");return x.digest.split(";",2)[1]}function v(x){if(!m(x))throw new Error("Not a redirect error");return Number(x.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)})(rc,rc.exports);var B0=rc.exports,cc={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,{isNotFoundError:function(){return i},notFound:function(){return o}});const n="NEXT_NOT_FOUND";function o(){const c=new Error(n);throw c.digest=n,c}function i(c){return typeof c!="object"||c===null||!("digest"in c)?!1:c.digest===n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(cc,cc.exports);var U0=cc.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var d in u)Object.defineProperty(l,d,{enumerable:!0,get:u[d]})}r(t,{ReadonlyURLSearchParams:function(){return c},RedirectType:function(){return n.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect}});const n=B0,o=U0;class i extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class c extends URLSearchParams{append(){throw new i}delete(){throw new i}set(){throw new i}sort(){throw new 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)})(tc,tc.exports);var H0=tc.exports,Tg={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return i}});const n=_n._(j),o=n.default.createContext(null);function i(c){const l=(0,n.useContext)(o);l&&l(c)}})(Tg);var To={exports:{}},xa={},bd;function $0(){return bd||(bd=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,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});const r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(c){super("Bail out to client-side rendering: "+c),this.reason=c,this.digest=r}}function o(i){return typeof i!="object"||i===null||!("digest"in i)?!1:i.digest===r}}(xa)),xa}var Oo={exports:{}},Ao={exports:{}},jd;function W0(){return jd||(jd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,tl().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)}(Ao,Ao.exports)),Ao.exports}var Sd;function V0(){return Sd||(Sd=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=W0();(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)),Oo.exports}var Cd;function G0(){return Cd||(Cd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const r=$0(),n=V0();function o(i){const c=n.staticGenerationAsyncStorage.getStore();if(!(c!=null&&c.forceStatic)&&c!=null&&c.isStaticGeneration)throw new r.BailoutToCSRError(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)}(To,To.exports)),To.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(w,I){for(var P in I)Object.defineProperty(w,P,{enumerable:!0,get:I[P]})}r(t,{ReadonlyURLSearchParams:function(){return u.ReadonlyURLSearchParams},RedirectType:function(){return u.RedirectType},ServerInsertedHTMLContext:function(){return d.ServerInsertedHTMLContext},notFound:function(){return u.notFound},permanentRedirect:function(){return u.permanentRedirect},redirect:function(){return u.redirect},useParams:function(){return g},usePathname:function(){return m},useRouter:function(){return _},useSearchParams:function(){return h},useSelectedLayoutSegment:function(){return S},useSelectedLayoutSegments:function(){return x},useServerInsertedHTML:function(){return d.useServerInsertedHTML}});const n=j,o=Gp(),i=Rg,c=M0,l=Ac,u=H0,d=Tg;function h(){const w=(0,n.useContext)(i.SearchParamsContext),I=(0,n.useMemo)(()=>w?new u.ReadonlyURLSearchParams(w):null,[w]);if(typeof window>"u"){const{bailoutToClientRendering:P}=G0();P("useSearchParams()")}return I}function m(){return(0,n.useContext)(i.PathnameContext)}function _(){const w=(0,n.useContext)(o.AppRouterContext);if(w===null)throw new Error("invariant expected app router to be mounted");return w}function g(){return(0,n.useContext)(i.PathParamsContext)}function v(w,I,P,C){P===void 0&&(P=!0),C===void 0&&(C=[]);let N;if(P)N=w[1][I];else{const z=w[1];var T;N=(T=z.children)!=null?T:Object.values(z)[0]}if(!N)return C;const O=N[0],M=(0,c.getSegmentValue)(O);return!M||M.startsWith(l.PAGE_SEGMENT_KEY)?C:(C.push(M),v(N,I,!1,C))}function x(w){w===void 0&&(w="children");const I=(0,n.useContext)(o.LayoutRouterContext);return I?v(I.tree,w):null}function S(w){w===void 0&&(w="children");const I=x(w);if(!I||I.length===0)return null;const P=w==="children"?I[0]:I[I.length-1];return P===l.DEFAULT_SEGMENT_KEY?null: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)})(Za,Za.exports);var K0=Za.exports,wd=K0;function Q0({accountName:e}){const{user:t}=ss(),r=wd.usePathname(),n=wd.useSearchParams(),o=(t==null?void 0:t.sub)||(t==null?void 0:t.email),i=t==null?void 0:t.userId;return j.useEffect(()=>{o&&i?k0("CUSTOM_USER_INFO",{userId:i,userEmail:o,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[r,n,o,i]),null}const Y0="_active_gk7mu_380",X0="_banner_gk7mu_655",J0="_container_gk7mu_689",Z0="_slugs_gk7mu_703",eE="_root_gk7mu_785",tE="_otContainer_gk7mu_797",Zr={active:Y0,banner:X0,container:J0,slugs:Z0,"content-page-modifier":"_content-page-modifier_gk7mu_741",root:eE,otContainer:tE};function rE({title:e,srcImages:t,children:r,className:n,...o}){const{isMobile:i}=xe(),c=i?t.mobile:t.desktop;return s.jsxs("div",{...o,className:p.helpers.classNameConcat(Zr.banner,n),children:[s.jsx(at.Image,{src:c,alt:e,fill:!0}),r||s.jsx("h1",{children:e})]})}const lc=({children:e,className:t})=>s.jsx("div",{className:p.helpers.classNameConcat(Zr.container,t),children:e});lc.displayName="Politicas.Container";const nE=({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 j.useEffect(()=>{window.OneTrust&&t()},[]),s.jsxs(s.Fragment,{children:[s.jsx(Zc,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),s.jsx("div",{className:Zr.otContainer,children:s.jsx("div",{id:"otnotice-container",children:s.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},Ed={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Og=e=>{const{nextimage:t}=Ae();return s.jsx(Qt,{name:e.name,children:e.data.banners.map((r,n)=>s.jsx("div",{className:Ed["card-image-wrapper"],children:s.jsx("div",{className:Ed["card-image-container"],children:s.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},n))})},sE="_embedLiveContainer_1ss0l_2",oE="_embedLivePlayer_1ss0l_7",Pd={embedLiveContainer:sE,embedLivePlayer:oE},Ag=({data:e,name:t})=>s.jsx(Qt,{name:t,children:s.jsx("div",{className:Pd.embedLiveContainer,children:s.jsx("div",{className:Pd.embedLivePlayer,children:e.banner.videosrc?s.jsx(at.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):s.jsxs("div",{children:[s.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),s.jsx(Zc,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),uc={"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 iE(e,t){const{mediatorRef:r}=xe();j.useEffect(()=>r.current.subscribe(e,t),[e,t])}const Id=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:n,totalPages:o,position:i,hideControllers:c,left:l,isFirst:u,ICONS:d})=>{const[h,m]=j.useState("default");return iE("herobanner:change_controllers_variant",_=>{u&&m(_.includes("white")?"inverse":"default")}),s.jsxs(p.Carousel.Controller,{className:uc["carousel-controllers-modifier"],position:i??"absolute","data-hide-controllers":c,bottom:"16px",top:"unset",left:l,children:[s.jsxs(p.Carousel.Arrows,{className:uc["carrousel-arrows-display-controller"],children:[s.jsx(p.Button,{variant:"tertiary",onClick:e,adornment:{start:s.jsx(p.Icon,{name:d.arrow_left})},mode:h}),s.jsx(p.Button,{variant:"tertiary",onClick:t,adornment:{start:s.jsx(p.Icon,{name:d.arrow_right})},mode:h})]}),s.jsx(p.Carousel.Bullets,{page:n,total:o,onBulletClick:r,mode:h})]})},aE=({children:e,data:t,banner:r,...n})=>{const{mediatorRef:o}=xe();return t.data.first?s.jsx(Yo,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...n,children:e}):s.jsx(s.Fragment,{children:e})},kg=e=>{const{initialize:t,pagination:r,controller:n,itemsStyles:o}=p.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),i=j.useRef(void 0),c=j.useMemo(()=>E_(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),l=j.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(i.current=setInterval(()=>{n==null||n.nextPage()},e.data.config.slideDuration*1e3))},[n,e.data.config.slideDuration,r.totalPages]),u=j.useCallback(h=>{clearInterval(i.current),l(),h()},[l]),d=j.useMemo(()=>{var h;return{nextOnClick:()=>u(()=>n==null?void 0:n.nextPage()),prevOnClick:()=>u(()=>n==null?void 0:n.prevPage()),onBulletClick:m=>u(()=>n==null?void 0:n.navigateTo(m)),currentPage:r.currentPage,totalPages:r.totalPages,position:c.position,hideControllers:((h=e.data.config)==null?void 0:h.hideControllers)??!1,left:c.left}},[r.currentPage,r.totalPages,c.position,e.data.config.hideControllers,u,n]);return j.useEffect(()=>(l(),()=>clearInterval(i.current)),[l]),s.jsx(Qt,{name:e.name,children:s.jsxs(p.Carousel.Root,{innerRef:h=>{t(h)},className:p.helpers.classNameConcat(uc["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:[c.shouldRender==="top"&&r.totalPages>1?s.jsx(Id,{ICONS:e.ICONS,...d,isFirst:e.data.first}):s.jsx(s.Fragment,{}),s.jsx(p.Carousel.Body,{children:e==null?void 0:e.data.banners.map((h,m)=>s.jsx(p.Carousel.Item,{style:o,children:s.jsx(aE,{data:e,banner:h,children:s.jsx($s,{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:h,index:m,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&m===0&&{priority:!0}})})},`hero-banner-item-${m}`))}),c.shouldRender==="bottom"&&r.totalPages>1?s.jsx(Id,{ICONS:e.ICONS,...d}):s.jsx(s.Fragment,{})]})})},Mn={"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"},Mg=({data:e,name:t,CONSTANTS:r})=>{var h;const{isMobile:n}=xe(),o=e.config.size??"medium",i=e.config.disableCarouselMobile??!1,{initialize:c,pagination:l,controller:u,itemsStyles:d}=p.Carousel.useCarousel({itemsPerPage:n?e==null?void 0:e.config.slidesPerViewMobile:(h=e==null?void 0:e.config)==null?void 0:h.slidesPerView,gap:n?e.config.gapMobile:e.config.gap,direction:n&&i?"column":"row"});return s.jsx(Qt,{name:t,children:s.jsx(p.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:s.jsxs(p.Carousel.Root,{innerRef:m=>{c(m)},className:p.helpers.classNameConcat(Mn["carousel-modifier"],"common-section"),children:[o==="medium"?s.jsxs(p.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&s.jsx(p.TextStructure.DivWrapper,{className:Mn["carousel-title-modifier"],children:s.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),n&&l.totalPages>1&&s.jsx(p.Carousel.Controller,{className:p.helpers.classNameConcat(Mn["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?Mn["title-on"]:void 0),children:s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_right})}})]})})]}):s.jsx(s.Fragment,{}),s.jsx(p.Carousel.Body,{children:e.bennefit.map((m,_)=>s.jsx(p.Carousel.Item,{className:Mn["card-modifier"],style:d,children:s.jsx(p.Card,{stroke:!0,padding:"small",children:s.jsx(p.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:s.jsx(p.Icon,{name:m.icon,size:o==="medium"?"medium":"small"})},children:s.jsxs(p.TextStructure.DivWrapper,{alignItems:"start",children:[s.jsx("h3",{className:"typography-style-body-md",children:m.title}),m.subtitle&&m.subtitle.length?s.jsx("p",{className:"typography-style-body-xs",children:m.subtitle}):s.jsx(s.Fragment,{})]})})})},`bennefit=${_}`))}),!n&&l.totalPages>1?s.jsxs(p.Carousel.Controller,{className:Mn["row-controller-modifier"],children:[s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_right})}})]}),s.jsx(p.Carousel.Bullets,{page:l.currentPage,total:l.totalPages,onBulletClick:m=>u==null?void 0:u.navigateTo(m)})]}):s.jsx(s.Fragment,{})]})})})},Lg=({data:{componentIndex:e,...t},name:r,CONSTANTS:n})=>s.jsx(Qt,{name:r,children:s.jsx(el,{...t,CONSTANTS:n})}),Dg=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:n,name:o})=>s.jsx(Qt,{name:o,children:s.jsx("div",{className:p.helpers.classNameConcat(Qa.textContentSection,n??""),style:e.borderTop?{borderTop:"none"}:void 0,children:s.jsx(k_,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),Nd={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Fg=({data:e,id:t,ICONS:r,className:n,name:o})=>{var l;const[i,c]=j.useState([]);return s.jsx(Qt,{name:o,children:s.jsxs(p.Utils.Column,{gap:"var(--gap-vertical-sm)",className:n??"",children:[e.titleAccordion?s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):s.jsx(s.Fragment,{}),(l=e.accordions)==null?void 0:l.map((u,d)=>s.jsxs(p.Accordion.Wrapper,{className:Nd["accordion-modifier"],children:[s.jsx(p.Accordion.Header,{id:`${t}-text-accordion-${d}`,openIndicator:s.jsx(p.Icon,{name:r.arrow_down}),closeIndicator:s.jsx(p.Icon,{name:r.arrow_up}),startOpen:i.includes(d),onClick:()=>c(h=>h.includes(d)?h.filter(m=>m!==d):[...h,d]),children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h3",{className:"typography-style-body-md-strong",children:u.title}),u.subtitle&&u.subtitle.length?s.jsx("h2",{children:u.subtitle}):s.jsx(s.Fragment,{})]})})}),s.jsx(p.Accordion.Body,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Nd["accordion-body-modifier"],children:s.jsx(dn.Editor,{editorKey:`${t}-editor-${d}`,blockRenderMap:w_,editorState:u.text?Qc(JSON.parse(u.text)):dn.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${d}-${i.includes(d)}`))]})})},zg=async e=>{const{type:t}=e,r=t==="collectionSearch"?"/_v/proxy/search/product":"/_v/proxy/search/crosselling",n=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await U.fetchProxy(r,{method:"POST",headers:{"Content-Type":"application/json"},body:n}).then(i=>i.json()).then(i=>t==="collectionSearch"?i.data.products:i.products)).filter(i=>!!i.node.availability.status)},cE="_shelf__container_bi04n_10",qg={shelf__container:cE},lE=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:n})=>{const[o,i]=j.useState([]),{isMobile:c}=xe(),{ref:l,inView:u}=Hd.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:d}=Ee();return j.useEffect(()=>{if(!e)return;function h(){var m,_;zg({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:((_=e==null?void 0:e.params)==null?void 0:_.sort)??r.ITEMS_DEFAULT_SORT}}).then(g=>{i(g)})}h()},[e]),j.useEffect(()=>{!u||o.length===0||d({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[u,o]),o.length===0?null:s.jsx("div",{ref:l,className:qg.shelf__container,children:s.jsx(Ps.Shelf,{title:t??"Você também pode gostar",itemsPerPage:n?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(o)&&o.map(({node:h},m)=>{const{availability:{status:_}}=h;return _?s.jsx(Ps.Card,{item:h,isMobile:c,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},h.id):null})})})},uE=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[n,o]=j.useState([]),{isMobile:i}=xe(),{ref:c,inView:l}=Hd.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=Ee(),d=j.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return j.useEffect(()=>{if(!e)return;function h(){var m;zg({type:"recommendationSearch",facets:d,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(_=>o(_))}h()},[d,e]),j.useEffect(()=>{if(!l||n.length===0||(e==null?void 0:e.type)==="suggestions")return;const h=t??"Você também pode gostar";u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:n},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[l,n]),(n==null?void 0:n.length)===0?null:(e==null?void 0:e.type)==="suggestions"?s.jsx(gh,{products:n,innerRef:c,inView:l,CONSTANTS:r}):s.jsx("div",{ref:c,className:qg.shelf__container,children:s.jsx(Ps.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(n)&&n.map(({node:h},m)=>{const{availability:{status:_}}=h;return _?s.jsx(Ps.Card,{item:h,isMobile:i,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},h.id):null})})})},Bg=({data:e,name:t,CONSTANTS:r})=>{const{productId:n}=_p();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,i)=>s.jsx(Qt,{name:t,children:s.jsx(uE,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:n,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${i}`)}))},Ug=({data:e,CONSTANTS:t,searchModal:r,name:n})=>{var i;const o=(i=e==null?void 0:e.productLists)==null?void 0:i.filter(c=>!!c.collectionId||!!c.search_base_name);return!o||o.length===0?null:o.map((c,l)=>{const u=c.collectionId?{term:"",facets:[{key:"productclusterids",value:`${c.collectionId}`}]}:{term:c.search_base_name,facets:[]};return s.jsx(Qt,{name:n,children:s.jsx(lE,{title:c.title,collectionSearch:{params:{count:c.number_of_items,sort:c.sort},...u},searchModal:r,CONSTANTS:t},`shelf=${l}`)})})},dE="_popup_5taxs_9",fE="_popup__overlay_5taxs_19",pE="_popup__modal_5taxs_27",Dt={popup:dE,popup__overlay:fE,popup__modal:pE,"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"},hE=e=>s.jsx("div",{className:Dt["popup__modal--success"],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:e.ICONS.check_circle,size:"large"})},children:s.jsxs(p.TextStructure.DivWrapper,{className:Dt["text-structure-modifier"],children:[s.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),s.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),mE=e=>{const{title:t,description:r,groups:n,ICONS:o}=e,{formErrors:i,submitForm:c,success:l}=si(),[u,d]=j.useState(!1);return s.jsx("form",{onSubmit:c,className:Dt.formContainer,children:s.jsxs("div",{className:Dt["popup__modal--form"],children:[s.jsxs(p.TextStructure.DivWrapper,{className:Dt["popup__modal--header"],children:[s.jsx("strong",{className:"typography-style-body-md-strong",children:t}),s.jsx("p",{className:"typography-style-body-xs",children:r})]}),l?s.jsx(hE,{...e}):s.jsxs(s.Fragment,{children:[n.map(h=>s.jsx(Bn.FieldGroup,{group:h,children:s.jsx(Bn.FieldWrapper,{fields:h.fields})},h.groupLabel)),s.jsx(p.Checkbox,{className:Dt["popup__modal--checkbox"],adornment:s.jsx(p.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:u,onChange:()=>d(!u)}),s.jsxs("div",{children:[!u&&s.jsx(p.TextStructure.DivWrapper,{className:Dt["popup__modal--status"],children:s.jsxs("p",{className:"typography-style-body-caption",children:[s.jsx(p.Icon,{size:"small",name:o.alert_circle}),Uv]})}),s.jsx(p.Button,{disabled:!u,size:"medium",type:"submit",children:$v}),i.length?s.jsx(p.TextStructure.DivWrapper,{className:Dt["popup__modal--status"],children:s.jsx("p",{className:p.helpers.classNameConcat(Dt.formSubmitWarning,"typography-style-body-xs"),children:Hv})}):null]})]})]})})},Hg=({data:e,name:t,CONSTANTS:r})=>{const[n,o]=j.useState(!1),i=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,c=()=>{o(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return j.useEffect(()=>{setTimeout(()=>!i&&o(!0),2e3)},[]),e.active&&n?s.jsx(Qt,{name:t,children:s.jsxs("div",{className:Dt.popup,children:[s.jsx("div",{onClick:c,className:Dt.popup__overlay}),s.jsxs("div",{className:Dt.popup__modal,children:[s.jsx(p.Button,{onClick:c,variant:"tertiary",className:Dt["popup__modal--close"],children:s.jsx(p.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),s.jsx("div",{children:s.jsx(at.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),s.jsx(ug,{...e,children:s.jsx(mE,{...e,ICONS:r.ICONS})})]})]})}):null},_E={"Image Grid":Og,"Embed Live":Ag,"Banner Carousel":kg,Banner:Xc,"Bennefits Bar":Mg,newsletter:Lg,TextContent:Dg,TextAccordion:Fg,"Product Carousel":Ug,"PDP Product Carousel":Bg,"Popup Modal":Hg},$g=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((n,o)=>{const i=_E[n.name],c={...(r==null?void 0:r[n.name])??{}};return t&&o===0&&(n.data.first=!0),n.data.componentIndex=o,n.name==="TextAccordion"&&(c.id=`text-accordion-${o}`),i?s.jsx(i,{name:n.name,data:n.data,...c},`section-zone-component-${o}`):null});async function gE({slug:e,pageData:t,tabsData:r,oneTrust:n}){var l,u,d,h;const i=(r?[...r].sort((m,_)=>m.config.tabConfig.order-_.config.tabConfig.order):[]).map(m=>({slug:m.config.seo.slug||Ua(m.config.tabConfig.title),title:m.config.tabConfig.title})),c=r==null?void 0:r.find(m=>m.config.seo.slug===`/${decodeURIComponent(e)}`);return c&&(c.id=Ua(c.config.seo.slug||"")),s.jsxs("div",{className:Zr.root,children:[s.jsx(lc,{children:s.jsx(rE,{title:(l=t==null?void 0:t.config.banners)==null?void 0:l.altImageBackgroud,srcImages:{desktop:(u=t==null?void 0:t.config.banners)==null?void 0:u.imageBackgroudDesk,mobile:(h=(d=t==null?void 0:t.config)==null?void 0:d.banners)==null?void 0:h.imageBackgroudMobile}})}),s.jsxs(lc,{children:[s.jsx("div",{className:Zr.slugs,children:i.map(m=>s.jsx(wt,{href:m.slug?`/politicas/${m.slug.replace(/^\/+/,"")}`:"#",className:m.slug===(c==null?void 0:c.id)?Zr.active:"",title:m.title,scroll:!1,children:m.title},m.slug.replace(/^\/+/,"")))}),s.jsx("div",{className:Zr["content-page-modifier"],children:e==="privacidade-e-seguranca"?s.jsx(nE,{oneTrust:n}):s.jsx($g,{data:(c==null?void 0:c.sections)??[]})})]})]})}const xr={"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"},Wg=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:r}=Ae();return s.jsx("div",{children:s.jsxs(p.Banner.Container,{className:xr["banner-wrapper"],children:[s.jsxs(p.Banner.ImageWrapper,{className:xr["banner-image"],children:[s.jsx(at.Image,{className:xr["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),s.jsx(at.Image,{className:xr["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),s.jsx(p.Banner.Slot,{className:p.helpers.classNameConcat(xr["text-wrapper"],xr["text-wrapper-modifier"]),margin:107,children:s.jsxs(p.TextStructure.Root,{layoutProps:{textRow:{className:xr["custom-row"]}},children:[s.jsxs(p.TextStructure.DivWrapper,{className:p.helpers.classNameConcat(xr["text-area"],xr["text-area-modifier"]),children:[s.jsx("h1",{className:"typography-style-display-strong",children:e.title}),s.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),s.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),s.jsx(p.Button,{onClick:()=>r.push("/"),children:t})]})})]})})};Wg.displayName="ErrorTemplate";const yE={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},vE=j.createContext(yE);function xE(){return j.useContext(vE)}function ba(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}function ja(){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 bE="_container_df1ql_11",Sa={"action-button":"_action-button_df1ql_1",container:bE,"container-icon":"_container-icon_df1ql_31"};function jE({icon:e,text:t,onClick:r,isActive:n=!1}){const o=i=>{i.preventDefault(),n&&r()};return s.jsxs("div",{className:p.helpers.classNameConcat(Sa["action-button"],n?"":"disable"),onClick:i=>o(i),children:[s.jsx("div",{className:p.helpers.classNameConcat(Sa["container-icon"],n?"":"disable"),children:s.jsx("img",{src:e,alt:"icon"})}),s.jsxs("div",{className:p.helpers.classNameConcat(Sa.container,n?"":"disable"),children:[s.jsx("span",{children:t}),s.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const SE="_container_k11me_1",CE="_header_k11me_18",wE="_body_k11me_45",hs={container:SE,header:CE,body:wE,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function EE(e,t=!1,r){const{base:n,orderformId:o}=e,i=r==null?void 0:r.split("codigo: ")[1],c=localStorage.getItem("maiscarrinho"),l={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(r??"")}`,cp:i?`&utmi_cp=${i}`:"",source:`&utm_source=${c}`};return t?`${n}/checkout/?orderFormId=${o}${l.source}${l.campaign}${l.cp}${l.medium}#/cart`:`${n}/checkout/?orderFormId=${o}${l.source}${l.campaign}${l.cp}${l.medium}#/payment`}function PE(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 Rd({mode:e,config:t,newCart:r}){const[n,o]=j.useState(!1),[i,c]=j.useState(""),l=EE(t,e==="cart",t.sellerCode),{useClipboard:u}=qo.hooks,[,d]=u();function h(){o(!0);const m=document.createElement("textArea");m.readOnly=!0,m.contentEditable="true",m.value=i,document.body.appendChild(m),m.select(),d(m.value),document.body.removeChild(m),setTimeout(()=>{o(!1)},3e3)}return j.useEffect(()=>{c(""),c("Gerando link..."),PE(l).then(m=>c(m)).catch(()=>c("Algo deu errado, tente novamente mais tarde"))},[l]),s.jsxs("div",{className:hs.container,children:[s.jsxs("div",{className:hs.header,children:[s.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),s.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),s.jsxs("div",{className:hs.body,children:[s.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
27
- compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),s.jsxs("form",{children:[s.jsx("input",{type:"text",disabled:!0,value:i}),s.jsxs("div",{className:p.helpers.classNameConcat(hs["copy-cart-button"],i?"active":""),children:[s.jsx("img",{src:"/images/Feedback_copiado/ico_share.png",alt:"share",className:"share",onClick:()=>i&&h()}),n&&s.jsx("div",{className:"share-input-copy-feedback",children:"Link Copiado"})]})]}),s.jsx("button",{className:hs["reset-orderform-button"],onClick:()=>{er.set(Lo,{}),r()},children:"Novo Atendimento"})]})]})}const IE="_container_jla2u_1",NE="_header_jla2u_24",RE="_body_jla2u_56",ms={container:IE,header:NE,"header-open":"_header-open_jla2u_29","close-btn":"_close-btn_jla2u_48",body:RE};var Xt=(e=>(e.base="base",e.shareCart="shareCart",e.sharePayment="sharePayment",e))(Xt||{});const Td=({text:e,isActive:t,onClick:r,icon:n,iconDisabled:o})=>s.jsx(jE,{icon:t?n:o,text:t?e:"Preencha a sacola para compartilhar",onClick:r,isActive:t}),TE=({config:e,isshowing:t})=>{var T,O,M;const[r,n]=j.useState(!1),[o,i]=j.useState(""),{addCouponSeller:c,cartStore:l}=Xe(),[u,d]=j.useState(t??!1),{setOrderformId:h,update:m,isValidSharedCart:_,setConfiguration:g,setCodVendedora:v}=xE(),[x,S]=j.useState(Xt.base),w=j.useMemo(()=>l,[l]),{marketingData:I}=qo.stores.cart.useGetCartStoreState();j.useEffect(()=>{ba("cleverapp")==="true"&&(localStorage.setItem("maiscarrinho","cleverapp"),window.location.replace("/")),ba("televendas")==="true"&&(localStorage.setItem("maiscarrinho","televendas"),window.location.replace("/")),ba("vendedora")==="true"&&(localStorage.setItem("maiscarrinho","vendedora"),ja())},[]),j.useEffect(()=>{var z,D,B,G,J;(z=w==null?void 0:w.openTextField)!=null&&z.value&&i(((D=w==null?void 0:w.openTextField)==null?void 0:D.value)??""),(B=w.openTextField)!=null&&B.value&&(v(String((G=w.openTextField)==null?void 0:G.value).split("codigo")[1]),c(String((J=w.openTextField)==null?void 0:J.value),"seller")),h(w.id),localStorage.getItem("maiscarrinho")&&d(!0)},[w.id,(T=w.openTextField)==null?void 0:T.value,v,h,c]);const P=()=>{g(e),S(Xt.base),n(!r),h(w.id),setTimeout(()=>{_()&&m(w.id)},300)},{id:C}=qo.stores.cart.useGetCartStoreState(),N=z=>{U.postMediaData({apiUrl:"/api/marketingData",body:{orderFormId:C,coupon:I==null?void 0:I.coupon,utmiCampaign:"codigodavendedora",utmSource:"widget",utmMedium:z===Xt.sharePayment?"linkvendedor":"carrinho_compartilhado"}}),S(z)};return s.jsx(s.Fragment,{children:u&&s.jsxs("div",{className:p.helpers.classNameConcat(ms.container,r?"open":""),children:[s.jsx("div",{className:p.helpers.classNameConcat(ms.header,r?"open":""),onClick:P,children:r?s.jsxs("div",{className:ms["header-open"],children:[s.jsx("div",{className:ms["close-btn"],children:s.jsx("img",{src:"/images/Widget_open/close_grey_24x24.png",alt:"close",width:30,height:30})}),s.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"close",width:30,height:30}),s.jsx("span",{className:"text",children:"Vendedor"})]}):s.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"logo",width:30,height:30})}),r&&s.jsx("div",{className:ms.body,children:s.jsxs(s.Fragment,{children:[x===Xt.base&&s.jsxs(s.Fragment,{children:[s.jsx(Td,{icon:"/images/Modal_compartilhar_sacola/ico_sacola_big.png",iconDisabled:"/images/Widget_open/ico_sacola_disabled.png",text:"Compartilhar a Sacola",onClick:()=>N(Xt.shareCart),isActive:w.items.length>0&&!!((O=w==null?void 0:w.openTextField)!=null&&O.value)}),s.jsx(Td,{icon:"/images/Modal_compartilhar_editavel/ico_form_big.png",iconDisabled:"/images/Widget_open_disabled/ico_form_disabled.png",text:"Compartilhar link para pagamento",onClick:()=>N(Xt.sharePayment),isActive:w.items.length>0&&!!((M=w.openTextField)!=null&&M.value)})]}),x===Xt.shareCart&&s.jsx(Rd,{mode:"cart",config:{...e,sellerCode:o,orderformId:w.id},newCart:()=>{ja(),S(Xt.base)}}),x===Xt.sharePayment&&s.jsx(Rd,{mode:"payment",config:{...e,sellerCode:o,orderformId:w.id},newCart:()=>{ja(),S(Xt.base)}})]})})]})})},pn={teamComponents:{AddToCart:Oc,BackToTop:jx,HelpButton:Dw,BuyPackage:gh,Filter:{...tr,helpers:Am},...sS,FreightCalculation:jm,Header:bm,Link:wt,Media:at,PLPNavigation:$r,ProductCard:Ue,ProductList:Ft,ProductVariationList:sr,Sort:Zo,UserMenu:Xo,Newsletter:el,Form:Bn,Table:Mo},template:{minicart:Nt,pdc:Q_,pdc_composites:nr,pdp:pC,searchResult:tg,wishList:rh,LPCadastro:Zw,SearchModal:hg,LPStores:_r,tracker:Q0,Politicas:gE,ErrorTemplate:Wg,WidgetVendedora:TE},utils:{EventCollector:Sw,ExternalScripts:Iw,LinkOrNotLink:gn,ObserverWrapper:Yo,SnackBarComponent:qn,DraftJsLinkWrapper:C_}},OE=(e,t)=>{const r=e.map(o=>`'${o.source}'`).join(`,
24
+ `)),this.wrapperTag=null)}},{key:"indent",value:function(){this.output.push($C.repeat(this.indentLevel))}},{key:"withCustomInlineStyles",value:function(r,n){if(!this.inlineStyleFn)return r;var o=this.inlineStyleFn(n);if(!o)return r;var i=o.element,c=i===void 0?"span":i,l=o.attributes,u=o.style,d=kn(Eo({},l,{style:u&&So(u)}));return"<".concat(c).concat(d,">").concat(r,"</").concat(c,">")}},{key:"renderBlockContent",value:function(r){var n=this,o=r.getType(),i=r.getText();if(i==="")return T_;i=this.preserveWhitespace(i);var c=r.getCharacterList(),l=DC(i,c);return l.map(function(u){var d=_a(u,2),h=d[0],m=d[1],_=m.map(function(D){var B=_a(D,2),G=B[0],J=B[1],Y=YC(G),X=!0,Z=!1,he=void 0;try{for(var fe=n.styleOrder[Symbol.iterator](),ee;!(X=(ee=fe.next()).done);X=!0){var ie=ee.value;if(!(ie===Yc&&o===vt.CODE)&&J.has(ie)){var _e=n.inlineStyles[ie],we=_e.element,ge=_e.attributes,Ee=_e.style;if(we==null&&(we="span"),ge=ha(ge),Ee!=null){var V=So(Ee);ge=ge==null?{style:V}:Eo({},ge,{style:V})}var oe=kn(ge);Y="<".concat(we).concat(oe,">").concat(Y,"</").concat(we,">")}}}catch(F){Z=!0,he=F}finally{try{!X&&fe.return!=null&&fe.return()}finally{if(Z)throw he}}return n.withCustomInlineStyles(Y,J)}).join(""),g=h?n.contentState.getEntity(h):null,v=g==null?null:g.getType().toUpperCase(),x;if(g!=null&&n.options.entityStyleFn&&(x=n.options.entityStyleFn(g))){var S=x,w=S.element,I=S.attributes,P=S.style;if(w==null&&(w="span"),I=ha(I),P!=null){var C=So(P);I=I==null?{style:C}:Eo({},I,{style:C})}var N=kn(I);return"<".concat(w).concat(N,">").concat(_,"</").concat(w,">")}else if(v!=null&&v===ts.LINK){var T=Io.hasOwnProperty(v)?Io[v](v,g):null,O=kn(T);return"<a".concat(O,">").concat(_,"</a>")}else if(v!=null&&v===ts.IMAGE){var M=Io.hasOwnProperty(v)?Io[v](v,g):null,z=kn(M);return"<img".concat(z,"/>")}else return _}).join("")}},{key:"preserveWhitespace",value:function(r){for(var n=r.length,o=new Array(n),i=0;i<n;i++)r[i]===" "&&(i===0||i===n-1||r[i-1]===" ")?o[i]=" ":o[i]=r[i];return o.join("")}}]),e}();function kn(e){if(e==null)return"";for(var t=[],r=0,n=Object.keys(e);r<n.length;r++){var o=n[r],i=e[o];i!=null&&t.push(" ".concat(o,'="').concat(XC(i+""),'"'))}return t.join("")}function QC(e){switch(e){case vt.UNORDERED_LIST_ITEM:case vt.ORDERED_LIST_ITEM:return!0;default:return!1}}function YC(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split(" ").join("&nbsp;").split(`
25
+ `).join(T_+`
26
+ `)}function XC(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")}function JC(e,t){return new KC(e,t).generate()}const pd=e=>{const r=Qc(JSON.parse(e)).getCurrentContent();return JC(r)},ZC=({expanded:e,content:t})=>{const r=t.textStructureReduced?pd(t.textStructureReduced):null,n=t.showTextStructureExpander&&t.textStructure?pd(t.textStructure):null;return s.jsxs("details",{open:e,children:[r&&s.jsx("summary",{onClick:o=>o.preventDefault(),dangerouslySetInnerHTML:{__html:r}}),n&&s.jsx("div",{dangerouslySetInnerHTML:{__html:n}})]})},ew="_textContentWrapper_176ht_5",tw="_textContentSection_176ht_13",Ka={"link-modifier":"_link-modifier_176ht_1",textContentWrapper:ew,textContentSection:tw},O_=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})=>{var i;const[n,o]=j.useState(!1);return s.jsx(p.TextStructure.Root,{layoutProps:{textRow:{alignContent:An(e.textStructureAlignment),alignItems:An(e.textStructureAlignment)},columnWrapper:{alignContent:An(e.textStructureAlignment),alignItems:An(e.textStructureAlignment)}},adornment:{bottom:e.showTextStructureExpander&&e.textStructure?s.jsx(p.Button,{variant:"tertiary",adornment:{end:s.jsx(p.Icon,{name:n?`${t.arrow_up}`:`${t.arrow_down}`})},onClick:()=>o(c=>!c),size:"small",children:n?(r==null?void 0:r.less)??"Ver Menos":(r==null?void 0:r.more)??"Ver Mais"}):s.jsx(s.Fragment,{})},children:s.jsxs(p.Utils.Column,{className:Ka.textContentWrapper,style:{alignItems:An(e.textStructureAlignment)},children:[s.jsx(p.TextStructure.DivWrapper,{style:{textAlign:An(e.textStructureAlignment)},mode:e.textStructureMode??"default",children:e.textStructureReduced?s.jsx(ZC,{content:e,expanded:n}):s.jsx(s.Fragment,{})}),e.textStructureButtonLabel?s.jsx(wt,{mode:e.textStructureMode??"default",href:e.textStructureButtonHref??"#",size:e.textStructureButtonSize,className:Ka["link-modifier"],adornments:(i=e.textStructureButtonIcon)!=null&&i.length&&e.enableIcon?{end:s.jsx(p.Icon,{name:e.textStructureButtonIcon})}:void 0,children:e.textStructureButtonLabel}):s.jsx(s.Fragment,{})]})})},rw=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],hd=e=>({centro:"center",esquerda:"start",direita:"end"})[e],md={"content-modifier":"_content-modifier_16y4u_5","banner-image-wrapper-modifier":"_banner-image-wrapper-modifier_16y4u_13"},_d=({data:e,videoUrl:t,priority:r,videoRef:n,ICONS:o,TEXTCONTENT_EXPANDED:i,TIME_ZONE:c,className:l,...u})=>{const{video:d,image:h,imageHref:m,imageOpacity:_,altImage:g,backgroundColor:v,position:x,contentAlignment:S,showTimer:w,contentOrder:I,timerMode:P,timerEnd:C,timerInit:N,textStructure:T,textStructureReduced:O}=e.banner,M=(m==null?void 0:m.trim())||(h==null?void 0:h.trim())||null,{nextimage:z}=Ae();return s.jsxs(p.Banner.Container,{...u,children:[s.jsxs(p.Banner.ImageWrapper,{className:md["banner-image-wrapper-modifier"],style:_?{background:v}:void 0,children:[d&&s.jsx(at.Video,{videoRef:n,src:t,autoPlay:r,loop:!0,playsInline:!0,muted:!0}),M&&!(d!=null&&d.length)&&s.jsx(z,{src:M,width:"1920",height:"1080",alt:g??h??"",...r?{priority:r}:{},style:_?{opacity:"0"}:void 0}),!h&&!(d!=null&&d.length)&&s.jsx("div",{style:{background:v}})]}),w||O||T?s.jsx(p.Banner.Slot,{...rw(x??"centro"),className:p.helpers.classNameConcat(md["content-modifier"],l),style:{textAlign:hd(S)},children:s.jsxs(p.Utils.Column,{gap:"16px",alignItems:hd(S),children:[w&&I==="timer-first"&&s.jsx(Uo,{mode:P??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:N?new Date(N):new Date,TIME_ZONE:c}),s.jsx(O_,{data:e.banner,ICONS:o,TEXTCONTENT_EXPANDED:i}),w&&I!=="timer-first"&&s.jsx(Uo,{mode:P??"default",size:"small",dateEnd:C?new Date(C):new Date,dateInit:N?new Date(N):new Date,TIME_ZONE:c})]})}):s.jsx(s.Fragment,{})]})};class Qt extends j.Component{constructor(){super(...arguments);Qr(this,"state",{hasError:!1,error:null})}static getDerivedStateFromError(){return{hasError:!0,error:null}}componentDidCatch(r,n){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:",n),console.groupEnd()}}render(){const{hasError:r}=this.state,{children:n,fallback:o}=this.props;return r&&process.env.NODE_ENV==="production"?null:r&&o!==void 0?o:n}}const $s=({data:e,className:t,priority:r,creative:n,name:o,...i})=>{const{handleSelectPromotionEvent:c,currentLocalRef:l}=Ce(),{banner:{promotion_name:u},index:d,componentIndex:h}=e,m=typeof d=="number"?`:${d+1}`:"",_={creative_name:n,creative_slot:`${n}-${l.current}:${h+1}${m}`,promotion_id:e.banner.href,promotion_name:u},g=j.useRef(null),v=j.useMemo(()=>{var S;if((S=e.banner.video)!=null&&S.includes("player.vimeo")){const w=e.banner.video.split("?")[1],I=w==null?void 0:w.split("&"),P=I==null?void 0:I.filter(N=>N.includes("loc")||N.includes("signature")||N.includes("user_id")),C=P==null?void 0:P.join("&");return`${e.banner.video.split("?")[0]}?${C}`}return e.banner.video},[e]),x=()=>{var S;(S=g.current)!=null&&S.paused&&g.current.play()};return s.jsx(Qt,{name:o,children:s.jsx(Yo,{eventData:{functionKey:"readyEvents",data:{event:"view_promotion",readyData:{ecommerce:{..._,index:d}}}},observerOptions:{delay:100,...v&&{threshold:.1}},...v&&{callBackWhenVisible:x},children:e.banner.href?s.jsx(Ot,{href:e.banner.href,onClick:()=>{c({updatePromotionRef:!0,promotion:_,index:d})},children:s.jsx(_d,{data:e,videoUrl:v,priority:r,videoRef:g,className:t,...i})}):s.jsx(_d,{data:e,videoUrl:v,priority:r,videoRef:g,className:t,...i})})})},Xc=e=>s.jsx(Qt,{name:e.name,children:s.jsx($s,{...e})}),A_=({columns:e,gap:t,className:r})=>{const{isMobile:n}=xe(),{banners:o}=Us(),{constants:{ICONS:i,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u}}=ut();return Array.isArray(o)?o.map((d,h)=>j.createElement(Ft.Banner,{...d,columns:d.columns,gap:t,isMobile:n??!1,key:`${d.position_grid}-${h}`,totalColumns:e,PRODUCT_CARD_IMAGE_ASPECT_RATIO:c},s.jsx($s,{name:"Banner Carousel",data:{banner:d,componentIndex:h},creative:"banner_grid",ICONS:i,TEXTCONTENT_EXPANDED:l,TIME_ZONE:u,className:r}))):null};A_.displayName="PDC.InfiniteScroller.Banners";const k_=({page:e,...t})=>{var c;const{rootRef:r}=Ze(),{gap:n,updateParamPage:o}=Vr(),{element:i}=$o({callback:()=>o(e.page),options:{threshold:0}});return s.jsx("div",{...t,id:`pdc-scroll-infinite-${e==null?void 0:e.page}`,className:St["pdc--infinite--loader"],"data-page":e.page,ref:i,style:{top:(Number(((c=r==null?void 0:r.current)==null?void 0:c.offsetHeight)??0)+n*2)*-1}})};k_.displayName="PDC.Page.Anchor";const M_=e=>{var n;const{gap:t}=Vr(),{rootRef:r}=Ze();return s.jsx("div",{...e,className:St["pdc--infinite--card--anchor-pdp"],style:{top:(Number(((n=r==null?void 0:r.current)==null?void 0:n.offsetHeight)??0)+t*2)*-1}})};M_.displayName="PDC.Page.AnchorPDP";const L_=({first:e,gap:t,empty:r=!1,isMobile:n=!1,item:o,index:i,order:c,page:l,showVideo:u=!1})=>{const{handleNotify:d}=Vr(),{getAvailableProductTag:h}=Cr(),{constants:m,mainSeller:_}=ut(),{load:g}=Wr(),v=h(o==null?void 0:o.cluster.highlights);if(r)return;const{BUY_BUTTON_LABELS:x,MAIN_IMAGE:S,PLP_GRID_SCROLL_BACK:w,PLP_INFINITE_SCROLL:I,PLP_PRODUCT_SIMILAR_DELAY:P,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:C,PLP_SIZE_ORDER:N,PRODUCT_CARD_IMAGE_ASPECT_RATIO:T,PRODUCT_CARD_TEXTS:O,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:M,PRODUCT_IMAGE_DIMENSIONS:z,SECOND_IMAGE:D,TEXTURE_IMAGE:B,Z_INDEX_WAR:G,ICONS:J}=m;return s.jsxs(Ft.Card,{"data-skeleton":o.id==="skeleton",className:St["pdc--infinite--card--disabled"],gap:t,isMobile:n??!1,item:o,order:c,tag:v,index:i,setSkuSelected:d,showVideo:u,CONSTANTS:{BUY_BUTTON_LABELS:x,MAIN_IMAGE:S,PLP_GRID_SCROLL_BACK:w,PLP_INFINITE_SCROLL:I,PLP_PRODUCT_SIMILAR_DELAY:P,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:C,PLP_SIZE_ORDER:N,PRODUCT_CARD_IMAGE_ASPECT_RATIO:T,PRODUCT_CARD_TEXTS:O,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:M,PRODUCT_IMAGE_DIMENSIONS:z,SECOND_IMAGE:D,StoreConfig_MainSellerId:_,TEXTURE_IMAGE:B,Z_INDEX_WAR:G,ICONS:J},children:[s.jsx(Cs.AnchorPDP,{}),e&&l&&s.jsx(Cs.Anchor,{page:l}),g&&l&&!(l!=null&&l.loading)?s.jsx(Cs.Loader,{page:l}):null]})};L_.displayName="PDC.Page.Card";const D_=({type:e="default",page:t,...r})=>{const{updateProducts:n}=Wr(),{element:o}=$o({callback:()=>{t.loading||n(t.page)},onEnterViewportOnce:!0,options:{threshold:[.2,.5]}});return s.jsx("div",{...r,className:St[`pdc--infinite--loader${e==="page"?"--page":""}`],ref:o})};D_.displayName="PDC.Page.Loader";const F_=({nextPage:e=!1,page:t,total:r,...n})=>{const{addNewPage:o}=Vr(),{element:i}=$o({callback:()=>{o(t,r,e)},onEnterViewportOnce:!0,options:{threshold:[.1,.5]}});return e===!0&&t.loading===!0?s.jsx("div",{...n,className:St["pdc--infinite--next-page--card"],"data-next-page":!0,ref:i}):null};F_.displayName="PDC.Page.NextPage";const Cs={Anchor:k_,AnchorPDP:M_,Card:L_,Loader:D_,NextPage:F_},nw=({page:e})=>{const{isMobile:t}=xe(),{gap:r,columns:n}=Vr(),{isLoading:o,pagination:i,products:c}=os(),{load:l,products:u,trimPages:d,setLoad:h}=Wr(),{constants:{ICONS:m,PLP_NOT_RESULT:_,ITEMS_PER_PAGE:g}}=ut(),{count:v,nextPage:x,total:S}=i,w=(e.page-1)*24;j.useEffect(()=>{o||h(!0)},[o,h]),j.useEffect(()=>{!o&&c.length===0&&e.loading&&e.page>S&&e.page>1&&d(S)},[o,e,c,S,d]);const I=e.page===S?v-g*(e.page-1):g,P=c.length>0?c:Array.from({length:I},()=>Vf()),C=Qf(P.map(T=>T.node),n),N=l&&e.page===1&&!o&&i.total===0;return s.jsxs(s.Fragment,{children:[e.page===1&&s.jsx(Kc,{total:(i==null?void 0:i.count)??0}),N&&s.jsx(nr.Empty,{ICONS:m,PLP_NOT_RESULT:_}),Array.isArray(P)?P.map((T,O)=>{const M=u[w+O]+1;return s.jsx(Cs.Card,{empty:e.loading&&e.page===1&&!o&&!c.length,first:O===0,gap:r,index:O,item:T.node,isMobile:t??!1,order:M,page:e,showVideo:C.indexOf(O)!==-1},M)}):null,l&&!o&&x&&c.length>0&&s.jsx(Cs.NextPage,{page:e,nextPage:x,total:S})]})},z_=({page:e})=>{const{state:t}=ft(),{sendDataLayerEvent:r}=Ce(),n=j.useCallback(o=>{r({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o.products}}})},[r,t==null?void 0:t.query]);return s.jsx(zc,{callback:n,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:s.jsx(nw,{page:e})})};z_.displayName="PDC.Page";const sw=()=>{var P;const{constants:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_FILTERS_TITLE:o,PLP_SIZE_ORDER:i},openFilters:c,setOpenFilters:l}=ut(),[u,d]=j.useState("10000:0"),{isMobile:h}=xe(),{state:m}=ft(),{breadcrumb:_,deleteAllFacets:g,facets:v,isLoading:x,onToggleFacet:S}=Gc(),w={isLast:!0,href:(P=m.term)!=null&&P.length?`/${m.term}`:"",name:m.term},I=U.filterNonRootFacets(m.facets,m==null?void 0:m.base);return j.useEffect(()=>{const C=v.find(({key:N})=>N==="price");if(C){const[N,T]=g_(C.values,u??"10000:0");d(`${N}:${T}`)}},[v,u,d]),s.jsxs(pn.teamComponents.Filter.Root,{CONSTANTS:{ICONS:e,PLP_FILTERS_TITLE:o,PLP_FILTERS:t},breadcrumb:_.length?_:[w],deleteAllFacets:g,filters:{facets:U.filterNonCategorySelected(v,m==null?void 0:m.base),selected:I},isMobile:h??!1,isLoading:x??!1,isOpen:c,price:u,onToggleFacet:S,setIsOpen:l,children:[s.jsx(pn.teamComponents.Filter.Selected,{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r}),s.jsx(pn.teamComponents.Filter.Content,{columns:2,CONSTANTS:{ICONS:e,PLP_FILTERS:t,PLP_FILTERS_COLORS:r,PLP_FILTERS_EMPTY:n,PLP_SIZE_ORDER:i}})]})},q_=({sort:e,...t})=>{const{load:r}=Wr();return s.jsxs(v_,{...t,enabled:r,children:[s.jsx(nr.Navigation,{}),s.jsx(sw,{})]})};q_.displayName="PDC.INFINITE-SCROLLER.FILTERS";const ow=({load:e,PLP_GRID_SCROLL_BACK:t})=>{const r=j.useRef(!1);j.useEffect(()=>{if(e&&!r.current){const n=sessionStorage.getItem(t.refer),o=sessionStorage.getItem(t.order);if(n==="true"){const i=document.querySelector(`[data-order="${o}"] > [class*="anchor-pdp"]`);i&&(i.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0),sessionStorage.setItem(t.refer,"false")}else{const i=document.querySelectorAll('[id*="pdc-scroll-infinite"]');if(i.length>0){const c=i[i.length-1];i.length>1&&c.scrollIntoView({behavior:"instant",block:"start"}),r.current=!0}}}if(!e&&r.current){r.current=!1;const n=document.querySelector("body > main");n&&n.scrollIntoView({behavior:"instant",block:"start"})}},[e])},iw=e=>{const{constants:{PLP_GRID_SCROLL_BACK:t,ITEMS_PER_PAGE:r}}=ut(),{gap:n,columns:o}=Vr(),{load:i,pages:c}=Wr();return ow({load:i,PLP_GRID_SCROLL_BACK:t}),s.jsx("div",{className:St["pdc--grid--content"],children:s.jsxs(Ft.Root,{children:[Array.isArray(c)&&c.map(l=>s.jsx(z_,{count:r,page:l},l.page)),s.jsx(A_,{columns:o,count:r,gap:n})]})})},B_=e=>{const{state:t}=ft(),{banners:r}=Us(),{columns:n}=Vr(),{constants:{ITEMS_PER_PAGE:o,PLP_SORT_DEFAULT:i}}=ut(),{createPagesScroll:c}=Wr(),l=j.useRef(!1);return j.useEffect(()=>{if(l.current)return;const u=Vo(r,50,n,o);c(t.page,u),l.current=!0},[]),s.jsxs(up,{banners:r,children:[s.jsx(q_,{state:t,sort:i}),s.jsx(iw,{})]})};B_.displayName="PDC.InfiniteScroller";const U_=()=>{const{state:e}=ft(),{constants:{Z_INDEX_WAR:t},setOpenFilters:r}=ut(),{selectedFacets:n,onToggleFacet:o,onSort:i}=Gc(),c=U.filterNonRootFacets(n,e==null?void 0:e.base);return s.jsx($r.Root,{onSort:i,setOpenFilters:r,style:{zIndex:t.plp_navigation},children:s.jsx($r.Selected,{callback:o,selected:c})})};U_.displayName="Navigation";const Qa=({currentPage:e,callback:t,type:r,...n})=>s.jsx(p.Button,{...n,iconNameStart:`arrow-${r}`,onClick:()=>{typeof t=="function"&&t(r==="left"?"prev":"")},size:"large",variant:"tertiary"});Qa.displayName="Arrow";const Ya=({active:e,prev:t,ellipses:r,page:n,selectedPage:o})=>s.jsxs(s.Fragment,{children:[r&&t&&s.jsx(p.Button,{size:"large",variant:"tertiary",children:"..."}),e&&s.jsx(p.Pagination.Item,{isActive:!1,index:n,variant:"tertiary",onClick:()=>{typeof o=="function"&&o(n)},children:n}),r&&!t&&s.jsx(p.Button,{size:"large",variant:"tertiary",children:"..."})]});Ya.displayName="PageEllipses";const H_=({children:e,endPage:t,page:r,total:n,selectedPage:o,ITEMS_PER_SECTION:i})=>s.jsxs(s.Fragment,{children:[s.jsx(Ya,{active:r>=i&&n>i,selectedPage:o,currentPage:r,prev:!1,ellipses:r>i&&n>i,page:1}),e,s.jsx(Ya,{active:n-r>1&&n!==t,selectedPage:o,currentPage:r,prev:!0,ellipses:t<n-1,page:n})]});H_.displayName="Pagination.Layout";const aw=(e,t,r)=>{const n=new URLSearchParams(r);return n.set(e,t),n.toString()},cw=(e,t)=>{const r=[];for(let n=e;n<=t;n++)r.push(n);return r},lw=({currentPage:e,total:t,maxVisiblePages:r,SEARCH_PAGE_ITEM_THRESHOLD:n})=>{const o=t>=n?n:t,i=Math.max(1,e===o?o-r+1:e-Math.floor(r/2)),c=Math.min(o,i+r-1);return{startPage:i,endPage:c,totalPages:o}},$_=({currentPage:e,pages:t,searchParams:r,VARIANT_PAGINATION:n})=>{const{router:o,pathname:i}=Ae();return Array.isArray(t)?t.map(c=>s.jsx(p.Pagination.Item,{isActive:e===c,index:c,variant:e===c?n.active:n.default,onClick:()=>o.push(`${i}?${aw("page",c.toString(),r)}`),children:c},c)):null};$_.displayName="Pages";const Jc=({query:e,type:t="default",searchParams:r,ITEMS_DEFAULT_SORT:n,ITEMS_PER_SECTION:o,ITEMS_PER_PAGE:i,SEARCH_PAGE_ITEM_THRESHOLD:c,VARIANT_PAGINATION:l,...u})=>{const{router:d,pathname:h}=Ae(),{state:{page:m=1}}=ft(),{pagination:{total:_}}=os(),{endPage:g,totalPages:v,startPage:x}=lw({currentPage:m,total:_,maxVisiblePages:o,SEARCH_PAGE_ITEM_THRESHOLD:c}),S=I=>{const P=I.toString(),C=new URLSearchParams(r.toString());t==="default"&&C.set("page",P),t==="search"&&(C.set("query",e??""),C.set("count",i.toString()),C.set("page",P),n&&C.set("sort",n.replace("_",":")));const T=`${t==="search"?"/search":h}?${C.toString()}`;d.push(T)},w=I=>{S(I==="prev"?m-1:m+1)};return _?s.jsx("div",{...u,className:St["pdc--pagination"],children:s.jsx(p.Pagination.Wrapper,{adornment:{start:s.jsx(Qa,{callback:w,currentPage:m,disabled:m<2,type:"left"}),end:s.jsx(Qa,{callback:w,currentPage:m,disabled:m>=v,type:"right"})},children:s.jsx(H_,{endPage:g,page:m,selectedPage:S,total:_,ITEMS_PER_SECTION:o,children:s.jsx($_,{currentPage:m,pages:cw(x,g),searchParams:r,VARIANT_PAGINATION:l})})})}):null};Jc.displayName="Pagination";const W_=({gap:e,isMobile:t,className:r})=>{const{state:n}=ft(),{banners:o}=Us(),{constants:i}=ut(),{ICONS:c,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,TEXTCONTENT_EXPANDED:u,TIME_ZONE:d}=i,h=o.filter(m=>Xf(m.position_grid,n.page,(n==null?void 0:n.count)??1));return Array.isArray(h)?h.map((m,_)=>s.jsx(Ft.Banner,{columns:m.columns,gap:e,isMobile:t,position_grid:m.position_grid,totalColumns:t?2:4,PRODUCT_CARD_IMAGE_ASPECT_RATIO:l,children:s.jsx($s,{name:"Banner Carousel",data:{banner:m,componentIndex:_},creative:"banner_grid",ICONS:c,TEXTCONTENT_EXPANDED:u,TIME_ZONE:d,className:r})},m.position_grid)):null};W_.displayName="PDC.Grid.Banners";const V_=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:I,Z_INDEX_WAR:P})=>{const{banners:C}=Us(),{getAvailableProductTag:N}=Cr(),{state:T}=ft(),[O,M]=j.useState(!1),[z,D]=j.useState(null),[B,G]=j.useState([]),J=j.useCallback((fe,ee)=>{const ie=ee?qs([ee]):null;G(fe),D(ie!=null&&ie.length?ie[0]:null),M(!0)},[]),Y=e?8:16,X=(T.page-1)*((T==null?void 0:T.count)??1),Z=Ft.helpers.createGridPosAndVideo(t,C,e?2:4,T.page),he=Vo(C,T.page,e?2:4);return s.jsxs(s.Fragment,{children:[s.jsxs(Ft.Root,{children:[Array.isArray(t)&&t.map((fe,ee)=>{var _e;const ie=N(fe.node.cluster.highlights);return s.jsx(Ft.Card,{gap:Y,isMobile:e??!1,item:fe.node,order:he.products[X+ee]+1,tag:ie,index:ee,setSkuSelected:J,showVideo:(_e=Z[ee])==null?void 0:_e.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:I,Z_INDEX_WAR:P,ICONS:n}},fe.node.sku)}),t.length>0&&s.jsx(W_,{gap:Y,isMobile:e??!1})]}),s.jsx(Bs,{open:O,sku:z,skus:B,setSku:D,setVisible:M,ICONS:n,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PRODUCT_CARD_TEXTS:g,Z_INDEX_WAR:P})]})};V_.displayName="PDC.Products";const nr={Empty:Dc,Filters:x_,Grid:b_,InfiniteScroller:B_,Spinner:Fc,Navigation:U_,Notification:Bs,Pagination:Jc,Products:V_},G_=({className:e})=>{const{constants:t}=ut(),{state:r,searchParams:n}=ft(),{sendDataLayerEvent:o}=Ce(),i=j.useCallback(_=>{o({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:_.products}}})},[o]),{ITEMS_DEFAULT_SORT:c,ITEMS_PER_SECTION:l,ITEMS_PER_PAGE:u,PLP_INFINITE_SCROLL:d,SEARCH_PAGE_ITEM_THRESHOLD:h,VARIANT_PAGINATION:m}=t;return s.jsx("div",{className:p.helpers.classNameConcat(St.pdc,e),children:d===!0?s.jsx("div",{className:St["pdc--grid"],children:s.jsx(nr.Grid,{infinite:!0})}):s.jsxs(s.Fragment,{children:[s.jsxs(v_,{state:r,children:[s.jsx(nr.Navigation,{}),s.jsx(nr.Filters,{})]}),s.jsxs(zc,{callback:i,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:[s.jsx("div",{className:St["pdc--grid"],children:s.jsx("div",{className:St["pdc--grid--content"],children:s.jsx(nr.Grid,{})})}),s.jsx(nr.Pagination,{searchParams:n,ITEMS_DEFAULT_SORT:c,ITEMS_PER_SECTION:l,ITEMS_PER_PAGE:u,SEARCH_PAGE_ITEM_THRESHOLD:h,VARIANT_PAGINATION:m})]})]})})};G_.displayName="Templates.PDC";const K_=j.createContext({}),uw=({children:e,...t})=>s.jsx(K_.Provider,{value:t,children:e}),ni=()=>{const e=j.useContext(K_);if(e===void 0)throw new Error("useSearchConstants must be used within a SearchConstantsProvider");return e},dw="_grid_e75z7_21",fw="_navigation_e75z7_44",pw="_spinner_e75z7_70",hw="_sort_e75z7_76",Hr={"rearch-result--empty":"_rearch-result--empty_e75z7_1",grid:dw,"grid-header":"_grid-header_e75z7_37",navigation:fw,"result-disclaimer":"_result-disclaimer_e75z7_51",spinner:pw,sort:hw,"search-result":"_search-result_e75z7_91"},Q_=({term:e})=>{const{router:t}=Ae(),{SEARCH_RESULT:r,ICONS:n}=ni(),o=()=>{t.push(r.EMPTY.ALL_TERMS)};return s.jsxs("div",{className:Hr["rearch-result--empty"],children:[s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:r.EMPTY.NOT_FOUND})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:r.EMPTY.NOT_FOUND})}),s.jsxs("p",{children:[r.EMPTY.NOT_FOUND_P," ",`"${e}"`]})]}),s.jsx(p.Button,{onClick:()=>o(),variant:"tertiary",size:"medium",adornment:{end:s.jsx(p.Icon,{name:n.arrow_right,size:"medium"})},children:r.EMPTY.ALL_TERMS_LABEL})]})};Q_.displayName="RearchResult.Empty";const mw=e=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:e.SEARCH.SEARCHING})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:e.SEARCH.SEARCHING})}),s.jsx(p.Spinner,{className:Hr.spinner})]}),_w=(e,t,r)=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx("h2",{className:"typography-style-heading-sm",children:t.SEARCH.SEARCHED})}),s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx("h2",{className:"typography-style-body-md",children:t.SEARCH.SEARCHED})}),s.jsxs("p",{children:[t.SEARCH.SEARCHED_P_START," ",e," ",t.SEARCH.SEARCHED_P_END," ",`"${r}"`]})]}),Y_=({isLoading:e,quantity:t,term:r})=>{const{SEARCH_RESULT:n}=ni();return s.jsx(p.TextStructure.DivWrapper,{children:e?mw(n):_w(t,n,r)})};Y_.displayName="Search.Loading";const gw=({term:e})=>{const[t,r]=j.useState(!1),{router:n}=Ae(),{searchParams:o}=ft(),{ITEMS_DEFAULT_SORT:i,ITEMS_PER_PAGE:c,ICONS:l}=ni(),u=d=>{U.navigateToSearchPage(n,e,c,1,d??i)};return s.jsx("div",{className:Hr.sort,children:s.jsx(Zo,{handleSelectValue:d=>u(d??"release_desc"),sortListOpen:t,setSortListOpen:r,searchParams:o,ICONS:l})})},yw=({query:e})=>{const{isLoading:t,products:r,pagination:n}=os();return s.jsxs("div",{className:Hr["grid-header"],children:[s.jsxs("div",{className:Hr.navigation,children:[!t&&(r!=null&&r.length)?s.jsx(gw,{term:e}):null,s.jsx(p.Utils.Divider,{})]}),!t&&(r!=null&&r.length)?s.jsx("div",{className:Hr["result-disclaimer"],children:s.jsx(Y_,{term:e,isLoading:t,quantity:n.count})}):null]})},X_=({isMobile:e=!1,items:t,BUY_BUTTON_LABELS:r,ICONS:n,MAIN_IMAGE:o,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:I,Z_INDEX_WAR:P})=>{const{getAvailableProductTag:C}=Cr(),{state:N}=ft(),[T,O]=j.useState(!1),[M,z]=j.useState(null),[D,B]=j.useState([]),G=j.useCallback((Z,he)=>{const fe=he?qs([he]):null;B(Z),z(fe!=null&&fe.length?fe[0]:null),O(!0)},[]),J=e?8:16,Y=(N.page-1)*((N==null?void 0:N.count)??1),X=Ft.helpers.createGridPosAndVideo(t,[],e?2:4,N.page);return s.jsxs(s.Fragment,{children:[s.jsx(Ft.Root,{children:Array.isArray(t)&&t.map((Z,he)=>{var ee,ie;const fe=C(Z.node.cluster.highlights);return s.jsx(Ft.Card,{gap:J,isMobile:e??!1,item:Z.node,order:Y+(((ee=X[he])==null?void 0:ee.position)??0),tag:fe,index:he,setSkuSelected:G,showVideo:(ie=X[he])==null?void 0:ie.canPlayVideo,CONSTANTS:{BUY_BUTTON_LABELS:r,MAIN_IMAGE:o,PLP_GRID_SCROLL_BACK:l,PLP_INFINITE_SCROLL:u,PLP_PRODUCT_SIMILAR_DELAY:d,PLP_SHOW_VIDEO_ON_PRODUCT_CARD:h,PLP_SIZE_ORDER:m,PRODUCT_CARD_IMAGE_ASPECT_RATIO:_,PRODUCT_CARD_TEXTS:g,PRODUCT_CARD_TOP_WISHLIST_TOGGLE:v,PRODUCT_IMAGE_DIMENSIONS:x,SECOND_IMAGE:S,StoreConfig_MainSellerId:w,TEXTURE_IMAGE:I,Z_INDEX_WAR:P,ICONS:n}},Z.node.sku)})}),s.jsx(Bs,{open:T,sku:M,skus:D,setSku:z,setVisible:O,ICONS:n,NEWSLETTER_CONFIGS:i,NOTIFY_INFO:c,PRODUCT_CARD_TEXTS:g,Z_INDEX_WAR:P})]})};X_.displayName="PDC.Products";const J_=({isMobile:e=!1,query:t})=>{const{isLoading:r,products:n,pagination:o}=os(),{searchParams:i}=ft(),c=ni(),l=j.useMemo(()=>!r&&n.length>0&&o.count>0,[r,n.length,o.count]);return s.jsxs("div",{className:Hr.grid,children:[l&&s.jsx(yw,{query:t}),!r&&(n!=null&&n.length)?s.jsx(X_,{...c,isMobile:e??!1,items:n}):null,(n==null?void 0:n.length)===0&&!r?s.jsx(Q_,{term:t}):null,l&&s.jsx(Jc,{searchParams:i,...c})]})};J_.displayName="SearchResultContent";const vw=({className:e})=>{const{state:t}=ft(),{sendDataLayerEvent:r}=Ce(),{isMobile:n}=xe(),o=j.useCallback(i=>{var c;r({functionKey:"readyEvents",data:{event:"view_search_results",readyData:{search_term:t==null?void 0:t.query,search_found:((c=i==null?void 0:i.products)==null?void 0:c.length)>0}}})},[r,t==null?void 0:t.query]);return s.jsx(zc,{callback:i=>o(i),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:s.jsx("div",{className:p.helpers.classNameConcat(Hr["search-result"],e),children:s.jsx(J_,{currentPage:t.page,isMobile:n??!1,query:t.term??""})})})},xw=new Bf,Z_=({className:e,searchParams:t,CONSTANTS:r})=>{const n=new URLSearchParams(t??""),o=String((n==null?void 0:n.get("query"))??""),i=Number((n==null?void 0:n.get("count"))??0),c=Number((n==null?void 0:n.get("page"))??0),l=String((n==null?void 0:n.get("sort"))??"");return s.jsx(Hf,{client:xw,children:s.jsx(uw,{...r,children:s.jsx(jc,{state:{sort:l,query:o,base:"",facets:[],term:o,page:c,count:i},searchParams:n,children:s.jsx(vw,{className:e})})})})};Z_.displayName="Search";const bw=({page:e,data:t})=>{const{pathname:r}=Ae(),n=j.useRef(null),{sendDataLayerEvent:o,currentLocalRef:i,itemListRef:c,promotionEventRef:l}=Ce();return j.useEffect(()=>{const u=Zf("login_event")||"{}",d=JSON.parse(u);if(d.name||d.method){const h=new Date(0);o({functionKey:"readyEvents",data:{event:d.name,readyData:{method:d.method}}}),Ec("login_event","",{expires:h})}},[]),j.useEffect(()=>{if(n.current===r)return;n.current=r;let u={};switch(e){case"PDP":{const h=t,m={};if(!h){u={page_category:"pdp"};break}h.items.forEach(({itemId:_,sellers:g})=>m[_]=g[0].commertialOffer.AvailableQuantity),u={page_category:"pdp",seller_ids:h.items.map(({sellers:_})=>_[0].sellerId).join(),skuStocks:m,product_reference_id:h.productReference};break}case"PDC":{const{page_category:h,page_departament:m,id:_,name:g}=Yd(),v=g,x=_;u={page_category:"lista_produtos",...m&&{page_departament:m}},c.current={item_list_name:r==="/search"?"busca":v??void 0,item_list_id:r==="/search"?void 0:x??void 0},m&&o({functionKey:"readyEvents",data:{event:"view_category",readyData:{page_category:h,page_departament:m}}});break}default:u={page_category:e},l.current={},c.current={};break}const d={region:e,...u};i.current=e,o({functionKey:"readyEvents",data:{readyData:{vtex_version:"fast",...d}},timeout:0})},[r]),null};var Xa={exports:{}},No={exports:{}},gd;function jw(){return gd||(gd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(u,d){for(var h in d)Object.defineProperty(u,h,{enumerable:!0,get:d[h]})}r(t,{DOMAttributeNames:function(){return n},default:function(){return l},isEqualNode:function(){return i}});const n={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(u){let{type:d,props:h}=u;const m=document.createElement(d);for(const v in h){if(!h.hasOwnProperty(v)||v==="children"||v==="dangerouslySetInnerHTML"||h[v]===void 0)continue;const x=n[v]||v.toLowerCase();d==="script"&&(x==="async"||x==="defer"||x==="noModule")?m[x]=!!h[v]:m.setAttribute(x,h[v])}const{children:_,dangerouslySetInnerHTML:g}=h;return g?m.innerHTML=g.__html||"":_&&(m.textContent=typeof _=="string"?_:Array.isArray(_)?_.join(""):""),m}function i(u,d){if(u instanceof HTMLElement&&d instanceof HTMLElement){const h=d.getAttribute("nonce");if(h&&!u.getAttribute("nonce")){const m=d.cloneNode(!0);return m.setAttribute("nonce",""),m.nonce=h,h===u.nonce&&u.isEqualNode(m)}}return u.isEqualNode(d)}let c;process.env.__NEXT_STRICT_NEXT_HEAD?c=(u,d)=>{const h=document.querySelector("head");if(!h)return;const m=h.querySelectorAll('meta[name="next-head"]')||[],_=[];if(u==="meta"){const x=h.querySelector("meta[charset]");x&&_.push(x)}for(let x=0;x<m.length;x++){var g;const w=m[x].nextSibling;(w==null||(g=w.tagName)==null?void 0:g.toLowerCase())===u&&_.push(w)}const v=d.map(o).filter(x=>{for(let S=0,w=_.length;S<w;S++){const I=_[S];if(i(I,x))return _.splice(S,1),!1}return!0});_.forEach(x=>{var S;const w=x.previousSibling;if(w&&w.getAttribute("name")==="next-head"){var I;(I=x.parentNode)==null||I.removeChild(w)}(S=x.parentNode)==null||S.removeChild(x)}),v.forEach(x=>{var S;const w=document.createElement("meta");w.name="next-head",w.content="1",((S=x.tagName)==null?void 0:S.toLowerCase())==="meta"&&x.getAttribute("charset")||h.appendChild(w),h.appendChild(x)})}:c=(u,d)=>{const h=document.getElementsByTagName("head")[0],m=h.querySelector("meta[name=next-head-count]");if(process.env.NODE_ENV!=="production"&&!m){console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");return}const _=Number(m.content),g=[];for(let S=0,w=m.previousElementSibling;S<_;S++,w=(w==null?void 0:w.previousElementSibling)||null){var v;(w==null||(v=w.tagName)==null?void 0:v.toLowerCase())===u&&g.push(w)}const x=d.map(o).filter(S=>{for(let w=0,I=g.length;w<I;w++){const P=g[w];if(i(P,S))return g.splice(w,1),!1}return!0});g.forEach(S=>{var w;return(w=S.parentNode)==null?void 0:w.removeChild(S)}),x.forEach(S=>h.insertBefore(S,m)),m.content=(_-g.length+x.length).toString()};function l(){return{mountedInstances:new Set,updateHead:u=>{const d={};u.forEach(_=>{if(_.type==="link"&&_.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+_.props["data-href"]+'"]'))return;_.props.href=_.props["data-href"],_.props["data-href"]=void 0}const g=d[_.type]||[];g.push(_),d[_.type]=g});const h=d.title?d.title[0]:null;let m="";if(h){const{children:_}=h.props;m=typeof _=="string"?_:Array.isArray(_)?_.join(""):""}m!==document.title&&(document.title=m),["meta","base","link","style","script"].forEach(_=>{c(_,d[_]||[])})}}}(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)}(No,No.exports)),No.exports}(function(e,t){"use client";Object.defineProperty(t,"__esModule",{value:!0});function r(T,O){for(var M in O)Object.defineProperty(T,M,{enumerable:!0,get:O[M]})}r(t,{default:function(){return N},handleClientScriptLoad:function(){return S},initScriptLoader:function(){return P}});const n=Ct,o=_n,i=s,c=n._(dc),l=o._(j),u=Xm(),d=jw(),h=Vp(),m=new Map,_=new Set,g=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],v=T=>{if(c.default.preinit){T.forEach(O=>{c.default.preinit(O,{as:"style"})});return}if(typeof window<"u"){let O=document.head;T.forEach(M=>{let z=document.createElement("link");z.type="text/css",z.rel="stylesheet",z.href=M,O.appendChild(z)})}},x=T=>{const{src:O,id:M,onLoad:z=()=>{},onReady:D=null,dangerouslySetInnerHTML:B,children:G="",strategy:J="afterInteractive",onError:Y,stylesheets:X}=T,Z=M||O;if(Z&&_.has(Z))return;if(m.has(O)){_.add(Z),m.get(O).then(z,Y);return}const he=()=>{D&&D(),_.add(Z)},fe=document.createElement("script"),ee=new Promise((ie,_e)=>{fe.addEventListener("load",function(we){ie(),z&&z.call(this,we),he()}),fe.addEventListener("error",function(we){_e(we)})}).catch(function(ie){Y&&Y(ie)});B?(fe.innerHTML=B.__html||"",he()):G?(fe.textContent=typeof G=="string"?G:Array.isArray(G)?G.join(""):"",he()):O&&(fe.src=O,m.set(O,ee));for(const[ie,_e]of Object.entries(T)){if(_e===void 0||g.includes(ie))continue;const we=d.DOMAttributeNames[ie]||ie.toLowerCase();fe.setAttribute(we,_e)}J==="worker"&&fe.setAttribute("type","text/partytown"),fe.setAttribute("data-nscript",J),X&&v(X),document.body.appendChild(fe)};function S(T){const{strategy:O="afterInteractive"}=T;O==="lazyOnload"?window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>x(T))}):x(T)}function w(T){document.readyState==="complete"?(0,h.requestIdleCallback)(()=>x(T)):window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>x(T))})}function I(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(O=>{const M=O.id||O.getAttribute("src");_.add(M)})}function P(T){T.forEach(S),I()}function C(T){const{id:O,src:M="",onLoad:z=()=>{},onReady:D=null,strategy:B="afterInteractive",onError:G,stylesheets:J,...Y}=T,{updateScripts:X,scripts:Z,getIsSsr:he,appDir:fe,nonce:ee}=(0,l.useContext)(u.HeadManagerContext),ie=(0,l.useRef)(!1);(0,l.useEffect)(()=>{const we=O||M;ie.current||(D&&we&&_.has(we)&&D(),ie.current=!0)},[D,O,M]);const _e=(0,l.useRef)(!1);if((0,l.useEffect)(()=>{_e.current||(B==="afterInteractive"?x(T):B==="lazyOnload"&&w(T),_e.current=!0)},[T,B]),(B==="beforeInteractive"||B==="worker")&&(X?(Z[B]=(Z[B]||[]).concat([{id:O,src:M,onLoad:z,onReady:D,onError:G,...Y}]),X(Z)):he&&he()?_.add(O||M):he&&!he()&&x(T)),fe){if(J&&J.forEach(we=>{c.default.preinit(we,{as:"style"})}),B==="beforeInteractive")return M?(c.default.preload(M,Y.integrity?{as:"script",integrity:Y.integrity,nonce:ee,crossOrigin:Y.crossOrigin}:{as:"script",nonce:ee,crossOrigin:Y.crossOrigin}),(0,i.jsx)("script",{nonce:ee,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([M,{...Y,id:O}])+")"}})):(Y.dangerouslySetInnerHTML&&(Y.children=Y.dangerouslySetInnerHTML.__html,delete Y.dangerouslySetInnerHTML),(0,i.jsx)("script",{nonce:ee,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...Y,id:O}])+")"}}));B==="afterInteractive"&&M&&c.default.preload(M,Y.integrity?{as:"script",integrity:Y.integrity,nonce:ee,crossOrigin:Y.crossOrigin}:{as:"script",nonce:ee,crossOrigin:Y.crossOrigin})}return null}Object.defineProperty(C,"__nextScript",{value:!0});const N=C;(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)})(Xa,Xa.exports);var Sw=Xa.exports,Cw=Sw;const Zc=U.getDefaultExportFromCjs(Cw),ww=({children:e,ONE_TRUST:t})=>s.jsxs(s.Fragment,{children:[s.jsx(Zc,{src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",defer:!0,strategy:"afterInteractive","data-domain-script":t.siteId,type:"text/javascript"}),e]}),Ew=Gh(()=>Promise.resolve(ww),{ssr:!1}),Pw="_lgpd_vffd3_82",Iw="_success_vffd3_248",Nw="_error_vffd3_312",Ye={"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:Pw,"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:Iw,"text-structure-modifier":"_text-structure-modifier_vffd3_257","success-title":"_success-title_vffd3_297","close-button":"_close-button_vffd3_302",error:Nw,"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"},eg=({invalid_message:e,master_data_field:t,placeholder:r,required:n=!1,CONSTANTS:o})=>{const{isMobile:i}=xe(),{inputsStatus:c,setInputsStatus:l,setFormStatus:u,variant:d}=Nc();return s.jsx(p.TextField.Structure,{className:`${Ye["textfield-structure-modifier"]} ${d}`,input:s.jsx(p.TextField.Input,{mode:"simple",label:r,sizeVariant:i?o.NEWSLETTER_CONFIGS.interactionSizeMob:o.NEWSLETTER_CONFIGS.interactionSizeDesk,name:t,className:`${Ye["input-wrapper-modifier"]} ${d}`,feedback:c[t]==="required"?"error":c[t],onChange:()=>{c[t]!=="none"&&(l(h=>({...h,[t]:"none"})),u("idle"))},required:n}),supportText:c[t]==="error"||c[t]==="required"?s.jsx("div",{className:d==="horizontal"?Ye["support-text-modifier"]:"",children:s.jsx(p.TextField.SupportText,{text:c[t]==="error"?e??o.NEWSLETTER_CONFIGS.messages.invalid_generic:o.NEWSLETTER_CONFIGS.messages.required_field,feedback:"error"})}):null})};eg.displayName="Newsletter.Input";const tg=({formStatus:e,fields:t,CONSTANTS:r})=>s.jsxs(s.Fragment,{children:[Array.isArray(t)&&t.map((n,o)=>s.jsx(eg,{invalid_message:n.invalid_message,master_data_field:n.master_data_field,placeholder:n.placeholder,required:n.required,type:n.type,CONSTANTS:r},`nt-field-${n.master_data_field}-${o}`)),e==="error"&&s.jsx("div",{className:Ye.error,children:s.jsx("p",{children:r.NEWSLETTER_CONFIGS.form.status.error})})]});tg.displayName="Newsletter.FormFields";const rg=({formStatus:e,CONSTANTS:t,...r})=>{const{isMobile:n}=xe();return s.jsxs(p.Button,{...r,className:Ye["submit-btn"],disabled:e==="success",size:n?"medium":"large",children:[s.jsx("span",{"data-loading":e==="loading","data-label":!0,children:t.NEWSLETTER_CONFIGS.submitLabel}),t.NEWSLETTER_CONFIGS.hasLoadingState&&e==="loading"&&s.jsx(p.Spinner,{className:Ye["loading-spinner"],size:"small"})]})};rg.displayName="Newsletter.SubmitButton";const ng=({checkboxRef:e,formStatus:t,setFormStatus:r,CONSTANTS:n})=>{const o=i=>{i.target.checked?(e.current=!0,t==="unchecked"&&r("idle")):e.current=!1};return s.jsxs(s.Fragment,{children:[s.jsx(p.Checkbox,{adornment:s.jsx(p.Icon,{name:n.ICONS.check,size:"x-small"}),defaultChecked:e.current,disabled:t==="success",name:"terms-and-conditions",label:n.NEWSLETTER_CONFIGS.messages.accept_terms_and_conditions,onChange:o,sizeVariant:"small",className:Ye["terms-and-conditions-checkbox"]}),t==="unchecked"&&s.jsx("div",{className:Ye["terms-and-conditions-unchecked"],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:n.ICONS.alert_circle,size:"small"})},children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{children:n.NEWSLETTER_CONFIGS.messages.terms_and_conditions_not_accepted})})})})]})};ng.displayName="Newsletter.Terms";const sg=({title:e,description:t,CONSTANTS:r})=>s.jsx("div",{className:Ye.success,children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{className:Ye["text-structure-modifier"],children:[s.jsxs("div",{className:Ye["success-title"],children:[s.jsx(p.Icon,{name:r.ICONS.check_circle,size:"medium"}),s.jsx("h3",{children:e})]}),s.jsx("p",{children:t})]})})});sg.displayName="Newsletter.Success";const og=({formPayloadOptionals:e,masterDataEntity:t,banner:r,termsDescription:n,lgpdLinkLable:o,lgpdLink:i,variant:c,CONSTANTS:l})=>{const{checkboxRef:u,fields:d,formStatus:h,hasTermsAndConditions:m,handleClickToSubmit:_,handleSubmit:g,setFormStatus:v}=Nc();return s.jsx(s.Fragment,{children:h==="success"?s.jsx(sg,{description:l.NEWSLETTER_CONFIGS.messages.success_description,title:l.NEWSLETTER_CONFIGS.messages.success_title,CONSTANTS:l}):s.jsxs(s.Fragment,{children:[s.jsxs("form",{className:Ye["form-wrapper"],onSubmit:x=>g(x,e,t),children:[s.jsx(tg,{formStatus:h,fields:d,CONSTANTS:l}),m&&s.jsx(ng,{checkboxRef:u,formStatus:h,setFormStatus:v,CONSTANTS:l}),s.jsx(rg,{formStatus:h,type:"submit",variant:"primary",onClick:_,CONSTANTS:l})]}),(r||c==="vertical")&&s.jsxs("div",{className:Ye.lgpd,children:[n&&s.jsx("p",{children:n}),o&&s.jsx(wt,{href:i,children:o})]})]})})};og.displayName="Newsletter.Form";const Rw=["horizontal","vertical"],el=({className:e,description:t,formPayloadOptionals:r,fields:n,masterDataEntity:o,masterDataEmailField:i,masterDataNameField:c,banner:l,altBanner:u,bannerBackground:d,termsDescription:h,lgpdLinkLable:m,lgpdLink:_,title:g,variant:v,borderTop:x,borderBottom:S,CONSTANTS:w,actionName:I="cadastrou-newsletter",originName:P="",...C})=>{if(!i||!c)return null;const N=p.helpers.ValidateProp({fieldTypes:Rw,property:v,fallback:"horizontal"});return s.jsxs("div",{className:l?d?Ye["banner-background"]:Ye["newsletter-wrapper"]:"",children:[l&&s.jsx(p.Banner.Container,{className:Ye["banner-container"],children:s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{src:l,alt:u,width:"1920",height:"500"})})}),s.jsx("div",{className:l?Ye["newsletter-provider-wrapper"+(d?"-background":"")]:"",children:s.jsx(bp,{dito:{actionName:I,originName:P},fields:n,masterDataEmailField:i,masterDataNameField:c,variant:N,CONSTANTS:w,children:s.jsx("div",{...C,className:p.helpers.classNameConcat(Ye["newsletter-root"+(l||N==="vertical"?"-banner":"")],[x&&Ye["has-border-top"],S&&Ye["has-border-bottom"],e].filter(Boolean)),"data-variant":N,children:s.jsxs("div",{className:l||N==="vertical"?Ye["newsletter-container-banner"]:Ye["newsletter-container"],children:[s.jsxs("div",{className:Ye["content-text"],children:[s.jsx("h2",{children:g}),s.jsx("p",{children:t}),!l&&N==="horizontal"&&s.jsxs("div",{className:Ye.lgpd,children:[s.jsx("p",{children:h}),m&&s.jsx(wt,{target:"_blank",href:_,children:m})]})]}),s.jsx(og,{formPayloadOptionals:r,masterDataEntity:o,CONSTANTS:w,banner:l,lgpdLink:_,lgpdLinkLable:m,termsDescription:h,variant:N})]})})})})]})};el.displayName="Newsletter";const ig=({children:e,...t})=>s.jsx("div",{...t,children:e});ig.displayName="CallToAction";const Tw="_wrapper_aejhu_1",Ow="_body_aejhu_8",Ho={wrapper:Tw,body:Ow,"wrapper-body":"_wrapper-body_aejhu_16","accordion-modifier":"_accordion-modifier_aejhu_32"},Aw=({children:e,className:t,...r})=>s.jsx("div",{...r,className:p.helpers.classNameConcat(Ho.wrapper,t),children:e}),kw=({data:e,ICONS:t})=>{const[r,n]=j.useState(null),o=c=>{n(l=>l===c?null:c)},{router:i}=Ae();return s.jsx("div",{className:p.helpers.classNameConcat(Ho.body),children:Array.isArray(e)&&(e==null?void 0:e.map((c,l)=>{var m;const u=r===c.id,d=c.buttonHref&&c.buttonHref!=="#",h=c.buttonHref&&c.type==="button"&&d?{onClick:()=>{var _;if((_=c.buttonHref)!=null&&_.startsWith("/")){i.push(c.buttonHref);return}window.open(c.buttonHref,"_blank")}}:{};return s.jsx("div",{children:c.type==="button"?s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{variant:"tertiary",mode:c.buttonMode??"default",size:c.buttonSize??"medium",iconNameStart:t[c.buttonIcon]??c.buttonIcon,...h,style:{marginTop:16},children:c.buttonLabel}),s.jsx(p.Utils.Divider,{direction:"horizontal",size:"small",style:{height:16}})]}):s.jsxs(p.Accordion.Wrapper,{className:p.helpers.classNameConcat(Ho["accordion-modifier"]),children:[s.jsx(p.Accordion.Header,{id:`${l}-${c.title}`,closeIndicator:u?s.jsx(p.Icon,{name:t.arrow_up,size:"medium"}):void 0,openIndicator:u?void 0:s.jsx(p.Icon,{name:t.arrow_down,size:"medium"}),title:"accordion-header",onClick:()=>o(c.id),children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:"typography-style-body-sm",children:c.title})})})}),s.jsx(p.Accordion.Body,{title:"accordion-body",children:s.jsx(p.TextStructure.Root,{children:u&&s.jsxs(p.TextStructure.DivWrapper,{children:[c.subtitle?s.jsx("h3",{className:"typography-style-body-md",children:c.subtitle}):s.jsx(s.Fragment,{}),s.jsx("p",{className:"typography-style-caption",children:c.description}),c.buttonLabel&&c.buttonHref?s.jsx(wt,{href:c.buttonHref??"#",mode:c.buttonMode??"default",size:c.buttonSize??"medium",adornments:(m=c.buttonIcon)!=null&&m.length?{end:s.jsx(p.Icon,{name:t[c.buttonIcon]??c.buttonIcon})}:void 0,children:c.buttonLabel}):s.jsx(s.Fragment,{})]})})})]})},c.id)}))})},Mw=({className:e,data:t,ICONS:r,...n})=>{const[o,i]=j.useState(!1),[c,l]=j.useState(null);j.useEffect(()=>{!o&&!c&&t&&l(t)},[o,c]);const u=j.useCallback(()=>{i(d=>!d)},[]);return c?s.jsxs(Aw,{...n,className:e,children:[s.jsx("div",{className:Ho["wrapper-body"],hidden:!o,children:o&&s.jsx(kw,{data:c.content,ICONS:r})}),s.jsx(ig,{children:s.jsx("div",{onClick:u,children:o?s.jsx(p.Button,{iconNameEnd:r.close,size:(c==null?void 0:c.helpButtonSize)??"x-large"}):s.jsx(p.Button,{iconNameStart:(c==null?void 0:c.iconLabel)??r.help,size:(c==null?void 0:c.helpButtonSize)??"x-large",children:c==null?void 0:c.label})})})]}):s.jsx(s.Fragment,{})},Lw="_formContainer_zwlly_1",Dw="_formFieldGroup_zwlly_6",Fw="_formFieldGroupName_zwlly_10",zw="_formFieldWrapper_zwlly_20",qw="_formFieldInput_zwlly_30",Bw="_success_zwlly_73",Uw="_button_zwlly_110",Hw="_error_zwlly_114",gr={formContainer:Lw,formFieldGroup:Dw,formFieldGroupName:Fw,formFieldWrapper:zw,formFieldInput:qw,success:Bw,"text-structure-modifier":"_text-structure-modifier_zwlly_85",button:Uw,error:Hw},$w=({group:e,children:t,className:r})=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:p.helpers.classNameConcat(gr.formFieldGroup,r),children:[s.jsx("h1",{className:gr.formFieldGroupName,children:e.groupLabel}),t]},e.groupLabel)}),ag=j.createContext({});function cg({children:e,groups:t,masterDataEntity:r,postFn:n,actionName:o="",originName:i="",POPUP_SUBMITTED_STORAGE:c}){const[l,u]=j.useState(!1),[d,h]=j.useState({}),[m,_]=j.useState([]),[g,v]=j.useState("idle"),[x,S]=j.useState(""),w=({target:{name:P,value:C}})=>{h({...d,[P]:C})},I=P=>{P.preventDefault(),n({body:{masterDataEntity:r,payload:d}}).then(async({Message:C})=>{if(C){const T=C.match(/'(.*?[^\\])'/g)||[];var N="-";for(const O of T){const M=O.substring(1,O.length-1),D=t.flatMap(B=>B.fields).find(({name:B})=>B===M);S(M),D&&(N=D.name)}return v("error"),_([N])}if(d.email){const T=await yp(d.email||""),O=new Date().toISOString();vp([{user_id:T,timestamp:O,type:"IDENTIFY",traits:{id:T,created_at:O,name:d.name,email:d.email,phone:d==null?void 0:d.phone}},{action:o,timestamp:O,type:"TRACK",user_id:T,context:{user_agent:navigator.userAgent},properties:{custom_data:{email:d.email,nome:d.name,origem:i,...d}}}])}return window.localStorage.setItem(c,"true"),h({}),u(!0),v("success"),_([])})};return s.jsx(ag.Provider,{value:{formErrors:m,handleInputChange:w,submitForm:I,formData:d,status:g,fieldMessage:x,success:l,setSuccess:u},children:e})}function si(){return j.useContext(ag)}const Ww=({fields:e,className:t})=>{const{formData:r,handleInputChange:n,formErrors:o}=si();return s.jsx("div",{className:p.helpers.classNameConcat(gr.formFieldWrapper,t),children:e.map(({label:i,name:c,required:l,width:u="medium"})=>s.jsx(p.TextField.Input,{label:`${i}${l?"*":""}`,title:c,value:r[c]||"",name:c,sizeVariant:"large",onChange:n,required:l,feedback:o.includes(c)?"error":"none",className:gr.formFieldInput,"data-inputsize":u},c))})},Vw=({FORM_CONFIGS:e,ICONS:t})=>{const{router:r}=Ae();return s.jsxs("div",{className:gr.success,children:[s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t.check_circle,size:"medium"})},children:s.jsx(p.TextStructure.DivWrapper,{className:gr["text-structure-modifier"],children:s.jsx("p",{children:e.successMessage})})}),s.jsx(p.Button,{size:"large",onClick:()=>r.push("/"),className:gr.button,children:e.returnButton})]})},Gw=({FORM_CONFIGS:e,ICONS:t})=>{const{fieldMessage:r}=si();return s.jsx("div",{className:gr.error,children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:t.delete_circle,size:"small"})},children:s.jsx(p.TextStructure.DivWrapper,{className:gr["text-structure-modifier"],children:s.jsxs("p",{children:[e.errorMessage,r]})})})})},Kw=({children:e,className:t,ICONS:r,FORM_CONFIGS:n})=>{const{submitForm:o,status:i}=si();return s.jsx("form",{onSubmit:o,className:p.helpers.classNameConcat(gr.formContainer,t),children:i==="success"?s.jsx(Vw,{ICONS:r,FORM_CONFIGS:n}):s.jsxs(s.Fragment,{children:[e,i==="error"&&s.jsx(Gw,{ICONS:r,FORM_CONFIGS:n})]})})},Qw=e=>{const{children:t,className:r}=e;return s.jsx(cg,{...e,children:s.jsx(Kw,{ICONS:e.ICONS,FORM_CONFIGS:e.FORM_CONFIGS,className:r,children:t})})},Bn={Root:Qw,FieldGroup:$w,FieldWrapper:Ww},Yw="_button_1e35m_39",Xr={"banner-container":"_banner-container_1e35m_1","banner-background":"_banner-background_1e35m_6","form-root":"_form-root_1e35m_15",button:Yw,"form-fied-wrapper":"_form-fied-wrapper_1e35m_52"};function Xw({content:e,sections:t,FORM_CONFIGS:r,ICONS:n,postFn:o,POPUP_SUBMITTED_STORAGE:i}){var u;const{isMobile:c}=xe(),l=((u=t.find(({name:d})=>d==="Form"))==null?void 0:u.data)||{};return s.jsx("div",{children:s.jsxs(p.Banner.Container,{className:Xr["banner-container"],children:[s.jsx(p.Banner.ImageWrapper,{children:s.jsx(at.Image,{className:Xr["banner-background"],src:c?e.bannerMobile:e.bannerDesk,alt:e.altBanner,width:"1920",height:"500"})}),s.jsxs(Bn.Root,{postFn:o,ICONS:n,FORM_CONFIGS:r,groups:l.groups||[],masterDataEntity:l.masterDataEntity||"",className:Xr["form-root"],POPUP_SUBMITTED_STORAGE:i,children:[l.groups.map(d=>s.jsx(Bn.FieldGroup,{group:d,children:s.jsx(Bn.FieldWrapper,{fields:d.fields,className:Xr["form-fied-wrapper"]})},d.groupLabel)),s.jsxs("div",{children:[s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("p",{className:"typography-style-body-xs",children:e.requiredMessage})}),s.jsx("div",{className:Xr["button-wrapper"],children:s.jsx("div",{className:Xr["button-frame"],children:s.jsx(p.Button,{size:"large",type:"submit",className:Xr.button,children:e.buttonLabel})})})]})]})]})})}const Jw="_content_1jj9i_36",Zw="_trends_1jj9i_47",e0="_modal_1jj9i_1",zt={"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:Jw,trends:Zw,"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:e0,"search-modal__modal":"_search-modal__modal_1jj9i_100"},lg=j.createContext({}),t0=({children:e,term:t})=>{const[r,n]=j.useState([]),[o,i]=j.useState(!1);return j.useEffect(()=>{if(!t){n([]);return}(async()=>{i(!0);try{const l=await U.fetchProxy("/_v/proxy/search/suggestedTerms",{method:"POST",body:JSON.stringify({query:t,locale:"pt-BR"})}),{data:u}=await l.json();n((u==null?void 0:u.searches)||[])}catch(l){console.error("Erro ao buscar sugestões:",l)}})()},[t]),s.jsx(lg.Provider,{value:j.useMemo(()=>({suggestedTerms:r,loading:o,setLoading:i}),[r,o]),children:e})},r0=({children:e,...t})=>s.jsx(t0,{...t,children:e}),n0=()=>{const e=j.useContext(lg);if(!e)throw new Error("useSuggestedTermsContext must be used within a SuggestedTermsProvider");return e},ga=(e,t,r=24,n=1,o="release:desc")=>{const i=`/search?query=${t??""}&count=${r}&page=${n}${o?`&sort=${o.replace("_",":")}`:""}`;e.push(i)},ug=({placeholder:e,noResultsTitle:t,noResultsLabel:r,noResultsTermText:n,handleClose:o,setTerm:i,ICONS:c,ITEMS_DEFAULT_SORT:l,ITEMS_PER_PAGE:u,SEARCH_MODAL:d})=>{const[h,m]=j.useState(""),{suggestedTerms:_,loading:g,setLoading:v}=n0(),{router:x}=Ae(),S=j.useRef(null),w=C=>{m(C.target.value),clearTimeout(S.current),C.target.value.length>2&&(i(C.target.value),S.current=setTimeout(()=>{i(C.target.value),v(!1)},2e3))},I=C=>{C.key==="Enter"&&(h==null?void 0:h.length)>2&&(o(),ga(x,h,u,1,l))},P=C=>{o(),ga(x,C,u,1,l)};return j.useEffect(()=>{if(clearTimeout(S.current),h.length<=2||_.length>0){v(!1);return}return v(!0),S.current=setTimeout(()=>{ga(x,h,u,1,l),v(!1),o()},2e3),()=>{clearTimeout(S.current)}},[h,_]),s.jsx(p.DropDown.AutoComplete,{className:zt["modal-auto-complete"],onKeyDown:I,onInputChange:w,placeholder:e,stopClickPropagation:!1,adornment:{end:g?s.jsx(p.Spinner,{size:"small"}):s.jsx(p.Button,{variant:"tertiary",size:"small",iconNameStart:c.search,onClick:()=>{P(h)},disabled:!(h.length>2)})},children:(_==null?void 0:_.length)>0&&s.jsx(s.Fragment,{children:(_==null?void 0:_.length)>0&&(h==null?void 0:h.length)>2?s.jsx(p.DropDown.AutoCompleteList,{className:zt["modal-auto-complete__dropdown"],seeAll:s.jsx("span",{onClick:()=>P(h),children:n+h}),children:_.map((C,N)=>s.jsx(p.DropDown.ListItemWithLink,{children:s.jsx(wt,{href:`/search?query=${C.term}&count=${u}&page=1`,size:"x-small",title:C.term,disableUnderline:!0,disablePadding:!1,onClick:T=>{T.preventDefault(),o()},children:C.term})},`key-${C.term}-${N}`))}):!g&&(h==null?void 0:h.length)>3&&(_==null?void 0:_.length)===0&&s.jsxs(p.DropDown.AutoCompleteList,{className:zt["modal-search-empty"],children:[s.jsx(p.DropDown.NotResults,{description:r,title:t}),s.jsx(p.Button,{className:"all-terms",onClick:()=>{o(),x.push(d.EMPTY.ALL_TERMS)},variant:"tertiary",size:"medium",title:d.EMPTY.ALL_TERMS_LABEL,adornment:{end:s.jsx(p.Icon,{name:c.arrow_right,size:"medium"})},children:d.EMPTY.ALL_TERMS_LABEL})]})})})};ug.displayName="SearchModal.AutoComplete";function s0({title:e,ICONS:t}){const{isMobile:r}=xe();return s.jsx(p.Modal.Header,{navigation:"top",className:zt["modal-header"],children:s.jsxs(p.Modal.Controls,{navigation:"top",isMobile:!!r,children:[s.jsx(p.Button,{"data-close":!0,iconNameStart:t.arrow_left,size:"small",variant:"tertiary"}),s.jsx(p.Modal.Title,{navigation:"top",className:zt["search-modal__title"],title:e}),s.jsx(p.Button,{className:zt["modal-header__close-button"],"data-close":!0,iconNameStart:t.close,size:"small",variant:"tertiary"})]})})}const dg=j.createContext({searches:[],isLoading:!1,error:null});let ya=null;const o0=({children:e})=>{const[t,r]=j.useState([]),[n,o]=j.useState(!0),[i,c]=j.useState(null);return j.useEffect(()=>{(async()=>{try{if(o(!0),ya){r(ya),o(!1);return}const u=await U.fetchProxy("/_v/proxy/search/topSearch");if(!u.ok)throw new Error(`Erro ao buscar os dados: ${u.status}`);const h=(await u.json()).data.searches||[];ya=h,r(h)}catch(u){c(u instanceof Error?u.message:"Erro desconhecido")}finally{o(!1)}})()},[]),s.jsx(dg.Provider,{value:j.useMemo(()=>({searches:t,isLoading:n,error:i}),[t,n,i]),children:e})},i0=()=>{const e=j.useContext(dg);if(!e)throw new Error("useTopSearches must be used within a TopSearchesProvider");return e},a0=({title:e,allTermsLabel:t,allTermsUrl:r,qtyTrends:n,handleClose:o,ICONS:i,ITEMS_PER_PAGE:c})=>{const{searches:l,isLoading:u}=i0(),{router:d}=Ae(),h=Array.isArray(l)?l:[];return s.jsx(s.Fragment,{children:!u&&h.length>0?s.jsx(p.ComponentList.Structure,{className:zt.trends,title:e,children:s.jsxs("div",{className:zt["trends-content"],children:[s.jsx(p.ComponentList.List,{columns:1,children:h.slice(0,n).map((m,_)=>s.jsx(p.ComponentList.ListItem,{className:zt["trends-item"],children:s.jsx(wt,{href:`/search?query=${m.term}&count=${c}&page=1`,size:"x-small",adornments:{end:s.jsx(p.Icon,{name:i.arrow_right,size:"x-small"})},disableUnderline:!0,title:m.term,onClick:()=>o(),children:m.term})},`list-item-${_}`))}),s.jsx(p.Button,{className:"all-terms",variant:"tertiary",size:"x-small",underline:!1,onClick:()=>{o(),d.push(r)},adornment:{end:s.jsx(p.Icon,{name:i.arrow_right,size:"x-small"})},children:t})]})}):null})};function c0({SectionZone:e}){var n;const[t,r]=j.useState(null);return j.useEffect(()=>{(async()=>{try{const i=await fetch("/api/cms/content-type-client",{method:"POST",body:JSON.stringify({contentType:"search"})});if(!i.ok)return;const c=await i.json();r(c)}catch(i){console.error("[CMS FETCH ERROR]",i)}})()},[]),s.jsx("div",{className:zt.content,children:t!==null&&s.jsx(e,{data:((n=t[0])==null?void 0:n.sections)??[],componentConfigs:{"Product Carousel":{searchModal:!0}}})})}const fg=({className:e,trends:t,CONSTANTS:r,SectionZone:n})=>{const[o,i]=j.useState(""),{isMobile:c}=xe(),l=mf(),{setValue:u}=Wo(),{SEARCH_MODAL:d,ICONS:h,ITEMS_PER_PAGE:m,ITEMS_DEFAULT_SORT:_}=r;return s.jsxs(p.Modal.Root,{isMobile:c??!1,variant:c?"sideBottom":"sideRight",isOpen:l,setIsOpen:u,className:`${zt.modal} ${zt["search-modal__modal"]} ${e??""}`,children:[s.jsx(s0,{title:d.HEADER.TITLE,ICONS:h}),s.jsxs(p.Modal.Body,{className:zt["modal-content-body"],children:[s.jsx(r0,{term:o,children:s.jsx(ug,{placeholder:d.AUTOCOMPLETE.PLACEHOLDER,noResultsTitle:d.EMPTY.NOT_FOUND,noResultsLabel:d.EMPTY.NOT_FOUND_P,noResultsTermUrl:d.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_URL,noResultsTermText:d.AUTOCOMPLETE.NO_RESULTS.NO_RESULTS_TERM_TEXT,handleClose:()=>u(!1),setTerm:i,ICONS:h,ITEMS_DEFAULT_SORT:_,ITEMS_PER_PAGE:m,SEARCH_MODAL:d})}),t?s.jsx(o0,{children:s.jsx(a0,{title:d.TRENDS.TITLE,allTermsUrl:d.TRENDS.ALL_TERMS_URL,allTermsLabel:d.TRENDS.ALL_TERMS_LABEL,qtyTrends:d.TRENDS.QTY_TERMS,handleClose:()=>u(!1),ICONS:h,ITEMS_PER_PAGE:m})}):null,s.jsx(c0,{SectionZone:n})]})]})};fg.displayName="SearchModal";const Gt={"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"},pg=({LPLOJAS_TEMPLATE_RETURN_BUTTON:e,ICONS:t,showVendor:r})=>{const{selectedCity:n,selectedStore:o}=Go();return s.jsx(p.Card,{padding:"small",shadow:!0,className:Gt["store--wrapper"],children:o?s.jsxs(s.Fragment,{children:[s.jsx(_r.ReturnButton,{ICONS:t,children:e}),s.jsx(_r.Details,{ICONS:t,showVendor:r,store:n==null?void 0:n.find(i=>i.nome===o)})]}):s.jsx(_r.Select,{ICONS:t})})};pg.displayName="LPStores.Content";const bs=({title:e,text:t,type:r,...n})=>s.jsx(p.TextStructure.DivWrapper,{...n,children:r==="title"?s.jsx("h4",{className:Gt["store--details--title"],children:e}):s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:Gt["store--details--subtitle"],children:e}),s.jsx("p",{className:Gt["store--details--text"],children:t})]})});bs.displayName="LPStores.Details";const hg=({vendor:e,ICONS:t})=>{const r=e?e.split(","):[];return s.jsxs(p.Accordion.Wrapper,{style:{width:"100%"},children:[s.jsx(p.Accordion.Header,{id:"accordion-header-vendor",closeIndicator:s.jsx(p.Icon,{name:t.arrow_up,size:"small"}),openIndicator:s.jsx(p.Icon,{name:t.arrow_down,size:"small"}),title:"Código de vendedor (A)",children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{gap:0,children:s.jsx("h3",{className:"typography-style-body-md",children:"Código de vendedor (A)"})})})}),s.jsx(p.Accordion.Body,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Gt["store--details--vendor"],children:r.map((n,o)=>s.jsx("p",{className:"typography-style-body-sm",children:n.trim()},o))})})})]})};hg.displayName="LPStores.Details";const mg=({store:e,showVendor:t,ICONS:r})=>s.jsxs("div",{className:Gt["store--details"],children:[s.jsx(bs,{alignItems:"left",title:String(e==null?void 0:e.nome),type:"title"}),s.jsx(bs,{title:"Endereço",text:String(e.endereco)}),e.telefone&&s.jsx(bs,{title:"Telefone",text:String(e.telefone)}),e.horario&&s.jsx(bs,{title:"Horário de funcionamento",text:String(e.horario)}),t&&s.jsx(hg,{ICONS:r,vendor:String(e.vendedoras)})]});mg.displayName="LPStores.Details";const _g=({ICONS:e,arrowDownIcon:t=s.jsx(p.Icon,{name:e.arrow_down,size:"small"}),arrowUpIcon:r=s.jsx(p.Icon,{name:e.arrow_up,size:"small"}),list:n,selectText:o,...i})=>s.jsx(p.DropDown.DefaultDropDown,{...i,"aria-placeholder":o,adornmentListClosed:{end:t},adornmentListOpened:{end:r},mode:"simple",placeholder:o,sizeVariant:"large",children:s.jsx(p.DropDown.DefaultDropDownList,{placeholder:o,supportText:o,maxHeight:400,children:Array.isArray(n)&&(n==null?void 0:n.map(c=>s.jsx(p.DropDown.ListItem,{value:c,children:c},c.replace(/\s/g,""))))})});_g.displayName="LPStores.DropDown";const gg=({children:e,ICONS:t})=>{const{clearSelectedStore:r}=Go(),n=()=>{typeof r=="function"&&r()};return s.jsxs("button",{"aria-label":String(e),className:Gt["store--return-button"],onClick:n,onKeyDown:n,children:[s.jsx(p.Icon,{name:t.arrow_left,size:"small"}),e]})};gg.displayName="LPStores.ReturnButton";const yg=({children:e,data:t})=>s.jsx(Sp,{data:t,children:e});yg.displayName="LPStores.Root";const vg=({children:e,imgAlt:t,imgSrcDesk:r,imgSrcMob:n})=>{const{isMobile:o}=xe();return s.jsxs("section",{className:Gt["store--section"],children:[s.jsx(Ns,{src:o?n:r,alt:t,fill:!0,className:Gt["store--section--img"]}),e]})};vg.displayName="LPStores.Section";const xg=({ICONS:e})=>{const{data:t,handleSelectCity:r,selectedCity:n,handleSelectStore:o}=Go(),i=new Set(t.map(l=>l.cidade)),c=Array.from(i).filter(l=>typeof l=="string");return s.jsxs("div",{className:Gt["store--select"],children:[s.jsx(_r.DropDown,{selectText:"Selecione a cidade",handleSelectedValue:r,list:c,defaultValue:n==null?void 0:n[0].cidade,ICONS:e}),s.jsx(_r.DropDown,{"data-selected-city":!!n,selectText:"Selecione a loja",handleSelectedValue:o,list:n?n==null?void 0:n.map(l=>String(l.nome)):[],ICONS:e},n==null?void 0:n[0].cidade)]})};xg.displayName="LPStores.Select";const bg=({children:e})=>s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Gt["store--page-title"],children:s.jsx("h2",{className:Gt["store--page-title--title"],children:e})})});bg.displayName="LPStores.Title";const _r={Content:pg,Details:mg,DropDown:_g,ReturnButton:gg,Root:yg,Section:vg,Select:xg,Title:bg};var jg={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 l0(e,t,r){const n=t.window,o=Object.assign({},t);if(delete o.window,n){n.dataLayer=n.dataLayer||[],n.dataLayer.push({event:e,ecommerce:o});return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,ecommerce:o})}function u0(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 Sg=[["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 d0(e,t,r){u0({id:e,custom_data:t},"#00c851",r)}var f0={DataLayer:l0,Dito:d0};async function p0(e,t){const r=jg[e];r&&await Promise.allSettled(r.destinations.map(async n=>{try{await f0[n](e.toLowerCase(),t,n)}catch(o){console.error(`[DT] Failed to send ${e} to ${n}:`,o)}}))}async function h0(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 m0(e){try{const{pathname:t}=new URL(e,window.location.origin);return/\/p\/?$/.test(t)}catch{return!1}}function Cg(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 _0(e){const t=Cg(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 n=await r.json();return(n==null?void 0:n[0])||null}catch(r){return console.error("Erro ao buscar dados do produto:",r),null}}function wg(e,t){var r,n,o,i;const c=(n=(r=e==null?void 0:e.shippingData)==null?void 0:r.logisticsInfo)==null?void 0:n.find(u=>u.itemId===t.id),l=(o=c==null?void 0:c.slas)==null?void 0:o.find(u=>u.id===c.selectedSla);return(i=l==null?void 0:l.pickupStoreInfo)!=null&&i.friendlyName?`retirada em loja: ${l.pickupStoreInfo.friendlyName}`:l!=null&&l.name?`Receba em casa: ${l.name}`:null}async function Eg(e){var t,r;const n=await h0(e.productId||e.productID||e.item_group_id);return n.length&&(r=(t=n[0].items.find(o=>o.name===e.skuName))==null?void 0:t.itemId)!=null?r:null}function oi(e){return e.discount||e.discount===0?e.discount:parseFloat(Math.max(e.listPrice-e.sellingPrice,0).toFixed(2))/100||0}function vn(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 n=r();if(n!=null)return n}return null}function Ws(e){const t=[()=>Object.values((e==null?void 0:e.productCategories)||{}).pop(),()=>Object.values((e==null?void 0:e.categories)||{}).pop(),()=>{var r,n,o,i,c;return(c=(i=(o=(n=(r=e==null?void 0:e.category)==null?void 0:r.split)==null?void 0:n.call(r,">"))==null?void 0:o[1])==null?void 0:i.trim)==null?void 0:c.call(i)},()=>e.item_category2];for(const r of t){const n=r();if(n!=null)return n}return null}function Pg(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 g0={farm:"farmrio","farm etc":"farmetc","farm rio":"farmrio"};function yd(e){if(!e)return null;const t=e.toLowerCase().trim();return g0[t]||null}function yr(e){var t;let r=[];if(Array.isArray(e)&&e.every(i=>typeof i=="string"))r=e;else if(Array.isArray(e))r=e.map(i=>{var c;return((c=i.additionalInfo)==null?void 0:c.brandName)||i.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"?yd(e):null;const n=r.map(yd).filter(i=>i!==null),o=[...new Set(n)].sort();return o.length>0?o.join("_"):null}function y0(e){var t;if(!e.orderForm&&!((t=e.orderForm.items)!=null&&t.length))return null;const r=e.orderForm.items;return yr(r)}function v0(e){var t;const{item:r}=e;return yr(((t=r==null?void 0:r.additionalInfo)==null?void 0:t.brandName)||r.brand||r.item_brand)}function x0(e,t){if(e!=null&&e.brand)return yr(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 y0(e);case"ADD_TO_CART":case"REMOVE_FROM_CART":return v0(e);default:return null}}async function b0(e){var t;const r=((t=e.orderForm)==null?void 0:t.items)||[];return r.length?await Promise.all(r.map(async n=>{var o,i,c;return{item_id:n.productId,item_category2:Ws(n),item_category4:Pg(n),item_shipping_tier:wg(e.orderForm,n),price:parseFloat((n.price/100).toFixed(2))||0,quantity:n.quantity||1,item_ref:n.refId||null,item_brand:yr((o=n.additionalInfo)==null?void 0:o.brandName)||((i=n.additionalInfo)==null?void 0:i.brandName)||null,item_sku:await Eg(n)||n.id||null,item_name:n.name||n.id||null,item_category:vn(n)||null,item_variant:n.skuName.split(/[-/]/)[0].trim(),item_variant2:((c=n.skuName.split(/[-/]/).pop())==null?void 0:c.trim())||"",discount:oi(n)}})):[]}async function j0(e,t){var r,n,o;const{item:i,orderForm:c}=e;return[{index:0,quantity:1,item_id:i.productId||i.item_group_id||i.sku||null,item_category2:Ws(i),item_category4:Pg(i),item_shipping_tier:t==="REMOVE_FROM_CART"?wg(c,i):null,price:i.listPrice||parseFloat((i.price/100).toFixed(2))||0,item_ref:i.refId||i.item_ref||(i==null?void 0:i.additionalProperty.find(l=>l.name==="RefId").value)||null,item_brand:((r=i.additionalInfo)==null?void 0:r.brandName)||i.item_brand||i.brand.name||null,item_sku:i.sku||i.id||i.item_id||await Eg(i)||null,item_name:i.name||i.item_name||null,item_category:vn(i)||null,item_variant:(i.skuName||i.item_variant||i.name).split(/[-/]/)[0].trim()||null,item_variant2:i.size||((n=i==null?void 0:i.itemAttributes)==null?void 0:n.size)||((o=(i.skuName||i.name).split(/[-/]/).pop())==null?void 0:o.trim())||null,discount:oi(i),item_list_name:vn(i)||null,item_url:i.item_url||null}]}async function S0(e){return((e==null?void 0:e.list)||[]).map(t=>{var r,n,o,i,c;return{price:((r=t==null?void 0:t.price)==null?void 0:r.list)||(t==null?void 0:t.price)||((n=t==null?void 0:t.offers)==null?void 0:n.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(l=>l.name==="RefId").value)||null,index:typeof(e==null?void 0:e.index)=="number"?e.index:null,item_brand:yr((o=t==null?void 0:t.brand)==null?void 0:o.name)||yr(e.brand)||yr(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)||((i=t==null?void 0:t.seo)==null?void 0:i.title)||null,item_category:vn(t)||null,item_variant:((c=t==null?void 0:t.name)==null?void 0:c.split("-")[0].trim())||(t==null?void 0:t.item_variant)||null,item_category2:Ws(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:oi(t)||null,item_list_name:(e==null?void 0:e.itemListName)||vn(t)||null}})}async function C0(e){var t,r,n;const{item:o}=e;return[{price:e.value||0,quantity:1,item_ref:o.ref||o.additionalProperty.find(i=>i.name==="RefId").value||null,item_brand:yr(o.brand.name)||yr(e.brand)||null,item_name:o.productName||o.alternateName||null,item_category:vn(o)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-")[0].trim())||null,item_category2:Ws(o)||((n=(r=o==null?void 0:o.category)==null?void 0:r.split(">")[1])==null?void 0:n.trim())||null,item_id:(o==null?void 0:o.productID)||(o==null?void 0:o.productId)||o.item_group_id||null,discount:oi(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 w0(e){var t;if(!m0(e==null?void 0:e.bannerUrl))return[];const n=await _0(e==null?void 0:e.bannerUrl),o=n==null?void 0:n.items[0];return{price:(o==null?void 0:o.sellers[0].commertialOffer.Price)||0,quantity:1,item_ref:Cg(e==null?void 0:e.bannerUrl),item_brand:yr(n.brand)||null,item_name:(n==null?void 0:n.productName)||(n==null?void 0:n.alternateName)||(n==null?void 0:n.item_name)||null,item_category:vn(n)||null,item_variant:((t=o==null?void 0:o.name)==null?void 0:t.split("-").pop().trim())||null,item_category2:Ws(n)||null,item_id:(n==null?void 0:n.productId)||null,discount:(o==null?void 0:o.sellers[0].commertialOffer.ListPrice)-(o==null?void 0:o.sellers[0].commertialOffer.Price)||null}}function E0(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 b0(e);case"ADD_TO_CART":case"ADD_TO_WISHLIST":case"REMOVE_FROM_CART":return j0(e,t);case"SELECT_ITEM":case"VIEW_ITEM_LIST":return S0(e);case"VIEW_ITEM":return C0(e);case"VIEW_PROMOTION":case"SELECT_PROMOTION":return w0(e);default:return null}}function P0(e){var t,r,n;if(!e.orderForm)return null;const o=((t=e.orderForm.paymentData)==null?void 0:t.payments)||[],i=((r=e.orderForm.paymentData)==null?void 0:r.paymentSystems)||[];if(!o.length||!i.length)return null;const c=o.find(m=>m==null?void 0:m.paymentSystem)||o[0],l=String((c==null?void 0:c.paymentSystem)||"").trim();if(!l)return null;const u=i.find(m=>String(m.id)===l),d=((n=u==null?void 0:u.name)==null?void 0:n.toLowerCase())||"",h=Sg.find(([m])=>d.includes(m));return h?h[1]:null}function I0(e){var t,r,n,o;if(!e.orderForm)return null;const i=((t=e.orderForm.paymentData)==null?void 0:t.transactions)||[];if(!i.length)return null;const c=((r=i[0])==null?void 0:r.payments)||[];if(!c.length)return null;const l=((o=(n=c[0])==null?void 0:n.paymentSystemName)==null?void 0:o.toLowerCase())||"",u=Sg.find(([d])=>l.includes(d));return u?u[1]:null}function N0(e,t){if(e!=null&&e.paymentType)return e.paymentType;switch(t){case"ORDER_REVIEWED":case"CUSTOM_ADD_PAYMENT_INFO":return P0(e);case"PURCHASE":case"CUSTOM_PURCHASE":return I0(e);default:return null}}var R0={brand:x0,items:E0,payment_type:N0,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 i=`${o}/_v/user-info`,c=await fetch(i,{method:"POST",body:JSON.stringify({email:e.userEmail})});return c.status!==200?{customer:{email:e.userEmail,id:e==null?void 0:e.userId},address:null}:await c.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,n,o,i;return e!=null&&e.currency?e.currency:e!=null&&e.bannerUrl?"BRL":e!=null&&e.item?((n=(r=e.item)==null?void 0:r.offers)==null?void 0:n.priceCurrency)||"BRL":((i=(o=e.orderForm)==null?void 0:o.storePreferencesData)==null?void 0:i.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,n;const i=(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).find(c=>c.id==="Discounts");return i?Math.abs(i.value)/100:0},subtotal:(e,t)=>{var r,n;return(((r=e.orderForm)==null?void 0:r.totalizers)||((n=e.orderForm)==null?void 0:n.totals)||[]).filter(c=>c.id==="Items").reduce((c,l)=>c+(l.value||0),0)/100||0},coupon_message:(e,t)=>{var r;if(e.couponMessage)return e.couponMessage;const n=((r=e.orderForm)==null?void 0:r.messages)||[];if(n.length===0)return null;const o=n.filter(i=>i.text.toLowerCase().includes("cupom"));return o.length===0?null:o.map(i=>i.text).join(" | ")},seller_cod_name:(e,t)=>e.appliedSellerCodName||(e==null?void 0:e.orderForm.marketingData.utmiCampaign)||null,coupon:(e,t)=>{var r,n;return e.appliedCoupon||((n=(r=e==null?void 0:e.orderForm)==null?void 0:r.marketingData)==null?void 0:n.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 n=e.orderForm;return n?(((r=n.shippingData)==null?void 0:r.logisticsInfo)||[]).some(c=>{var l;return(l=c.slas)==null?void 0:l.some(u=>u.deliveryChannel==="pickup-in-point")}):null},shippings:(e,t)=>{const r=e.orderForm;if(!r)return null;const n={};for(const i of r.shippingData.logisticsInfo){const c=r.items[i.itemIndex];if(c)for(const l of i.slas){const u=l.name;n[u]||(n[u]={shipping_tier:l.name,delivery_time:parseInt(l.shippingEstimate),shipping:parseFloat((l.price/100).toFixed(1)),line_items:[]}),n[u].line_items.push(c.id)}}return Object.values(n).map(i=>({shipping:i.shipping,shipping_tier:i.shipping_tier,delivery_time:i.delivery_time,line_items:i.line_items.join(",")}))||null},shipping:(e,t)=>{var r,n,o;return((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).reduce((c,l)=>{var u,d;const h=(u=l.slas)==null?void 0:u.find(m=>m.id===l.selectedSla);return c+((d=h==null?void 0:h.price)!=null?d:0)},0)},shipping_tier:(e,t)=>{var r,n,o,i;const l=((o=(n=(r=e==null?void 0:e.orderForm)==null?void 0:r.shippingData)==null?void 0:n.logisticsInfo)!=null?o:[]).find(_=>_.selectedSla);if(!l)return null;const u=(i=l.slas)==null?void 0:i.find(_=>_.id===l.selectedSla);if(!u)return null;const{deliveryChannel:d,name:h,pickupStoreInfo:m}=u;return d==="pickup-in-point"?`retirada em loja${m!=null&&m.friendlyName?`: ${m.friendlyName}`:""}`:d==="delivery"?`receba em casa${h?`: ${h}`:""}`:null},transaction_id:(e,t)=>{var r,n;return((n=(r=e.orderForm)==null?void 0:r.orderGroup)==null?void 0:n.toString())||null},available_grid:(e,t)=>e.availableGrid||null};async function T0(e={},t){const r=jg[t];return r?Object.fromEntries(await Promise.all(r.requiredParams.map(async o=>{const i=R0[o];return typeof i!="function"?(console.error(`[DT] Missing paramGetter for param: ${o}`),[o,null]):[o,await i(e,t)]}))):void 0}async function O0(e,t={}){try{const r=await T0(t,e);return await p0(e,Object.assign({},r,{window:t.window}))}catch(r){return console.error(`[DT] Error tracking event ${e}:`,r)}}var Ja={exports:{}},Ig={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{PathParamsContext:function(){return i},PathnameContext:function(){return o},SearchParamsContext:function(){return n}});const r=j,n=(0,r.createContext)(null),o=(0,r.createContext)(null),i=(0,r.createContext)(null);process.env.NODE_ENV!=="production"&&(n.displayName="SearchParamsContext",o.displayName="PathnameContext",i.displayName="PathParamsContext")})(Ig);var Za={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}});function r(n){return Array.isArray(n)?n[1]:n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(Za,Za.exports);var A0=Za.exports,ec={exports:{}},tc={exports:{}},rc={exports:{}},nc={exports:{}},Ro={exports:{}},vd;function tl(){return vd||(vd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return i}});const r=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}const o=globalThis.AsyncLocalStorage;function i(){return o?new o:new n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Ro,Ro.exports)),Ro.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,tl().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)})(nc,nc.exports);var k0=nc.exports;(function(e,t){"TURBOPACK { transition: next-shared }";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,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return n.requestAsyncStorage}});const n=k0;function o(i){const c=n.requestAsyncStorage.getStore();if(c)return c;throw new Error("`"+i+"` 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)})(rc,rc.exports);var M0=rc.exports,sc={exports:{}},oc={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,tl().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)})(oc,oc.exports);var L0=oc.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=L0;(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)})(sc,sc.exports);var D0=sc.exports,ic={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r;(function(n){n[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.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)})(ic,ic.exports);var F0=ic.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(x,S){for(var w in S)Object.defineProperty(x,w,{enumerable:!0,get:S[w]})}r(t,{RedirectType:function(){return l},getRedirectError:function(){return u},getRedirectStatusCodeFromError:function(){return v},getRedirectTypeFromError:function(){return g},getURLFromRedirectError:function(){return _},isRedirectError:function(){return m},permanentRedirect:function(){return h},redirect:function(){return d}});const n=M0,o=D0,i=F0,c="NEXT_REDIRECT";var l;(function(x){x.push="push",x.replace="replace"})(l||(l={}));function u(x,S,w){w===void 0&&(w=i.RedirectStatusCode.TemporaryRedirect);const I=new Error(c);I.digest=c+";"+S+";"+x+";"+w+";";const P=n.requestAsyncStorage.getStore();return P&&(I.mutableCookies=P.mutableCookies),I}function d(x,S){S===void 0&&(S="replace");const w=o.actionAsyncStorage.getStore();throw u(x,S,w!=null&&w.isAction?i.RedirectStatusCode.SeeOther:i.RedirectStatusCode.TemporaryRedirect)}function h(x,S){S===void 0&&(S="replace");const w=o.actionAsyncStorage.getStore();throw u(x,S,w!=null&&w.isAction?i.RedirectStatusCode.SeeOther:i.RedirectStatusCode.PermanentRedirect)}function m(x){if(typeof x!="object"||x===null||!("digest"in x)||typeof x.digest!="string")return!1;const[S,w,I,P]=x.digest.split(";",4),C=Number(P);return S===c&&(w==="replace"||w==="push")&&typeof I=="string"&&!isNaN(C)&&C in i.RedirectStatusCode}function _(x){return m(x)?x.digest.split(";",3)[2]:null}function g(x){if(!m(x))throw new Error("Not a redirect error");return x.digest.split(";",2)[1]}function v(x){if(!m(x))throw new Error("Not a redirect error");return Number(x.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)})(tc,tc.exports);var z0=tc.exports,ac={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,{isNotFoundError:function(){return i},notFound:function(){return o}});const n="NEXT_NOT_FOUND";function o(){const c=new Error(n);throw c.digest=n,c}function i(c){return typeof c!="object"||c===null||!("digest"in c)?!1:c.digest===n}(typeof t.default=="function"||typeof t.default=="object"&&t.default!==null)&&typeof t.default.__esModule>"u"&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)})(ac,ac.exports);var q0=ac.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(l,u){for(var d in u)Object.defineProperty(l,d,{enumerable:!0,get:u[d]})}r(t,{ReadonlyURLSearchParams:function(){return c},RedirectType:function(){return n.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect}});const n=z0,o=q0;class i extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class c extends URLSearchParams{append(){throw new i}delete(){throw new i}set(){throw new i}sort(){throw new 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)})(ec,ec.exports);var B0=ec.exports,Ng={};(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0});function t(c,l){for(var u in l)Object.defineProperty(c,u,{enumerable:!0,get:l[u]})}t(e,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return i}});const n=_n._(j),o=n.default.createContext(null);function i(c){const l=(0,n.useContext)(o);l&&l(c)}})(Ng);var To={exports:{}},va={},xd;function U0(){return xd||(xd=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,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});const r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(c){super("Bail out to client-side rendering: "+c),this.reason=c,this.digest=r}}function o(i){return typeof i!="object"||i===null||!("digest"in i)?!1:i.digest===r}}(va)),va}var Oo={exports:{}},Ao={exports:{}},bd;function H0(){return bd||(bd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,tl().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)}(Ao,Ao.exports)),Ao.exports}var jd;function $0(){return jd||(jd=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=H0();(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)),Oo.exports}var Sd;function W0(){return Sd||(Sd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const r=U0(),n=$0();function o(i){const c=n.staticGenerationAsyncStorage.getStore();if(!(c!=null&&c.forceStatic)&&c!=null&&c.isStaticGeneration)throw new r.BailoutToCSRError(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)}(To,To.exports)),To.exports}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});function r(w,I){for(var P in I)Object.defineProperty(w,P,{enumerable:!0,get:I[P]})}r(t,{ReadonlyURLSearchParams:function(){return u.ReadonlyURLSearchParams},RedirectType:function(){return u.RedirectType},ServerInsertedHTMLContext:function(){return d.ServerInsertedHTMLContext},notFound:function(){return u.notFound},permanentRedirect:function(){return u.permanentRedirect},redirect:function(){return u.redirect},useParams:function(){return g},usePathname:function(){return m},useRouter:function(){return _},useSearchParams:function(){return h},useSelectedLayoutSegment:function(){return S},useSelectedLayoutSegments:function(){return x},useServerInsertedHTML:function(){return d.useServerInsertedHTML}});const n=j,o=Ac,i=Ig,c=A0,l=Oc,u=B0,d=Ng;function h(){const w=(0,n.useContext)(i.SearchParamsContext),I=(0,n.useMemo)(()=>w?new u.ReadonlyURLSearchParams(w):null,[w]);if(typeof window>"u"){const{bailoutToClientRendering:P}=W0();P("useSearchParams()")}return I}function m(){return(0,n.useContext)(i.PathnameContext)}function _(){const w=(0,n.useContext)(o.AppRouterContext);if(w===null)throw new Error("invariant expected app router to be mounted");return w}function g(){return(0,n.useContext)(i.PathParamsContext)}function v(w,I,P,C){P===void 0&&(P=!0),C===void 0&&(C=[]);let N;if(P)N=w[1][I];else{const z=w[1];var T;N=(T=z.children)!=null?T:Object.values(z)[0]}if(!N)return C;const O=N[0],M=(0,c.getSegmentValue)(O);return!M||M.startsWith(l.PAGE_SEGMENT_KEY)?C:(C.push(M),v(N,I,!1,C))}function x(w){w===void 0&&(w="children");const I=(0,n.useContext)(o.LayoutRouterContext);return I?v(I.tree,w):null}function S(w){w===void 0&&(w="children");const I=x(w);if(!I||I.length===0)return null;const P=w==="children"?I[0]:I[I.length-1];return P===l.DEFAULT_SEGMENT_KEY?null: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)})(Ja,Ja.exports);var V0=Ja.exports,Cd=V0;function G0({accountName:e}){const{user:t}=ss(),r=Cd.usePathname(),n=Cd.useSearchParams(),o=(t==null?void 0:t.sub)||(t==null?void 0:t.email),i=t==null?void 0:t.userId;return j.useEffect(()=>{o&&i?O0("CUSTOM_USER_INFO",{userId:i,userEmail:o,platform:"store",account:e}):console.warn("[DT] Usuário deslogado ou sessão carregando...")},[r,n,o,i]),null}const K0="_active_gk7mu_380",Q0="_banner_gk7mu_655",Y0="_container_gk7mu_689",X0="_slugs_gk7mu_703",J0="_root_gk7mu_785",Z0="_otContainer_gk7mu_797",Zr={active:K0,banner:Q0,container:Y0,slugs:X0,"content-page-modifier":"_content-page-modifier_gk7mu_741",root:J0,otContainer:Z0};function eE({title:e,srcImages:t,children:r,className:n,...o}){const{isMobile:i}=xe(),c=i?t.mobile:t.desktop;return s.jsxs("div",{...o,className:p.helpers.classNameConcat(Zr.banner,n),children:[s.jsx(at.Image,{src:c,alt:e,fill:!0}),r||s.jsx("h1",{children:e})]})}const cc=({children:e,className:t})=>s.jsx("div",{className:p.helpers.classNameConcat(Zr.container,t),children:e});cc.displayName="Politicas.Container";const tE=({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 j.useEffect(()=>{window.OneTrust&&t()},[]),s.jsxs(s.Fragment,{children:[s.jsx(Zc,{onLoad:t,id:"otprivacy-notice-script",src:"https://privacyportal-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.js"}),s.jsx("div",{className:Zr.otContainer,children:s.jsx("div",{id:"otnotice-container",children:s.jsx("div",{id:`otnotice-${e.policyId}`,className:"otnotice"})})})]})},wd={"card-image-wrapper":"_card-image-wrapper_10mul_1","card-image-container":"_card-image-container_10mul_9"},Rg=e=>{const{nextimage:t}=Ae();return s.jsx(Qt,{name:e.name,children:e.data.banners.map((r,n)=>s.jsx("div",{className:wd["card-image-wrapper"],children:s.jsx("div",{className:wd["card-image-container"],children:s.jsx(t,{src:r.image,alt:r.altImage?r.altImage:"Banner Coleção",width:500,height:600})})},n))})},rE="_embedLiveContainer_1ss0l_2",nE="_embedLivePlayer_1ss0l_7",Ed={embedLiveContainer:rE,embedLivePlayer:nE},Tg=({data:e,name:t})=>s.jsx(Qt,{name:t,children:s.jsx("div",{className:Ed.embedLiveContainer,children:s.jsx("div",{className:Ed.embedLivePlayer,children:e.banner.videosrc?s.jsx(at.Video,{src:e.banner.videosrc??"",playsInline:!0,autoPlay:!0,loop:!0,muted:!0,title:"Live",controls:!0}):s.jsxs("div",{children:[s.jsx("iframe",{src:e.banner.embed_source??"",allow:"autoplay; fullscreen; picture-in-picture; loop;",title:"Live"}),s.jsx(Zc,{src:"https://player.vimeo.com/api/player.js",defer:!0,strategy:"lazyOnload"})]})})})}),lc={"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 sE(e,t){const{mediatorRef:r}=xe();j.useEffect(()=>r.current.subscribe(e,t),[e,t])}const Pd=({prevOnClick:e,nextOnClick:t,onBulletClick:r,currentPage:n,totalPages:o,position:i,hideControllers:c,left:l,isFirst:u,ICONS:d})=>{const[h,m]=j.useState("default");return sE("herobanner:change_controllers_variant",_=>{u&&m(_.includes("white")?"inverse":"default")}),s.jsxs(p.Carousel.Controller,{className:lc["carousel-controllers-modifier"],position:i??"absolute","data-hide-controllers":c,bottom:"16px",top:"unset",left:l,children:[s.jsxs(p.Carousel.Arrows,{className:lc["carrousel-arrows-display-controller"],children:[s.jsx(p.Button,{variant:"tertiary",onClick:e,adornment:{start:s.jsx(p.Icon,{name:d.arrow_left})},mode:h}),s.jsx(p.Button,{variant:"tertiary",onClick:t,adornment:{start:s.jsx(p.Icon,{name:d.arrow_right})},mode:h})]}),s.jsx(p.Carousel.Bullets,{page:n,total:o,onBulletClick:r,mode:h})]})},oE=({children:e,data:t,banner:r,...n})=>{const{mediatorRef:o}=xe();return t.data.first?s.jsx(Yo,{observerOptions:{threshold:.51},stopOnIntersection:!1,callBackWhenVisible:()=>{o.current.publish("header:change_variant",r.headerVariant)},...n,children:e}):s.jsx(s.Fragment,{children:e})},Og=e=>{const{initialize:t,pagination:r,controller:n,itemsStyles:o}=p.Carousel.useCarousel({gap:e.data.config.gap,itemsPerPage:e.data.config.slidesPerView,direction:"row"}),i=j.useRef(void 0),c=j.useMemo(()=>C_(e.data.config.controllerPosition??"dentro-inferior-centro"),[e]),l=j.useCallback(()=>{e.data.config.slideDuration&&r.totalPages>1&&(i.current=setInterval(()=>{n==null||n.nextPage()},e.data.config.slideDuration*1e3))},[n,e.data.config.slideDuration,r.totalPages]),u=j.useCallback(h=>{clearInterval(i.current),l(),h()},[l]),d=j.useMemo(()=>{var h;return{nextOnClick:()=>u(()=>n==null?void 0:n.nextPage()),prevOnClick:()=>u(()=>n==null?void 0:n.prevPage()),onBulletClick:m=>u(()=>n==null?void 0:n.navigateTo(m)),currentPage:r.currentPage,totalPages:r.totalPages,position:c.position,hideControllers:((h=e.data.config)==null?void 0:h.hideControllers)??!1,left:c.left}},[r.currentPage,r.totalPages,c.position,e.data.config.hideControllers,u,n]);return j.useEffect(()=>(l(),()=>clearInterval(i.current)),[l]),s.jsx(Qt,{name:e.name,children:s.jsxs(p.Carousel.Root,{innerRef:h=>{t(h)},className:p.helpers.classNameConcat(lc["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:[c.shouldRender==="top"&&r.totalPages>1?s.jsx(Pd,{ICONS:e.ICONS,...d,isFirst:e.data.first}):s.jsx(s.Fragment,{}),s.jsx(p.Carousel.Body,{children:e==null?void 0:e.data.banners.map((h,m)=>s.jsx(p.Carousel.Item,{style:o,children:s.jsx(oE,{data:e,banner:h,children:s.jsx($s,{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:h,index:m,componentIndex:e.data.componentIndex},creative:"banner-carousel",...e.data.first&&m===0&&{priority:!0}})})},`hero-banner-item-${m}`))}),c.shouldRender==="bottom"&&r.totalPages>1?s.jsx(Pd,{ICONS:e.ICONS,...d}):s.jsx(s.Fragment,{})]})})},Mn={"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"},Ag=({data:e,name:t,CONSTANTS:r})=>{var h;const{isMobile:n}=xe(),o=e.config.size??"medium",i=e.config.disableCarouselMobile??!1,{initialize:c,pagination:l,controller:u,itemsStyles:d}=p.Carousel.useCarousel({itemsPerPage:n?e==null?void 0:e.config.slidesPerViewMobile:(h=e==null?void 0:e.config)==null?void 0:h.slidesPerView,gap:n?e.config.gapMobile:e.config.gap,direction:n&&i?"column":"row"});return s.jsx(Qt,{name:t,children:s.jsx(p.Utils.Column,{style:{width:o==="small"?"70%":"100%"},alignContent:"center",justifyContent:"center",alignItems:"center",children:s.jsxs(p.Carousel.Root,{innerRef:m=>{c(m)},className:p.helpers.classNameConcat(Mn["carousel-modifier"],"common-section"),children:[o==="medium"?s.jsxs(p.TextStructure.Root,{children:[r.ACTIVE_BENNEFITS_BAR_TITLE&&s.jsx(p.TextStructure.DivWrapper,{className:Mn["carousel-title-modifier"],children:s.jsx("h2",{className:"typography-style-body-lg",children:r.BENNEFITS_BAR_TITLE})}),n&&l.totalPages>1&&s.jsx(p.Carousel.Controller,{className:p.helpers.classNameConcat(Mn["row-controller-modifier"],r.ACTIVE_BENNEFITS_BAR_TITLE?Mn["title-on"]:void 0),children:s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_right})}})]})})]}):s.jsx(s.Fragment,{}),s.jsx(p.Carousel.Body,{children:e.bennefit.map((m,_)=>s.jsx(p.Carousel.Item,{className:Mn["card-modifier"],style:d,children:s.jsx(p.Card,{stroke:!0,padding:"small",children:s.jsx(p.TextStructure.Root,{layoutProps:{columnWrapper:{alignContent:"start",alignItems:"start",justifyContent:"start"},textRow:{alignContent:"center",alignItems:"center",justifyContent:"center"}},adornment:{[o==="medium"?"top":"start"]:s.jsx(p.Icon,{name:m.icon,size:o==="medium"?"medium":"small"})},children:s.jsxs(p.TextStructure.DivWrapper,{alignItems:"start",children:[s.jsx("h3",{className:"typography-style-body-md",children:m.title}),m.subtitle&&m.subtitle.length?s.jsx("p",{className:"typography-style-body-xs",children:m.subtitle}):s.jsx(s.Fragment,{})]})})})},`bennefit=${_}`))}),!n&&l.totalPages>1?s.jsxs(p.Carousel.Controller,{className:Mn["row-controller-modifier"],children:[s.jsxs(p.Carousel.Arrows,{children:[s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.prevPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_left})}}),s.jsx(p.Button,{variant:"tertiary",onClick:()=>u==null?void 0:u.nextPage(),adornment:{start:s.jsx(p.Icon,{name:r.ICONS.arrow_right})}})]}),s.jsx(p.Carousel.Bullets,{page:l.currentPage,total:l.totalPages,onBulletClick:m=>u==null?void 0:u.navigateTo(m)})]}):s.jsx(s.Fragment,{})]})})})},kg=({data:{componentIndex:e,...t},name:r,CONSTANTS:n})=>s.jsx(Qt,{name:r,children:s.jsx(el,{...t,CONSTANTS:n})}),Mg=({data:e,ICONS:t,TEXTCONTENT_EXPANDED:r,className:n,name:o})=>s.jsx(Qt,{name:o,children:s.jsx("div",{className:p.helpers.classNameConcat(Ka.textContentSection,n??""),style:e.borderTop?{borderTop:"none"}:void 0,children:s.jsx(O_,{data:e,ICONS:t,TEXTCONTENT_EXPANDED:r})})}),Id={"accordion-modifier":"_accordion-modifier_1we16_1","accordion-body-modifier":"_accordion-body-modifier_1we16_7"},Lg=({data:e,id:t,ICONS:r,className:n,name:o})=>{var l;const[i,c]=j.useState([]);return s.jsx(Qt,{name:o,children:s.jsxs(p.Utils.Column,{gap:"var(--gap-vertical-sm)",className:n??"",children:[e.titleAccordion?s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{children:s.jsx("h2",{className:p.helpers.classNameConcat("typography-style-heading-sm","common-section"),style:{fontWeight:500},children:e.titleAccordion})})}):s.jsx(s.Fragment,{}),(l=e.accordions)==null?void 0:l.map((u,d)=>s.jsxs(p.Accordion.Wrapper,{className:Id["accordion-modifier"],children:[s.jsx(p.Accordion.Header,{id:`${t}-text-accordion-${d}`,openIndicator:s.jsx(p.Icon,{name:r.arrow_down}),closeIndicator:s.jsx(p.Icon,{name:r.arrow_up}),startOpen:i.includes(d),onClick:()=>c(h=>h.includes(d)?h.filter(m=>m!==d):[...h,d]),children:s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{children:[s.jsx("h3",{className:"typography-style-body-md-strong",children:u.title}),u.subtitle&&u.subtitle.length?s.jsx("h2",{children:u.subtitle}):s.jsx(s.Fragment,{})]})})}),s.jsx(p.Accordion.Body,{children:s.jsx(p.TextStructure.Root,{children:s.jsx(p.TextStructure.DivWrapper,{className:Id["accordion-body-modifier"],children:s.jsx(dn.Editor,{editorKey:`${t}-editor-${d}`,blockRenderMap:S_,editorState:u.text?Qc(JSON.parse(u.text)):dn.EditorState.createEmpty(),onChange:()=>null})})})})]},`${t}-accordion-${d}-${i.includes(d)}`))]})})},Dg=async e=>{const{type:t}=e,r=t==="collectionSearch"?"/_v/proxy/search/product":"/_v/proxy/search/crosselling",n=JSON.stringify(t==="collectionSearch"?{...e.params,facets:e.facets,term:e.term,forceUpdate:!1}:e.facets);return(await U.fetchProxy(r,{method:"POST",headers:{"Content-Type":"application/json"},body:n}).then(i=>i.json()).then(i=>t==="collectionSearch"?i.data.products:i.products)).filter(i=>!!i.node.availability.status)},iE="_shelf__container_bi04n_10",Fg={shelf__container:iE},aE=({collectionSearch:e,title:t,CONSTANTS:r,searchModal:n})=>{const[o,i]=j.useState([]),{isMobile:c}=xe(),{ref:l,inView:u}=Ud.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:d}=Ce();return j.useEffect(()=>{if(!e)return;function h(){var m,_;Dg({type:"collectionSearch",term:e==null?void 0:e.term,facets:e==null?void 0:e.facets,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:((_=e==null?void 0:e.params)==null?void 0:_.sort)??r.ITEMS_DEFAULT_SORT}}).then(g=>{i(g)})}h()},[e]),j.useEffect(()=>{!u||o.length===0||d({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:o},customData:{item_list_name:t??"Você também pode gostar"}}})},[u,o]),o.length===0?null:s.jsx("div",{ref:l,className:Fg.shelf__container,children:s.jsx(Is.Shelf,{title:t??"Você também pode gostar",itemsPerPage:n?{desktop:2,mobile:1.4}:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(o)&&o.map(({node:h},m)=>{const{availability:{status:_}}=h;return _?s.jsx(Is.Card,{item:h,isMobile:c,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},h.id):null})})})},cE=({recommendationSearch:e,title:t,CONSTANTS:r})=>{const[n,o]=j.useState([]),{isMobile:i}=xe(),{ref:c,inView:l}=Ud.useInView({threshold:.7,delay:100,triggerOnce:!0}),{sendDataLayerEvent:u}=Ce(),d=j.useMemo(()=>e?[{key:e.type,value:e.productId}]:[],[e]);return j.useEffect(()=>{if(!e)return;function h(){var m;Dg({type:"recommendationSearch",facets:d,params:{count:((m=e==null?void 0:e.params)==null?void 0:m.count)??12,sort:r.ITEMS_DEFAULT_SORT}}).then(_=>o(_))}h()},[d,e]),j.useEffect(()=>{if(!l||n.length===0||(e==null?void 0:e.type)==="suggestions")return;const h=t??"Você também pode gostar";u({functionKey:"productListEvent",data:{event:"view_item_list",commonData:{products:n},customData:{item_list_name:h},outsideEcommerceData:{item_list_name:h}}})},[l,n]),(n==null?void 0:n.length)===0?null:(e==null?void 0:e.type)==="suggestions"?s.jsx(vh,{products:n,innerRef:c,inView:l,CONSTANTS:r}):s.jsx("div",{ref:c,className:Fg.shelf__container,children:s.jsx(Is.Shelf,{title:t??"Você também pode gostar",itemsPerPage:{desktop:4.4,mobile:2.2},ICONS:r.ICONS,children:Array.isArray(n)&&n.map(({node:h},m)=>{const{availability:{status:_}}=h;return _?s.jsx(Is.Card,{item:h,isMobile:i,size:"medium",index:m,shelfTitle:t??"Você também pode gostar",CONSTANTS:r},h.id):null})})})},zg=({data:e,name:t,CONSTANTS:r})=>{const{productId:n}=mp();return!(e!=null&&e.productLists)||e.productLists.length===0?null:e.productLists.map((o,i)=>s.jsx(Qt,{name:t,children:s.jsx(cE,{title:o.title,recommendationSearch:{type:o.product_group_option,productId:n,params:{count:o.number_of_items,sort:"score:desc"}},CONSTANTS:r},`shelf=${i}`)}))},qg=({data:e,CONSTANTS:t,searchModal:r,name:n})=>{var i;const o=(i=e==null?void 0:e.productLists)==null?void 0:i.filter(c=>!!c.collectionId||!!c.search_base_name);return!o||o.length===0?null:o.map((c,l)=>{const u=c.collectionId?{term:"",facets:[{key:"productclusterids",value:`${c.collectionId}`}]}:{term:c.search_base_name,facets:[]};return s.jsx(Qt,{name:n,children:s.jsx(aE,{title:c.title,collectionSearch:{params:{count:c.number_of_items,sort:c.sort},...u},searchModal:r,CONSTANTS:t},`shelf=${l}`)})})},lE="_popup_5taxs_9",uE="_popup__overlay_5taxs_19",dE="_popup__modal_5taxs_27",Dt={popup:lE,popup__overlay:uE,popup__modal:dE,"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"},fE=e=>s.jsx("div",{className:Dt["popup__modal--success"],children:s.jsx(p.TextStructure.Root,{adornment:{start:s.jsx(p.Icon,{name:e.ICONS.check_circle,size:"large"})},children:s.jsxs(p.TextStructure.DivWrapper,{className:Dt["text-structure-modifier"],children:[s.jsx("h3",{className:"typography-style-body-sm-strong",children:e.successTitle}),s.jsx("p",{className:"typography-style-body-caption",children:e.successDescription})]})})}),pE=e=>{const{title:t,description:r,groups:n,ICONS:o}=e,{formErrors:i,submitForm:c,success:l}=si(),[u,d]=j.useState(!1);return s.jsx("form",{onSubmit:c,className:Dt.formContainer,children:s.jsxs("div",{className:Dt["popup__modal--form"],children:[s.jsxs(p.TextStructure.DivWrapper,{className:Dt["popup__modal--header"],children:[s.jsx("strong",{className:"typography-style-body-md-strong",children:t}),s.jsx("p",{className:"typography-style-body-xs",children:r})]}),l?s.jsx(fE,{...e}):s.jsxs(s.Fragment,{children:[n.map(h=>s.jsx(Bn.FieldGroup,{group:h,children:s.jsx(Bn.FieldWrapper,{fields:h.fields})},h.groupLabel)),s.jsx(p.Checkbox,{className:Dt["popup__modal--checkbox"],adornment:s.jsx(p.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:u,onChange:()=>d(!u)}),s.jsxs("div",{children:[!u&&s.jsx(p.TextStructure.DivWrapper,{className:Dt["popup__modal--status"],children:s.jsxs("p",{className:"typography-style-body-caption",children:[s.jsx(p.Icon,{size:"small",name:o.alert_circle}),qv]})}),s.jsx(p.Button,{disabled:!u,size:"medium",type:"submit",children:Uv}),i.length?s.jsx(p.TextStructure.DivWrapper,{className:Dt["popup__modal--status"],children:s.jsx("p",{className:p.helpers.classNameConcat(Dt.formSubmitWarning,"typography-style-body-xs"),children:Bv})}):null]})]})]})})},Bg=({data:e,name:t,CONSTANTS:r})=>{const[n,o]=j.useState(!1),i=typeof window<"u"?window.sessionStorage.getItem(r.POPUP_TRACK_STORAGE)||window.localStorage.getItem(r.POPUP_SUBMITTED_STORAGE):null,c=()=>{o(!1),window.sessionStorage.setItem(r.POPUP_TRACK_STORAGE,"true")};return j.useEffect(()=>{setTimeout(()=>!i&&o(!0),2e3)},[]),e.active&&n?s.jsx(Qt,{name:t,children:s.jsxs("div",{className:Dt.popup,children:[s.jsx("div",{onClick:c,className:Dt.popup__overlay}),s.jsxs("div",{className:Dt.popup__modal,children:[s.jsx(p.Button,{onClick:c,variant:"tertiary",className:Dt["popup__modal--close"],children:s.jsx(p.Icon,{style:{color:e.closeColor||"#000"},name:r.ICONS.close,size:"medium"})}),s.jsx("div",{children:s.jsx(at.Image,{src:e.imageUrl,width:"459",height:"418",alt:e.title})}),s.jsx(cg,{...e,children:s.jsx(pE,{...e,ICONS:r.ICONS})})]})]})}):null},hE={"Image Grid":Rg,"Embed Live":Tg,"Banner Carousel":Og,Banner:Xc,"Bennefits Bar":Ag,newsletter:kg,TextContent:Mg,TextAccordion:Lg,"Product Carousel":qg,"PDP Product Carousel":zg,"Popup Modal":Bg},Ug=({data:e,identifyWhoIsFirst:t=!1,componentConfigs:r})=>e==null?void 0:e.map((n,o)=>{const i=hE[n.name],c={...(r==null?void 0:r[n.name])??{}};return t&&o===0&&(n.data.first=!0),n.data.componentIndex=o,n.name==="TextAccordion"&&(c.id=`text-accordion-${o}`),i?s.jsx(i,{name:n.name,data:n.data,...c},`section-zone-component-${o}`):null});async function mE({slug:e,pageData:t,tabsData:r,oneTrust:n}){var l,u,d,h;const i=(r?[...r].sort((m,_)=>m.config.tabConfig.order-_.config.tabConfig.order):[]).map(m=>({slug:m.config.seo.slug||Ba(m.config.tabConfig.title),title:m.config.tabConfig.title})),c=r==null?void 0:r.find(m=>m.config.seo.slug===`/${decodeURIComponent(e)}`);return c&&(c.id=Ba(c.config.seo.slug||"")),s.jsxs("div",{className:Zr.root,children:[s.jsx(cc,{children:s.jsx(eE,{title:(l=t==null?void 0:t.config.banners)==null?void 0:l.altImageBackgroud,srcImages:{desktop:(u=t==null?void 0:t.config.banners)==null?void 0:u.imageBackgroudDesk,mobile:(h=(d=t==null?void 0:t.config)==null?void 0:d.banners)==null?void 0:h.imageBackgroudMobile}})}),s.jsxs(cc,{children:[s.jsx("div",{className:Zr.slugs,children:i.map(m=>s.jsx(wt,{href:m.slug?`/politicas/${m.slug.replace(/^\/+/,"")}`:"#",className:m.slug===(c==null?void 0:c.id)?Zr.active:"",title:m.title,scroll:!1,children:m.title},m.slug.replace(/^\/+/,"")))}),s.jsx("div",{className:Zr["content-page-modifier"],children:e==="privacidade-e-seguranca"?s.jsx(tE,{oneTrust:n}):s.jsx(Ug,{data:(c==null?void 0:c.sections)??[]})})]})]})}const xr={"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"},Hg=({data:e,ERROR_TEMPLATE_RETURN_BUTTON:t})=>{const{router:r}=Ae();return s.jsx("div",{children:s.jsxs(p.Banner.Container,{className:xr["banner-wrapper"],children:[s.jsxs(p.Banner.ImageWrapper,{className:xr["banner-image"],children:[s.jsx(at.Image,{className:xr["banner-desktop"],alt:e.altImageBackgroud??e.imageBackgroudDesk,src:e.imageBackgroudDesk,width:1366,height:695,priority:!0}),s.jsx(at.Image,{className:xr["banner-mobile"],alt:e.altImageBackgroud??e.imageBackgroudMobile,src:e.imageBackgroudMobile,width:375,height:755,priority:!0})]}),s.jsx(p.Banner.Slot,{className:p.helpers.classNameConcat(xr["text-wrapper"],xr["text-wrapper-modifier"]),margin:107,children:s.jsxs(p.TextStructure.Root,{layoutProps:{textRow:{className:xr["custom-row"]}},children:[s.jsxs(p.TextStructure.DivWrapper,{className:p.helpers.classNameConcat(xr["text-area"],xr["text-area-modifier"]),children:[s.jsx("h1",{className:"typography-style-display-strong",children:e.title}),s.jsx("h2",{className:"typography-style-body-lg",children:e.subTitle}),s.jsx("p",{className:"typography-style-body-sm",children:e.description})]}),s.jsx(p.Button,{onClick:()=>r.push("/"),children:t})]})})]})})};Hg.displayName="ErrorTemplate";const _E={codVenderoda:"",orderformId:"",cupom:"",setCodVendedora:()=>null,setCupom:()=>null,setOrderformId:()=>null,setConfiguration:()=>null,update:()=>!1,isValidSharedCart:()=>!1},gE=j.createContext(_E);function yE(){return j.useContext(gE)}function xa(e,t=""){if(!e)return;if(!t)if(typeof window<"u")t=window.location.href;else return;e=e.replace(/[[\]]/g,"\\$&");const n=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}function ba(){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 vE="_container_df1ql_11",ja={"action-button":"_action-button_df1ql_1",container:vE,"container-icon":"_container-icon_df1ql_31"};function xE({icon:e,text:t,onClick:r,isActive:n=!1}){const o=i=>{i.preventDefault(),n&&r()};return s.jsxs("div",{className:p.helpers.classNameConcat(ja["action-button"],n?"":"disable"),onClick:i=>o(i),children:[s.jsx("div",{className:p.helpers.classNameConcat(ja["container-icon"],n?"":"disable"),children:s.jsx("img",{src:e,alt:"icon"})}),s.jsxs("div",{className:p.helpers.classNameConcat(ja.container,n?"":"disable"),children:[s.jsx("span",{children:t}),s.jsx("img",{src:"/images/Widget_open/navigate_next-black-18dp.png",alt:"next"})]})]})}const bE="_container_k11me_1",jE="_header_k11me_18",SE="_body_k11me_45",ms={container:bE,header:jE,body:SE,"copy-cart-button":"_copy-cart-button_k11me_78","reset-orderform-button":"_reset-orderform-button_k11me_110"};function CE(e,t=!1,r){const{base:n,orderformId:o}=e,i=r==null?void 0:r.split("codigo: ")[1],c=localStorage.getItem("maiscarrinho"),l={medium:t?"&utm_medium=carrinho_compartilhado":"&utm_medium=linkvendedor",campaign:`&utm_campaign=${encodeURIComponent(r??"")}`,cp:i?`&utmi_cp=${i}`:"",source:`&utm_source=${c}`};return t?`${n}/checkout/?orderFormId=${o}${l.source}${l.campaign}${l.cp}${l.medium}#/cart`:`${n}/checkout/?orderFormId=${o}${l.source}${l.campaign}${l.cp}${l.medium}#/payment`}function wE(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 Nd({mode:e,config:t,newCart:r}){const[n,o]=j.useState(!1),[i,c]=j.useState(""),l=CE(t,e==="cart",t.sellerCode),{useClipboard:u}=qo.hooks,[,d]=u();function h(){o(!0);const m=document.createElement("textArea");m.readOnly=!0,m.contentEditable="true",m.value=i,document.body.appendChild(m),m.select(),d(m.value),document.body.removeChild(m),setTimeout(()=>{o(!1)},3e3)}return j.useEffect(()=>{c(""),c("Gerando link..."),wE(l).then(m=>c(m)).catch(()=>c("Algo deu errado, tente novamente mais tarde"))},[l]),s.jsxs("div",{className:ms.container,children:[s.jsxs("div",{className:ms.header,children:[s.jsx("img",{src:e==="cart"?"/images/Modal_compartilhar_sacola/ico_sacola_big.png":"/images/Modal_compartilhar_editavel/ico_form_big.png",alt:"close"}),s.jsxs("span",{className:"text",children:[" ",e==="cart"?"Compartilhar a Sacola":"Compartilhar link para pagamento"]})]}),s.jsxs("div",{className:ms.body,children:[s.jsx("p",{children:e==="cart"?`Envie a sacola para um ou mais clientes usando o link abaixo ou
27
+ compartilhe direto por whatsapp`:"Envie a sacola para um cliente usando o link abaixo ou compartilhe direto por whatsapp"}),s.jsxs("form",{children:[s.jsx("input",{type:"text",disabled:!0,value:i}),s.jsxs("div",{className:p.helpers.classNameConcat(ms["copy-cart-button"],i?"active":""),children:[s.jsx("img",{src:"/images/Feedback_copiado/ico_share.png",alt:"share",className:"share",onClick:()=>i&&h()}),n&&s.jsx("div",{className:"share-input-copy-feedback",children:"Link Copiado"})]})]}),s.jsx("button",{className:ms["reset-orderform-button"],onClick:()=>{er.set(Lo,{}),r()},children:"Novo Atendimento"})]})]})}const EE="_container_jla2u_1",PE="_header_jla2u_24",IE="_body_jla2u_56",_s={container:EE,header:PE,"header-open":"_header-open_jla2u_29","close-btn":"_close-btn_jla2u_48",body:IE};var Xt=(e=>(e.base="base",e.shareCart="shareCart",e.sharePayment="sharePayment",e))(Xt||{});const Rd=({text:e,isActive:t,onClick:r,icon:n,iconDisabled:o})=>s.jsx(xE,{icon:t?n:o,text:t?e:"Preencha a sacola para compartilhar",onClick:r,isActive:t}),NE=({config:e,isshowing:t})=>{var T,O,M;const[r,n]=j.useState(!1),[o,i]=j.useState(""),{addCouponSeller:c,cartStore:l}=Xe(),[u,d]=j.useState(t??!1),{setOrderformId:h,update:m,isValidSharedCart:_,setConfiguration:g,setCodVendedora:v}=yE(),[x,S]=j.useState(Xt.base),w=j.useMemo(()=>l,[l]),{marketingData:I}=qo.stores.cart.useGetCartStoreState();j.useEffect(()=>{xa("cleverapp")==="true"&&(localStorage.setItem("maiscarrinho","cleverapp"),window.location.replace("/")),xa("televendas")==="true"&&(localStorage.setItem("maiscarrinho","televendas"),window.location.replace("/")),xa("vendedora")==="true"&&(localStorage.setItem("maiscarrinho","vendedora"),ba())},[]),j.useEffect(()=>{var z,D,B,G,J;(z=w==null?void 0:w.openTextField)!=null&&z.value&&i(((D=w==null?void 0:w.openTextField)==null?void 0:D.value)??""),(B=w.openTextField)!=null&&B.value&&(v(String((G=w.openTextField)==null?void 0:G.value).split("codigo")[1]),c(String((J=w.openTextField)==null?void 0:J.value),"seller")),h(w.id),localStorage.getItem("maiscarrinho")&&d(!0)},[w.id,(T=w.openTextField)==null?void 0:T.value,v,h,c]);const P=()=>{g(e),S(Xt.base),n(!r),h(w.id),setTimeout(()=>{_()&&m(w.id)},300)},{id:C}=qo.stores.cart.useGetCartStoreState(),N=z=>{U.postMediaData({apiUrl:"/api/marketingData",body:{orderFormId:C,coupon:I==null?void 0:I.coupon,utmiCampaign:"codigodavendedora",utmSource:"widget",utmMedium:z===Xt.sharePayment?"linkvendedor":"carrinho_compartilhado"}}),S(z)};return s.jsx(s.Fragment,{children:u&&s.jsxs("div",{className:p.helpers.classNameConcat(_s.container,r?"open":""),children:[s.jsx("div",{className:p.helpers.classNameConcat(_s.header,r?"open":""),onClick:P,children:r?s.jsxs("div",{className:_s["header-open"],children:[s.jsx("div",{className:_s["close-btn"],children:s.jsx("img",{src:"/images/Widget_open/close_grey_24x24.png",alt:"close",width:30,height:30})}),s.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"close",width:30,height:30}),s.jsx("span",{className:"text",children:"Vendedor"})]}):s.jsx("img",{src:"/images/Widget_compacto/ico_vendedora_big.png",alt:"logo",width:30,height:30})}),r&&s.jsx("div",{className:_s.body,children:s.jsxs(s.Fragment,{children:[x===Xt.base&&s.jsxs(s.Fragment,{children:[s.jsx(Rd,{icon:"/images/Modal_compartilhar_sacola/ico_sacola_big.png",iconDisabled:"/images/Widget_open/ico_sacola_disabled.png",text:"Compartilhar a Sacola",onClick:()=>N(Xt.shareCart),isActive:w.items.length>0&&!!((O=w==null?void 0:w.openTextField)!=null&&O.value)}),s.jsx(Rd,{icon:"/images/Modal_compartilhar_editavel/ico_form_big.png",iconDisabled:"/images/Widget_open_disabled/ico_form_disabled.png",text:"Compartilhar link para pagamento",onClick:()=>N(Xt.sharePayment),isActive:w.items.length>0&&!!((M=w.openTextField)!=null&&M.value)})]}),x===Xt.shareCart&&s.jsx(Nd,{mode:"cart",config:{...e,sellerCode:o,orderformId:w.id},newCart:()=>{ba(),S(Xt.base)}}),x===Xt.sharePayment&&s.jsx(Nd,{mode:"payment",config:{...e,sellerCode:o,orderformId:w.id},newCart:()=>{ba(),S(Xt.base)}})]})})]})})},pn={teamComponents:{AddToCart:Tc,BackToTop:xx,HelpButton:Mw,BuyPackage:vh,Filter:{...tr,helpers:Mm},...nS,FreightCalculation:Cm,Header:Sm,Link:wt,Media:at,PLPNavigation:$r,ProductCard:Ue,ProductList:Ft,ProductVariationList:sr,Sort:Zo,UserMenu:Xo,Newsletter:el,Form:Bn,Table:Mo},template:{minicart:Nt,pdc:G_,pdc_composites:nr,pdp:fC,searchResult:Z_,wishList:eh,LPCadastro:Xw,SearchModal:fg,LPStores:_r,tracker:G0,Politicas:mE,ErrorTemplate:Hg,WidgetVendedora:NE},utils:{EventCollector:bw,ExternalScripts:Ew,LinkOrNotLink:gn,ObserverWrapper:Yo,SnackBarComponent:qn,DraftJsLinkWrapper:j_}},RE=(e,t)=>{const r=e.map(o=>`'${o.source}'`).join(`,
28
28
  `);return`
29
29
  import type { NextRequest } from 'next/server'
30
30
  import { NextResponse } from 'next/server'
@@ -64,4 +64,4 @@ See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-comp
64
64
  ${r}
65
65
  ]
66
66
  }
67
- `},AE=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:OE},Symbol.toStringTag,{value:"Module"})),kE={helpers:AE},ME={Banner:Xc},Vg=j.createContext({}),LE=({data:e,children:t,...r})=>{var v,x,S,w,I,P,C,N,T,O,M,z,D;const[n,o]=j.useState(!0),{initialize:i,controller:c,itemsStyles:l}=p.Carousel.useCarousel({gap:0,itemsPerPage:1}),u={slideTranstionTimer:(x=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:x.slideTranstionTimer,showCarouselArrows:(w=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:w.showCarouselArrows,hasCloseBtn:(P=(I=e==null?void 0:e.staticConfig)==null?void 0:I.staticConfig)==null?void 0:P.hasCloseBtn,backgroundColor:(N=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:N.backgroundColor,textColorVariant:(O=(T=e==null?void 0:e.staticConfig)==null?void 0:T.staticConfig)==null?void 0:O.textColorVariant,content:((z=(M=e==null?void 0:e.content)==null?void 0:M.content)==null?void 0:z.items)??[]},d=(D=u.content)==null?void 0:D.filter(B=>!B.countDownEndDate||new Date(B.countDownEndDate)>new Date),h=d.length>1,m={...u.backgroundColor?{backgroundColor:u.backgroundColor}:{}},_=()=>{o(!1)},g=p.helpers.ValidateProp({fieldTypes:zn.Mode,property:u.textColorVariant,fallback:"default"});return s.jsx(Vg.Provider,{value:{isOpen:n,setIsOpen:o,hasCarousel:h,backgroundStyle:m,handleCloseTipbar:_,mode:g,slideTranstionTimer:u.slideTranstionTimer,showCarouselArrows:u.showCarouselArrows,hasCloseBtn:u.hasCloseBtn,slices:d,carouselProps:{initialize:i,controller:c,itemsStyles:l},...r},children:t})},Er=()=>j.useContext(Vg),DE=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=Er();return s.jsx(Uo,{dateEnd:new Date(e),TIME_ZONE:r,...t})},FE="_tipbar_bt3p0_1",zE="_tipbar__carousel_bt3p0_15",Vs={tipbar:FE,tipbar__carousel:zE,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},qE=({coupon:e,feedbackTitle:t,feedbackDescription:r,...n})=>{const{CONSTANTS:o}=Er(),{addCouponSeller:i,cartStore:c}=Xe(),[l,u]=j.useState({status:!1,showSnackBar:!1}),[d,h]=j.useState(!1),[m,_]=j.useState(!1),g=async()=>{if(!c.items.length){_(!0);return}(await i(e,"coupon")).code===200?u({status:!0,showSnackBar:!0}):h(!0)};return j.useEffect(()=>{l.showSnackBar&&setTimeout(()=>{u(v=>({...v,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[l.showSnackBar]),j.useEffect(()=>{d&&setTimeout(()=>{h(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[d]),j.useEffect(()=>{m&&setTimeout(()=>{_(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[m]),s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{...n,onClick:g,disabled:l.status,className:Vs["tipbar-item__coupon"],children:l.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),l.showSnackBar&&(t||r)&&s.jsx(qn,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),d&&s.jsx(qn,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),m&&s.jsx(qn,{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}`)]})},BE=({title:e,description:t,style:r,mode:n,className:o})=>s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{mode:n,className:o,children:[e&&s.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&s.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),UE=({coupon:e,...t})=>{const{CONSTANTS:r}=Er();return s.jsx(p.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},HE=({staticZone:e,type:t,className:r,description:n,title:o})=>{const{mode:i}=Er();if(t==="countdown")return s.jsx(DE,{dateEnd:e.countDownEndDate,size:"x-small",mode:i});if(t==="coupon"){const c=p.helpers.ValidateProp({fieldTypes:zn.Mode,property:e.couponButtonMode,fallback:"default"}),l=p.helpers.ValidateProp({fieldTypes:zn.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?s.jsx(qE,{coupon:e.coupon,mode:c,variant:l,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const c=p.helpers.ValidateProp({fieldTypes:zn.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?s.jsx(UE,{coupon:e.coupon,mode:c}):null}return s.jsx(BE,{title:o,description:n,mode:i,className:r})},Od=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=Er();return s.jsx(p.Button,{title:"fechar tipbar",className:Vs["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:s.jsx(p.Icon,{name:r.ICONS.close})}})},$E=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:n})=>{const{carouselProps:o,CONSTANTS:i}=Er(),c=j.useRef(null),l=(d,h)=>{var m,_;d.stopPropagation(),d.preventDefault(),h==="prev"?(m=o.controller)==null||m.prevPage():(_=o.controller)==null||_.nextPage(),c.current&&(clearInterval(c.current),u())},u=j.useCallback(()=>{if(n&&o.controller){const d=setInterval(()=>{var h;(h=o.controller)==null||h.nextPage()},n);c.current=d}},[n,o]);return j.useEffect(()=>(u(),()=>{c.current&&clearInterval(c.current)}),[n,u]),s.jsxs(p.Carousel.Root,{innerRef:d=>{o.initialize(d)},className:Vs.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&s.jsx(p.Button,{variant:"tertiary",mode:t,onClick:d=>l(d,"prev"),adornment:{start:s.jsx(p.Icon,{name:i.ICONS.arrow_left})}}),s.jsx(p.Carousel.Body,{children:e}),r&&s.jsx(p.Button,{variant:"tertiary",mode:t,onClick:d=>l(d,"next"),adornment:{start:s.jsx(p.Icon,{name:i.ICONS.arrow_right})}})]})},WE=({children:e,className:t})=>{const{hasCarousel:r,mode:n,hasCloseBtn:o,backgroundStyle:i,showCarouselArrows:c,slideTranstionTimer:l,handleCloseTipbar:u}=Er(),d=r&&c;return s.jsx("div",{style:i,"data-hasclosebtn":o,className:p.helpers.classNameConcat(Vs.tipbar,t),children:r?s.jsxs(s.Fragment,{children:[s.jsx($E,{mode:n,showCarouselArrows:d,slideTranstionTimer:l,children:e}),o&&s.jsx(Od,{handleCloseTipbar:u,showCarouselArrows:d,mode:n})]}):s.jsxs(s.Fragment,{children:[e,o&&s.jsx(Od,{handleCloseTipbar:u,mode:n})]})})},VE=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:n,carouselProps:o}=Er(),i=s.jsx("div",{...r,className:Vs["tipbar-item"],children:e});return n?s.jsx(p.Carousel.Item,{style:o.itemsStyles,children:i}):i},Gg=({className:e})=>{const{isOpen:t,slices:r}=Er();return r.length&&t?s.jsx(WE,{children:r.map((n,o)=>{var i;return s.jsx(s.Fragment,{children:s.jsx(gn,{href:n.link,children:s.jsx(VE,{highlightFirstSection:n.highlightFirstSection,"data-justifyhighlightedsection":n.horizontalAlignHighlightedSection?n.horizontalAlignHighlightedSection:"center",children:n&&((i=n==null?void 0:n.items)!=null&&i.length)?n.items.map((c,l)=>s.jsx(HE,{staticZone:n,type:c.type,title:c.title,description:c.description,className:e},`tipbar-slice-field-${l}`)):null})})},`tipbar-slice-${o}`)})}):null};Gg.displayName="TipBar.Root";const dc=({className:e,...t})=>s.jsx(LE,{...t,children:s.jsx(Gg,{className:e})});dc.displayName="TipBar";const GE=({CONSTANTS:e,data:t})=>{const{pathname:r}=Ae(),{tipbarRef:n}=Ze(),o=l=>{const u=t==null?void 0:t.find(d=>{var h,m,_,g,v;return((m=(h=d.staticConfig)==null?void 0:h.staticConfig)==null?void 0:m.deviceType)===l&&((v=(g=(_=d.staticConfig)==null?void 0:_.staticConfig)==null?void 0:g.paths)==null?void 0:v.includes(r))});return u||(t==null?void 0:t.find(d=>{var h,m,_,g,v,x;return((m=(h=d.staticConfig)==null?void 0:h.staticConfig)==null?void 0:m.deviceType)===l&&(!((g=(_=d.staticConfig)==null?void 0:_.staticConfig)!=null&&g.paths)||((x=(v=d.staticConfig)==null?void 0:v.staticConfig)==null?void 0:x.paths.length)===0)}))},i=o("desktop"),c=o("mobile");return s.jsxs("div",{ref:n,className:U.responsive["responsive-flex"],children:[c&&s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx(dc,{data:c,CONSTANTS:e})}),i&&s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx(dc,{data:i,CONSTANTS:e})})]})},KE=({SectionZone:e,name:t,previewId:r})=>{const[n,o]=j.useState();return j.useEffect(()=>{n||U.fetchContentType("search",{name:t,previewId:r}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&o(i.data[0])})},[]),s.jsx(e,{data:n??[]})},QE=e=>{const t=JE(XE(e));return YE(t)},YE=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},XE=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let n=t[r==null?void 0:r.cidade];n===void 0&&(n=t[r==null?void 0:r.cidade]=[]),n.push(r)}return t},{}),JE=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((n,o)=>n.localeCompare(o)),r={};for(const n of t)r[n]=e[n];return r},ZE=({content:e,data:t,showVendor:r,ICONS:n,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:i})=>{const[c,l]=j.useState([]);return j.useEffect(()=>{(async()=>{try{const d=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(!d.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${d.status}`);const h=await d.json();l(QE(h))}catch(d){console.error(d)}})()},[o]),!Array.isArray(t)||!t.length?null:s.jsxs(_r.Root,{data:c,children:[s.jsx(_r.Title,{children:e.titlePage}),s.jsx(_r.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:s.jsx(_r.Content,{showVendor:r,ICONS:n,LPLOJAS_TEMPLATE_RETURN_BUTTON:i})})]})},eP=({data:e,children:t,SectionZone:r,responsive:n,COMMON_PAGE_COLUMN_GAP:o})=>{var m,_;const i=((m=e==null?void 0:e.filter(g=>g.config.responsive.deviceType==="mobile")[0])==null?void 0:m.sections)||[],c=((_=e==null?void 0:e.filter(g=>g.config.responsive.deviceType==="desktop")[0])==null?void 0:_.sections)||[],l=i.slice(0,1),u=i.slice(1,i.length),d=c.slice(0,1),h=c.slice(1,c.length);return s.jsxs(s.Fragment,{children:[s.jsxs(p.Utils.Column,{className:p.helpers.classNameConcat(n["responsive-mobile-flex"],"utils-column-modifier"),children:[s.jsx(r,{data:l??[]}),s.jsxs(p.Utils.Column,{gap:o,children:[t,s.jsx(r,{data:u??[]})]})]}),s.jsxs(p.Utils.Column,{className:p.helpers.classNameConcat(n["responsive-desktop-flex"],"utils-column-modifier"),children:[s.jsx(r,{data:d??[]}),s.jsxs(p.Utils.Column,{gap:o,children:[t,s.jsx(r,{data:h??[]})]})]})]})},tP={Banner:ME,BannerSection:$s,BennefitsBarSection:Mg,SingleBannerSection:Xc,TextContentSection:Dg,BannerCarousel:kg,TextAccordionSection:Fg,TipbarScreening:GE,ImageGrid:Og,SearchPageScreening:U.SearchPageScreening,SearchContent:KE,NewsletterSection:Lg,PDPProductCarousel:Bg,ProductCarousel:Ug,EmbedLive:Ag,PopupModalSection:Hg,SectionZone:$g,LPStoresClientWrapper:ZE,WishlistScreening:eP},rP={Components:tP,helpers:jC};exports.configureFetchProxy=U.configureFetchProxy;exports.fetchProxy=U.fetchProxy;exports.proxyCartAPI=U.proxyCartAPI;exports.cms=rP;exports.contexts=qo;exports.data=Tc;exports.layout=pn;exports.scripts=kE;
67
+ `},TE=Object.freeze(Object.defineProperty({__proto__:null,generateMiddleware:RE},Symbol.toStringTag,{value:"Module"})),OE={helpers:TE},AE={Banner:Xc},$g=j.createContext({}),kE=({data:e,children:t,...r})=>{var v,x,S,w,I,P,C,N,T,O,M,z,D;const[n,o]=j.useState(!0),{initialize:i,controller:c,itemsStyles:l}=p.Carousel.useCarousel({gap:0,itemsPerPage:1}),u={slideTranstionTimer:(x=(v=e==null?void 0:e.staticConfig)==null?void 0:v.staticConfig)==null?void 0:x.slideTranstionTimer,showCarouselArrows:(w=(S=e==null?void 0:e.staticConfig)==null?void 0:S.staticConfig)==null?void 0:w.showCarouselArrows,hasCloseBtn:(P=(I=e==null?void 0:e.staticConfig)==null?void 0:I.staticConfig)==null?void 0:P.hasCloseBtn,backgroundColor:(N=(C=e==null?void 0:e.staticConfig)==null?void 0:C.staticConfig)==null?void 0:N.backgroundColor,textColorVariant:(O=(T=e==null?void 0:e.staticConfig)==null?void 0:T.staticConfig)==null?void 0:O.textColorVariant,content:((z=(M=e==null?void 0:e.content)==null?void 0:M.content)==null?void 0:z.items)??[]},d=(D=u.content)==null?void 0:D.filter(B=>!B.countDownEndDate||new Date(B.countDownEndDate)>new Date),h=d.length>1,m={...u.backgroundColor?{backgroundColor:u.backgroundColor}:{}},_=()=>{o(!1)},g=p.helpers.ValidateProp({fieldTypes:zn.Mode,property:u.textColorVariant,fallback:"default"});return s.jsx($g.Provider,{value:{isOpen:n,setIsOpen:o,hasCarousel:h,backgroundStyle:m,handleCloseTipbar:_,mode:g,slideTranstionTimer:u.slideTranstionTimer,showCarouselArrows:u.showCarouselArrows,hasCloseBtn:u.hasCloseBtn,slices:d,carouselProps:{initialize:i,controller:c,itemsStyles:l},...r},children:t})},Er=()=>j.useContext($g),ME=({dateEnd:e,...t})=>{const{CONSTANTS:{TIME_ZONE:r}}=Er();return s.jsx(Uo,{dateEnd:new Date(e),TIME_ZONE:r,...t})},LE="_tipbar_bt3p0_1",DE="_tipbar__carousel_bt3p0_15",Vs={tipbar:LE,tipbar__carousel:DE,"tipbar__close-btn":"_tipbar__close-btn_bt3p0_29","tipbar-item":"_tipbar-item_bt3p0_37","tipbar-item__coupon":"_tipbar-item__coupon_bt3p0_45"},FE=({coupon:e,feedbackTitle:t,feedbackDescription:r,...n})=>{const{CONSTANTS:o}=Er(),{addCouponSeller:i,cartStore:c}=Xe(),[l,u]=j.useState({status:!1,showSnackBar:!1}),[d,h]=j.useState(!1),[m,_]=j.useState(!1),g=async()=>{if(!c.items.length){_(!0);return}(await i(e,"coupon")).code===200?u({status:!0,showSnackBar:!0}):h(!0)};return j.useEffect(()=>{l.showSnackBar&&setTimeout(()=>{u(v=>({...v,showSnackBar:!1}))},o.TIPBAR_CONFIGS.snackbar_timeout)},[l.showSnackBar]),j.useEffect(()=>{d&&setTimeout(()=>{h(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[d]),j.useEffect(()=>{m&&setTimeout(()=>{_(!1)},o.TIPBAR_CONFIGS.snackbar_timeout)},[m]),s.jsxs(s.Fragment,{children:[s.jsx(p.Button,{...n,onClick:g,disabled:l.status,className:Vs["tipbar-item__coupon"],children:l.status?`${o.TIPBAR_CONFIGS.coupon_applied_message}`:`${o.TIPBAR_CONFIGS.coupon_default_message}`}),l.showSnackBar&&(t||r)&&s.jsx(qn,{title:t,subtitle:r,Z_INDEX_WAR:o.Z_INDEX_WAR},`feedback-coupon-${e}`),d&&s.jsx(qn,{title:o.TIPBAR_CONFIGS.coupon_error_title,subtitle:o.TIPBAR_CONFIGS.coupon_error_message,Z_INDEX_WAR:o.Z_INDEX_WAR},`error-coupon-${e}`),m&&s.jsx(qn,{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}`)]})},zE=({title:e,description:t,style:r,mode:n,className:o})=>s.jsx(p.TextStructure.Root,{children:s.jsxs(p.TextStructure.DivWrapper,{mode:n,className:o,children:[e&&s.jsx("h3",{className:"typography-style-body-sm",style:r,children:e}),t&&s.jsx("p",{className:"typography-style-caption",style:r,children:t})]})}),qE=({coupon:e,...t})=>{const{CONSTANTS:r}=Er();return s.jsx(p.Copy,{...t,iconCopy:r.ICONS.copy,iconSuccess:r.ICONS.check,children:e})},BE=({staticZone:e,type:t,className:r,description:n,title:o})=>{const{mode:i}=Er();if(t==="countdown")return s.jsx(ME,{dateEnd:e.countDownEndDate,size:"x-small",mode:i});if(t==="coupon"){const c=p.helpers.ValidateProp({fieldTypes:zn.Mode,property:e.couponButtonMode,fallback:"default"}),l=p.helpers.ValidateProp({fieldTypes:zn.VariantsExtended,property:e.couponButtonVariant,fallback:"primary"});return e.coupon?s.jsx(FE,{coupon:e.coupon,mode:c,variant:l,feedbackTitle:e.couponFeedbackTitle,feedbackDescription:e.couponFeedbackDescription}):null}if(t==="copy"){const c=p.helpers.ValidateProp({fieldTypes:zn.Mode,property:e.couponButtonMode,fallback:"default"});return e.coupon?s.jsx(qE,{coupon:e.coupon,mode:c}):null}return s.jsx(zE,{title:o,description:n,mode:i,className:r})},Td=({handleCloseTipbar:e,mode:t})=>{const{CONSTANTS:r}=Er();return s.jsx(p.Button,{title:"fechar tipbar",className:Vs["tipbar__close-btn"],onClick:e,variant:"tertiary",mode:t,adornment:{start:s.jsx(p.Icon,{name:r.ICONS.close})}})},UE=({children:e,mode:t="default",showCarouselArrows:r=!0,slideTranstionTimer:n})=>{const{carouselProps:o,CONSTANTS:i}=Er(),c=j.useRef(null),l=(d,h)=>{var m,_;d.stopPropagation(),d.preventDefault(),h==="prev"?(m=o.controller)==null||m.prevPage():(_=o.controller)==null||_.nextPage(),c.current&&(clearInterval(c.current),u())},u=j.useCallback(()=>{if(n&&o.controller){const d=setInterval(()=>{var h;(h=o.controller)==null||h.nextPage()},n);c.current=d}},[n,o]);return j.useEffect(()=>(u(),()=>{c.current&&clearInterval(c.current)}),[n,u]),s.jsxs(p.Carousel.Root,{innerRef:d=>{o.initialize(d)},className:Vs.tipbar__carousel,style:{flexDirection:"row",alignItems:"center"},children:[r&&s.jsx(p.Button,{variant:"tertiary",mode:t,onClick:d=>l(d,"prev"),adornment:{start:s.jsx(p.Icon,{name:i.ICONS.arrow_left})}}),s.jsx(p.Carousel.Body,{children:e}),r&&s.jsx(p.Button,{variant:"tertiary",mode:t,onClick:d=>l(d,"next"),adornment:{start:s.jsx(p.Icon,{name:i.ICONS.arrow_right})}})]})},HE=({children:e,className:t})=>{const{hasCarousel:r,mode:n,hasCloseBtn:o,backgroundStyle:i,showCarouselArrows:c,slideTranstionTimer:l,handleCloseTipbar:u}=Er(),d=r&&c;return s.jsx("div",{style:i,"data-hasclosebtn":o,className:p.helpers.classNameConcat(Vs.tipbar,t),children:r?s.jsxs(s.Fragment,{children:[s.jsx(UE,{mode:n,showCarouselArrows:d,slideTranstionTimer:l,children:e}),o&&s.jsx(Td,{handleCloseTipbar:u,showCarouselArrows:d,mode:n})]}):s.jsxs(s.Fragment,{children:[e,o&&s.jsx(Td,{handleCloseTipbar:u,mode:n})]})})},$E=({children:e,highlightFirstSection:t,...r})=>{const{hasCarousel:n,carouselProps:o}=Er(),i=s.jsx("div",{...r,className:Vs["tipbar-item"],children:e});return n?s.jsx(p.Carousel.Item,{style:o.itemsStyles,children:i}):i},Wg=({className:e})=>{const{isOpen:t,slices:r}=Er();return r.length&&t?s.jsx(HE,{children:r.map((n,o)=>{var i;return s.jsx(s.Fragment,{children:s.jsx(gn,{href:n.link,children:s.jsx($E,{highlightFirstSection:n.highlightFirstSection,"data-justifyhighlightedsection":n.horizontalAlignHighlightedSection?n.horizontalAlignHighlightedSection:"center",children:n&&((i=n==null?void 0:n.items)!=null&&i.length)?n.items.map((c,l)=>s.jsx(BE,{staticZone:n,type:c.type,title:c.title,description:c.description,className:e},`tipbar-slice-field-${l}`)):null})})},`tipbar-slice-${o}`)})}):null};Wg.displayName="TipBar.Root";const uc=({className:e,...t})=>s.jsx(kE,{...t,children:s.jsx(Wg,{className:e})});uc.displayName="TipBar";const WE=({CONSTANTS:e,data:t})=>{const{pathname:r}=Ae(),{tipbarRef:n}=Ze(),o=l=>{const u=t==null?void 0:t.find(d=>{var h,m,_,g,v;return((m=(h=d.staticConfig)==null?void 0:h.staticConfig)==null?void 0:m.deviceType)===l&&((v=(g=(_=d.staticConfig)==null?void 0:_.staticConfig)==null?void 0:g.paths)==null?void 0:v.includes(r))});return u||(t==null?void 0:t.find(d=>{var h,m,_,g,v,x;return((m=(h=d.staticConfig)==null?void 0:h.staticConfig)==null?void 0:m.deviceType)===l&&(!((g=(_=d.staticConfig)==null?void 0:_.staticConfig)!=null&&g.paths)||((x=(v=d.staticConfig)==null?void 0:v.staticConfig)==null?void 0:x.paths.length)===0)}))},i=o("desktop"),c=o("mobile");return s.jsxs("div",{ref:n,className:U.responsive["responsive-flex"],children:[c&&s.jsx("div",{className:U.responsive["responsive-mobile-flex"],children:s.jsx(uc,{data:c,CONSTANTS:e})}),i&&s.jsx("div",{className:U.responsive["responsive-desktop-flex"],children:s.jsx(uc,{data:i,CONSTANTS:e})})]})},VE=({SectionZone:e,name:t,previewId:r})=>{const[n,o]=j.useState();return j.useEffect(()=>{n||U.fetchContentType("search",{name:t,previewId:r}).then(i=>{i!=null&&i.data&&Array.isArray(i.data)&&o(i.data[0])})},[]),s.jsx(e,{data:n??[]})},GE=e=>{const t=YE(QE(e));return KE(t)},KE=e=>{const t=[];for(const r in e)t.push(...e[r]);return t},QE=e=>!e||!Array.isArray(e)?{}:e==null?void 0:e.reduce((t,r)=>{if(r!=null&&r.cidade){let n=t[r==null?void 0:r.cidade];n===void 0&&(n=t[r==null?void 0:r.cidade]=[]),n.push(r)}return t},{}),YE=e=>{if(!e||!Object.keys(e).length)return{};const t=Object.keys(e).sort((n,o)=>n.localeCompare(o)),r={};for(const n of t)r[n]=e[n];return r},XE=({content:e,data:t,showVendor:r,ICONS:n,entity:o,LPLOJAS_TEMPLATE_RETURN_BUTTON:i})=>{const[c,l]=j.useState([]);return j.useEffect(()=>{(async()=>{try{const d=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(!d.ok)throw new Error(`[LPStoresClientWrapper] MasterData error ${d.status}`);const h=await d.json();l(GE(h))}catch(d){console.error(d)}})()},[o]),!Array.isArray(t)||!t.length?null:s.jsxs(_r.Root,{data:c,children:[s.jsx(_r.Title,{children:e.titlePage}),s.jsx(_r.Section,{imgSrcDesk:e.imageBackgroundDesk,imgSrcMob:e.imageBackgroundMob,imgAlt:e.altImageBackgroud,children:s.jsx(_r.Content,{showVendor:r,ICONS:n,LPLOJAS_TEMPLATE_RETURN_BUTTON:i})})]})},JE=({data:e,children:t,SectionZone:r,responsive:n,COMMON_PAGE_COLUMN_GAP:o})=>{var m,_;const i=((m=e==null?void 0:e.filter(g=>g.config.responsive.deviceType==="mobile")[0])==null?void 0:m.sections)||[],c=((_=e==null?void 0:e.filter(g=>g.config.responsive.deviceType==="desktop")[0])==null?void 0:_.sections)||[],l=i.slice(0,1),u=i.slice(1,i.length),d=c.slice(0,1),h=c.slice(1,c.length);return s.jsxs(s.Fragment,{children:[s.jsxs(p.Utils.Column,{className:p.helpers.classNameConcat(n["responsive-mobile-flex"],"utils-column-modifier"),children:[s.jsx(r,{data:l??[]}),s.jsxs(p.Utils.Column,{gap:o,children:[t,s.jsx(r,{data:u??[]})]})]}),s.jsxs(p.Utils.Column,{className:p.helpers.classNameConcat(n["responsive-desktop-flex"],"utils-column-modifier"),children:[s.jsx(r,{data:d??[]}),s.jsxs(p.Utils.Column,{gap:o,children:[t,s.jsx(r,{data:h??[]})]})]})]})},ZE={Banner:AE,BannerSection:$s,BennefitsBarSection:Ag,SingleBannerSection:Xc,TextContentSection:Mg,BannerCarousel:Og,TextAccordionSection:Lg,TipbarScreening:WE,ImageGrid:Rg,SearchPageScreening:U.SearchPageScreening,SearchContent:VE,NewsletterSection:kg,PDPProductCarousel:zg,ProductCarousel:qg,EmbedLive:Tg,PopupModalSection:Bg,SectionZone:Ug,LPStoresClientWrapper:XE,WishlistScreening:JE},eP={Components:ZE,helpers:xC};exports.configureFetchProxy=U.configureFetchProxy;exports.fetchProxy=U.fetchProxy;exports.proxyCartAPI=U.proxyCartAPI;exports.cms=eP;exports.contexts=qo;exports.data=Rc;exports.layout=pn;exports.scripts=OE;