1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="fb899ba9-a1ae-658c-dabe-5d8d2545d042")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,336763,e=>{"use strict";var t=e.i(843476),n=e.i(540187),a=e.i(41931),s=e.i(203281),r=e.i(266027);let i=async()=>(await a.api.get("/whitelabel_applications/bundle")).data;var l=e.i(257602),o=e.i(673988);let c=[{title:"Terms & Conditions",link:"https://www.healthera.co.uk/pharmacy-terms"},{title:"Cookies",link:"https://www.healthera.co.uk/cookies"},{title:"Privacy Policy",link:"https://www.healthera.co.uk/privacy"},{title:"EULA",link:"https://www.healthera.co.uk/eula"}],d=[{title:"Terms & Conditions",link:"https://healthera.ca/legal/terms-of-use/"},{title:"Cookies",link:"https://healthera.ca/legal/cookie-policy/"},{title:"Privacy Policy",link:"https://healthera.ca/legal/privacy-policy/"}],u=()=>(0,o.isCARegion)()?d:c,h="Contacts";function m(e){if(!e)return[];let t=[];e.contactName&&t.push({title:e.contactName}),e.contactAddress&&t.push({title:e.contactAddress});let n=[];e.emailAddress&&n.push({title:`Email: ${e.emailAddress}`,link:`mailto:${e.emailAddress}`}),e.phoneNumber&&n.push({title:`T: ${e.phoneNumber}`,link:`tel:${e.phoneNumber.replace(/[^\d+]/g,"")}`}),e.faxNumber&&n.push({title:`F: ${e.faxNumber}`}),e.contactHours&&n.push({title:e.contactHours});let a=[];return t.length>0&&a.push({header:h,items:t}),n.length>0&&a.push(t.length>0?{items:n}:{header:h,items:n}),a}function p(e){return e?/^https?:\/\/|^\/\//.test(e)||/^(mailto|tel):/.test(e)?{link:e}:{link:e,internal:!0}:{}}function x(e){return{header:e.header??"Other",horizontal:e.horizontal,items:e.details.map(e=>({title:e.title,...p(e.link)}))}}var f=e.i(522016);function g({column:e}){return e.horizontal?(0,t.jsx)("div",{className:"flex flex-wrap gap-6 text-sm text-muted-foreground",children:e.items.map(e=>e.link?(0,t.jsx)(f.default,{href:e.link,className:"hover:text-foreground",...!e.internal&&{target:"_blank",rel:"noopener noreferrer"},children:e.title},e.title):(0,t.jsx)("span",{children:e.title},e.title))}):(0,t.jsxs)("div",{className:"flex flex-col gap-3 max-w-70 wrap-break-word",children:[e.header?(0,t.jsx)("h3",{className:"text-sm font-bold text-foreground tracking-tight",children:e.header}):(0,t.jsx)("span",{"aria-hidden":!0,className:"invisible hidden text-sm font-bold tracking-tight sm:block",children:"Â "}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:e.items.map(e=>e.link?(0,t.jsx)(f.default,{href:e.link,className:"text-sm text-muted-foreground leading-snug hover:text-foreground",...!e.internal&&{target:"_blank",rel:"noopener noreferrer"},children:e.title},e.title):(0,t.jsx)("span",{className:"text-sm text-muted-foreground leading-snug",children:e.title},e.title))})]})}var b=e.i(363273),j=e.i(323508),N=e.i(657688);let v=`\xa9 ${new Date().getFullYear()} Healthera Ltd. is a company registered in England and Wales with company number 9609198. 3 4All rights reserved.`,y=`\xa9 ${new Date().getFullYear()} Healthera Canada Inc. is a company registered in the province of Ontario. 5 6All rights reserved.`;function k({text:e}){let{organisationName:n}=(0,l.useOrganisationIdentity)(),a=(0,j.useHomepageUrl)(),s=e||((0,o.isCARegion)()?y:v),r=(0,b.useLogo)();return(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4",children:[r&&(0,t.jsx)(f.default,{href:a,className:"flex items-center shrink min-w-0",children:(0,t.jsx)(N.default,{src:r,alt:n||"Logo",width:150,height:32,className:"h-12 w-auto max-w-[200px] object-contain"})}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:s})]})}function w({gphc:e,logoUrl:n}){if(!n&&!e.pharmacyGphcRegistrationNumber&&!e.superintendentName)return null;let a=n?(0,t.jsx)("img",{src:n,alt:"Registered Pharmacy",className:"h-16 w-auto object-contain"}):null;return(0,t.jsxs)("div",{className:"flex items-start gap-6",children:[a&&(0,t.jsx)("div",{className:"shrink-0",children:e.pharmacyGphcUrl?(0,t.jsx)(f.default,{href:e.pharmacyGphcUrl,target:"_blank",rel:"noopener noreferrer",children:a}):a}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[e.pharmacyGphcReg
6istrationNumber&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground leading-snug",children:e.pharmacyGphcUrl?(0,t.jsxs)(f.default,{href:e.pharmacyGphcUrl,target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground",children:["GPhC: ",e.pharmacyGphcRegistrationNumber]}):(0,t.jsxs)(t.Fragment,{children:["GPhC: ",e.pharmacyGphcRegistrationNumber]})}),e.superintendentName&&(0,t.jsxs)("span",{className:"text-sm text-muted-foreground leading-snug",children:["Superintendent:"," ",e.superintendentGphcUrl?(0,t.jsxs)(f.default,{href:e.superintendentGphcUrl,target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground",children:[e.superintendentName,e.superintendentRegistrationNumber&&` (${e.superintendentRegistrationNumber})`]}):(0,t.jsxs)(t.Fragment,{children:[e.superintendentName,e.superintendentRegistrationNumber&&` (${e.superintendentRegistrationNumber})`]})]})]})]})}var C=e.i(89888);e.s(["Footer",0,function({sectionClassName:e}={}){let{data:a,isFetched:c}=(0,C.useWebsiteFooter)(),d=function(){let{data:e}=(0,n.useConfig)(),{organisationId:t,bundleId:a}=(0,l.useOrganisationIdentity)(),c=!!a,{data:d,isLoading:h}=(0,r.useQuery)({...(0,s.queryOptions)({queryKey:["whiteLabelConfig"],queryFn:i}),enabled:!!a});if(h)return{columns:[],isLoading:!0};if(c&&d)return{columns:(d.footer??[]).map(x),copyright:d.copy_rights,isLoading:!1};if(t&&!c&&e){let t=function(e){let t=m(e.contactUs&&{contactName:e.contactUs.contactName,contactAddress:e.contactUs.contactAddress,emailAddress:e.contactUs.email,phoneNumber:e.contactUs.phoneNumber??void 0,contactHours:e.contactUs.contactHours}),n=function(e){if((0,o.isCARegion)()||!e)return null;let t=[];return(e.gphcNumber&&t.push({title:`Premises GPhC Number: ${e.gphcNumber}`}),e.pharmacySuperintendentName&&t.push({title:`Superintendent: ${e.pharmacySuperintendentName}${e.pharmacySuperintendentRegistrationNumber?` (${e.pharmacySuperintendentRegistrationNumber})`:""}`}),0===t.length)?null:{header:"Information",items:t}}(e.contactUs);if(n&&t.push(n),!(0,o.isCARegion)()){let n=function(e){let t=[];if(e.aboutUs?.enabled&&t.push({title:"About us",link:"/about-us",internal:!0}),e.contactUs?.enabled&&t.push({title:"Contact us",link:"/contact-us",internal:!0}),e.footerCustomLinks)for(let n of e.footerCustomLinks)t.push({title:n.title,...p(n.link)});return{header:"Other",items:t}}(e);n.items.length>0&&t.push(n)}return t}(e);return t.push({items:u(),horizontal:!0}),{columns:t,isLoading:!1}}return{columns:[],isLoading:!1}}(),h=a?function(e){let t=m(e.content.contactUs),n=function(e){let t=[];if(e.registrationNumber&&t.push({title:`Company No: ${e.registrationNumber}`}),e.registeredOfficeAddress&&t.push({title:e.registeredOfficeAddress}),e.vatNumber&&t.push({title:`VAT: ${e.vatNumber}`}),e.placeOfRegistration){let n="northernIreland"===e.placeOfRegistration?"Northern Ireland":e.placeOfRegistration.charAt(0).toUpperCase()+e.placeOfRegistration.slice(1);t.push({title:`Registered in ${n}`})}return 0===t.length?null:{header:"Information",items:t}}(e.content.contactUs);n&&t.push(n);let a=[];for(let n of e.content.navigation?.menu??[])"group"===n.kind&&n.links.length>0?t.push({header:n.label,items:n.links.map(e=>({title:e.label,link:e.url,internal:!e.url.startsWith("http")}))}):"link"===n.kind&&a.push({title:n.label,link:n.url,internal:!n.url.startsWith("http")});a.length>0&&!(0,o.isCARegion)()&&t.push({header:"Other",items:a}),t.push({items:u(),horizontal:!0});let s=e.content.contactUs,r=s.pharmacyGphcRegistrationNumber||s.pharmacySuperintendentName?{pharmacyGphcUrl:s.pharmacyGphcUrl,pharmacyGphcRegistrationNumber:s.pharmacyGphcRegistrationNumber,superintendentName:s.pharmacySuperintendentName,superintendentGphcUrl:s.pharmacySuperintendentGphcUrl,superintendentRegistrationNumber:s.pharmacySuperintendentRegistrationNumber}:void 0;return{columns:t,copyright:e.content.copyright,gphc:r}}(a):null,f=h?h.columns:d.columns,b=h?h.copyright:d.copyright;if(!c&&d.isLoading)return null;let j=f.filter(e=>!e.horizontal),N=f.filter(e=>e.horizontal),v=a?.style?.background,y=e??(v?`section-${v}`:"section-white"),R=!(0,o.isCARegion)()&&h?.gphc;return(0,t.jsx)("footer",{className:`${y} pt-16 pb-6`,children:(0,t.jsxs)("div",{className:"container-wide flex flex-col gap-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-6 sm:gap-10",children:[(0,t.jsx)("div",{className:"sm:col-span-full md:col-span-1",children:(0,t.jsx)(k,{text:b})}),j.map((e,n)=>(0,t.jsx)(g,{column:e},e.header??n))]}),R&&(0,t.jsx)(w,{gphc:h.gphc}),N.map((e,n)=>(0,t.jsx)(g,{column:e},n))]})})}],336763)},335155,e=>{"use strict";
6var t=e.i(843476),n=e.i(271645),a=e.i(551594),s=e.i(657688),r=e.i(942522),i=e.i(363273);let l=({identity:e})=>{let n=((e,t)=>{let n,{attribution:s}=(n=(0,r.getStoredAttribution)(),{attribution:n?.source??null,attributionSourceType:n?.sourceType??null,gpOdsCode:(0,r.getStoredGpOdsCode)()});return(0,a.isHealthera)(e,t)&&s?.toLowerCase()===r.ATTRIBUTION_SOURCE.ECONSULT})(e.organisationId,e.bundleId),l=(0,i.useLogo)(),o=l,c=l;n?(o="/img/brands/econsultmobilelogo.svg",c="/img/brands/econsultdesktoplogo.svg"):(0,a.isHealthera)(e.organisationId,e.bundleId)&&(o="/img/brands/healthera-planet.svg");let d=o!==c;return(0,t.jsxs)("div",{className:"relative h-12 w-[200px] max-w-full shrink min-w-0",children:[d&&(0,t.jsx)(s.default,{src:o,alt:"Logo",fill:!0,sizes:"200px",className:"object-contain object-left sm:hidden",loading:"eager"}),(0,t.jsx)(s.default,{src:c,alt:"Logo",fill:!0,sizes:"200px",className:`object-contain object-left ${d?"hidden sm:block":""}`,priority:!0})]})};var o=e.i(522016),c=e.i(716327),d=e.i(519455),u=e.i(981140),h=e.i(30030),m=e.i(369340),p=e.i(934620),x=e.i(820783),f=e.i(248425),g=e.i(296626),b=e.i(610772),j=Object.defineProperty,N=(e,t)=>j(e,"name",{value:t,configurable:!0}),v="Collapsible",[y,k]=(0,h.createContextScope)(v),[w,C]=y(v),R=n.forwardRef(N(function(e,a){let{__scopeCollapsible:s,open:r,defaultOpen:i,disabled:l,onOpenChange:o,...c}=e,[d,u]=(0,m.useControllableState)({prop:r,defaultProp:i??!1,onChange:o,caller:v});return(0,t.jsx)(w,{scope:s,disabled:l,contentId:(0,b.useId)(),open:d,onOpenToggle:n.useCallback(()=>u(e=>!e),[u]),children:(0,t.jsx)(f.Primitive.div,{"data-state":L(d),"data-disabled":l?"":void 0,...c,ref:a})})},"Collapsible")),U=n.forwardRef(N(function(e,n){let{__scopeCollapsible:a,...s}=e,r=C("CollapsibleTrigger",a);return(0,t.jsx)(f.Primitive.button,{type:"button","aria-controls":r.open?r.contentId:void 0,"aria-expanded":r.open||!1,"data-state":L(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...s,ref:n,onClick:(0,u.composeEventHandlers)(e.onClick,r.onOpenToggle)})},"CollapsibleTrigger")),A="CollapsibleContent",I=n.forwardRef(N(function(e,n){let{forceMount:a,...s}=e,r=C(A,e.__scopeCollapsible);return(0,t.jsx)(g.Presence,{present:a||r.open,children:({present:e})=>(0,t.jsx)(S,{...s,ref:n,present:e})})},"CollapsibleContent")),S=n.forwardRef(N(function(e,a){let{__scopeCollapsible:s,present:r,children:i,...l}=e,o=C(A,s),[c,d]=n.useState(r),u=n.useRef(null),h=(0,x.useComposedRefs)(a,u),m=n.useRef(0),g=m.current,b=n.useRef(0),j=b.current,N=o.open||c,v=n.useRef(N),y=n.useRef(void 0);return n.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,p.useLayoutEffect)(()=>{let e=u.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();m.current=t.height,b.current=t.width,v.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),d(r)}},[o.open,r]),(0,t.jsx)(f.Primitive.div,{"data-state":L(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!N,...l,ref:h,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...e.style},children:N&&i})},"CollapsibleContentImpl"));function L(e){return e?"open":"closed"}N(L,"getState");var D=e.i(755146),M=e.i(840454),O=e.i(311165),T=e.i(758779);function z(){let e=(0,M.useEventTracker)(O.HEADER_TRACKING.SCREENS.NAV);return t=>{let n=(0,T.isPrescriptionsUrl)(t)?O.HEADER_TRACKING.EVENTS.PRESCRIPTIONS_NAV_CLICK:(0,T.isServicesUrl)(t)?O.HEADER_TRACKING.EVENTS.SERVICES_NAV_CLICK:void 0;n&&e(n)}}function P({item:e}){let n=z();return e.links.map((e,a)=>(0,t.jsx)(D.DropdownMenuItem,{asChild:!0,children:(0,t.jsx)(o.default,{href:e.url,onClick:()=>n(e.url),children:e.label})},a))}function E({item:e}){return 0===e.links.length?null:(0,t.jsx)("li",{children:(0,t.jsxs)(D.DropdownMenu,{children:[(0,t.jsxs)(D.DropdownMenuTrigger,{className:"flex items-center gap-1 text-base font-medium text-brand-900 hover:text-brand-700 focus-ring rounded-sm",children:[e.label,(0,t.jsx)(c.ChevronDown,{className:"size-3.5"})]}),(0,t.jsx)(D.DropdownMenuContent,{align:"start",className:"min-w-48",children:(0,t.jsx)(P,{item:e})})]})})}function G({menu:e}
6){let n=z();return(0,t.jsx)("nav",{"aria-label":"Main navigation",children:(0,t.jsx)("ul",{className:"flex flex-row flex-wrap items-center gap-x-4 gap-y-2 md:gap-x-6 lg:gap-x-10",children:e.map((e,a)=>"group"===e.kind?(0,t.jsx)(E,{item:e},a):(0,t.jsx)("li",{children:(0,t.jsx)(o.default,{href:e.url,onClick:()=>n(e.url),className:"text-base font-medium text-brand-900 hover:text-brand-700",children:e.label})},a))})})}function B({item:e}){let n=z();return 0===e.links.length?null:(0,t.jsx)("li",{children:(0,t.jsxs)(R,{children:[(0,t.jsx)(U,{asChild:!0,children:(0,t.jsxs)(d.Button,{variant:"ghost",className:"w-full justify-between text-base py-2 px-3 rounded-md [&[data-state=open]>svg]:rotate-180",children:[e.label,(0,t.jsx)(c.ChevronDown,{className:"size-4 transition-transform"})]})}),(0,t.jsx)(I,{children:(0,t.jsx)("ul",{className:"ml-4 flex flex-col gap-1",children:e.links.map((e,a)=>(0,t.jsx)("li",{children:(0,t.jsx)(d.Button,{variant:"ghost",className:"w-full justify-start text-sm py-1.5 px-3 rounded-md text-brand-700",asChild:!0,children:(0,t.jsx)(o.default,{href:e.url,onClick:()=>n(e.url),children:e.label})})},a))})})]})})}function $({menu:e}){let n=z();return(0,t.jsx)("nav",{"aria-label":"Main navigation",children:(0,t.jsx)("ul",{className:"flex flex-col gap-1",children:e.map((e,a)=>"group"===e.kind?(0,t.jsx)(B,{item:e},a):(0,t.jsx)("li",{children:(0,t.jsx)(d.Button,{variant:"ghost",className:"w-full justify-start text-base py-2 px-3 rounded-md",asChild:!0,children:(0,t.jsx)(o.default,{href:e.url,onClick:()=>n(e.url),children:e.label})})},a))})})}let H=({menu:e,mobile:n=!1})=>0===e.length?null:n?(0,t.jsx)($,{menu:e}):(0,t.jsx)(G,{menu:e});var _=e.i(302747),F=e.i(111640),W=e.i(330132),K=e.i(342425),V=e.i(769041),q=e.i(224053),Q=e.i(172299),Y=e.i(673988),X=e.i(157108);let J=({isMobile:e=!1})=>{let n,{data:a,isLoading:s}=(0,F.useGetUser)(),r=(0,q.isAnonymousUser)(),i=(0,K.useOnSuccessUrl)(),l=(0,W.useLegacyLoginRedirectHandler)(),c=(n=Q.logOutAndRedirect,[{href:(0,Y.isCARegion)()?"/account":"/profile/details",label:"Profile"},{href:"/appointments",label:"Appointments"},{href:"#",label:"Log out",onClick:n}]),u=(0,V.getLoginUrl)(i);return s?(0,t.jsx)(_.Skeleton,{className:e?"w-full h-10 rounded-md":"w-24 h-9 rounded-full","data-testid":"user-menu-skeleton"}):!a||r?e?(0,t.jsx)(d.Button,{variant:"ghost",className:"w-full justify-start text-base py-2 px-3 rounded-md hover:bg-gray-100",asChild:!0,children:(0,t.jsx)(o.default,{href:u,rel:"nofollow",onNavigate:l,children:"Log in"})}):(0,t.jsx)(d.Button,{className:"h-9 px-3 gap-2.5 font-medium text-base max-w-62.5",asChild:!0,children:(0,t.jsxs)(o.default,{href:u,rel:"nofollow",onNavigate:l,children:[(0,t.jsx)(X.UserRoundIcon,{className:"size-4.5"}),"Log in"]})}):e?(0,t.jsx)("div",{className:"flex flex-col w-full gap-1",children:c.map(e=>e.onClick?(0,t.jsx)(d.Button,{variant:e.variant||"ghost",className:"w-full justify-start text-base py-2 px-3 rounded-md",onClick:e.onClick,children:e.label},e.href):(0,t.jsx)(d.Button,{variant:e.variant||"ghost",className:"w-full justify-start text-base py-2 px-3 rounded-md",asChild:!0,children:(0,t.jsx)(o.default,{href:e.href,children:e.label})},e.href))}):(0,t.jsxs)(D.DropdownMenu,{children:[(0,t.jsx)(D.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(d.Button,{className:"h-9 px-3 gap-2.5 font-medium text-base max-w-62.5","data-sl":"mask",children:[(0,t.jsx)(X.UserRoundIcon,{className:"size-4.5"}),a.firstName?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"hidden sm:block truncate",children:`${a.firstName} ${a.lastName}`}),(0,t.jsxs)("span",{className:"sr-only",children:["Open user menu for ",a.firstName," ",a.lastName]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"hidden sm:block truncate",children:"My account"}),(0,t.jsx)("span",{className:"sr-only",children:"Open user menu"})]})]})}),(0,t.jsx)(D.DropdownMenuContent,{align:"end",children:c.map(e=>e.onClick?(0,t.jsx)(D.DropdownMenuItem,{onClick:e.onClick,className:"destructive"===e.variant?"text-destructive":void 0,children:e.label},e.href):(0,t.jsx)(D.DropdownMenuItem,{className:"destructive"===e.variant?"text-destructive":void 0,asChild:!0,children:(0,t.jsx)(o.default,{href:e.href,children:e.label})},e.href))})]})};var Z=e.i(561993),ee=e.i(456420);let et={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};et.node;let en=(0,ee.default)(et);var ea=e.i(263676);let es={name:"message-circle-more",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]]};es.node;let er=(0,ee.default)(es);var ei=e.i(447130),el=e.i(266027),eo=e.i(755332),ec=e.i(442625);let ed=({isMobile:e,buttonProps:n})=>{let{data:a}=(0,F.useGetUser)(),s=(0,q.isAnonymousUser)(),{data:r,isLoading:i}=(0,el.useQuery)({...(0,ec.getAllProductsForLatestOrderSessionQueryOptions)(),enabled:!!(a&&
6!s)}),l=r?.length??0,{data:c,isLoading:u}=(0,eo.useOtcBasket)(),h=c?.products?.reduce((e,t)=>e+t.quantity,0),m=i||u?0:l+(h??0);return(0,t.jsx)(d.Button,{...n,asChild:!0,children:(0,t.jsx)(o.default,{href:"/marketplace/basket",children:e?(0,t.jsxs)("span",{className:"flex items-center gap-1.5 w-full",children:["My basket",(0,t.jsxs)("span",{className:"ml-auto flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"w-1 h-1 rounded-full bg-gray-300"}),(0,t.jsx)("span",{className:"tabular-nums text-base",children:m})]})]}):(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(ei.ShoppingBasket,{className:"size-4.5"}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"w-1 h-1 rounded-full bg-gray-300"}),(0,t.jsx)("span",{className:"tabular-nums text-base",children:m})]}),(0,t.jsx)("span",{className:"sr-only",children:"My basket"})]})})})};var eu=e.i(975157),eh=e.i(540855),em=e.i(831023),ep=e.i(851532),ex=e.i(675013);function ef({className:e}){let n=(0,eh.useSession)(),a=n?.user?.id,{data:s}=(0,em.useLinkedPharmacies)({userId:a}),r=(0,ex.resolvePharmacy)(s,null),{data:i}=(0,ep.useUnreadMessagesCount)({pharmacyId:r?.id});return i?(0,t.jsx)("span",{className:(0,eu.cn)("pointer-events-none absolute size-2 rounded-full bg-destructive",e),children:(0,t.jsx)("span",{className:"sr-only",children:"You have unread messages"})}):null}let eg=({isMobile:e=!1})=>{let n=e?{variant:"ghost",className:"w-full justify-start text-base py-2 px-3 rounded-md hover:bg-gray-100"}:{variant:"outline",className:"border-brand-200 text-brand-contrast font-medium text-base px-3 shadow-none"},a=(0,Y.isCARegion)();return(0,t.jsxs)("div",{className:`flex items-center gap-3 ${e?"flex-col w-full":""}`,role:"group","aria-label":"Quick actions",children:[(0,t.jsx)(d.Button,{...n,asChild:!0,children:(0,t.jsx)(o.default,{href:a?"/my-prescriptions/orders":"/orders",children:"My orders"})}),(0,t.jsx)(d.Button,{...n,asChild:!0,children:(0,t.jsxs)(o.default,{href:a?"/messages":"/orders/messages",className:"relative",children:[e?"Messages":(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"sr-only",children:"Messages"}),(0,t.jsx)(er,{className:"size-4.5"})]}),a&&(0,t.jsx)(ef,{className:e?"static ml-1":"right-1 top-1"})]})}),(0,t.jsx)(ed,{isMobile:e,buttonProps:n})]})},eb=({identity:e,menu:n,hideActions:a=!1})=>(0,t.jsxs)(Z.Drawer,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"inline md:hidden",children:(0,t.jsx)(ed,{buttonProps:{variant:"outline"}})}),(0,t.jsx)(Z.DrawerTrigger,{asChild:!0,children:(0,t.jsxs)(d.Button,{variant:"ghost",size:"icon",children:[(0,t.jsx)(en,{className:"h-6 w-6"}),(0,t.jsx)("span",{className:"sr-only",children:"Menu"})]})})]}),(0,t.jsxs)(Z.DrawerContent,{className:"p-0 w-full max-w-xs flex flex-col h-full","data-vaul-drawer-direction":"left",children:[(0,t.jsx)(Z.DrawerHeader,{className:"px-4 py-4 border-b",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(Z.DrawerTitle,{className:"font-semibold text-lg",children:(0,t.jsx)(l,{identity:e})}),(0,t.jsx)(Z.DrawerClose,{asChild:!0,children:(0,t.jsxs)(d.Button,{variant:"ghost",size:"icon",autoFocus:!0,children:[(0,t.jsx)(ea.X,{className:"h-6 w-6"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-4 flex flex-col gap-4",role:"navigation",children:[(0,t.jsx)(H,{menu:n,mobile:!0}),!a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"border-t pt-4",children:(0,t.jsx)(eg,{isMobile:!0})}),(0,t.jsx)("div",{className:"mt-auto border-t pt-4 mb-14",children:(0,t.jsx)(J,{isMobile:!0})})]})]})]})]});var ej=e.i(902434),ej=ej,eN=e.i(618566),ev=e.i(343488);let ey="cursor-pointer snap-start text-brand-700 hover:bg-background hover:border-brand-900 hover:text-brand-900",ek="border-black text-foreground ",ew=e=>"link"===e.kind||e.links.length>0,eC=e=>"link"===e.kind?[e.url]:e.links.map(e=>e.url),eR=({homepageUrl:e,menu:a,preview:s=!1})=>{let r=(0,eN.usePathname)(),i=z(),l=(0,n.useRef)(null),c=(0,n.useCallback)(e=>{l.current=e}
6,[]),u=(0,n.useRef)(null),[h,m]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),f=r===e||"/"===r||!r,g=a.filter(ew),b=[e,"/",...g.flatMap(eC)].includes(r??""),j=(0,n.useCallback)(()=>{let e=u.current;e&&(m(e.scrollLeft>0),x(e.scrollLeft<e.scrollWidth-e.clientWidth-1))},[]),N=(0,ev.useDebouncedCallback)(j,{wait:50}),v=(0,ev.useDebouncedCallback)(j,{wait:150});return((0,n.useEffect)(()=>{let e=l.current,t=u.current;if(!e||!t)return;let n=e.getBoundingClientRect(),a=t.getBoundingClientRect();n.left>=a.left&&n.right<=a.right||e.scrollIntoView({behavior:"instant",block:"nearest",inline:"center"})},[r]),(0,n.useEffect)(()=>(j(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)),[j,v,a]),0!==g.length&&(s||b))?(0,t.jsxs)("div",{className:"relative","aria-hidden":"true",children:[(0,t.jsx)("div",{className:(0,eu.cn)("pointer-events-none absolute left-0 top-0 bottom-0 w-16 bg-gradient-to-r from-background to-transparent z-1 transition-opacity duration-200",h?"opacity-100":"opacity-0")}),(0,t.jsx)("div",{className:(0,eu.cn)("pointer-events-none absolute right-0 top-0 bottom-0 w-16 bg-gradient-to-l from-background to-transparent z-1 transition-opacity duration-200",p?"opacity-100":"opacity-0")}),(0,t.jsx)("div",{ref:u,onScroll:N,className:"container-full overflow-x-auto scrollbar-none py-2 snap-x snap-mandatory scroll-px-4",children:(0,t.jsxs)("div",{className:"flex gap-2 w-max",children:[(0,t.jsx)(d.Button,{variant:"outline",size:"sm",asChild:!0,className:(0,eu.cn)(ey,f&&ek),"data-active":f||void 0,tabIndex:-1,children:(0,t.jsxs)(o.default,{href:e,tabIndex:-1,ref:f?c:void 0,children:[(0,t.jsx)(ej.default,{}),"Home"]})}),g.map((e,n)=>{if("group"===e.kind){let a=e.links.some(e=>r===e.url);return(0,t.jsx)(eU,{item:e,active:a,ref:a?c:void 0},n)}let a=r===e.url;return(0,t.jsx)(d.Button,{variant:"outline",size:"sm",asChild:!0,className:(0,eu.cn)(ey,a&&ek),"data-active":a||void 0,tabIndex:-1,children:(0,t.jsx)(o.default,{href:e.url,tabIndex:-1,ref:a?c:void 0,onClick:()=>i(e.url),children:e.label})},n)})]})})]}):null};function eU({item:e,active:n,ref:a}){return(0,t.jsxs)(D.DropdownMenu,{children:[(0,t.jsx)(D.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(d.Button,{variant:"outline",size:"sm",className:(0,eu.cn)(ey,n&&ek,"[&[data-state=open]>svg]:rotate-180"),"data-active":n||void 0,tabIndex:-1,ref:a,children:[e.label,(0,t.jsx)(c.ChevronDown,{className:"size-3.5 transition-transform"})]})}),(0,t.jsx)(D.DropdownMenuContent,{align:"start",className:"min-w-48",onCloseAutoFocus:e=>e.preventDefault(),children:(0,t.jsx)(P,{item:e})})]})}var eA=e.i(99699),eI=e.i(323508),eS=e.i(257602),eL=e.i(89888),eD=e.i(693162);e.s(["Header",0,()=>{let e=!!(0,n.useContext)(eD.PreviewContext),{data:a}=(0,eL.useWebsiteHeader)(),s=(0,eS.useOrganisationIdentity)(),r=(0,eI.useHomepageUrl)(),i=(0,eA.useHeaderPages)(),c=a?.menu??i.map(e=>({kind:"link",label:e.headerTitle,url:e.headerLink,isReadOnly:!0}));return(0,t.jsxs)("header",{className:"sticky top-0 z-50 flex flex-col bg-white shadow-[0px_1px_2px_rgba(0,0,0,0.05)]",children:[(0,t.jsxs)("div",{className:"container-wide flex items-center justify-between gap-4 py-2.5 min-h-14",children:[(0,t.jsx)(o.default,{href:r,className:"flex items-center shrink min-w-0",children:(0,t.jsx)(l,{identity:s})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("nav",{className:"hidden md:flex items-center gap-3",children:[(0,t.jsx)(eg,{}),(0,t.jsx)(J,{})]}),(0,t.jsx)("nav",{className:"block md:hidden","aria-label":"Menu",children:(0,t.jsx)(eb,{identity:s,menu:c})})]})]}),(0,t.jsx)("div",{className:"hidden md:flex items-center container-wide pb-3 pt-1",children:(0,t.jsx)(H,{menu:c})}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(eR,{homepageUrl:r,menu:c,preview:e})})]})}
6],335155)},363273,323508,e=>{"use strict";var t=e.i(271645),n=e.i(540187),a=e.i(89888),s=e.i(693162);e.s(["useLogo",0,function(){let e=(0,t.useContext)(s.PreviewContext),{data:r}=(0,n.useConfig)(),{data:i}=(0,a.useWebsiteThemeLogo)(),l=e?.themeOverride?.logoUrl??e?.logoPreview?.logoUrl;return l||(i??r?.logoUrl??"")}],363273),e.s(["useHomepageUrl",0,function(){let{data:e}=(0,n.useConfig)(),{data:t}=(0,a.useWebsiteSettings)();return t?.externalHomepageUrl??e?.homepageUrl??"/"}],323508)}]); 7 8//# debugId=fb899ba9-a1ae-658c-dabe-5d8d2545d042
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.