import{a as st}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-FHIYLRJA.js";import{d as ot,e as it}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-ZKYLEAWH.js";import{b as He}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-VQGZ5WPJ.js";import{a as kt}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-TKPZJZZF.js";import{a as tt}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-JVKNTGXC.js";import{$ as _,A as Je,B as Xe,C as Ze,F as ae,P as et,T as nt,U as rt,V as at,e as Ye,g as Y,k as ye,u as xe,z as Ve}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-4WGLXVPZ.js";import{c as ve,d as we,f as Oe,g as Qe,j as Pe,s as Se}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-PYETN2HX.js";import{a as qe}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-J44IZTW2.js";import{b as Ke}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-GFXNKJ5U.js";import{a as N}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-FWBXOOCE.js";import{a as be,g as oe}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-YAHMRLQ4.js";import{a as P}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-34QOOIQ4.js";import{a as $e,e as ze,o as ue,t as re,u as De,x as Ge}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-C4I3W2OX.js";import{a as y}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-LL6AKNEK.js";import{a as U}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-LQ2PFFE3.js";import{d as m}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-H7QMOPDN.js";var se=m(U());function Ct(t){return Bt(t)||Ht(t)||Ot(t)||Lt()}function Lt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ot(t,e){if(t){if(typeof t=="string")return Be(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Be(t,e)}}function Ht(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Bt(t){if(Array.isArray(t))return Be(t)}function Be(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:ve;return we(e,_t()),function(r){var i=r||{},l=i.escapeHTML,p=l===void 0?!0:l,u=i.transformItems,s=u===void 0?function(c){return c}:u,f,d;return{$$type:"ais.hits",init:function(a){e(q(q({},this.getWidgetRenderState(a)),{},{instantSearchInstance:a.instantSearchInstance}),!0)},render:function(a){var o=this.getWidgetRenderState(a);e(q(q({},o),{},{instantSearchInstance:a.instantSearchInstance}),!1),o.sendEvent("view:internal",o.hits)},getRenderState:function(a,o){return q(q({},a),{},{hits:this.getWidgetRenderState(o)})},getWidgetRenderState:function(a){var o=a.results,h=a.helper,v=a.instantSearchInstance;if(f||(f=Ve({instantSearchInstance:v,index:h.getIndex(),widgetType:this.$$type})),d||(d=Je({index:h.getIndex(),widgetType:this.$$type,instantSearchInstance:v})),!o)return{hits:[],results:void 0,sendEvent:f,bindEvent:d,widgetParams:r};p&&o.hits.length>0&&(o.hits=Qe(o.hits));var S=Xe(o.hits,o.page,o.hitsPerPage),k=Ze(S,o.queryID),E=s(k,{results:o});return{hits:E,results:o,sendEvent:f,bindEvent:d,widgetParams:r}},dispose:function(a){var o=a.state;return n(),p?o.setQueryParameters(Object.keys(Oe).reduce(function(h,v){return q(q({},h),{},ct({},v,void 0))},{})):o},getWidgetSearchParameters:function(a){return p?a.setQueryParameters(Oe):a}}}},ut=Ft;function ft(t,e){return Se(ut,t,e)}function de(t){return de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(t)}function Wt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dt(t,e){for(var n=0;n=i-r?l-(i-n):r}},{key:"isLastPage",value:function(){return this.currentPage===this.total-1||this.total===0}},{key:"isFirstPage",value:function(){return this.currentPage===0}}]),t}(),pt=$t;function me(t){return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(t)}function gt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function K(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:ve;return we(e,Yt()),function(r){var i=r||{},l=i.totalPages,p=i.padding,u=p===void 0?3:p,s=new pt({currentPage:0,total:0,padding:u}),f={};function d(c){var a=c.nbPages;return l!==void 0?Math.min(l,a):a}return{$$type:"ais.pagination",init:function(a){var o=a.instantSearchInstance;e(K(K({},this.getWidgetRenderState(a)),{},{instantSearchInstance:o}),!0)},render:function(a){var o=a.instantSearchInstance;e(K(K({},this.getWidgetRenderState(a)),{},{instantSearchInstance:o}),!1)},dispose:function(a){var o=a.state;return n(),o.setQueryParameter("page",void 0)},getWidgetUiState:function(a,o){var h=o.searchParameters,v=h.page||0;return v?K(K({},a),{},{page:v+1}):a},getWidgetSearchParameters:function(a,o){var h=o.uiState,v=h.page?h.page-1:0;return a.setQueryParameter("page",v)},getWidgetRenderState:function(a){var o=a.results,h=a.helper,v=a.state,S=a.createURL;f.refine||(f.refine=function(T){h.setPage(T),h.search()}),f.createURL||(f.createURL=function(T){return function(B){return S(T.setPage(B))}});var k=v.page||0,E=d(o||{nbPages:0});return s.currentPage=k,s.total=E,{createURL:f.createURL(v),refine:f.refine,canRefine:E>1,currentRefinement:k,nbHits:o?.nbHits||0,nbPages:E,pages:o?s.pages():[],isFirstPage:s.isFirstPage(),isLastPage:s.isLastPage(),widgetParams:r}},getRenderState:function(a,o){return K(K({},a),{},{pagination:this.getWidgetRenderState(o)})}}}},ht=qt;function bt(t,e){return Se(ht,t,e)}var wt=m(kt());var Q=m(U());var pe=m(y()),yt=({src:t,preloader:e,width:n,height:r,className:i,objectFit:l="cover",hideMainImage:p=!1,alt:u,...s})=>(0,pe.jsxs)("div",{className:"relative flex",children:[!p&&(0,pe.jsx)(oe,{src:t,alt:u||"",width:n,height:r,className:P(i,"absolute left-0 top-0 z-10",l),...s}),(0,pe.jsx)("img",{className:`${i} overflow-hidden`,style:n&&r?{aspectRatio:n/r}:{},width:n,height:r,src:e||_.medshopPlugImg,alt:u||""})]});var L=m(y()),xt=({orientation:t,backgroundToggle:e,hotOffer:n,builder:r})=>(0,L.jsxs)(L.Fragment,{children:[n?.toggle&&(0,L.jsx)("div",{className:P("flex h-full justify-center overflow-hidden",t==="sm:flex-col"?"w-full":"",t==="sm:flex-col md:flex-row"?"w-full md:flex-grow":"",t==="sm:flex-col-reverse md:flex-row-reverse"?"w-full md:w-1/2":"",t==="sm:flex-col-reverse"?"w-full":""),children:!e&&n?.file&&(0,L.jsxs)("video",{height:"auto",width:"100%",autoPlay:!0,controls:!1,preload:"auto",loop:!0,muted:!0,playsInline:!0,poster:n?.image?.url?r.auto("format").width(390).height(365).image(n?.image?.url).quality(80).url():"",children:[(0,L.jsx)("source",{src:n.file.asset.url,type:n.file.asset.mimeType}),(0,L.jsx)("track",{kind:"caption",src:"foo.en.vtt",srcLang:"en",label:"English"})]})}),!n?.toggle&&n?.image&&(0,L.jsx)(L.Fragment,{children:(0,L.jsx)("div",{id:"image",className:P("flex h-full justify-center overflow-hidden",t==="sm:flex-col"?"w-full":"",t==="sm:flex-col md:flex-row"?"w-full md:flex-grow":"",t==="sm:flex-col-reverse md:flex-row-reverse"?"w-full md:w-1/2":"",t==="sm:flex-col-reverse"?"w-full":""),children:n?.image&&(0,L.jsx)("div",{className:"flex h-[150px] flex-col md:h-full md:w-auto",children:n?.link?.slug?(0,L.jsx)(ue,{to:n?.link?.slug||"/",children:(0,L.jsx)(yt,{preloader:n?.image?.blurDataURL,alt:"hotOffer",loading:"eager",src:n?.image?.url?r.auto("format").width(390).height(365).image(n?.image?.url).quality(80).url():"",height:365,width:390,className:"h-full max-h-full transform cursor-pointer object-contain transition duration-300 hover:scale-110"})}):(0,L.jsx)(oe,{alt:"hotOffer",loading:"eager",fetchpriority:"high",src:n?.image?.url?r.auto("format").image(n?.image?.url).quality(80).width(390).height(365).url():"",width:500,className:"h-full max-h-full transform object-contain transition duration-300 hover:scale-110"})})})})]});var $=m(y()),vt=({logo:t,logoSideText:e,brand:n,textColor:r,paddingRight:i})=>t||e?.length?(0,$.jsxs)("div",{className:P("flex items-center gap-1.5",n?" order-1":"z-[1] order-2"),style:{paddingRight:i},children:[t?.url&&(0,$.jsx)(oe,{loading:"eager",alt:"logo",src:t?.url||"",aspectRatio:"auto",className:P("!w-fit min-w-[44px]",n?"h-17":"h-11")}),(0,$.jsx)("div",{className:"flex flex-col justify-center gap-[3px]",children:!!e?.length&&e?.map(l=>(0,$.jsx)(N.P2,{style:{color:r||"white"},className:"flex w-full whitespace-normal break-words !font-[400] !leading-[1.1] md:!font-[700]",children:l},l))})]}):(0,$.jsx)($.Fragment,{});var I=m(y()),Te=(0,Q.memo)(({sanityProjectId:t,sanityDataset:e,collectionHeader:n,brand:r})=>{let[i,l]=(0,Q.useState)(0),p=n?.icon,u=n?.iconSideText,s=n?.background,f=n?.name,d=n?.info,c=n?.orientation??"sm:flex-col md:flex-row",a=n?.textColor?.hex,o=n?.textShadow,h=n?.nameAlign,v=n?.infoAlign,S=`${i>960&&n?.paddingRight||0}px`,k=n?.hotOffer,E=n?.blur,T=!p&&!f&&!d?!0:n.preserveRatio,B=n?.backgroundToggle,le=n?.videoBackground?.asset?.url,z=n?.videoBackground?.asset?.mimeType,ce=(0,wt.default)({projectId:t,dataset:e}),D=s?ce.auto("format").height(365).width(1296).image(s?.url).quality(80).url():"",M={background:E?`linear-gradient(116deg, rgba(142, 65, 0, 0.20) 0%, rgba(0, 0, 0, 0.00) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.00) 100%), url(${D})`:`url(${D})`,filter:E?"blur(20px)":"none"},W=(0,Q.useMemo)(()=>T?`${s?.width}/${s?.height}`:(r,"auto"),[s]);return(0,Q.useEffect)(()=>{let C=ye(()=>{l(window.innerWidth)},250);return window.addEventListener("resize",C),C(),()=>window.removeEventListener("resize",C)},[]),(f||d||k||s)&&(0,I.jsxs)("div",{id:"collection_header",className:P("relative flex h-full w-full items-start overflow-hidden rounded-lg",c==="sm:flex-col md:flex-row"?"flex-row":c,c==="sm:flex-col md:flex-row"&&!T?"h-[325px] md:h-[365px]":"0",r?"mb-0":"",T&&r&&"lg:aspect-[auto]",T&&!r&&`lg:aspect-[${W}]`,!T&&"lg:aspect-[952/264]",B&&!p?.url&&"min-h-[148px]"),style:{aspectRatio:W},children:[B&&(0,I.jsxs)("video",{autoPlay:!0,controls:!1,preload:"auto",style:{position:"absolute",left:0,top:0,height:"100%",width:"100%",objectFit:"cover"},loop:!0,muted:!0,playsInline:!0,poster:s?.url||"",children:[(0,I.jsx)("source",{src:le,type:z}),(0,I.jsx)("track",{kind:"caption",src:"foo.en.vtt",srcLang:"en",label:"English"})]}),(f||d)&&(0,I.jsxs)("div",{className:P("flex gap-4 px-4 py-3 smm:p-6 md:p-8",c==="sm:flex-col"&&"flex-col md:w-full",c==="sm:flex-col md:flex-row"&&"h-full w-full flex-col md:justify-between md:pr-0",c==="sm:flex-col-reverse md:flex-row-reverse"&&"w-full flex-col-reverse md:w-1/2",c==="sm:flex-col-reverse"&&"flex-col-reverse md:w-full",r?"md:gap-4":"justify-between",T&&"absolute h-full w-full"),children:[(0,I.jsxs)("div",{className:P("z-[1] flex w-full flex-col gap-4",c==="sm:flex-col"||c==="sm:flex-col-reverse"&&"items-center",r?"order-2":"order-1 lg:w-[626px]"),style:{paddingRight:S},children:[f&&(0,I.jsx)(N.H2,{className:P("!text-[13px] font-bold tracking-[-0.72px] 2sm:!text-lg md:!text-2xl md:tracking-[-1.44px]",r?"flex self-start leading-[28.8px] lg:!text-[32px] lg:leading-[40px]":"leading-[120%] md:!text-[36px] lg:!text-[48px]",o?"drop-shadow-md":""),style:{color:a||"white",textAlign:h||"left"},children:f}),d&&(0,I.jsx)(N.P2,{style:{color:a||"white",textAlign:v||"left"},className:P("!text-sm !font-[400] !leading-[140%] !tracking-[0] ",o?"drop-shadow-md":""),children:d})]}),(0,I.jsx)(vt,{logoSideText:u,logo:p,brand:!!r,textColor:a,paddingRight:S})]}),(0,I.jsx)(xt,{orientation:c,backgroundToggle:B,hotOffer:k,builder:ce}),!B&&D&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("div",{className:P("absolute bottom-0 left-0 right-0 top-0 z-[-1] w-full !bg-cover !bg-center !bg-no-repeat",T&&r&&"lg:aspect-[auto]",T&&!r&&`lg:aspect-[${W}]`,!T&&"lg:aspect-auto"),style:{...M,aspectRatio:W}}),(0,I.jsx)("img",{alt:"blur",sizes:"(max-width: 1440px) 50vw, 1400w",src:s?.blurDataURL,className:"absolute z-[-2] flex h-full w-full"})]})]})});var Pt=m(U());var A=m(y()),Hn=({isLoggedAsB2b:t,...e})=>{let{infinity:n,currency:r,collection:i,...l}=e,{hits:p}=ft(l),{status:u}=ae();return(0,Pt.useEffect)(()=>{let s=a=>{let o=a?.getBoundingClientRect();if(o)return o.top>=0&&o.left>=0&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&o.right<=(window.innerWidth||document.documentElement.clientWidth)},f=a=>(a?.getBoundingClientRect()).bottom<=window.innerHeight,d=a=>(a?.getBoundingClientRect()).top<0,c=()=>{let a=document.getElementById("restoreTop"),o=document.getElementById("restoreBottom"),h=s(a),v=s(o);h||d(a)&&f(o)||a&&!v&&window.scrollTo({top:Math.abs(Math.ceil(a.offsetTop)),behavior:"smooth"})};return document.addEventListener("selectFacet",c),()=>{document.removeEventListener("selectFacet",c)}},[]),(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)("div",{className:`${l.styleName}`,id:"restoreTop",children:[!!p.length&&(0,A.jsxs)("ul",{className:"relative grid grid-cols-2 gap-x-5 gap-y-8 lg:grid-cols-3 lg:gap-x-8",children:[p.map((s,f)=>{let d="/products/"+s.handle;return(0,A.jsx)("li",{children:(0,A.jsx)(et,{hit:s,currency:r,collection:i,path:d,index:f,isLoggedAsB2b:t})},s.objectID)}),(0,A.jsx)("li",{id:"restoreBottom",className:"absolute bottom-20 right-0 h-0 w-0"})]}),!p.length&&u==="idle"&&(0,A.jsx)("div",{className:"flex w-full justify-center text-lg md:mt-20 md:text-xl",children:"It looks like there are no items here..."})]})})};var Re=m(U());var Ee=m(y()),_n=({children:t,location:e})=>{let[n,r]=(0,Re.useState)(""),{setUiState:i}=ae();return(0,Re.useEffect)(()=>{if(!n){r(e);return}n&&i({})},[e]),(0,Ee.jsx)(Ee.Fragment,{children:t})};var x=m(U());var V=m(U()),ie=m(y()),St=(0,V.memo)(t=>{let e=(0,V.useRef)([]),[n,r]=(0,V.useState)({left:0,width:0}),{activeTabIndex:i,tabsSource:l,handleChangeTab:p}=t;return(0,V.useEffect)(()=>{let u=()=>{let s=e[i];r({left:s?.offsetLeft??0,width:s?.clientWidth??0})};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[i]),(0,ie.jsxs)("div",{className:"tabs-scrollbar relative w-full overflow-auto whitespace-nowrap",children:[(0,ie.jsx)("div",{className:"flex w-fit min-w-full flex-nowrap space-x-8 border-b-2 border-[#E7E7E7]",children:l.map((u,s)=>(0,ie.jsx)("button",{ref:f=>e[s]=f,className:`leading-tight pb-4 pt-2 text-sm font-[600] leading-[140%] ${i===s?"text-[#FE522A]":"text-black"}`,onClick:()=>p(s),children:u.title},u.title))}),(0,ie.jsx)("span",{className:"absolute bottom-0 block h-[2px] bg-[#FE522A] transition-all duration-300",style:{left:n.left,width:n.width}})]})});var R=m(y()),Kt='.tabs-content-wrapper{width:100%;padding:32px 0 0 0;font-family:"Inter","Open Sans";margin:0 auto;align-items:center;justify-content:center}.tabs-content-wrapper div{line-height:140%;font-weight:400}.tabs-content-wrapper p{font-weight:400;font-size:16px;line-height:1.4}@media(max-width: 768px){.tabs-content-wrapper p{font-size:14px}}@media(max-width: 450px){.tabs-content-wrapper #collection_header p{font-size:11px}}.tabs-content-wrapper h2,.tabs-content-wrapper h3{line-height:1.625;font-size:26px;text-align:start}.tabs-content-wrapper b,.tabs-content-wrapper strong{padding-bottom:.3rem}.tabs-content-wrapper a{color:#000;font-weight:500}.tabs-content-wrapper ol{list-style:initial;list-style-type:decimal;padding:0 1rem}.tabs-content-wrapper li{padding:0 4px;line-height:1.625;text-decoration:none;font-size:16px}.tabs-content-wrapper img{max-width:100% !important}.tabs-content-wrapper iframe{width:100%}.video-img{display:flex;flex-direction:column;align-items:center;gap:1rem}.tabs-scrollbar::-webkit-scrollbar{display:none}.tabs-content-wrapper{color:#000}.tabs-content-wrapper h2{font-size:24px;font-weight:700;line-height:120%;letter-spacing:-0.72px}@media(max-width: 992px){.tabs-content-wrapper h2{font-size:16px}}@media(max-width: 768px){.tabs-content-wrapper h2{letter-spacing:-0.48px}}.tabs-content-wrapper div[data-testid=lite-yt-embed] img{border-radius:12px;cursor:pointer}@media screen and (max-width: 768px){.tabs-content-wrapper div[data-testid=lite-yt-embed] img{border-radius:8px}}.tabs-content-wrapper ul li a{color:#000;font-size:16px;font-style:normal;font-weight:600;line-height:140%}@media(max-width: 992px){.tabs-content-wrapper ul li a{font-size:14px}}.tabs-content-wrapper ul li{position:relative;padding-left:20px}.tabs-content-wrapper ul li:before{position:absolute;left:0;top:10px;content:"";display:block;width:6px;height:6px;border-radius:50%;background:#000}.embed-container{border-radius:12px;padding-bottom:44% !important;overflow:none !important}@media screen and (max-width: 768px){.embed-container{border-radius:8px;padding-bottom:56% !important}}.collection--description .tabs{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:0}.collection--description .tabs .tablinks{border:none;outline:none;cursor:pointer;padding-bottom:16px;margin-right:32px;min-width:fit-content;text-align:center;position:relative;top:2px;z-index:40;font-family:Inter;font-size:14px;font-style:normal;font-weight:600;line-height:140%}@media(max-width: 480px){.collection--description .tabs .tablinks{-webkit-box-flex:2;-ms-flex:2 1 50%;flex:2 1 50%;position:relative}}.collection--description .tabs .tablinks:hover{color:#fe7555}.collection--description .tabs .tablinks:last-child{margin-right:0}.collection--description .tabs .tablinks.active{color:#fe522a}.collection--description .tabs .tablinks.active::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background-color:#fe522a;z-index:60}.collection--description ul.tabs-content{margin-top:0;border-top:2px solid #e7e7e7;width:100%}.modal--quickshop-full .modal-inner{max-height:90vh;overflow:scroll}.product-description~button.product-description-toggle{display:none}.collection--information{width:100%}.tabs-content>li{display:none}.tabs-content>li.tabcontent.active{display:block}',_e=(0,x.memo)(({tabsData:t,collectionHeader:e,collectionName:n,tabsHeight:r=365,deviceType:i="desktop",sanityProjectId:l,sanityDataset:p})=>{let[,u]=(0,x.useState)(!1),[s,f]=(0,x.useState)(!1),d=(0,x.useRef)(null),c=(0,x.useRef)(null),a=(0,x.useRef)(!1),o=(0,x.useRef)(i==="mobile"||typeof window<"u"&&window.innerWidth<768),h=(0,x.useRef)(null),v=(0,x.useRef)(null),[S,k]=(0,x.useState)(0),[E,T]=(0,x.useState)(!1),[B,le]=(0,x.useState)(null),z=o.current?24:54,ce=e?S>0:!0,D=e?S===0:!1,M=(0,x.useMemo)(()=>e&&t?.length?[{title:n,content:e},...t]:e&&!t?.length?[{title:n,content:e}]:t,[t,n,e]);(0,x.useEffect)(()=>{let w=window.innerWidth;f(!0);let G=ye(()=>{w!==window.innerWidth&&(w=window.innerWidth,o.current=window.innerWidth<768,d.current=null,he(v.current),k(0),u(Le=>!Le))},400);return document.addEventListener("resize",G),()=>{document.removeEventListener("resize",G)}},[]),(0,x.useEffect)(()=>(!d.current&&v.current&&(c.current?.disconnect(),c.current=new ResizeObserver(w=>{d.current=w?.[0]?.contentRect?.height||null}),c.current.observe(v.current)),()=>{c.current?.disconnect()}),[S,B]);let W=w=>{k(w),T(!1)},C=M[S]?.content,j=x.default.isValidElement(C),X=C?.length===1&&C[0]._type==="module.images",ge=C?.length===1&&C[0]._type==="module.iframe",Z=!!(e||M?.length),ee=ge||X||j,he=w=>{if(!w)return;let G=w.scrollHeight,Le=C?.length&&C.some(O=>O._type==="module.iframe"||O._type==="module.images"||x.default.isValidElement(O)),je=O=>!!(G>O&&!ee||Le&&!ee);if(v.current=w,!d.current){let O=G>r?r:G;a.current=je(O),d.current=!a.current&&!ee?O+z:O}if(le(()=>je(d.current)),j){let O=w.querySelector("video");if(!O)return;let Ue=()=>{let te=w.querySelector("#collection_header");te&&(te.style.aspectRatio=`${O.videoWidth} / ${O.videoHeight}`,te.style.height="auto",te.style.maxHeight=`${r}px`,d.current!==te.scrollHeight&&S===0&&(w.style.minHeight=`${te.scrollHeight}px`,d.current=te.scrollHeight))};O.readyState>=1?Ue():O?.addEventListener("loadedmetadata",Ue)}},Ce=(0,x.useCallback)(he,[C,r]),Et=E||ge||X||j||!d.current?"none":`${d.current-z}px`,Nt=d.current?`${ee||a.current&&S!==0?d.current:d.current-z}px`:"none",[Qt,It]=(0,x.useState)(!1);(0,x.useEffect)(()=>{It(!0)},[]);let We=!E&&C?.length&&!C.some(w=>w._type==="module.iframe"||w._type==="module.images"||x.default.isValidElement(w))?{maxHeight:i==="mobile"?r+z+6:397,overflow:"hidden"}:{};return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("style",{dangerouslySetInnerHTML:{__html:Kt}}),(0,R.jsx)("div",{className:"flex w-full",children:(0,R.jsxs)("div",{className:"w-full flex-col",children:[Z&&(0,R.jsx)(St,{activeTabIndex:S,tabsData:t,tabsSource:M,handleChangeTab:W}),(0,R.jsxs)("div",{className:"tabs-content-wrapper mb-4 rounded-t-lg",style:We,children:[(0,R.jsxs)("div",{ref:h,className:P("flex !overflow-hidden font-inter",!e&&!E?"aspect-[358/126] w-full smm:aspect-auto":""),style:{minHeight:B?"100%":Nt,maxHeight:Et},children:[(0,R.jsxs)("div",{className:"noscrollbar flex w-full flex-col gap-4 !overflow-hidden",ref:Ce,children:[D&&e,Array.isArray(M?.[S]?.content)&&(0,R.jsx)(He,{blocks:[...M[S].content],blocksTitle:M[S].title,objectFit:"contain",className:"w-full",aspectRatio:"auto",iframeClassName:"aspect-[343/240] lg:!h-[526px]",sanityProjectId:l,sanityDataset:p})]}),(0,R.jsx)("div",{className:"contents",children:M.slice(1)?.map((w,G)=>(0,R.jsx)("div",{className:"noscrollbar hidden w-full flex-col gap-4 !overflow-hidden",children:Array.isArray(w?.content)&&(0,R.jsx)(He,{blocks:[...w.content],blocksTitle:w.title,objectFit:"contain",className:"w-full",aspectRatio:"auto",sanityProjectId:l,sanityDataset:p,iframeClassName:"aspect-[343/240] lg:!h-[526px]"})},G))})]},S),B&&(0,R.jsxs)(R.Fragment,{children:[!o.current&&(0,R.jsx)(qe.Secondary,{onClick:()=>T(w=>!w),className:"mt-2 w-full min-w-[25%] lg:max-w-[295px]",children:E?"Show less":"Show more"}),o.current&&(0,R.jsx)("button",{onClick:()=>T(w=>!w),className:"mt-2 h-4 w-full text-left text-sm text-ORANGE_TWO",children:E?"Show less":"Show more"})]})]},JSON.stringify(We))]})})]})});var Ne=m(y()),Qn=({children:t})=>ae()?.indexUiState?.page??!1?null:(0,Ne.jsx)(Ne.Fragment,{children:t});var F=m(U());var Ie=m(U());var ne=m(y()),Tt=({context:t,closedMenu:e,facets:n})=>{let{changeType:r,type:i}=xe(),{filters:l,clearFilters:p,changeCursor:u}=t,s=Object.values(l).flat().length,[f,d]=(0,Ie.useState)({}),c=JSON.stringify(f)!==JSON.stringify(l),a=i==="shopify filters",[o]=re(),h=o.data.envs.algoliaIndex,v=()=>{p(),u(null)};return(0,Ie.useEffect)(()=>{a&&d(l)},[i]),(0,ne.jsxs)("section",{className:P("flex w-full flex-grow flex-col lg:min-w-[25%] lg:max-w-[295px] lg:flex-grow-0",a&&"h-[calc(100vh-6rem)]"),children:[e&&(0,ne.jsx)(ot,{context:t,quantity:s,removeFilters:v,changeType:()=>r("shopify filters"),collection:!0}),(0,ne.jsxs)("div",{className:P(e&&"hidden lg:contents",a&&"contents"),children:[(0,ne.jsx)(at,{context:t,facets:n}),(0,ne.jsx)(it,{shopify:!0,clearRefinements:()=>{v(),r(null)},prefix:h,canRefine:!s&&c||!!s,haveNewRefinements:c||!s&&c,handleApplyChanges:()=>r(null)})]})]})};var b=m(y()),Rt=({closedMenu:t,currency:e,sanityDescription:n,storefrontCollection:r,brand:i,sanityBrand:l})=>{let p=typeof window>"u"?!0:t,[u,s]=re(),f=u.data.envs.sanityProjectId,d=u.data.envs.sanityDataset,c={sanityProjectId:f,sanityDataset:d},a=Ye(),o=ze(),h=(0,F.useRef)(null),{pathname:v}=$e(),S=Ge(),{cursor:k,filters:E,sortKey:T,clearFilters:B,changeFilters:le,changeSortKey:z,changeCursor:ce}=a,D=r?.handle,M=n?.collectionHeader?.hotOffer?.image||n?.collectionHeader?.hotOffer?.file||n?.collectionHeader?.name||n?.collectionHeader?.background||n?.collectionHeader?.icon||!1,W=S?.data?.searchResults?.results?.collection?.products||{},C=W?.pageInfo,j=S?.data?.facets?.collection?.products?.filters||[],X=(0,F.useMemo)(()=>i&&j?.length?j?.find(Z=>Z?.label==="Brand")?.values?.find(Z=>Z?.id.includes(s.params?.handle)):"",[j.length]),ge=Z=>{let ee="/api/collection",he=o.locale?`/${o.locale}${ee}`:ee,Ce=Z||"";S.submit({collection:Ce,...k,productFilters:JSON.stringify(E),sortKey:T},{method:"GET",action:he})};return(0,F.useEffect)(()=>{i&&X&&le(X.input,"Brand")},[j.length]),(0,F.useEffect)(()=>{(k||E||T)&&ge(D)},[k,E,T]),(0,F.useEffect)(()=>{k&&window.scrollTo({top:Math.abs(Math.ceil(h.current?.offsetTop?h.current?.offsetTop+110:0)),behavior:"smooth"})},[k]),(0,F.useEffect)(()=>B,[D]),(0,F.useEffect)(()=>{z("RELEVANCE"),ce(null)},[v]),(0,b.jsxs)("div",{className:"flex w-full flex-col",children:[t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex w-full flex-wrap items-center gap-1 pb-8 pt-1 text-sm leading-[16px] md:gap-2 md:pb-9 md:pt-[18px]",children:[(0,b.jsxs)(ue,{prefetch:"intent",to:"/",className:"flex items-center gap-1 md:gap-2",children:[(0,b.jsx)(N.P2,{className:"whitespace-normal font-medium",children:"Medical Supplies & Equipment Home"}),(0,b.jsx)("div",{className:"flex h-4 w-4 items-center justify-center",children:(0,b.jsx)(Y,{src:_.arrowRight,width:5,height:8,className:"h-2 w-[5px]",alt:">"})})]}),i&&(0,b.jsxs)(ue,{to:"/collections/brands",className:"flex items-center gap-1 md:gap-2",children:[(0,b.jsx)(N.P2,{className:"font-medium",children:"Brands"}),(0,b.jsx)("div",{className:"flex h-4 w-4 items-center justify-center",children:(0,b.jsx)(Y,{src:_.arrowRight,width:5,height:8,className:"h-2 w-[5px]",alt:">"})})]}),(0,b.jsx)(N.P2,{className:"items-bottom flex h-full font-medium capitalize text-GREY_TWO",children:n.title||X?.label||""})]}),(0,b.jsxs)("div",{className:"mb-6 flex w-full flex-wrap items-center justify-between gap-2 md:h-12 lg:mb-8",children:[(0,b.jsx)("h1",{className:"leading-10 font-inter text-[24px] font-bold text-black md:text-[32px]",children:n.title||X?.label||""}),(0,b.jsx)("div",{className:"flex flex-grow justify-end md:contents",children:(0,b.jsx)(rt,{context:a})})]})]}),p&&(n.tabs||M)&&(0,b.jsx)("div",{className:"mb-8 flex w-full",children:(0,b.jsx)(_e,{tabsData:n.tabs,sanityProjectId:f,sanityDataset:d,collectionHeader:M?(0,b.jsx)(Te,{...c,brand:!1,collectionHeader:n.collectionHeader}):null,collectionName:n.title},n.title)}),(0,b.jsxs)("div",{className:"flex w-full grow flex-col justify-between gap-8 lg:flex-row",ref:h,id:"scrollable",children:[(0,b.jsx)(Tt,{context:a,closedMenu:t,facets:j}),(0,b.jsxs)("div",{className:"flex flex-grow flex-col gap-8",children:[i&&!l?.tabs?.length&&l?(0,b.jsx)(Te,{...c,brand:i,collectionHeader:l}):null,i&&!!l?.tabs?.length&&(0,b.jsx)(_e,{tabsData:l.tabs,collectionHeader:l?(0,b.jsx)(Te,{...c,brand:i,collectionHeader:l}):null,collectionName:n.title},n.title),t&&(0,b.jsx)(nt,{context:a,products:be(W),pageInfo:C})]})]})]})};var J=m(U());var ke=m(y()),Fe=(0,J.forwardRef)(({changeHandler:t,value:e},n)=>{let[r,i]=(0,J.useState)(!1),l=(0,J.useRef)(null);(0,J.useImperativeHandle)(n,()=>({hideInput:()=>i(!1)}));let p=()=>{i(!0)},u=f=>{let{value:d}=f.target;t(d)},s=()=>{t(""),i(!1)};return r?(0,ke.jsx)(Ke,{excludedRef:l,onOutsideClick:s,children:(0,ke.jsx)("input",{type:"text",ref:l,onChange:u,value:e,className:"flex h-6 w-8 items-center justify-center rounded-sm border border-GREY_TWO px-1 py-2 text-[14px]"})}):(0,ke.jsx)("button",{onClick:p,children:"..."})});var g=m(y()),Sr=t=>{let e=bt(t),{pages:n}=e,r=(0,se.useRef)(null),[i,l]=(0,se.useState)(""),p=o=>{let h=Number(o);if(h>=1&&/^-?\d+$/.test(o)&&h<=e.nbPages){l(o);return}o||l("")},u=()=>{setTimeout(()=>{if(typeof window<"u"){let o=document.getElementById("restoreTop");o&&window.scrollTo({top:Math.abs(Math.ceil(o.offsetTop+40)),behavior:"smooth"})}},0)},s=o=>{e.refine(o),u()},f=e.isFirstPage&&e.isLastPage,d=()=>{let{pages:o,nbPages:h}=e;return!!(o?.length&&o[o.length-1]===h-1)},c=()=>!!(n?.length&&n.includes(0)),a=o=>{o.key==="Enter"&&i&&(s(Number(i)-1),l(""),r.current&&r.current.hideInput())};return(0,se.useEffect)(()=>(document.addEventListener("keypress",a),()=>{document.removeEventListener("keypress",a)}),[i]),f?(0,g.jsx)(g.Fragment,{}):(0,g.jsxs)("div",{className:"flex flex-col rounded-lg bg-[#eee] pb-0 md:contents",children:[(0,g.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-center gap-6 rounded-lg bg-[#eee] px-4 pb-[18px] pt-5 md:gap-6 lg:mt-2",children:[!e.isFirstPage&&(0,g.jsxs)("a",{className:P("items-center justify-center gap-1",e.nbPages>5?"hidden smm:flex":"flex"),href:e.createURL(e.currentRefinement-1),onClick:o=>{u(),o.preventDefault(),e.refine(e.currentRefinement-1)},children:[(0,g.jsx)(Y,{src:_.pagiArrow,width:8,height:12,className:"h-[16px] w-[16px] -rotate-180",alt:"arrow right"}),(0,g.jsx)(N.P2,{className:"font-[600] leading-[19.6px] text-GREY_ONE hover:text-black",children:"Previous"})]}),!c()&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("a",{href:e.createURL(0),onClick:o=>{u(),o.preventDefault(),e.refine(0)},children:(0,g.jsx)(N.P3,{className:e.currentRefinement!==e.nbPages?"text-GREY_ONE":"",children:"1"})}),n[0]===2&&(0,g.jsx)("a",{href:e.createURL(1),onClick:o=>{u(),o.preventDefault(),e.refine(1)},children:(0,g.jsx)(N.P3,{className:e.currentRefinement!==e.nbPages?"text-GREY_ONE":"",children:"2"})}),n[0]>2&&(0,g.jsx)(Fe,{changeHandler:p,value:i,ref:r})]}),e.pages.map(o=>(0,g.jsx)("a",{href:e.createURL(o),onClick:h=>{u(),h.preventDefault(),e.refine(o)},children:(0,g.jsx)(N.P3,{className:e.currentRefinement!==o?"text-GREY_ONE":"",children:o+1})},o)),!e.isLastPage&&!d()&&(0,g.jsxs)(g.Fragment,{children:[e.currentRefinement+5{u(),o.preventDefault(),e.refine(e.nbPages-1)},children:(0,g.jsx)(N.P3,{className:e.currentRefinement!==e.nbPages?"text-GREY_ONE":"",children:e.nbPages})})]}),!e.isLastPage&&(0,g.jsxs)("a",{href:e.createURL(e.currentRefinement+1),onClick:o=>{u(),o.preventDefault(),e.refine(e.currentRefinement+1)},className:P("items-center justify-center gap-1",e.nbPages>5?"hidden smm:flex":"flex"),children:[(0,g.jsx)(N.P2,{className:"flex items-center font-[600] leading-[19.6px] text-GREY_ONE hover:text-black",children:"Next"}),(0,g.jsx)(Y,{src:_.pagiArrow,className:"h-[16px] w-[16px]",width:8,height:12,alt:"next page"})]})]}),(0,g.jsxs)("div",{className:P("my-4 w-full items-center justify-center gap-4",e.nbPages>5?"flex smm:hidden":"hidden"),children:[!e.isFirstPage&&(0,g.jsxs)("a",{href:e.createURL(e.currentRefinement-1),onClick:o=>{u(),o.preventDefault(),e.refine(e.currentRefinement-1)},className:"flex items-center justify-center gap-1",children:[(0,g.jsx)(Y,{src:_.pagiArrow,width:8,height:12,className:"h-[16px] w-[16px] -rotate-180",alt:"arrow right"}),(0,g.jsx)(N.P2,{className:"font-[600] leading-[19.6px] text-GREY_ONE hover:text-black",children:"Previous"})]}),!e.isLastPage&&(0,g.jsxs)("a",{href:e.createURL(e.currentRefinement+1),onClick:o=>{u(),o.preventDefault(),e.refine(e.currentRefinement+1)},className:"flex items-center justify-center gap-1",children:[(0,g.jsx)(N.P2,{className:"flex items-center font-[600] leading-[19.6px] text-GREY_ONE hover:text-black",children:"Next"}),(0,g.jsx)(Y,{src:_.pagiArrow,className:"h-[16px] w-[16px]",width:8,height:12,alt:"next page"})]})]})]})};var H=m(y()),kr=({brand:t,sanityBrand:e})=>{let{collectionHandle:n,sanityDescription:r,serverState:i,serverUrl:l,vendor:p,collection:u,...s}=De(),f=s?.storefrontCollection,c=(xe()||{type:null})?.type===null,[a]=re(),o=a.data.layout.benefits,h=s.shopifyProducts&&{products:{nodes:be(s?.shopifyProducts),pageInfo:s?.shopifyProducts.pageInfo}};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)("div",{className:"content-wrapper collection-wrapper container grow",children:[(0,H.jsx)(Rt,{storefrontCollection:f||h,closedMenu:c,currency:a.data.currency,sanityDescription:r,brand:t,sanityBrand:e}),c&&(0,H.jsx)(H.Fragment,{children:o&&(0,H.jsx)("div",{className:"mt-20 w-screen",children:(0,H.jsx)(st,{secondary:!0,benefits:o})})})]}),c&&(0,H.jsx)("div",{className:"flex w-full md:mt-20",children:(0,H.jsx)(tt,{})})]})};export{Sr as a,Te as b,Hn as c,_n as d,_e as e,Qn as f,kr as g};