PageSourceSearch

https://www.tiendamacro.com.ar/_next/static/chunks/f1f5dc4a1e71fef5.js

js tiendamacro.com.ar collected 2026-10-09 23:55:01 UTC 67,901 bytes, 5 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47142,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(59684),a=e.i(18566),o=e.i(19273),s=e.i(95187);let i=(0,s.createServerReference)("4088a1768bd7f9be5404d350cf1dfee6c16ce70b57",s.callServer,void 0,s.findSourceMapURL,"getSuggestions");var l=e.i(55436),c=e.i(93479),d=e.i(79342),u=e.i(75157);let p=["heladeras","sillones","notebooks","lavarropas","celulares","bicicletas","audio y video","perfumes","televisores","muebles"];var m=e.i(88653),f=e.i(46932);function x({text:e,y:n=-50,duration:a=2e3,transition:o={duration:.3,ease:"easeOut"},containerClassName:s,...i}){let[l,c]=r.useState(0);r.useEffect(()=>{if(!Array.isArray(e))return;let t=setInterval(()=>{c(t=>(t+1)%e.length)},a);return()=>clearInterval(t)},[e,a]);let d=Array.isArray(e)?e[l]:e;return(0,t.jsx)("div",{className:(0,u.cn)("overflow-hidden py-1",s),children:(0,t.jsx)(m.AnimatePresence,{mode:"wait",children:(0,t.jsx)(f.motion.div,{transition:o,initial:{opacity:0,y:-n},animate:{opacity:1,y:0},exit:{opacity:0,y:n},...i,children:d},d)})})}let h=({textToRotate:e=[""],duration:r,className:n})=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(x,{className:n,text:e,duration:r})});var v=e.i(77677),g=e.i(36575),w=e.i(87536),b=e.i(10290);let y=({busqueda_keyword:e})=>{if(!v.IS_GA_EXTERNAL_ENABLED)return;let t=w.useSessionStore.getState().user?.client_type,r=t===b.CLIENT_TYPE.TA?"tienda_abierta":t?"tienda_cerrada":"No logueado";g.analyticsExternal.navigation.tmBusquedasPorKeyword({busqueda_keyword:e},r)};var j=e.i(70853);let N=(0,r.forwardRef)(({query:e,setQuery:n,onShowMore:a,isLoading:o},s)=>{let[i,m]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"relative w-full",children:[(0,t.jsx)(c.Input,{ref:s,type:"text",value:e,onChange:e=>{n(e.target.value)},onKeyDown:t=>{"Enter"===t.key&&e?.length>3&&(t.preventDefault(),y({busqueda_keyword:e}),a())},onFocus:()=>m(!0),onBlur:()=>m(!1),placeholder:" ",className:`
2            w-full px-4 py-2 text-lg h-auto rounded-md border-2 trONSition-all duration-200
3            ${i?"border-brand-500 focus-visible:border-brand-500 focus-visible:ring-brand-500/20":"border-gray-300 hover:border-gray-400"}
4            placeholder:text-gray-400
5          `}),(0,t.jsx)("div",{className:(0,u.cn)("search-overlay pointer-events-none left-5 absolute top-1/2 -translate-y-1/2 text-gray-400",e?"opacity-0":"opacity-100"),"aria-hidden":!!e,children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{children:j.SEARCH.SEARCH_BUTTON}),(0,t.jsx)("div",{className:"min-w-0 max-w-40 sm:max-w-[24rem]",children:(0,t.jsx)(h,{textToRotate:p,className:"align-center text-primary/80 py-0 truncate"})})]})}),(0,t.jsx)(d.UiButton,{onClick:()=>{e?.length>3&&(y({busqueda_keyword:e}),a())},size:"icon",className:(0,u.cn)("absolute right-1 top-1/2 -translate-y-1/2 rounded-md transition-all duration-200 size-8",{"bg-brand-500 hover:bg-brand-600":i,"bg-gray-400 hover:bg-gray-500":!i}),children:(0,t.jsx)(l.Search,{className:"size-5 text-white"})})]})});var C=e.i(49405);let E=({query:e,results:r})=>e?e.length<3?(0,t.jsxs)("div",{className:"p-8 text-center text-gray-500",children:[(0,t.jsx)("p",{className:"text-lg font-medium mb-2",children:j.SEARCH.KEEP_TYPING}),(0,t.jsx)("p",{className:"text-sm",children:j.SEARCH.MIN_CHARS})]}):r&&(0!==r.suggestions.categories.length||0!==r.suggestions.variants.length)?null:(0,t.jsxs)("div",{className:"p-8 text-center text-gray-500",children:[(0,t.jsx)("p",{className:"text-lg font-medium mb-2",children:j.SEARCH.NO_RESULTS}),(0,t.jsx)("p",{className:"text-sm",children:j.SEARCH.TRY_OTHER_TERMS})]}):(0,t.jsxs)("div",{className:"p-8 text-center text-gray-500",children:[(0,t.jsx)(l.Search,{className:"w-12 h-12 mx-auto mb-4 text-gray-300"}),(0,t.jsx)("p",{className:"text-lg font-medium mb-2",children:j.SEARCH.SEARCH_PRODUCTS}),(0,t.jsx)("p",{className:"text-sm",children:j.SEARCH.START_TYPING})]});var R=e.i(87486);let _=(0,r.forwardRef)(({category:e,onClose:r,isSelected:n,globalIndex:o,onSelect:s},i)=>{let l=(0,a.useRouter)();return(0,t.jsx)(R.Badge,{ref:i,variant:"secondary",className:`curs
5or-pointer transition-all duration-200 text-white ${n?"bg-secondary-600 shadow-md scale-105":"hover:bg-secondary-950"}`,onClick:()=>{s(o),l.push(`/catalog?query=${e.slug}`),r()},children:e.name})});_.displayName="SearchCategoryItem";let S=({categories:e,query:r,selectedIndex:n,itemRefs:a,onSelect:o,onClose:s,baseIndex:i=0,limit:l=6,className:c})=>{let d=e.slice(0,l);return 0===d.length?null:(0,t.jsxs)("div",{className:c,children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-secondary-900 mb-3",children:j.SEARCH.SEARCH_IN(r)}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:d.map((e,r)=>{let l=i+r,c=n===l;return(0,t.jsx)(_,{ref:e=>e&&a.current.set(l,e),category:e,isSelected:c,onClose:s,globalIndex:l,onSelect:o},`${e.slug}-${r}`)})})]})};var T=e.i(70989),k=e.i(44467),M=e.i(56982),P=e.i(88783);let I=({busqueda_sugerida:e})=>{if(!v.IS_GA_EXTERNAL_ENABLED)return;let t=w.useSessionStore.getState().user?.client_type,r=t===b.CLIENT_TYPE.TA?"tienda_abierta":t?"tienda_cerrada":"No logueado";g.analyticsExternal.navigation.tmBusquedasPorSugerencias({busqueda_sugerida:e},r)},A=(0,r.forwardRef)(({variant:e,isSelected:r=!1,onClose:n,globalIndex:o,onSelect:s},i)=>{var l;let c,d=(0,a.useRouter)(),p=e.product.percent_off?e.product.sale_price:e.product.regular_price;return(0,t.jsxs)("div",{ref:i,className:(0,u.cn)("flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-all duration-200",{"bg-secondary-50 border-2 border-secondary-200 shadow-md":r,"hover:bg-gray-50 border-2 border-transparent":!r}),onClick:()=>{I({busqueda_sugerida:e.product.title}),(0,P.fireSelectItemEvent)({variant:e,item_list_name:"search_results",item_list_id:"search_results",index:o}),s(o),d.push(`/products/${e.product.slug}`),n()},children:[(0,t.jsx)(T.UiImage,{src:e.picture_thumb,alt:e.product.title,fill:!0,objectFit:"contain",className:"w-20 h-24 rounded"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"text-sm sm:text-base font-medium text-secondary-950 line-clamp-2",children:e.product.title}),(0,t.jsxs)("div",{className:"flex flex-col mt-1",children:[e.product.percent_off&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"text-xs sm:text-sm text-gray-500 line-through",children:["$",(0,k.serializeNumber)(e.product.regular_price)]}),(0,t.jsx)(M.DiscountBadge,{percent:e.product.percent_off,type:"productDetail"})]}),(0,t.jsxs)("div",{className:"text-base sm:text-xl font-semibold text-secondary",children:["$",(0,k.serializeNumber)(p)]}),e.product.max_installments_info?.installments>0&&(0,t.jsx)("p",{className:"text-xs",children:(c=(l=e.product.max_installments_info).coef>1?1===l.installments?"fija":"fijas":j.SEARCH.WITHOUT_INTEREST,1===l.installments?j.SEARCH.INSTALLMENT_SINGLE(c,(0,k.serializeNumber)(l.amount)):j.SEARCH.INSTALLMENT_MULTI(l.installments,c,(0,k.serializeNumber)(l.amount)))})]})]})]})}),D=(0,r.forwardRef)(({variant:e,isSelected:r=!1,onClose:n,globalIndex:o,onSelect:s},i)=>{let l=(0,a.useRouter)(),c=e.product.points||0;return(0,t.jsxs)("div",{ref:i,className:(0,u.cn)("flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-all duration-200",{"bg-secondary-50 border-2 border-secondary-200 shadow-md":r,"hover:bg-gray-50 border-2 border-transparent":!r}),onClick:()=>{I({busqueda_sugerida:e.product.title}),(0,P.fireSelectItemEvent)({variant:e,item_list_name:"search_results",item_list_id:"search_results",index:o}),s(o),l.push(`/products/${e.product.slug}`),n()},children:[(0,t.jsx)(T.UiImage,{src:e.picture_thumb,alt:e.product.title,fill:!0,objectFit:"contain",className:"w-20 h-24 rounded"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"text-sm sm:text-base font-medium text-secondary-950 line-clamp-2",children:e.product.title}),(0,t.jsx)("div",{className:"flex flex-col mt-1",children:(0,t.jsxs)("div",{className:"text-base sm:text-xl font-semibold text-secondary",children:[(0,k.serializeNumber)(c)," Puntos"]})})]})]})});var L=e.i(22016);let H=({query:e,variantsLength:r,onClose:n,threshold:a=1,delayMs:o=300,className:s})=>r<=a?null:(0,t.jsx)("div",{className:s??"pt-3 border-t border-gray-100",children:(0,t.jsx)(L.default,{prefetch:!1,href:`/catalog?query=${encodeURIComponent(e)}`,onClick:()=>{setTimeout(()=>n(),o)},className:"w-full text-secondary hover:text-secondary-950",children:"Ver más resultados"})});var O=e.i(12892);let F={points:D,purchasable:A};function z({variants:e,baseIndex:n,selectedIndex:a,itemRefs:o,onSelect:s,onClose:i,query:l,limit:c=5,className:d,seeMoreThreshold:u=1,seeMoreClassName:p="pt-3 border-t border-gray-100"}){let m=(0,r.useRef)(!1);if((0,r.useEffect)(()=>{!m.current&&e?.length&&(m.current=!0,(({products:e,items:t,item_list_name:r,item_list_id:n,currency:a})=>{if(!v.IS_GA_EXTERNAL_ENABLED)return;let o=t??e?.map((e,t)=>{let r=e.is_on_sale??!1,n=(0,k.toNumberFromLocale)(r?e.sale_price:e.regular_price),a=(0,k.toNumberFromLocale)(e.regular_price),o=e.breadcrumb??[],s=e.category?.name??"";return{item_id:String(e.variants?.[0]?.id??e.id),item_name:e.title||"no_dis
5ponible",item_brand:e.manufacturer?.name||"no_disponible",item_category:o[0]?.name||s||"no_disponible",item_category2:o[1]?.name||"no_disponible",item_category3:o[2]?.name||"no_disponible",price:n,discount:r?a-n:"no_disponible",index:t}})??[],s=w.useSessionStore.getState().user?.client_type,i=s===b.CLIENT_TYPE.TA?"tienda_abierta":s?"tienda_cerrada":"No logueado";g.analyticsExternal.ecommerce.viewItemList(o,r,n,i,a)})({items:e.slice(0,c).map((e,t)=>({item_id:String(e.id),item_name:e.product.title||"no_disponible",item_brand:e.product.manufacturer?.name||"no_disponible",price:parseFloat(e.product.sale_price||e.product.regular_price||"0"),item_list_name:"search_results",item_list_id:"search_results",index:t})),item_list_name:"search_results",item_list_id:"search_results"}))},[e,c]),!e||0===e.length)return null;let f=e.slice(0,c);return(0,t.jsxs)("div",{className:d,children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-secondary-900 mb-3",children:j.SEARCH.PRODUCTS_TITLE}),(0,t.jsx)("div",{className:"space-y-3",children:f.map((e,r)=>{var l;let c=n+r,d=a===c,u=F[(l=e.product).transaction_type===O.TRANSACTION_TYPE.POINTS?"points":l.transaction_type===O.TRANSACTION_TYPE.PURCHASABLE?"purchasable":l.transaction_type===O.TRANSACTION_TYPE.CASHBACK_VOUCHER||l.transaction_type===O.TRANSACTION_TYPE.CASHBACK||l.transaction_type===O.TRANSACTION_TYPE.VOUCHER||l.transaction_type===O.TRANSACTION_TYPE.VIRTUAL?"points":"purchasable"];return(0,t.jsx)(u,{ref:e=>{e&&o.current.set(c,e)},variant:e,isSelected:d,onClose:i,globalIndex:c,onSelect:s},e.id)})}),(0,t.jsx)(H,{query:l,variantsLength:e.length,onClose:i,threshold:u,className:p})]})}function U({className:e}){let[s,l]=(0,r.useState)(!1),{query:c,results:d,isLoading:u,selectedIndex:p,scrollContainerRef:m,itemRefs:f,modalRef:x,handleItemSelect:h,setQuery:v,inputRef:g,handleShowMore:w}=function({isOpen:e,onClose:t}){let[n,s]=(0,r.useState)(""),[l,c]=(0,r.useState)(null),[d,u]=(0,r.useState)(!1),[p,m]=(0,r.useState)(-1),f=(0,r.useRef)(null),x=(0,r.useRef)(null),h=(0,r.useRef)(new Map),v=(0,r.useRef)(null),g=(0,a.useRouter)(),w=(0,o.useDebounce)(n,300),b=(0,r.useCallback)(async e=>{if(!e||e.length<3)return void c(null);u(!0);try{let t=await i(e);t.data&&t.data.suggestions?c({query:e,suggestions:{categories:t.data.suggestions.categories||[],variants:t.data.suggestions.variants||[]}}):c({query:e,suggestions:{categories:[],variants:[]}})}catch(t){console.error("Error fetching suggestions:",t),c({query:e,suggestions:{categories:[],variants:[]}})}finally{u(!1)}},[]),y=(0,r.useCallback)(()=>{if(!l)return[];let e=[];return l.suggestions.categories.slice(0,6).forEach((t,r)=>{e.push({type:"category",data:t,index:r})}),l.suggestions.variants.slice(0,5).forEach((t,r)=>{e.push({type:"variant",data:t,index:r})}),e},[l]),j=(0,r.useCallback)(()=>{let e=y();if(p>=0&&p<e.length){let r=e[p];"category"===r.type?g.push(`/catalog?query=${r.data.slug}`):g.push(`/products/${r.data.product.slug}`),t()}},[p,y,g,t]),N=(0,r.useCallback)(e=>{m(e)},[]),C=(0,r.useCallback)(()=>{g.push(`/catalog?query=${n}`),t()},[n]);return(0,r.useEffect)(()=>{e&&(w.trim()&&w.length>=3?b(w.toLowerCase()):c(null),m(-1),h.current.clear())},[w,b,e]),(0,r.useEffect)(()=>{e&&f.current&&setTimeout(()=>f.current?.focus(),100)},[e]),(0,r.useEffect)(()=>{if(!e)return;let r=e=>{if("Escape"===e.key)t();else if("ArrowDown"===e.key){e.preventDefault();let t=y();m(e=>Math.min(e+1,t.length-1))}else"ArrowUp"===e.key?(e.preventDefault(),m(e=>Math.max(e-1,-1))):"Enter"===e.key&&(e.preventDefault(),j())};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,t,y,j]),(0,r.useEffect)(()=>{if(p>=0){let e=h.current.get(p);if(e&&x.current){let t=x.current.getBoundingClientRect(),r=e.getBoundingClientRect(),n=r.top<t.top+60,a=r.bottom>t.bottom-20;(n||a)&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}}},[p]),(0,r.useEffect)(()=>{if(!e)return;let r=e=>{v.current&&!v.current.contains(e.target)&&t()},n=setTimeout(()=>{document.addEventListener("mousedown",r)},100);return()=>{clearTimeout(n),document.removeEventListener("mousedown",r)}},[e,t]),(0,r.useEffect)(()=>{e||(s(""),c(null),m(-1),u(!1),h.current.clear())},[e]),{query:n,setQuery:s,results:l,isLoading:d,selectedIndex:p,inputRef:f,scrollC
5ontainerRef:x,itemRefs:h,modalRef:v,handleItemSelect:N,handleShowMore:C,getNavigableItems:y}}({isOpen:s,onClose:()=>{l(!1),v("")}});return(0,t.jsxs)("div",{ref:x,className:`relative w-full xs:mx-auto ${e??""}`,children:[(0,t.jsx)(N,{ref:g,query:c,isLoading:u,setQuery:e=>{v(e),e.trim().length>0?l(!0):l(!1)},onShowMore:w}),s&&(0,t.jsx)("div",{className:"absolute left-0 right-0 z-30 rounded-md border border-gray-200 bg-white shadow-2xl overflow-hidden",children:u?(0,t.jsx)(C.StepLoader,{loaderText:j.SEARCH.SEARCHING(c),className:"h-80"}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(n.ScrollArea,{ref:m,className:"min-h-55 max-h-90 overflow-y-auto",children:[(0,t.jsx)(E,{query:c,results:d}),d&&(0,t.jsxs)("div",{className:"p-4 space-y-6",children:[(0,t.jsx)(S,{categories:d.suggestions.categories,query:d.query,selectedIndex:p,itemRefs:f,onSelect:h,onClose:()=>l(!1)}),(0,t.jsx)(z,{variants:d.suggestions.variants,baseIndex:d.suggestions.categories.slice(0,6).length,selectedIndex:p,itemRefs:f,onSelect:h,onClose:()=>l(!1),query:c,limit:5,seeMoreThreshold:1,seeMoreClassName:"pt-3 border-t border-gray-100"})]})]})})})]})}e.s(["SearchInline",()=>U],47142)},92199,e=>{"use strict";var t=e.i(40141);function r(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(e)}function n(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"9",cy:"21",r:"1"},child:[]},{tag:"circle",attr:{cx:"20",cy:"21",r:"1"},child:[]},{tag:"path",attr:{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"},child:[]}]})(e)}function a(e){return(0,t.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"},child:[]}]})(e)}e.s(["FiMenu",()=>r,"FiShoppingCart",()=>n,"FiUser",()=>a])},87646,91125,e=>{"use strict";var t=e.i(77677),r=e.i(36575),n=e.i(87536),a=e.i(10290);e.s(["fireTmMenuPrincipal",0,({operacion_clickeada:e})=>{if(!t.IS_GA_EXTERNAL_ENABLED)return;let o=n.useSessionStore.getState().user?.client_type,s=o===a.CLIENT_TYPE.TA?"tienda_abierta":o?"tienda_cerrada":"No logueado";r.analyticsExternal.navigation.tmMenuPrincipal({operacion_clickeada:e},s)}],87646),e.s(["buildMenuOperation",0,e=>e.map(e=>(e?.trim()??"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/&/g," y ").replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")).filter(Boolean).join("_")],91125)},50185,e=>{"use strict";var t=e.i(43476),r=e.i(80376),n=e.i(71645),a=e.i(18566),o=e.i(92199),s=e.i(75157),i=e.i(73443),l=e.i(22016),c=e.i(72436),d=e.i(87646),u=e.i(91125);let p=["text-paragraph-base uppercase text-base","text-paragraph-base pl-4 font-semibold text-base","text-gray-600 pl-8 text-base"],m=({menu:e})=>{let r=(e,n=0,a=[])=>(0,t.jsx)("ul",{children:e.map(e=>{let o=e.title||e.name||"",m=[...a,o];return(0,t.jsx)("li",{className:(0,s.cn)("flex flex-col gap-y-2 ",{"pt-2":!(e.childs.length>0)}),children:e.childs.length>0?(0,t.jsx)(i.Accordion,{type:"single",collapsible:!0,children:(0,t.jsxs)(i.AccordionItem,{value:e.name||e.title,children:[(0,t.jsx)(i.AccordionTrigger,{className:"hover:no-underline py-2",children:(0,t.jsx)("span",{className:(0,s.cn)("w-full text-left ",p[n]),children:o})}),(0,t.jsx)(i.AccordionContent,{children:r(e.childs,n+1,m)})]})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.default,{prefetch:!1,href:e.url||"#",onClick:()=>{let e;(e=(0,u.buildMenuOperation)(m))&&(0,d.fireTmMenuPrincipal)({operacion_clickeada:e})},className:(0,s.cn)("w-full text-left ",p[n]),children:o}),n<2&&(0,t.jsx)(c.Separator,{})]})},e.name||e.title)})});return(0,t.jsx)(t.Fragment,{children:e&&(0,t.jsx)("nav",{className:"flex flex-col w-full",children:r(e)})})};var f=e.i(72520),x=e.i(87536),h=e.i(99676),v=e.i(59684),g=e.i(14025),w=e.i(64012),b=e.i(79342),y=e.i(44467),j=e.i(77677),N=e.i(46944),C=e.i(49775);let E=()=>{let{onLogout:e}
5=(0,C.useLogout)(),{user:r,isValidClientToShow:n}=(0,x.useSessionStore)((0,N.useShallow)(e=>({user:e.user,isValidClientToShow:e.isValidClientToShow()}))),a=(0,y.serializeNumber)(Math.floor(Number(r?.points)||0)),o=Number((0,y.serializeNumber)(Math.floor(Number(r?.pending_points)||0))),{formatTime:s}=(0,w.useSessionExpiration)();return(0,t.jsx)(t.Fragment,{children:r&&(0,t.jsx)(i.Accordion,{type:"single",collapsible:!0,className:"bg-gray-100 border-t-2 border-t-secondary-100 w-full",defaultValue:"3",children:(0,t.jsxs)(i.AccordionItem,{value:"1",children:[(0,t.jsx)(i.AccordionTrigger,{className:"px-4 py-2 text-[15px] leading-6 flex items-center justify-between rounded-none w-full",children:(0,t.jsxs)("span",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,t.jsx)(h.Avatar,{children:(0,t.jsxs)(h.AvatarFallback,{className:"bg-radial from-brand-950 to-primary text-brand-100",children:[r?.first_name&&r.first_name[0],r?.last_name&&r.last_name[0]]})}),(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-w-0",children:[(0,t.jsxs)("span",{className:"truncate block w-full",children:[r?.first_name," ",r?.last_name]}),j.IS_POINTS_ENABLED&&n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"text-xs",children:["Puntos disponibles:"," ",(0,t.jsx)("span",{className:"text-secondary font-semibold",children:a})]}),o>0&&(0,t.jsxs)("span",{className:"text-xs",children:["Puntos pendientes:"," ",(0,t.jsx)("span",{className:"text-secondary font-semibold",children:o})]})]})]})]})}),(0,t.jsxs)(i.AccordionContent,{className:"text-muted-foreground bg-linear-to-t from-gray-200 via-gray-100 to-white pb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-1 text-xs justify-end px-4 bg-linear-to-b from-gray-100 via-gray-50 to-white py-2 mt-2",children:["Su sesión expira en: ",(0,t.jsxs)("span",{className:"font-semibold",children:[" ",s]})]}),(0,t.jsx)(v.ScrollArea,{className:"w-full rounded-md px-4 h-[40vh]",children:(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:(0,g.getAccountOptionsMenu)(n).filter(e=>e.isActive).map(r=>!1===r.link?(0,t.jsx)(b.UiButton,{className:"block w-full text-center cursor-pointer bg-rose-500 hover:bg-rose-400",onClick:e,children:(0,t.jsx)("span",{className:"font-bold ms-2",children:r.title})},r.title):(0,t.jsx)(l.default,{prefetch:!1,href:r.href,className:"block",children:(0,t.jsxs)("div",{className:"bg-linear-to-r from-secondary-50 to-secondary-100 rounded-lg p-3 h-full border border-gray-100 flex gap-x-2 items-start",children:[r.icon&&(0,t.jsx)("div",{className:"h-7 w-7 shrink",children:(0,t.jsx)(r.icon,{className:"size-5 text-secondary"})}),(0,t.jsxs)("div",{className:"flex flex-col w-full",children:[(0,t.jsx)("h3",{className:"font-bold text-gray-800",children:r.title}),(0,t.jsx)("p",{className:"text-gray-600 text-xs line-clamp-2",children:r.description})]}),(0,t.jsx)("div",{className:"shrink size-6",children:(0,t.jsx)(f.ArrowRight,{className:"size-3.5 text-gray-400 ml-auto"})})]})},r.title))})})]})]},"1")})})};var R=e.i(84614),_=e.i(70853),S=e.i(24034);let T=()=>{let e=(0,x.useSessionStore)(e=>e.user);return(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex flex-col px-6 bg-linear-to-b from-gray-50 via-brand-100 to-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center pb-6 pt-5",children:[(0,t.jsx)(R.User,{className:"h-10 w-10 text-brand-700"}),(0,t.jsxs)("div",{className:"flex flex-col ms-4 space-y-1",children:[(0,t.jsx)("span",{className:"font-bold text-xl leading-none text-black",children:"¡Hola!"}),(0,t.jsx)("p",{className:"text-gray-700 text-base",children:"Ingresá a tu cuenta o registrate"})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-4 w-full flex-col",children:[(0,t.jsx)(b.UiButton,{asChild:!0,children:(0,t.jsx)(l.default,{prefetch:!1,href:j.LOGIN_URL,className:"flex-1",rel:"noopener noreferrer",children:_.NAV.MENU_LOGIN})}),j.REGISTER_URL&&(0,t.jsx)(b.UiButton,{asChild:!0,variant:"secondary",children:(0,t.jsx)(S.SacaTuTarjetaLink,{ubicacion:"header",className:"flex-1",children:_.NAV.REGISTER})})]})]})})})};var k=e.i(45848);e.s(["SidebarMenu",0,({menu:e})=>
5{let[s,i]=(0,n.useState)(!1),l=(0,a.usePathname)();return(0,n.useEffect)(()=>{i(!1)},[l]),(0,t.jsxs)(r.Sheet,{stableId:"sidebar-menu",open:s,onOpenChange:i,children:[(0,t.jsx)(r.SheetTrigger,{asChild:!0,children:(0,t.jsx)(b.UiButton,{className:"flex md:hidden order-1",variant:"ghost",size:"icon",children:(0,t.jsx)(o.FiMenu,{className:"size-6"})})}),(0,t.jsxs)(r.SheetContent,{side:"left",className:"px-0 flex flex-col h-dvh",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-0",children:[(0,t.jsx)(r.SheetTitle,{children:(0,t.jsx)(k.Mainlogo,{className:"ml-4"})}),(0,t.jsx)(r.SheetDescription,{}),(0,t.jsx)(T,{})]}),(0,t.jsx)("div",{className:"flex flex-col flex-grow min-h-0",children:(0,t.jsx)(v.ScrollArea,{className:"flex-1 min-h-0 h-full px-4",children:(0,t.jsx)(m,{menu:e})})}),(0,t.jsx)(r.SheetFooter,{className:"p-0",children:(0,t.jsx)(E,{})})]})]})}],50185)},16096,e=>{"use strict";var t=e.i(43476),r=e.i(54635),n=e.i(92199),a=e.i(79342),o=e.i(12910);e.s(["CartIconTrigger",0,()=>{let{cartItems:e}=(0,o.useCart)();return(0,t.jsx)(r.CartDialog,{children:(0,t.jsxs)(a.UiButton,{className:"order-3 relative text-primary hover:text-primary",variant:"ghost",size:"sm",type:"button",children:[(0,t.jsx)(n.FiShoppingCart,{className:"size-6"}),e.length>0&&(0,t.jsx)("span",{className:"absolute -top-1 -right-1 bg-primary gap-x-2 text-xs rounded-full w-4 h-4 flex items-center justify-center text-white",children:e.length})]})})}])},66354,e=>{"use strict";let t,r,n;var a=e.i(43476),o=e.i(71645),s=e.i(81140),i=e.i(20783),l=e.i(30030),c=e.i(69340),d=e.i(48425),u=e.i(75830),p=e.i(86318),m=e.i(26330),f=e.i(3536),x=e.i(65491),h=e.i(10772),v=e.i(53660),g=e.i(74606),w=e.i(96626),b=e.i(42727),y=Symbol("radix.slottable");function j(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===y}var N=e.i(30207),C=e.i(86312),E=e.i(85369),R=["Enter"," "],_=["ArrowUp","PageDown","End"],S=["ArrowDown","PageUp","Home",..._],T={ltr:[...R,"ArrowRight"],rtl:[...R,"ArrowLeft"]},k={ltr:["ArrowLeft"],rtl:["ArrowRight"]},M="Menu",[P,I,A]=(0,u.createCollection)(M),[D,L]=(0,l.createContextScope)(M,[A,v.createPopperScope,b.createRovingFocusGroupScope]),H=(0,v.createPopperScope)(),O=(0,b.createRovingFocusGroupScope)(),[F,z]=D(M),[U,K]=D(M),B=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:i,modal:l=!0}=e,c=H(t),[d,u]=o.useState(null),m=o.useRef(!1),f=(0,N.useCallbackRef)(i),x=(0,p.useDirection)(s);return o.useEffect(()=>{let e=()=>{m.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>m.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,a.jsx)(v.Root,{...c,children:(0,a.jsx)(F,{scope:t,open:r,onOpenChange:f,content:d,onContentChange:u,children:(0,a.jsx)(U,{scope:t,onClose:o.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:m,dir:x,modal:l,children:n})})})};B.displayName=M;var V=o.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=H(r);return(0,a.jsx)(v.Anchor,{...o,...n,ref:t})});V.displayName="MenuAnchor";var G="MenuPortal",[$,q]=D(G,{forceMount:void 0}),Y=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:o}=e,s=z(G,t);return(0,a.jsx)($,{scope:t,forceMount:r,children:(0,a.jsx)(w.Presence,{present:r||s.open,children:(0,a.jsx)(g.Portal,{asChild:!0,container:o,children:n})})})};Y.displayName=G;var W="MenuContent",[X,Z]=D(W),Q=o.forwardRef((e,t)=>{let r=q(W,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,s=z(W,e.__scopeMenu),i=K(W,e.__scopeMenu);return(0,a.jsx)(P.Provider,{scope:e.__scopeMenu,children:(0,a.jsx)(w.Presence,{present:n||s.open,children:(0,a.jsx)(P.Slot,{scope:e.__scopeMenu,children:i.modal?(0,a.jsx)(J,{...o,ref:t}):(0,a.jsx)(ee,{...o,ref:t})})})})}),J=o.forwardRef((e,t)=>{let r=z(W,e.__scopeMenu),n=o.useRef(null),l=(0,i.useComposedRefs)(t,n);return o.useEffect(()=>{let e=n.current;if(e)return(0,C.hideOthers)(e)},[]),(0,a.jsx)(er,{...e,ref:l,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:(0,s.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),ee=o.forwardRef((e,t)=>
5{let r=z(W,e.__scopeMenu);return(0,a.jsx)(er,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),et=((n=o.forwardRef((e,t)=>{let{children:r,...n}=e;if(o.isValidElement(r)){var a;let e,s,l=(a=r,(s=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(s=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),c=function(e,t){let r={...t};for(let n in t){let a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...e)=>{let t=o(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...o}:"className"===n&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==o.Fragment&&(c.ref=t?(0,i.composeRefs)(t,l):l),o.cloneElement(r,c)}return o.Children.count(r)>1?o.Children.only(null):null})).displayName="MenuContent.ScrollLock.SlotClone",t=n,(r=o.forwardRef((e,r)=>{let{children:n,...s}=e,i=o.Children.toArray(n),l=i.find(j);if(l){let e=l.props.children,n=i.map(t=>t!==l?t:o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null);return(0,a.jsx)(t,{...s,ref:r,children:o.isValidElement(e)?o.cloneElement(e,void 0,n):null})}return(0,a.jsx)(t,{...s,ref:r,children:n})})).displayName="MenuContent.ScrollLock.Slot",r),er=o.forwardRef((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:l,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:u,onEntryFocus:p,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:w,onInteractOutside:y,onDismiss:j,disableOutsideScroll:N,...C}=e,R=z(W,r),T=K(W,r),k=H(r),M=O(r),P=I(r),[A,D]=o.useState(null),L=o.useRef(null),F=(0,i.useComposedRefs)(t,L,R.onContentChange),U=o.useRef(0),B=o.useRef(""),V=o.useRef(0),G=o.useRef(null),$=o.useRef("right"),q=o.useRef(0),Y=N?E.RemoveScroll:o.Fragment;o.useEffect(()=>()=>window.clearTimeout(U.current),[]),(0,f.useFocusGuards)();let Z=o.useCallback(e=>{var t,r;return $.current===G.current?.side&&(t=e,!!(r=G.current?.area)&&function(e,t){let{x:r,y:n}=e,a=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){let s=t[e],i=t[o],l=s.x,c=s.y,d=i.x,u=i.y;c>n!=u>n&&r<(d-l)*(n-c)/(u-c)+l&&(a=!a)}return a}({x:t.clientX,y:t.clientY},r))},[]);return(0,a.jsx)(X,{scope:r,searchRef:B,onItemEnter:o.useCallback(e=>{Z(e)&&e.preventDefault()},[Z]),onItemLeave:o.useCallback(e=>{Z(e)||(L.current?.focus(),D(null))},[Z]),onTriggerLeave:o.useCallback(e=>{Z(e)&&e.preventDefault()},[Z]),pointerGraceTimerRef:V,onPointerGraceIntentChange:o.useCallback(e=>{G.current=e},[]),children:(0,a.jsx)(Y,{...N?{as:et,allowPinchZoom:!0}:void 0,children:(0,a.jsx)(x.FocusScope,{asChild:!0,trapped:l,onMountAutoFocus:(0,s.composeEventHandlers)(c,e=>{e.preventDefault(),L.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:(0,a.jsx)(m.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:w,onInteractOutside:y,onDismiss:j,children:(0,a.jsx)(b.Root,{asChild:!0,...M,dir:T.dir,orientation:"vertical",loop:n,currentTabStopId:A,onCurrentTabStopIdChange:D,onEntryFocus:(0,s.composeEventHandlers)(p,e=>{T.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,a.jsx)(v.Content,{role:"menu","aria-orientation":"vertical","data-state":eS(R.open),"data-radix-menu-content":"",dir:T.dir,...k,...C,ref:F,style:{outline:"none",...C.style},onKeyDown:(0,s.composeEventHandlers)(C.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;if(t){var a;let t,o,s,i,l,c;"Tab"===e.key&&e.preventDefault(),!r&&n&&(a=e.key,t=B.current+a,o=P().filter(e=>!e.disabled),s=document.activeElement,i=o.find(e=>e.ref.current===s)?.textValue,l=function(e,t,r){var n;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=r?e.indexOf(r):-1,s=(n=Math.max(o,0),e.map((t,r)=>e[(n+r)%e.length]));1===a.length&&(s=s.filter(e=>e!==r));let i=s.find(e=>e.toLowerCase().startsWith(a.toLowerCase()));return i!==r?i:void 0}(o.map(e=>e.textValue),t,i),c=o.find(e=>e.textValue===l)?.ref.current,function e(t){B.current=t,window.clearTimeout(U.current),""!==t&&(U.current=window.setTimeout(()=>e(""),1e3))}(t),c&&setTimeout(()=>c.focus()))}let o=L.current;
5if(e.target!==o||!S.includes(e.key))return;e.preventDefault();let s=P().filter(e=>!e.disabled).map(e=>e.ref.current);_.includes(e.key)&&s.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(s)}),onBlur:(0,s.composeEventHandlers)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(U.current),B.current="")}),onPointerMove:(0,s.composeEventHandlers)(e.onPointerMove,eM(e=>{let t=e.target,r=q.current!==e.clientX;e.currentTarget.contains(t)&&r&&($.current=e.clientX>q.current?"right":"left",q.current=e.clientX)}))})})})})})})});Q.displayName=W;var en=o.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,a.jsx)(d.Primitive.div,{role:"group",...n,ref:t})});en.displayName="MenuGroup";var ea=o.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,a.jsx)(d.Primitive.div,{...n,ref:t})});ea.displayName="MenuLabel";var eo="MenuItem",es="menu.itemSelect",ei=o.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:n,...l}=e,c=o.useRef(null),u=K(eo,e.__scopeMenu),p=Z(eo,e.__scopeMenu),m=(0,i.useComposedRefs)(t,c),f=o.useRef(!1);return(0,a.jsx)(el,{...l,ref:m,disabled:r,onClick:(0,s.composeEventHandlers)(e.onClick,()=>{let e=c.current;if(!r&&e){let t=new CustomEvent(es,{bubbles:!0,cancelable:!0});e.addEventListener(es,e=>n?.(e),{once:!0}),(0,d.dispatchDiscreteCustomEvent)(e,t),t.defaultPrevented?f.current=!1:u.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),f.current=!0},onPointerUp:(0,s.composeEventHandlers)(e.onPointerUp,e=>{f.current||e.currentTarget?.click()}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{let t=""!==p.searchRef.current;r||t&&" "===e.key||R.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ei.displayName=eo;var el=o.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:l,...c}=e,u=Z(eo,r),p=O(r),m=o.useRef(null),f=(0,i.useComposedRefs)(t,m),[x,h]=o.useState(!1),[v,g]=o.useState("");return o.useEffect(()=>{let e=m.current;e&&g((e.textContent??"").trim())},[c.children]),(0,a.jsx)(P.ItemSlot,{scope:r,disabled:n,textValue:l??v,children:(0,a.jsx)(b.Item,{asChild:!0,...p,focusable:!n,children:(0,a.jsx)(d.Primitive.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...c,ref:f,onPointerMove:(0,s.c
5omposeEventHandlers)(e.onPointerMove,eM(e=>{n?u.onItemLeave(e):(u.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,s.composeEventHandlers)(e.onPointerLeave,eM(e=>u.onItemLeave(e))),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>h(!0)),onBlur:(0,s.composeEventHandlers)(e.onBlur,()=>h(!1))})})})}),ec=o.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...o}=e;return(0,a.jsx)(ev,{scope:e.__scopeMenu,checked:r,children:(0,a.jsx)(ei,{role:"menuitemcheckbox","aria-checked":eT(r)?"mixed":r,...o,ref:t,"data-state":ek(r),onSelect:(0,s.composeEventHandlers)(o.onSelect,()=>n?.(!!eT(r)||!r),{checkForDefaultPrevented:!1})})})});ec.displayName="MenuCheckboxItem";var ed="MenuRadioGroup",[eu,ep]=D(ed,{value:void 0,onValueChange:()=>{}}),em=o.forwardRef((e,t)=>{let{value:r,onValueChange:n,...o}=e,s=(0,N.useCallbackRef)(n);return(0,a.jsx)(eu,{scope:e.__scopeMenu,value:r,onValueChange:s,children:(0,a.jsx)(en,{...o,ref:t})})});em.displayName=ed;var ef="MenuRadioItem",ex=o.forwardRef((e,t)=>{let{value:r,...n}=e,o=ep(ef,e.__scopeMenu),i=r===o.value;return(0,a.jsx)(ev,{scope:e.__scopeMenu,checked:i,children:(0,a.jsx)(ei,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":ek(i),onSelect:(0,s.c
5omposeEventHandlers)(n.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});ex.displayName=ef;var eh="MenuItemIndicator",[ev,eg]=D(eh,{checked:!1}),ew=o.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...o}=e,s=eg(eh,r);return(0,a.jsx)(w.Presence,{present:n||eT(s.checked)||!0===s.checked,children:(0,a.jsx)(d.Primitive.span,{...o,ref:t,"data-state":ek(s.checked)})})});ew.displayName=eh;var eb=o.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,a.jsx)(d.Primitive.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});eb.displayName="MenuSeparator";var ey=o.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=H(r);return(0,a.jsx)(v.Arrow,{...o,...n,ref:t})});ey.displayName="MenuArrow";var[ej,eN]=D("MenuSub"),eC="MenuSubTrigger",eE=o.forwardRef((e,t)=>{let r=z(eC,e.__scopeMenu),n=K(eC,e.__scopeMenu),l=eN(eC,e.__scopeMenu),c=Z(eC,e.__scopeMenu),d=o.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:p}=c,m={__scopeMenu:e.__scopeMenu},f=o.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return o.useEffect(()=>f,[f]),o.useEffect(()=>{let e=u.current;return()=>{window.clearTimeout(e),p(null)}},[u,p]),(0,a.jsx)(V,{asChild:!0,...m,children:(0,a.jsx)(el,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":l.contentId,"data-state":eS(r.open),...e,ref:(0,i.composeRefs)(t,l.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))}
5,onPointerMove:(0,s.composeEventHandlers)(e.onPointerMove,eM(t=>{c.onItemEnter(t),!t.defaultPrevented&&(e.disabled||r.open||d.current||(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100)))})),onPointerLeave:(0,s.composeEventHandlers)(e.onPointerLeave,eM(e=>{f();let t=r.content?.getBoundingClientRect();if(t){let n=r.content?.dataset.side,a="right"===n,o=t[a?"left":"right"],s=t[a?"right":"left"];c.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:o,y:t.top},{x:s,y:t.top},{x:s,y:t.bottom},{x:o,y:t.bottom}],side:n}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(e),e.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,t=>{let a=""!==c.searchRef.current;e.disabled||a&&" "===t.key||T[n.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});eE.displayName=eC;var eR="MenuSubContent",e_=o.forwardRef((e,t)=>{let r=q(W,e.__scopeMenu),{forceMount:n=r.forceMount,...l}=e,c=z(W,e.__scopeMenu),d=K(W,e.__scopeMenu),u=eN(eR,e.__scopeMenu),p=o.useRef(null),m=(0,i.useComposedRefs)(t,p);return(0,a.jsx)(P.Provider,{scope:e.__scopeMenu,children:(0,a.jsx)(w.Presence,{present:n||c.open,children:(0,a.jsx)(P.Slot,{scope:e.__scopeMenu,children:(0,a.jsx)(er,{id:u.contentId,"aria-labelledby":u.triggerId,...l,ref:m,align:"start",side:"rtl"===d.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{d.isUsingKeyboardRef.current&&p.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,s.composeEventHandlers)(e.onFocusOutside,e=>{e.target!==u.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:(0,s.composeEventHandlers)(e.onEscapeKeyDown,e=>{d.onClose(),e.preventDefault()}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=k[d.dir].includes(e.key);t&&r&&(c.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});function eS(e){return e?"open":"closed"}function eT(e){return"indeterminate"===e}function ek(e){return eT(e)?"indeterminate":e?"checked":"unchecked"}function eM(e){return t=>"mouse"===t.pointerType?e(t):void 0}e_.displayName=eR;var eP="DropdownMenu",[eI,eA]=(0,l.createContextScope)(eP,[L]),eD=L(),[eL,eH]=eI(eP),eO=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:i,onOpenChange:l,modal:d=!0}=e,u=eD(t),p=o.useRef(null),[m,f]=(0,c.useControllableState)({prop:s,defaultProp:i??!1,onChange:l,caller:eP});return(0,a.jsx)(eL,{scope:t,triggerId:(0,h.useId)(),triggerRef:p,contentId:(0,h.useId)(),open:m,onOpenChange:f,onOpenToggle:o.useCallback(()=>f(e=>!e),[f]),modal:d,children:(0,a.jsx)(B,{...u,open:m,onOpenChange:f,dir:n,modal:d,children:r})})};eO.displayName=eP;var eF="DropdownMenuTrigger",ez=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,l=eH(eF,r),c=eD(r);return(0,a.jsx)(V,{asChild:!0,...c,children:(0,a.jsx)(d.Primitive.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:(0,i.composeRefs)(t,l.triggerRef),onPointerDown:(0,s.composeEventHandlers)(e.onPointerDown,e=>{!n&&0===e.button&&!1===e.ctrlKey&&(l.onOpenToggle(),l.open||e.preventDefault())}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{!n&&(["Enter"," "].includes(e.key)&&l.onOpenToggle(),"ArrowDown"===e.key&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});ez.displayName=eF;var eU=e=>{let{__scopeDropdownMenu:t,...r}=e,n=eD(t);return(0,a.jsx)(Y,{...n,...r})};eU.displayName="DropdownMenuPortal";var eK="DropdownMenuContent",eB=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=eH(eK,r),l=eD(r),c=o.useRef(!1);return(0,a.jsx)(Q,{id:i.contentId,"aria-labelledby":i.triggerId,...l,...n,ref:t,onCloseAutoFocus:(0,s.composeEventHandlers)(e.onCloseAutoFocus,e=>{c.current||i.triggerRef.current?.focus(),c.current=!1,e.preventDefault()}),onInteractOutside:(0,s.composeEventHandlers)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!i.modal||n)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eB.displayName=eK;var eV=o.forwardRef((e,t)=>
5{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(en,{...o,...n,ref:t})});eV.displayName="DropdownMenuGroup";var eG=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(ea,{...o,...n,ref:t})});eG.displayName="DropdownMenuLabel";var e$=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(ei,{...o,...n,ref:t})});e$.displayName="DropdownMenuItem",o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(ec,{...o,...n,ref:t})}).displayName="DropdownMenuCheckboxItem",o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(em,{...o,...n,ref:t})}).displayName="DropdownMenuRadioGroup",o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(ex,{...o,...n,ref:t})}).displayName="DropdownMenuRadioItem",o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(ew,{...o,...n,ref:t})}).displayName="DropdownMenuItemIndicator";var eq=o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(eb,{...o,...n,ref:t})});eq.displayName="DropdownMenuSeparator",o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(ey,{...o,...n,ref:t})}).displayName="DropdownMenuArrow",o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(eE,{...o,...n,ref:t})}).displayName="DropdownMenuSubTrigger",o.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=eD(r);return(0,a.jsx)(e_,{...o,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}).displayName="DropdownMenuSubContent",e.i(78784),e.i(33565),e.i(33498);var eY=e.i(75157);function eW({...e}){return(0,a.jsx)(eO,{"data-slot":"dropdown-menu",...e})}function eX({...e}){return(0,a.jsx)(ez,{"data-slot":"dropdown-menu-trigger",...e})}function eZ({className:e,sideOffset:t=4,...r}){return(0,a.jsx)(eU,{children:(0,a.jsx)(eB,{"data-slot":"dropdown-menu-content",sideOffset:t,className:(0,eY.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function eQ({...e}){return(0,a.jsx)(eV,{"data-slot":"dropdown-menu-group",...e})}function eJ({className:e,inset:t,variant:r="default",...n}){return(0,a.jsx)(e$,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:(0,eY.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function e0({className:e,inset:t,...r}){return(0,a.jsx)(eG,{"data-slot":"dropdown-menu-label","data-inset":t,className:(0,eY.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function e1({className:e,...t}){return(0,a.jsx)(eq,{"data-slot":"dropdown-menu-separator",className:(0,eY.cn)("bg-border -mx-1 my-1 h-px",e),...t})}var e2=e.i(92199),e4=e.i(9797);let e5=(0,e.i(75254).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);var e6=e.i(22016),e3=e.i(87536),e7=e.i(99676),e9=e.i(64012);let e8=()=>{let{timeRemaining:e,formatTime:t,isSessionValid:r}=(0,e9.useSessionExpiration)();return(0,a.jsx)(a.Fragment,{children:e&&r&&(0,a.jsxs)("div",{className:"flex items-center gap-x-1 text-xs mt-2 text-secondary",children:["Su sesión expira en: ",(0,a.jsxs)("span",{className:"font-semibold",children:[" ",t]})]})})};var te=e.i(79342);let tt=[{link:"/account",title:"Mi Cuenta"},{link:"/account/orders",title:"Mis Pedidos"},{link:"/account/address",title:"Mis Direcciones"},{link:"/account/wishlist",title:"Mis Favoritos"}];var tr=e.i(44467),tn=e.i(77677),ta=e.i(38461),to=e.i(70853),ts=e.i(12882),ti=e.i(49775),tl=e.i(46944),tc=e.i(24034);e.s(["SessionNav",0,()=>{let{user:e,isValidClientToShow:t}=(0,e3.useSessionStore)((0,tl.useShallow)(e=>({user:e.user,isValidClientToShow:e.isValidClientToShow()}))),[r,n]=(0,o.useState)(!0),s=(0,tr.serializeNumber)(Math.floor(Number(e?.points)||0)),i=Number((0,tr.serializeNumber)(Math.floor(Number(e?.pen
5ding_points)||0))),{onLogout:l}=(0,ti.useLogout)();return(0,o.useEffect)(()=>{n(!1)},[e]),(0,o.useEffect)(()=>{!r&&e&&(0,ts.pushLogin)({method:"login"})},[e,r]),(0,a.jsx)(a.Fragment,{children:!r&&(e?(0,a.jsxs)(eW,{children:[(0,a.jsx)(eX,{asChild:!0,children:(0,a.jsxs)(te.UiButton,{variant:"ghost",className:"hidden md:flex items-center gap-2 hover:bg-transparent focus-visible:ring-0 animate-fade",children:[(0,a.jsx)(e7.Avatar,{className:"shrink-0 size-8",children:(0,a.jsxs)(e7.AvatarFallback,{className:"bg-radial from-brand-950 to-primary text-brand-100",children:[e?.first_name&&e.first_name[0],e?.last_name&&e.last_name[0]]})}),(0,a.jsxs)("div",{className:"flex flex-col items-start min-w-0 max-w-37.5",children:[(0,a.jsx)("span",{className:"text-foreground text-sm font-semibold truncate w-full text-left",children:e?.first_name}),tn.IS_POINTS_ENABLED&&t&&(0,a.jsxs)("span",{className:"text-[11px] text-paragraph-base text-right -mt-0.5 flex gap-1 items-center",children:[i>0&&(0,a.jsx)(ta.PendingPoints,{pendingPoints:i}),s," Puntos"]})]}),(0,a.jsx)(e4.ChevronDownIcon,{size:16,className:"opacity-60 shrink-0","aria-hidden":"true"})]})}),(0,a.jsxs)(eZ,{className:"w-56",children:[(0,a.jsxs)(e0,{className:"flex min-w-0 flex-col",children:[e?.email&&(0,a.jsx)("span",{className:"text-muted-foreground truncate text-xs font-normal",children:e?.email}),(0,a.jsx)(e8,{})]}),(0,a.jsx)(e1,{}),(0,a.jsx)(eQ,{children:tt.filter(e=>e.link).map((e,t)=>(0,a.jsx)(eJ,{asChild:!0,className:"cursor-pointer hover:bg-gray-100!",children:(0,a.jsx)(e6.default,{prefetch:!1,href:e.link,children:e.title})},t))}),(0,a.jsx)(e1,{}),(0,a.jsxs)(eJ,{onClick:l,className:"cursor-pointer hover:bg-gray-100!",children:[(0,a.jsx)(e5,{}),(0,a.jsx)("span",{children:"Salir"})]})]})]}):(0,a.jsxs)("div",{className:"flex items-center gap-x-5 animate-fade font-semibold",children:[tn.REGISTER_URL&&(0,a.jsx)(te.UiButton,{variant:"secondary",size:"sm",children:(0,a.jsx)(tc.SacaTuTarjetaLink,{ubicacion:"header",className:"flex flex-row items-center gap-x-2",children:to.NAV.REGISTER})}),(0,a.jsx)(te.UiButton,{className:"hidden md:flex",variant:"ghost",size:"sm",children:(0,a.jsx)(e6.default,{prefetch:!1,href:tn.LOGIN_URL,rel:"noopener noreferrer",className:"text-primary flex flex-row items-center gap-x-2",children:(0,a.jsx)(e2.FiUser,{className:"size-6"})})})]}))})}],66354)},76997,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(74080),a=e.i(30030),o=e.i(81140),s=e.i(48425),i=e.i(69340),l=e.i(20783),c=e.i(86318),d=e.i(96626),u=e.i(10772),p=e.i(75830),m=e.i(26330),f=e.i(99682),x=e.i(34620),h=e.i(30207),v=e.i(59411),g="NavigationMenu",[w,b,y]=(0,p.createCollection)(g),[j,N,C]=(0,p.createCollection)(g),[E,R]=(0,a.createContextScope)(g,[y,C]),[_,S]=E(g),[T,k]=E(g),M=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,value:o,onValueChange:d,defaultValue:u,delayDuration:p=200,skipDelayDuration:m=300,orientation:f="horizontal",dir:x,...h}=e,[v,w]=r.useState(null),b=(0,l.useComposedRefs)(n,e=>w(e)),y=(0,c.useDirection)(x),j=r.useRef(0),N=r.useRef(0),C=r.useRef(0),[E,R]=r.useState(!0),[_,S]=(0,i.useControllableState)({prop:o,onChange:e=>{let t=m>0;""!==e?(window.clearTimeout(C.current),t&&R(!1)):(window.clearTimeout(C.current),C.current=window.setTimeout(()=>R(!0),m)),d?.(e)},defaultProp:u??"",caller:g}),T=r.useCallback(()=>{window.clearTimeout(N.current),N.current=window.setTimeout(()=>S(""),150)},[S]),k=r.useCallback(e=>{window.clearTimeout(N.current),S(e)},[S]),M=r.useCallback(e=>{_===e?window.clearTimeout(N.current):j.current=window.setTimeout(()=>{window.clearTimeout(N.current),S(e)},p)},[_,S,p]);return r.useEffect(()=>()=>{window.clearTimeout(j.current),window.clearTimeout(N.current),window.clearTimeout(C.current)},[]),(0,t.jsx)(I,{scope:a,isRootMenu:!0,value:_,dir:y,orientation:f,rootNavigationMenu:v,onTriggerEnter:e=>{window.clearTimeout(j.current),E?M(e):k(e)},onTriggerLeave:()=>{window.clearTimeout(j.current),T()},onContentEnter:()=>window.clearTimeout(N.current),onContentLeave:T,onItemSelect:e=>{S(t=>t===e?"":e)},onItemDismiss:()=>S(""),children:(0,t.jsx)(s.Primitive.nav,{"aria-label":"Main","data-orientation":f,dir:y,...h,ref:b})})});M.displayName=g;var P="NavigationMenuSub";r.forwardRef((e,r)=>{let{__scopeNavigationMenu:n,value:a,onValueChange:o,defaultValue:l,orientation:c="horizontal",...d}=e,u=S(P,n),[p,m]=(0,i.useControllableState)({prop:a,onChange:o,defaultProp:l??"",caller:P});return(0,t.jsx)(I,{scope:n,isRootMenu:!1,value:p,dir:u.dir,orientation:c,rootNavigationMenu:u.rootNavigationMenu,onTriggerEnter:e=>m(e),onItemSelect:e=>m(e),onItemDismiss:()=>m(""),children:(0,t.jsx)(s.Primitive.div,{"data-orientation":c,...d,ref:r})})}).displayName=P;var I=e=>{let{scope:n,isRootMenu:a,rootNavigationMenu:o,dir:s,orientation:i,children:l,value:c,onItemSelect:d,onItemDismiss:p,onTriggerEnter:m,onTriggerLeave:x,onContentEnter:v,onContentLeave:g}=e,[b,y]=r.useState(null),[j,N]=r.useState(new Map),[C,E]=r.useState(null);return(0,t.jsx)(_,{scope:n,isRootMenu:a,rootNavigationMenu:o,value:c,previousValue:(0,f.usePrevious)(c),baseId:(0,u.useId)(),dir:s,orientation:i,viewport:b,onViewportChange:y,indicatorTrack:C,onIndicatorTrackChange:E,onTriggerEnter:(0,h.useCallbackRef)(m),onTriggerLeave:(0,h.useCallbackRef)(x),onContentEnter:(0,h.useCallbackRef)(v),onContentLeave:(0,h.useCallbackRef)(g),onItemSelect:(0,h.useCallbackRef)(d),onItemDismiss:(0,h.useCallbackRef)(p),onViewportContentChange:r.useCallback((e,t)=>{N(r=>(r.set(e,t),new Map(r)))},[]),onViewportContentRemove:r.useCallback(e=>{N(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,t.jsx)(w.Provider,{scope:n,children:(0,t.jsx)(T,{scope:n,items:j,children:l})})})},A="NavigationMenuList",D=r.forwardRef((e,r)=>{let{__scopeNavigationMenu:n,...a}=e,o=S(A,n),i=(0,t.jsx)(s.Primitive.ul,{"data-orientation":o.orientation,...a,ref:r});return(0,t.jsx)(s.Primitive.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:(0,t.jsx)(w.Slot,{scope:n,children:o.isRootMenu?(0,t.jsx)(J,{asChild:!0,children:i}):i}
5)})});D.displayName=A;var L="NavigationMenuItem",[H,O]=E(L),F=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,value:o,...i}=e,l=(0,u.useId)(),c=r.useRef(null),d=r.useRef(null),p=r.useRef(null),m=r.useRef(()=>{}),f=r.useRef(!1),x=r.useCallback((e="start")=>{if(c.current){m.current();let t=er(c.current);t.length&&en("start"===e?t:t.reverse())}},[]),h=r.useCallback(()=>{if(c.current){var e;let t=er(c.current);t.length&&((e=t).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),m.current=()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute("tabindex",t)})})}},[]);return(0,t.jsx)(H,{scope:a,value:o||l||"LEGACY_REACT_AUTO_VALUE",triggerRef:d,contentRef:c,focusProxyRef:p,wasEscapeCloseRef:f,onEntryKeyDown:x,onFocusProxyEnter:x,onRootContentClose:h,onContentFocusOutside:h,children:(0,t.jsx)(s.Primitive.li,{...i,ref:n})})});F.displayName=L;var z="NavigationMenuTrigger",U=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,disabled:i,...c}=e,d=S(z,e.__scopeNavigationMenu),u=O(z,e.__scopeNavigationMenu),p=r.useRef(null),m=(0,l.useComposedRefs)(p,u.triggerRef,n),f=es(d.baseId,u.value),x=ei(d.baseId,u.value),h=r.useRef(!1),g=r.useRef(!1),b=u.value===d.value;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.ItemSlot,{scope:a,value:u.value,children:(0,t.jsx)(et,{asChild:!0,children:(0,t.jsx)(s.Primitive.button,{id:f,disabled:i,"data-disabled":i?"":void 0,"data-state":eo(b),"aria-expanded":b,"aria-controls":x,...c,ref:m,onPointerEnter:(0,o.composeEventHandlers)(e.onPointerEnter,()=>{g.current=!1,u.wasEscapeCloseRef.current=!1}),onPointerMove:(0,o.composeEventHandlers)(e.onPointerMove,el(()=>{i||g.current||u.wasEscapeCloseRef.current||h.current||(d.onTriggerEnter(u.value),h.current=!0)})),onPointerLeave:(0,o.composeEventHandlers)(e.onPointerLeave,el(()=>{i||(d.onTriggerLeave(),h.current=!1)})),onClick:(0,o.composeEventHandlers)(e.onClick,()=>{d.onItemSelect(u.value),g.current=b}),onKeyDown:(0,o.composeEventHandlers)(e.onKeyDown,e=>{let t={horizontal:"ArrowDown",vertical:"rtl"===d.dir?"ArrowLeft":"ArrowRight"}[d.orientation];b&&e.key===t&&(u.onEntryKeyDown(),e.preventDefault())})})})}),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Root,{"aria-hidden":!0,tabIndex:0,ref:u.focu
5sProxyRef,onFocus:e=>{let t=u.contentRef.current,r=e.relatedTarget,n=r===p.current,a=t?.contains(r);(n||!a)&&u.onFocusProxyEnter(n?"start":"end")}}),d.viewport&&(0,t.jsx)("span",{"aria-owns":x})]})]})});U.displayName=z;var K="navigationMenu.linkSelect";r.forwardRef((e,r)=>{let{__scopeNavigationMenu:n,active:a,onSelect:i,...l}=e;return(0,t.jsx)(et,{asChild:!0,children:(0,t.jsx)(s.Primitive.a,{"data-active":a?"":void 0,"aria-current":a?"page":void 0,...l,ref:r,onClick:(0,o.composeEventHandlers)(e.onClick,e=>{let t=e.target,r=new CustomEvent(K,{bubbles:!0,cancelable:!0});if(t.addEventListener(K,e=>i?.(e),{once:!0}),(0,s.dispatchDiscreteCustomEvent)(t,r),!r.defaultPrevented&&!e.metaKey){let e=new CustomEvent(Y,{bubbles:!0,cancelable:!0});(0,s.dispatchDiscreteCustomEvent)(t,e)}},{checkForDefaultPrevented:!1})})})}).displayName="NavigationMenuLink";var B="NavigationMenuIndicator";r.forwardRef((e,r)=>{let{forceMount:a,...o}=e,s=S(B,e.__scopeNavigationMenu),i=!!s.value;return s.indicatorTrack?n.default.createPortal((0,t.jsx)(d.Presence,{present:a||i,children:(0,t.jsx)(V,{...o,ref:r})}),s.indicatorTrack):null}).displayName=B;var V=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,...o}=e,i=S(B,a),l=b(a),[c,d]=r.useState(null),[u,p]=r.useState(null),m="horizontal"===i.orientation,f=!!i.value;r.useEffect(()=>{let e=l(),t=e.find(e=>e.value===i.value)?.ref.current;t&&d(t)},[l,i.value]);let x=()=>{c&&p({size:m?c.offsetWidth:c.offsetHeight,offset:m?c.offsetLeft:c.offsetTop})};return ea(c,x),ea(i.indicatorTrack,x),u?(0,t.jsx)(s.Primitive.div,{"aria-hidden":!0,"data-state":f?"visible":"hidden","data-orientation":i.orientation,...o,ref:n,style:{position:"absolute",...m?{left:0,width:u.size+"px",transform:`translateX(${u.offset}px)`}:{top:0,height:u.size+"px",transform:`translateY(${u.offset}px)`},...o.style}}):null}),G="NavigationMenuContent",$=r.forwardRef((e,r)=>{let{forceMount:n,...a}=e,s=S(G,e.__scopeNavigationMenu),i=O(G,e.__scopeNavigationMenu),c=(0,l.useComposedRefs)(i.contentRef,r),u=i.value===s.value,p={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...a};return s.viewport?(0,t.jsx)(q,{forceMount:n,...p,ref:c}):(0,t.jsx)(d.Presence,{present:n||u,children:(0,t.jsx)(W,{"data-state":eo(u),...p,ref:c,onPointerEnter:(0,o.composeEventHandlers)(e.onPointerEnter,s.onContentEnter),onPointerLeave:(0,o.composeEventHandlers)(e.onPointerLeave,el(s.onContentLeave)),style:{pointerEvents:!u&&s.isRootMenu?"none":void 0,...p.style}})})});$.displayName=G;var q=r.forwardRef((e,t)=>{let{onViewportContentChange:r,onViewportContentRemove:n}=S(G,e.__scopeNavigationMenu);return(0,x.useLayoutEffect)(()=>{r(e.value,{ref:t,...e})},[e,t,r]),(0,x.useLayoutEffect)(()=>()=>n(e.value),[e.value,n]),null}),Y="navigationMenu.rootContentDismiss",W=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,value:s,triggerRef:i,focusProxyRef:c,wasEscapeCloseRef:d,onRootContentClose:u,onContentFocusOutside:p,...f}=e,x=S(G,a),h=r.useRef(null),v=(0,l.useComposedRefs)(h,n),g=es(x.baseId,s),w=ei(x.baseId,s),y=b(a),j=r.useRef(null),{onItemDismiss:N}=x;r.useEffect(()=>{let e=h.current;if(x.isRootMenu&&e){let t=()=>{N(),u(),e.contains(document.activeElement)&&i.current?.focus()};return e.addEventListener(Y,t),()=>e.removeEventListener(Y,t)}},[x.isRootMenu,e.value,i,N,u]);let C=r.useMemo(()=>{let e=y().map(e=>e.value);"rtl"===x.dir&&e.reverse();let t=e.indexOf(x.value),r=e.indexOf(x.previousValue),n=s===x.value,a=r===e.indexOf(s);if(!n&&!a)return j.current;let o=(()=>{if(t!==r){if(n&&-1!==r)return t>r?"from-end":"from-start";if(a&&-1!==t)return t>r?"to-start":"to-end"}return null})();return j.current=o,o},[x.previousValue,x.value,x.dir,y,s]);return(0,t.jsx)(J,{asChild:!0,children:(0,t.jsx)(m.DismissableLayer,{id:w,"aria-labelledby":g,"data-motion":C,"data-orientation":x.orientation,...f,ref:v,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(Y,{bubbles:!0,cancelable:!0});h.current?.dispatchEvent(e)},onFocusOutside:(0,o.composeEventHandlers)(e.onFocusOutside,e=>{p();let t=e.target;x.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:(0,o.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.target,r=y().some(e=>
5e.ref.current?.contains(t)),n=x.isRootMenu&&x.viewport?.contains(t);(r||n||!x.isRootMenu)&&e.preventDefault()}),onKeyDown:(0,o.composeEventHandlers)(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){let t=er(e.currentTarget),r=document.activeElement,n=t.findIndex(e=>e===r);en(e.shiftKey?t.slice(0,n).reverse():t.slice(n+1,t.length))?e.preventDefault():c.current?.focus()}}),onEscapeKeyDown:(0,o.composeEventHandlers)(e.onEscapeKeyDown,e=>{d.current=!0})})})}),X="NavigationMenuViewport",Z=r.forwardRef((e,r)=>{let{forceMount:n,...a}=e,o=!!S(X,e.__scopeNavigationMenu).value;return(0,t.jsx)(d.Presence,{present:n||o,children:(0,t.jsx)(Q,{...a,ref:r})})});Z.displayName=X;var Q=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,children:i,...c}=e,u=S(X,a),p=(0,l.useComposedRefs)(n,u.onViewportChange),m=k(G,e.__scopeNavigationMenu),[f,x]=r.useState(null),[h,v]=r.useState(null),g=f?f?.width+"px":void 0,w=f?f?.height+"px":void 0,b=!!u.value,y=b?u.value:u.previousValue;return ea(h,()=>{h&&x({width:h.offsetWidth,height:h.offsetHeight})}),(0,t.jsx)(s.Primitive.div,{"data-state":eo(b),"data-orientation":u.orientation,...c,ref:p,style:{pointerEvents:!b&&u.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":g,"--radix-navigation-menu-viewport-height":w,...c.style},onPointerEnter:(0,o.composeEventHandlers)(e.onPointerEnter,u.onContentEnter),onPointerLeave:(0,o.composeEventHandlers)(e.onPointerLeave,el(u.onContentLeave)),children:Array.from(m.items).map(([e,{ref:r,forceMount:n,...a}])=>{let o=y===e;return(0,t.jsx)(d.Presence,{present:n||o,children:(0,t.jsx)(W,{...a,ref:(0,l.composeRefs)(r,e=>{o&&e&&v(e)})})},e)})})}),J=r.forwardRef((e,r)=>{let{__scopeNavigationMenu:n,...a}=e,o=S("FocusGroup",n);return(0,t.jsx)(j.Provider,{scope:n,children:(0,t.jsx)(j.Slot,{scope:n,children:(0,t.jsx)(s.Primitive.div,{dir:o.dir,...a,ref:r})})})}),ee=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],et=r.forwardRef((e,r)=>{let{__scopeNavigationMenu:n,...a}=e,i=N(n),l=S("FocusGroupItem",n);return(0,t.jsx)(j.ItemSlot,{scope:n,children:(0,t.jsx)(s.Primitive.button,{...a,ref:r,onKeyDown:(0,o.composeEventHandlers)(e.onKeyDown,e=>{if(["Home","End",...ee].includes(e.key)){let t=i().map(e=>e.ref.current);if(["rtl"===l.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),ee.includes(e.key)){let r=t.indexOf(e.currentTarget);t=t.slice(r+1)}setTimeout(()=>en(t)),e.preventDefault()}})})})});function er(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function en(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function ea(e,t){let r=(0,h.useCallbackRef)(t);(0,x.useLayoutEffect)(()=>{let t=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}function eo(e){return e?"open":"closed"}function es(e,t){return`${e}-trigger-${t}`}function ei(e,t){return`${e}-content-${t}`}function el(e){return t=>"mouse"===t.pointerType?e(t):void 0}var ec=e.i(25913),ed=e.i(9797),eu=e.i(75157);function ep({className:e,children:r,viewport:n=!0,...a}){return(0,t.jsxs)(M,{"data-slot":"navigation-menu","data-viewport":n,className:(0,eu.cn)("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),suppressHydrationWarning:!0,...a,children:[r,n&&(0,t.jsx)(eg,{})]})}function em({className:e,...r}){return(0,t.jsx)(D,{"data-slot":"navigation-menu-list",className:(0,eu.cn)("group flex flex-1 list-none items-center justify-center gap-1",e),...r})}function ef({className:e,...r}){return(0,t.jsx)(F,{"data-slot":"navigation-menu-item",className:(0,eu.cn)("relative",e),...r})}let ex=(0,ec.cva)("group inline-flex text-center h-auto items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 ring-ring/10 dark:ring-ring/20 dark:outline-ring/40 outline-ring/50 transition-[color,box-shadow] focu
5s-visible:ring-4 focus-visible:outline-1");function eh({className:e,children:r,...n}){return(0,t.jsxs)(U,{"data-slot":"navigation-menu-trigger",className:(0,eu.cn)(ex(),"group",e),suppressHydrationWarning:!0,...n,children:[r," ",(0,t.jsx)(ed.ChevronDownIcon,{className:"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function ev({className:e,...r}){return(0,t.jsx)($,{"data-slot":"navigation-menu-content",className:(0,eu.cn)("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",e),...r})}function eg({className:e,...r}){return(0,t.jsx)("div",{className:(0,eu.cn)("absolute top-full left-0 isolate z-50 flex justify-center"),children:(0,t.jsx)(Z,{"data-slot":"navigation-menu-viewport",className:(0,eu.cn)("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",e),...r})})}var ew=e.i(22016),eb=e.i(87646),ey=e.i(91125);e.s(["Navbar",0,({menu:e})=>{let[n,a]=(0,r.useState)(""),o=e=>{let t=(0,ey.buildMenuOperation)(e);t&&(0,eb.fireTmMenuPrincipal)({operacion_clickeada:t})};return e?(0,t.jsx)("div",{className:"hidden w-full max-w-7xl mx-auto md:block p-1",children:(0,t.jsx)(ep,{value:n,onValueChange:a,className:"w-full max-w-none flex-none justify-start [&>div]:w-full",children:(0,t.jsx)(em,{className:"w-full flex-none justify-between gap-0",children:e&&e.map((e,r)=>(0,t.jsx)(ef,{value:`nav-item-${r}`,children:e.childs.length?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eh,{className:"uppercase bg-primary text-white focus:bg-primary focus:text-white hover:underline-offset-8 hover:bg-primary hover:text-white data-[state=open]:bg-primary data-[state=open]:hover:bg-primary data-[state=open]:focus:bg-primary data-[state=open]:text-white hover:underline hover:decoration-secondary-500 data-[state=open]:underline data-[state=open]:decoration-secondary-500 data-[state=open]:underline-offset-8",children:e.url?.length?(0,t.jsx)(ew.default,{href:e.url,prefetch:!1,onClick:()=>o([e.title||e.name]),children:e.title}):e.title}),(0,t.jsx)(ev,{children:(0,t.jsx)("ul",{className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3 max-w-7xl w-svw mx-auto p-3 border-t-4 border-secondary-700",children:e.childs.map((r,n)=>(0,t.jsxs)("li",{className:"flex flex-col w-full",children:[(0,t.jsx)(ew.default,{prefetch:!1,className:"font-semibold mb-2 text-secondary-700 hover:text-secondary-900",href:r.url,onClick:()=>{o([e.title||e.name,r.title||r.name]),a("")},children:r.name}),(0,t.jsx)("ul",{children:r.childs.map((n,s)=>(0,t.jsx)("li",{children:(0,t.jsx)(ew.default,{prefetch:!1,className:"text-paragraph-base hover:font-semibold hover:text-secondary-600 mb-2",href:n.url,onClick:()=>{o([e.title||e.name,r.title||r.name,n.title||n.name]),a("")},children:n.name})},s))})]},n))})})]}):(0,t.jsx)(ew.default,{prefetch:!1,href:e.url,passHref:!0,onClick:()=>o([e.title||e.name]),className:(0,eu.cn)(ex(),"uppercase bg-primary text-white hover:underline-offset-8 hover:bg-primary hover:text-white data-[state=open]:bg-primary data-[state=open]:hover:bg-primary data-[state=open]:focus:bg-primary data-[state=open]:text-white hover:underline hover:decoration-secondary-500 data-[state=open]:underline data-[state=open]:decoration-secondary-500 data-[state=open]:underline-offset-8"),children:e.title})},r))})})}):null}],76997)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.