1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4741],{34985:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/medspa-user/[name]",function(){return a(44196)}])},44196:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return eO},default:function(){return _name_}});var l=a(85893),n=a(79256),r=a(67294),s=a(12238),i=a(19765),o=a(75268),c=a(45808),d=a(79241);function formatClockTo12h(e){if(!e)return"";let t=(0,d.ZP)(e,"HH:mm",new Date);return Number.isFinite(t.getTime())?(0,c.ZP)(t,"h:mm a"):""}a(87014);var m=a(33783);function CompletedAppointments(e){let{completedAppointments:t=null,isLoading:a}=e,n=(0,r.useMemo)(()=>Array.isArray(t)?t.filter(e=>!!(null==e?void 0:e.procedureId)):[],[t]);return(0,l.jsx)(l.Fragment,{children:a?(0,l.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,l.jsx)(o.Z,{"aria-label":"Loading","aria-hidden":!0})}):n.length>0?(0,l.jsx)("div",{children:n.map(e=>(0,l.jsxs)("div",{className:"flex flex-row justify-between rounded-xl bg-ivory mb-2",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2 bg-green w-14 px-4 justify-center items-center rounded-l-xl",children:[(0,l.jsx)("span",{className:"t-overline-sm text-gold uppercase font-semibold",children:e.month}),(0,l.jsx)("span",{className:"text-gold uppercase t-overline-sm font-semibold text-[26px]",children:e.day})]}),(0,l.jsxs)("div",{className:"w-full flex flex-col xxl:flex-row xxl:justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start w-full pl-4 py-4",children:[(0,l.jsxs)("div",{className:"flex flex-col mb-4",children:[(0,l.jsx)("h3",{className:"text-black t-subsection-header",children:e.serviceName}),(0,l.jsxs)("span",{className:"text-charcoal t-body-sm font-bold",children:["".concat(formatClockTo12h(e.startTime)," "),(0,l.jsx)("span",{className:" text-charcoal font-normal",children:"with Dr. ".concat(e.staffName,", ").concat(e.staffRole)})]})]}),(0,l.jsx)("div",{className:"w-full flex flex-col xxl:flex-row xxl:justify-between",children:(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsx)("span",{className:"text-gold uppercase t-overline-sm",children:"".concat(e.location.city," Aedit Medspa")}),(0,l.jsx)("span",{className:"t-body-sm text-charcoal",children:"".concat(e.location.line1,", ").concat(e.location.line2," - ").concat(e.location.city,", ").concat(e.location.state," ").concat(e.location.zip)})]})})]}),(0,l.jsx)("div",{className:"flex gap-2 px-4 justify-center items-center pb-4 xxl:pb-0",children:(0,l.jsx)(m.z,{onClick:()=>{var t;return(0,i.bi)("booking",{initialItemId:e.procedureId,initialName:e.procedureName||e.serviceName,initialLocationId:null===(t=e.location)||void 0===t?void 0:t.id})},className:"px-8 py-3 t-body-sm leading-4 max-h-10 w-full xxl:w-[140px] whitespace-nowrap",children:"Book Again"})})]})]},e.appointmentId))}):(0,l.jsx)("div",{children:"appointments"})})}var u=a(29857),x=a(3241);function CancelAppointmentModal(e){let{isOpen:t,setIsOpen:a,clientId:n,appointmentId:i,updateUserSession:o,currentUser:c}=e,[d,h]=(0,r.useState)(!1);async function handleCancel(){h(!0),await (0,x.SU)({makeRequest:()=>s.Oj.client.mutations.cancelAppointment(n,{id:i,notes:"Canceled directly by the user."}),successCallback:async()=>{await o(c,!1,!0)},finallyCallback:()=>{h(!1),a(!1)}})}return(0,l.jsx)(u.Vq,{open:t,onOpenChange:a,children:(0,l.jsxs)(u.cZ,{className:"p-10 bg-white max-w-xl flex-col gap-4",closeButtonClassName:"top-4 right-4",children:[(0,l.jsx)(u.fK,{children:(0,l.jsx)(u.$N,{className:"text-black text-center",children:"Are you sure you want to cancel your appointment?"})}),(0,l.jsx)(u.Be,{className:"text-black text-center mb-4",children:"That's a risky self-care choice."}),(0,l.jsxs)(u.cN,{className:"mx-auto",children:[(0,l.jsx)(m.z,{className:"px-7 py-3 h-12 w-full md:w-fit",onClick:()=>a(!1),children:"Keep Appointment"}),(0,l.jsx)(m.z,{variant:"link-black",onClick:handleCancel,disabled:d,children:"Cancel Appointment"})]})]})})}function UpcomingAppointments(e){let{upcomingAppointments:t=null,isLoading:a,clientId:n,currentUser:s,updateUserSession:c}=e,[d,u]=(0,r.useState)(null),[x,h]=(0,r.useState)(!1),p=(0,r.useRef)(null),handleCancelAppointment=e=>{u(e),h(!0)};return(0,l.jsx)(l.Fragment,{children:a?(0,l.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,l.jsx)(o.Z,{"aria-label":"Loading","aria-hidden":!0})}):t?(0,l.jsxs)("div",{ref:p,children:[t.map(e=>{let t=Array.isArray(e.addons)&&e.addons.length>0?e.addons.map(e=>{var t;return null===(t=e.service)||void 0===t?void 0:t.name}).join(", "):"No enhancements";return(0,l.jsxs)("div",{className:"flex flex-row justify-between rounded-xl bg-ivory mb-2",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2 bg-green w-14 px-4 justify-center items-center rounded-l-xl",children:[(0,l.jsx)("span",{className:"t-overline-sm text-gold uppercase font-semibold",children:e.month}),(0,l.jsx)("span",{className:"text-gold uppercase t-overline-sm font-semibold text-[26px]",children:e.day})]}),(0,l.jsxs)("div",{className:"w-full flex flex-col xxl:flex-row xxl:justify-between",children:[(0,l.jsxs)("div",{className:" flex flex-col items-start w-full pl-4 py-4",children:[(0,l.jsxs)("div",{className:"flex flex-col mb-4",children:[(0,l.jsx)("h3",{className:"text-black t-subsection-header",children:e.serviceName}),(0,l.jsxs)("span",{className:"text-charcoal t-body-sm font-bold",children:["".concat(formatClockTo12h(e.startTime)," "),(0,l.jsx)("span",{className:" text-charcoal font-normal",children:"with Dr. ".concat(e.staffName,", ").concat(e.staffRole)}
1)]})]}),(0,l.jsxs)("div",{className:"w-full flex flex-col xxl:flex-row xxl:justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsx)("span",{className:"text-gold uppercase t-overline-sm",children:"".concat(e.location.city," Aedit Medspa")}),(0,l.jsx)("span",{className:"t-body-sm text-charcoal",children:"".concat(e.location.line1,", ").concat(e.location.line2," - ").concat(e.location.city,", ").concat(e.location.state," ").concat(e.location.zip)})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsx)("span",{className:"text-gold uppercase t-overline-sm",children:"selected enhancements"}),(0,l.jsx)("span",{className:"t-body-sm text-charcoal",children:t})]})]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 px-4 justify-center items-center pb-4 xxl:pb-0",children:[(0,l.jsx)(m.z,{type:"button",variant:"ghost-gray",className:"px-8 py-3 t-body-sm leading-4 h-12 whitespace-nowrap border-dark-gray border w-full xxl:w-[140px]",onClick:()=>handleCancelAppointment(e.appointmentId),style:{border:"1px solid #939393 "},children:"Cancel"}),(0,l.jsx)(m.z,{type:"button",variant:"default",disabled:!!e.rescheduleDisabled,className:"px-8 py-3 t-body-sm h-12 whitespace-nowrap w-full xxl:w-[140px]",onClick:()=>{(0,i.zD)("rescheduleProcedure",{appointmentData:e})},children:"Reschedule"})]})]})]})}),(0,l.jsx)(CancelAppointmentModal,{clientId:n,currentUser:s,updateUserSession:c,appointmentId:d,isOpen:x,setIsOpen:h})]}):(0,l.jsx)("p",{className:"t-body",children:"You have no upcoming appointments available"})})}var h=a(36951),p=a(4686),f=a(55745),v=a(70789),g=a(87198);function getStartAtTimestamp(e){let t=new Date((null==e?void 0:e.startAt)||"").getTime();return Number.isFinite(t)?t:Number.POSITIVE_INFINITY}var b=a(25675),j=a.n(b),y=a(41664),w=a.n(y),N=a(22653),k=a(74866);function AeditionCard(e){let{article:t}=e,{toggle:a,isLoading:n}=(0,k.B)(t);return(0,l.jsxs)("div",{className:"relative inline-block w-96 h-100 mr-8 mb-8",children:[(0,l.jsxs)(w(),{as:"/aedition/".concat(t.slug),href:"/aedition/[slug]",rel:"noopener noreferrer",children:[(0,l.jsx)("div",{className:"w-96 h-52 overflow-hidden relative",children:(0,l.jsx)(j(),{src:t.articleThumbn
1ailImage.src,alt:t.title,className:"object-cover",fill:!0,unoptimized:!0})}),(0,l.jsx)("span",{className:"absolute top-3 left-3 bg-ivory t-chiclet rounded-full px-3 py-1",children:t.collection.title}),(0,l.jsxs)("div",{className:"group",children:[(0,l.jsx)("span",{className:"block mt-2 t-subsection-header text-black group-hover:text-dark-gray transition-colors",children:t.title}),(0,l.jsx)("p",{className:"t-body text-black group-hover:text-dark-gray line-clamp-3 text-ellipsis transition-colors",children:t.intro})]})]}),(0,l.jsx)("button",{className:"absolute top-0 right-0 bg-transparent p-0 border-0 cursor-pointer",disabled:n,onClick:e=>{e.preventDefault(),e.stopPropagation(),a()},"aria-label":"Remove bookmark",children:(0,l.jsx)(N.Z,{className:(0,v.cn)("w-8 h-8 fill-gold",n&&"opacity-50"),stroke:"none","aria-hidden":!0})})]})}function BookmarksAedition(e){let{favorites:t=[]}=e;return(0,l.jsx)("div",{className:"overflow-y-auto max-h-[60vh]",children:t.length?t.map((e,t)=>{var a;return(0,l.jsx)(AeditionCard,{article:e},null!==(a=e.id)&&void 0!==a?a:t)}):(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"mb-8 t-subsection-header leading-6 text-charcoal",children:"You don't have any AEDITION Bookmarks"}),(0,l.jsxs)("div",{className:"bg-ivory max-w-[596px] min-w-[320px] rounded-2xl p-6",children:[(0,l.jsx)("span",{className:"text-gold font-medium text-sm tracking-overline uppercase h-8 text-start",children:"About the Aedition"}),(0,l.jsxs)("p",{className:"t-body text-charcoal",children:["Whether you're just getting familiar with cosmetic treatments or far along your aesthetic journey, our digital publication has something for you. ",(0,l.jsx)("br",{})," Our information is expert-backed by board-certified physicians and isn't powered by advertising, ensuring unbiased, trustworthy information that always delivers honest answers."]}),(0,l.jsx)("div",{className:" mt-6 w-fit items-start flex h-12",children:(0,l.jsx)(w(),{as:"/aedition",href:"aedition-button",children:(0,l.jsx)(m.z,{id:"aedition-button",className:"px-7 py-3 t-body-sm w-full h-full whitespace-nowrap",children:"Read the AEDITION"})})})]})]})})}function ConcernCard(e){let{concern:t}=e,{toggle:a,isLoading:n}=(0,k.B)(t);return(0,l.jsxs)("div",{className:"relative inline-block w-96 h-100 mr-8 mb-8",children:[(0,l.jsxs)(w(),{as:"/aedition/".concat(t.slug),href:"/aedition/[slug]",rel:"noopener noreferrer",children:[(0,l.jsx)("div",{className:"w-96 h-52 overflow-hidden relative",children:(0,l.jsx)(j(),{src:t.primary_image_thumbnail_url,alt:t.name,className:"object-cover",fill:!0,unoptimized:!0})}),(0,l.jsxs)("div",{className:"group",children:[(0,l.jsx)("span",{className:"block mt-2 t-subsection-header text-black group-hover:text-dark-gray transition-colors",children:t.name}),(0,l.jsx)("p",{className:"t-body text-black group-hover:text-dark-gray line-clamp-3 text-ellipsis transition-colors",children:t.blurb})]})]}),(0,l.jsx)("button",{className:"absolute top-0 right-0 bg-transparent p-0 border-0 cursor-pointer",disabled:n,onClick:e=>{e.preventDefault(),e.stopPropagation(),a()},"aria-label":"Remove bookmark",children:(0,l.jsx)(N.Z,{className:(0,v.cn)("w-8 h-8 fill-gold",n&&"opacity-50"),stroke:"none","aria-hidden":!0})})]})}function BookmarksConcerns(e){let{favorites:t=[]}=e;return(0,l.jsx)("div",{className:"overflow-y-auto max-h-[60vh]",children:t.length?t.map((e,t)=>{var a;return(0,l.jsx)(ConcernCard,{concern:e},null!==(a=e.id)&&void 0!==a?a:t)}):(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"mb-8 t-subsection-header leading-6 text-charcoal",children:"You don't have any CONCERNS Bookmarks"}),(0,l.jsxs)("div",{className:"bg-ivory max-w-[596px] min-w-[320px] rounded-2xl p-6",children:[(0,l.jsx)("span",{className:"text-gold font-medium text-sm tracking-overline uppercase h-8 text-start",children:"About the Concerns"}),(0,l.jsx)("p",{className:"t-body text-charcoal",children:"You haven't favorited any concerns just yet. Check out our concern database to find more."}),(0,l.jsx)("div",{className:" mt-6 w-fit items-start flex h-12",children:(0,l.jsx)(w(),{as:"/concerns",href:"concerns-button",children:(0,l.jsx)(m.z,{id:"concerns-button",className:"px-7 py-3 t-body-sm w-full h-full whitespace-nowrap",children:"Visit the Concerns Database"})})})]})]})})}function SolutionCard(e){let{procedure:t}=e,{toggle:a,isLoading:n}=(0,k.B)(t);return(0,l.jsxs)("div",{className:"relative inline-block w-96 h-100 mr-8 mb-8",children:[(0,l.jsxs)(w(),{as:"/aedition/".concat(t.slug),href:"/aedition/[slug]",rel:"noopener noreferrer",children:[(0,l.jsx)("div",{className:"w-96 h-52 overflow-hidden relative",children:(0,l.jsx)(j(),{src:t.primary_image_url,alt:t.name,className:"object-cover",fill:!0,unoptimized:!0})}),(0,l.jsxs)("div",{className:"group",children:[(0,l.jsx)("span",{className:"block mt-2 t-subsection-header text-black group-hover:text-dark-gray transition-colors",children:t.name}),(0,l.jsx)("p",{className:"t-body text-black group-hover:text-dark-gray line-clamp-3 text-ellipsis transition-colors",children:t.card_description})]})]}),(0,l.jsx)("button",{className:"absolute top-0 right-0 bg-transparent p-0 border-0 cursor-pointer",disabled:n,onClick:e=>{e.preventDefault(),e.stopPropagation(),a()},"aria-label":"Remove bookmark",children:(0,l.jsx)(N.Z,{className:(0,v.cn)("w-8 h-8 fill-gold",n&&"opacity-50"),stroke:"none","aria-hidden":!0})})]})}function BookmarksSolutions(e){let{favorites:t=[]}=e;return(0,l.jsx)("div",{className:"overflow-y-auto max-h-[60vh]",children:t.length?t.map((e,t)=>{var a;return(0,l.jsx)(SolutionCard,{procedure:e},null!==(a=e.id)&&void 0!==a?a:t)}):(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"mb-8 t-subsection-header leading-6 text-charcoal",children:"You don't have any SOLUTIONS Bookmarks"}),(0,l.jsxs)("div",{className:"bg-ivory max-w-[596px] min-w-[320px] rounded-2xl p-6",children:[(0,l.jsx)("span",{className:"text-gold font-medium text-sm tracking-overline uppercase h-8 text-start",children:"About the Solutions"}),(0,l.jsx)("p",{className:"t-body text-charcoal",children:"Our user-friendly guides break down the important, relevant details of cosmetic treatments and aesthetic concerns. With more than 350 medically verified procedures, research each of your options with AEDIT."}),(0,l.jsx)("div",{className:" mt-6 w-fit items-start flex h-12",children:(0,l.jsx)(w(),{as:"/procedures",href:"solutions-button",children:(0,l.jsx)(m.z,{id:"solutions-button",className:"px-7 py-3 t-body-sm w-full h-full whitespace-nowrap",children:"Visit the Solution Database"})})})]})]})})}var C=a(7739),A=a.n(C),P=a(12084),D=a(93767);let formatFavorites=e=>(null!=e?e:[]).map(e=>((null==e?void 0:e.sys)&&(e=(0,P.Z)(e)),e._type=(null==e?void 0:e.contentType)||(null==e?void 0:e._type),e));function phoneModifier(e){let t=null!=e?e:"",a=[];return t.length>3&&(a.push("(".concat(t.slice(0,3),")")),t=t.slice(3)),t.length>3&&(a.push(t.slice(0,3)),t=t.slice(3)),t.length>0&&a.push(t.slice(0,4)),a.join("-")}function formatProfileDate(e){return e?new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(e)):""}function enrichPackages(e,t,a){let l=a.flatMap(e=>{var t;return null!==(t=e.procedures)&&void 0!==t?t:[]}).reduce((e,t)=>
1(t.procedureSlug&&(e[t.procedureSlug]=t),e),{});return Object.entries(e).map(e=>{var a;let[n,{vouchers:r,locations:s}]=e,i=t.find(e=>e.treatmentName===n);if(!i)return null;let o=(null!==(a=i.childrenProcedures)&&void 0!==a?a:[]).flatMap(e=>{let t=e.procedureSlug;return t?[t]:[]}),c=new Map;(null!=r?r:[]).forEach(e=>{(null==e?void 0:e.name)&&c.set(e.name,e)});let d=o.flatMap(e=>{var t;let a=l[e];if(!a)return[];let n=null!==(t=a.procedureName?c.get(a.procedureName):void 0)&&void 0!==t?t:a.procedureSlug?c.get(a.procedureSlug):void 0;return[n?{...a,boulevard:{id:n.id,name:n.name}}:a]}),m=d.filter(e=>"boulevard"in e),u=d.filter(e=>!("boulevard"in e));return{id:i.id,contentfulPackage:i,treatmentName:n,totalCount:d.length,vouchers:d,remainingCount:m.length,redeemedCount:u.length,remainingProcedures:m,redeemedProcedures:u,locations:s}}).filter(Boolean)}let M={light:"animate-pulse-light",dark:"animate-pulse"};function Skeleton(e){let{className:t,variant:a="light",...n}=e;return(0,l.jsx)("div",{"data-slot":"skeleton",className:(0,v.cn)("rounded-xl bg-ivory",M[a],t),...n})}var I=a(86748);function DashboardBalance(e){let{myAccountBalance:t,isLoading:a}=e;if(a)return(0,l.jsx)(Skeleton,{className:"w-full lg:w-2/5 h-[136px] rounded-xl bg-ivory",variant:"light"});let n=(0,I.PE)(t);return(0,l.jsxs)("div",{className:"flex flex-col p-4 bg-ivory rounded-xl w-full lg:w-2/5",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsx)("span",{className:"t-overline leading-6 text-green ",children:"Your Aedit Credits"}),(0,l.jsxs)(u.Vq,{children:[(0,l.jsx)(u.hg,{className:"p-0",render:(0,l.jsx)(m.z,{variant:"link-green",className:"h-fit"}),children:"Learn More"}),(0,l.jsxs)(u.cZ,{className:"bg-white max-w-lg gap-4 px-8 py-16",children:[(0,l.jsx)(u.fK,{children:(0,l.jsx)(u.$N,{className:"text-center t-subsection-header font-normal text-black",children:"Your AEDIT Credits"})}),(0,l.jsxs)(u.Be,{className:"text-center text-black t-body",children:["Your balance will update AFTER yasasour appointment has been completed. Once your visit is finalized, your account will reflect any changes to your available credits. To learn more about AEDIT Credits,"," ",(0,l.jsx)(w(),{className:"underline",href:"/faq#topic-aedit-credits",children:"visit our FAQ page"}),"."]})]})]})]}),(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,l.jsx)("span",{className:"mb-2 text-[32px] font-maison font-semibold leading-8 tracking-overline text-gold tabular-nums",children:(0,I.lb)(n)}),(0,l.jsx)("span",{className:"text-charcoal font-maison font-light text-sm leading-5",children:"Available balance"})]})]})}function DashboardAppointmentHistory(e){let{oldAppointments:t,isLoading:a}=e,n=Array.isArray(t)?t.filter(e=>!!(null==e?void 0:e.procedureId)):[],r=n.length>0;return a?(0,l.jsx)(Skeleton,{className:"w-full h-[312px] rounded-xl bg-ivory",variant:"light"}):r?(0,l.jsxs)("div",{className:"flex flex-col w-full p-4 pb-8 bg-ivory rounded-xl gap-4",children:[(0,l.jsx)("h3",{className:"t-overline text-green uppercase",children:"Appointment history"}),n.slice(0,3).map(e=>(0,l.jsxs)("div",{className:" flex flex-row justify-between border-b items-center border-b-ivory-press pb-4",children:[(0,l.jsxs)("div",{className:"flex flex-col mb-0 w-full",children:[(0,l.jsx)("span",{className:"text-base leading-4 font-maison text-black",children:e.serviceName}),(0,l.jsx)("span",{className:"uppercase t-overline-sm text-dark-gray",children:"".concat(e.month," ").concat(e.day,", ").concat(e.year," @ ").concat(formatClockTo12h(e.startTime)," ")})]}),(0,l.jsx)("div",{className:"flex items-center justify-end",children:(0,l.jsx)(m.z,{className:"w-fit pr-0",variant:"link-green",onClick:()=>{var t;return(0,i.bi)("booking",{initialItemId:e.procedureId,initialName:e.procedureName||e.serviceName,initialLocationId:(null==e?void 0:null===(t=e.location)||void 0===t?void 0:t.id)||null})},children:"Book Again"})})]},e.appointmentId))]}):(0,l.jsxs)("div",{className:"flex flex-col p-4 pb-12 gap-4 bg-ivory rounded-xl w-full",children:[(0,l.jsx)("h3",{className:"t-overline text-green uppercase",children:"Appointment history"}),(0,l.jsx)("span",{className:"text-charcoal t-body",children:"You have no appointment history yet."})]})}var _=a(80656);function DashboardMembership(e){let{vouchers:t,isLoading:a,myPrimaryLocation:n,contentfulMembership:r,isMember:s,isBenefitBooked:o}=e,c=Array.isArray(t)&&t.length>0;return a?(0,l.jsx)(Skeleton,{className:"h-[224px] lg:h-[536px] w-full rounded-xl bg-green",variant:"light"}):s?!c||o?(0,l.jsxs)("div",{className:"bg-green rounded-xl p-4 w-full flex flex-col gap-4 relative overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-cover bg-[center_30%]",style:{backgroundImage:"linear-gradient(0deg, rgba(28, 47, 44, 0.5), rgba(28, 47, 44, 0.5)), url('https://images.ctfassets.net/zw35sfestf1t/2sTKg0laVRlUwLDwtH8oRd/8950228e45015d3c30969932c801b13d/982408ec4cb31760173c8f4f97230754878829a1.png')"}}),(0,l.jsx)("h3",{className:"uppercase t-overline text-white z-10",children:"Monthly Wellness Benefit"}),(0,l.jsx)("span",{className:"text-white font-GT-Super-Display text-l-section-header mb-auto pb-2 z-10",children:"Hope you enjoy your courtesy"}),(0,l.jsx)("p",{className:"text-white t-body z-10",children:"A new wellness treatment will be available for you next month"})]}):(0,l.jsxs)("div",{className:"w-full bg-green p-4 rounded-xl",children:[(0,l.jsx)("h3",{className:"uppercase t-overline text-white",children:"Monthly Wellness Benefit"}),(0,l.jsx)("span",{className:"leading-10 font-GT-Super-Display text-white text-[28px] mb-4",children:"Redeem your treatment:"}),(0,l.jsx)("div",{className:"flex flex-col lg:flex-row gap-2",children:t.map(e=>{var a,s,o;return(0,l.jsx)("div",{className:"treatment-redeem-card flex-1 cursor-pointer w-full lg:w-fit",onClick:()=>{(0,i.wK)("membership",{vouchers:t,locationId:n.id,contentfulMembership:r})},children:(0,l.jsxs)("div",{className:"flex flex-col w-full h-24",children:[(0,l.jsx)("div",{className:"relative h-8 overflow-clip rounded-t-xl w-full",children:(0,l.jsx)(j(),{src:null===(s=e.contentful)||void 0===s?void 0:null===(a=s.procedureImage)||void 0===a?void 0:a.src,alt:"Voucher Redeemable Procedure",fill:!0,unoptimized:!0,className:"object-cover"})}),(0,l.jsxs)("div",{className:"group flex flex-row justify-between bg-ivory h-full rounded-b-xl px-2 items-center",children:[(0,l.jsx)("span",{className:"text-green t-body-sm",children:null===(o=e.contentful)||void 0===o?void 0:o.procedureName}),(0,l.jsx)("div",{className:"h-6 w-6",children:(0,l.jsx)(_.Z,{height:24,width:24,className:"stroke-green group-hover:stroke-green-hover"})})]})]})},e.boulevard.id)})})]}):(0,l.jsxs)("div",{className:"bg-green rounded-xl p-4 w-full flex flex-col gap-4 relative overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-cover bg-[center_30%]",style:{backgroundImage:"linear-gradient(0deg, rgba(28, 47, 44, 0.5), rgba(28, 47, 44, 0.5)), url('https://images.ctfassets.net/zw35sfestf1t/2sTKg0laVRlUwLDwtH8oRd/8950228e45015d3c30969932c801b13d/982408ec4cb31760173c8f4f97230754878829a1.png')"}}),(0,l.jsx)("h3",{className:"uppercase t-overline text-white z-10",children:"Monthly Wellness Benefit"}),(0,l.jsxs)("span",{className:"text-white t-body mb-auto pb-4 z-10",children:["AEDIT WELL+ members have access to exclusive perks. Curious?"," "]}),(0,l.jsx)(m.z,{variant:"ghost-white",className:"w-fit self-center hover:text-white-hover z-10",onClick:()=>(0,i.bi)("membership"),children:"Join AEDIT WELL+"})]})}var T=a(29641),S=a(50158);function DashboardPackages(e){let{packages:t=[],isLoading:a=!1}=e,n=(0,T.Vm)(),r=Array.isArray(t)&&t.length>0;if(a)return(0,l.jsx)(Skeleton,{className:"w-full lg:w-2/5 h-[208px] rounded-xl bg-ivory",variant:"light"});if(!r)return(0,l.jsxs)("div",{className:"bg-ivory rounded-xl p-4 flex flex-col gap-4 w-full lg:w-2/5",children:[(0,l.jsxs)("div",{className:"flex flex-row justify-between items-center",children:[(0,l.jsx)("h3",{className:"t-overline text-green uppercase",children:"Your packages"}),(0,l.jsx)(w(),{href:"/medspa-user/packages",className:"text-link hover:text-link-hover underline t-body-sm",children:"See More"})]}),(0,l.jsx)("span",{className:"w-full t-body text-charcoal",children:"Discover curated packages to give you the most out of your AEDIT Cosmetic Wellness experience."}),(0,l.jsx)(m.z,{variant:"ghost-gray",className:"w-fit self-center",disabled:!n,onClick:()=>(0,i.bi)("packages"),children:n?"Purchase Packages":"Coming Soon"})]});let s=t.find(e=>{var t;return(null!==(t=null==e?void 0:e.remainingCount)&&void 0!==t?t:0)>0})||t[0]||{},{treatmentName:o="",redeemedCount:c=0,totalCount:d=0,vouchers:u=[],redeemedProcedures:x=[]}=s;return(0,l.jsxs)("div",{className:"bg-ivory rounded-xl p-4 flex flex-col w-full lg:w-2/5",children:[(0,l.jsxs)("div",{className:"flex flex-row justify-between items-center mb-4",children:[(0,l.jsx)("h3",{className:"t-overline text-green uppercase",children:"Your packages"}),(0,l.jsx)(w(),{href:"/medspa-user/packages",className:"text-link hover:text-link-hover underline t-body-sm",children:"See More"})]}),(0,l.jsx)("span",{className:"w-full font-GT-Super-Display text-2xl leading-8 text-green mb-2",children:o}),(0,l.jsxs)("div",{className:"flex flex-col xl:flex-row justify-between h-full gap-5",children:[(0,l.jsxs)("div",{className:"flex flex-col justify-center xl:items-center h-full",children:[(0,l.jsxs)("span",{className:"text-gold text-2xl",children:[c," of ",d]}),(0,l.jsx)("span",{className:"text-charcoal t-body-sm leading-[18px]",children:"Redeemed"})]}),(0,l.jsx)("div",{className:"flex flex-col gap-2 items-start h-full justify-center",children:u.map(e=>{let t=x.some(t=>t.procedureSlug===e.procedureSlug);return(0,l.jsxs)("div",{className:"flex flex-row gap-2 items-center justify-center",children:[(0,l.jsx)("div",{className:"rounded-full flex w-6 h-6 items-center justify-center ".concat(t?"bg-gold":"bg-inherit border-2 border-black"),children:t&&(0,l.jsx)(S.Z,{width:20,height:20,stroke:"black",strokeWidth:.5})}),(0,l.jsx)("span",{className:"text-xs leading-6 font-maison font-medium text-charcoal",children:e.procedureName})]},e.procedureSlug)})})]})]})}var L=a(762);function DashboardReferal(e){var t,a;let{currentUser:n,copyToClipboard:r}=e,s=(null==n?void 0:null===(a=n.referral_code)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:t.code)||"",i="aedit.com/".concat(s);return(0,l.jsxs)("div",{className:"bg-ivory rounded-xl p-4 w-full",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("span",{className:"uppercase t-overline text-green",children:"Refer a friend"}),(0,l.jsx)("span",{className:"text-charcoal t-body mb-10",children:"Give your friend $100 off their first treatment, and you'll get $100 when they finish their first appointment."})]}),(0,l.jsxs)(m.z,{variant:"ghost-white",className:"group bg-light-gray hover:bg-light-gray-hover flex flex-row justify-between items-center w-full pl-4 py-6 border-none pr-0",onClick:()=>r(i),children:[(0,l.jsx)("span",{className:"t-body-sm text-dark-gray",children:i}),(0,l.jsx)("div",{className:"flex items-center justify-center w-12 h-12",children:(0,l.jsx)(L.Z,{"aria-label":"Copy to clipboard","aria-hidden":!0,
1className:"stroke-black group-hover:stroke-gold group-hover:scale-110 duration-150 transition-all",width:24,height:24})})]})]})}var E=a(13466),Z=a(5595),R=a(4301),B=a(5334),O=a(69880),z=a(45694);function DashboardUpcomingAppointment(e){var t;let{isLoading:a,appointment:n}=e,s=(0,T._i)(),o=(null==n?void 0:n.numAddons)>0;return a?(0,l.jsx)(Skeleton,{className:"w-full md:w-3/5 h-[136px] rounded-xl",variant:"light"}):n?(0,l.jsxs)("div",{className:"flex flex-col bg-ivory p-4 rounded-xl w-full lg:w-3/5",children:[(0,l.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,l.jsx)("h3",{className:"uppercase t-overline",children:"Upcoming appointments"}),(0,l.jsxs)(E.h_,{children:[(0,l.jsx)(E.$F,{children:(0,l.jsx)(Z.Z,{"aria-label":"Ellipsis","aria-hidden":!0,width:24,height:24})}),(0,l.jsx)(E.AW,{className:"bg-white p-0 t-body-sm rounded-none w-auto whitespace-nowrap shadow-[-4px_4px_8px_5px_rgba(0,0,0,0.1)] data-[side=bottom]:data-[open]:fade-in data-[side=bottom]:data-[closed]:fade-out",side:"bottom",align:"end",sideOffset:4,children:(0,l.jsx)(E.Xi,{className:"cursor-pointer px-4 py-3 rounded-none hover:bg-white-hover",children:(0,l.jsx)(w(),{"data-cy":"manage-appointment-link",href:"/medspa-user/appointments",shallow:!0,children:"Manage Appointment"})})})]})]}),(0,l.jsxs)("div",{className:"w-full flex flex-col gap-6 sm:flex-row sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-col w-full",children:[(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-2",children:[(0,l.jsx)("span",{className:"font-GT-Super-Display text-green text-xl leading-8 mb-2",children:n.serviceName}),o&&(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)(R.Z,{"aria-label":"Magic Wand","aria-hidden":!0,stroke:"black",width:12,height:12}),(0,l.jsxs)("span",{className:"t-chiclet",children:["+ ",n.numAddons]})]},"addons")]}),(0,l.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row",children:[(0,l.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,l.jsx)(B.Z,{className:"shrink-0","aria-label":"Calendar","aria-hidden":!0,stroke:"#E3B24D",width:24,height:24,strokeWidth:1}),(0,l.jsx)("span",{className:"text-charcoal t-body-sm leading-4",children:"".concat(n.weekday,", ").concat(n.day," ").concat(n.month)})]}),(0,l.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,l.jsx)(O.Z,{"aria-label":"Clock","aria-hidden":!0,stroke:"#E3B24D",width:24,height:24}),(0,l.jsxs)("span",{className:"text-charcoal t-body-sm leading-4",children:[n.startTime," - ",n.endTime]})]})]})]}),(0,l.jsxs)("div",{className:"flex flex-row items-start w-full gap-2",children:[(0,l.jsx)("div",{className:"relative rounded-full h-14 w-14 overflow-hidden",children:(0,l.jsx)(j(),{src:n.staffAvatar,alt:"Medic Picture",fill:!0,unoptimized:!0})}),(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("span",{className:"underline t-body text-black",children:"".concat(n.staffName,", MD")}),(0,l.jsx)("span",{className:"t-chiclet text-charcoal font-medium",children:"Plastic Surgeon"}),(0,l.jsxs)("div",{className:"flex flex-row gap-1",children:[(0,l.jsx)(z.Z,{"aria-label":"Location Pin","aria-hidden":!0,stroke:"#E3B24D",width:12,height:12}),(0,l.jsx)("span",{className:"text-charcoal t-overline-sm normal-case font-medium tracking-normal",children:"AEDIT Medspa, ".concat("string"!=typeof(t=n.location.city)||""===t.trim()?"":t.trim().split(/\s+/).map(e=>e[0].toUpperCase()).join(""))})]})]})]})]})]}):(0,l.jsxs)("div",{className:"relative flex flex-col justify-between bg-ivory lg:w-3/5 p-4 rounded-xl",children:[(0,l.jsx)("h3",{className:"uppercase t-overline mb-4",children:"Upcoming appointments"}),(0,l.jsx)("div",{className:"flex items-start justify-between w-full h-full",children:(0,l.jsx)("span",{className:"text-start text-charcoal t-body",children:"You have no appointments scheduled at this time."})}),s&&(0,l.jsx)("div",{className:(0,v.cn)("w-full flex mt-4","sm:justify-end sm:mt-0","md:mt-4","xl:mt-0"),children:(0,l.jsx)(m.z,{onClick:()=>(0,i.bi)("booking"),className:"px-8 py-3 border-0 h-10 self-end",children:"Book Now"})})]})}function DashboardProducts(){return(0,l.jsxs)("div",{className:"flex flex-col w-full px-4 pt-4 pb-8 bg-ivory rounded-xl gap-4 relative",children:[(0,l.jsx)("span",{className:"absolute top-4 right-4 text-black bg-white rounded-full t-overline-sm px-3 py-1",children:"Coming soon"}),(0,l.jsx)("h3",{className:"t-overline text-green uppercase",children:"Your products"}),(0,l.jsx)("p",{className:"t-body text-charcoal text-left",children:"Coming soon: AEDIT Medshop. Handpicked essentials to maximize your results."})]})}function DashboardTreatmentsComingSoon(){return(0,l.jsxs)("div",{className:"flex flex-col w-full px-4 pt-4 pb-8 bg-ivory rounded-xl gap-4 relative",children:[(0,l.jsx)("span",{className:"absolute top-4 right-4 text-black bg-white rounded-full t-overline-sm px-3 py-1",children:"Coming soon"}),(0,l.jsx)("h3",{className:"t-overline text-green uppercase",children:"Treatment Plans"}),(0,l.jsx)("p",{className:"t-body text-charcoal text-left",children:"Coming soon: personalized treatment plans built with your AEDIT provider."})]})}function DashboardTreatments(e){let{hasActiveTreatmentPlan:t=!0}=e;return(0,l.jsx)(DashboardTreatmentsComingSoon,{})}var F=a(86308);function dashboard_getStartAtTimestamp(e){let t=new Date((null==e?void 0:e.startAt)||"").getTime();return Number.isFinite(t)?t:Number.POSITIVE_INFINITY}function FileInput(e){let{name:t,isUploading:a=!1,accept:n="image/png, image/jpeg",maxNumOfFiles:r=1,multiple:s=1!==r,maxFileSizeInMb:i=2,handleAutosave:o,...c}=e;return(0,l.jsxs)("div",{className:"flex flex-col items-start",children:[(0,l.jsx)("label",{htmlFor:"file-upload-".concat(t),className:(0,v.cn)("rounded bg-gold cursor-pointer font-normal text-black t-body-sm flex items-center py-3 px-7 justify-center transition-all",a?"opacity-50 cursor-not-allowed":"hover:bg-gold-hover"),children:(0,l.jsx)("div",{className:"flex items-center justify-center h-full w-full",children:a?(0,l.jsx)("div",{className:"animate-spin h-6 w-6 border-4 border-t-transparent border-white rounded-full"}):(0,l.jsx)("p",{className:"flex-nowrap whitespace-nowrap",children:"Upload Photo"})})}),(0,l.jsx)("input",{type:"file",id:"file-upload-".concat(t),name:t,accept:n,multiple:s,onChange:e=>{let t=Array.from(e.target.files);if(t.length>r){alert("You can only upload up to ".concat(r," file").concat(r>1?"s":"",".")),e.target.value="";return}let a=n.split(",").map(e=>e.trim());for(let l of t){if(l.size>1048576*i){alert('File "'.concat(l.name,'" exceeds the maximum size of ').concat(i,"MB.")),e.target.value="";return}if(!a.includes(l.type)){alert('File "'.concat(l.name,'" has an unsupported file type.')),e.target.value="";return}}o&&o(t),e.target.value=""},className:"hidden",...c})]})}var V=a(78070);function LookbookUploads(){let{uploads:e,addUpload:t,removeUpload:a}=(0,D.a)(),[n,s]=(0,r.useState)(null),[i,o]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1),openModal=e=>{s(e)},closeModal=()=>{s(null)},handleAutosave=async e=>{o(!0);let a=new FormData;
1e.forEach(e=>{a.append("media",e)});let l=await (0,x.SU)({makeRequest:async()=>{var e;let t=await V.legacyBrowserBackendApi.post("/user/me/my-uploads",a);return null===(e=t.data)||void 0===e?void 0:e.data},successCallback:e=>{t(e),F.Am.success({title:"Your changes have been saved."})},finallyCallback:()=>{o(!1)}});return l},handleDelete=async e=>{d(!0),await (0,x.SU)({makeRequest:()=>V.legacyBrowserBackendApi.delete("/user/me/my-uploads",{params:{media_id:e}}),successCallback:()=>{a(e),F.Am.success({title:"Your changes have been saved."}),closeModal()},finallyCallback:()=>{d(!1)}})};return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"mb-4 flex flex-col md:flex-row justify-between items-center bg-ivory p-6 rounded-xl gap-6",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("p",{className:"font-maison uppercase text-gold font-medium",children:"my progress photos"}),(0,l.jsx)("p",{className:"t-body text-charcoal",children:"Upload a clear, well-lit photo to see your results over time. Progress photos let you visually track your evolution and stay connected to your goals."})]}),(0,l.jsx)(FileInput,{isUploading:i,name:"lookbook-button",multiple:!0,maxNumOfFiles:3,maxFileSizeInMb:2,handleAutosave:handleAutosave})]}),e.length>0&&(0,l.jsx)("div",{className:"mt-4 flex max-w-none justify-center items-center md:justify-start md:items-start",children:(0,l.jsx)("div",{className:(0,v.cn)("w-120 grid grid-cols-2 auto-rows-[230px] gap-2 overflow-y-auto","xxl:grid-cols-3 xxl:max-h-[calc(100vh-220px)] xxl:pr-12 xxl:gap-4 xxl:box-content"),children:e.map(e=>(0,l.jsx)("div",{onClick:()=>openModal(e),className:"cursor-pointer w-full h-full relative",children:(0,l.jsx)(j(),{src:e.url,alt:"Uploaded",className:"max-h-64 object-cover",fill:!0,unoptimized:!0})},e.id))})}),(0,l.jsx)(u.Vq,{open:!!n,onOpenChange:e=>{e||closeModal()},children:(0,l.jsxs)(u.cZ,{hasCloseButton:!1,backdropClassName:"bg-black/50",className:"bg-white p-6 rounded shadow-lg w-80",children:[(0,l.jsx)("p",{className:"mb-4 text-center",children:"Are you sure? Deleting these photos cannot be undone."}),(0,l.jsxs)("div",{className:"flex justify-between mx-6",children:[(0,l.jsx)("button",{onClick:closeModal,className:"px-4 py-2 bg-gray-300 text-black rounded",children:"Cancel"}),(0,l.jsx)("button",{onClick:()=>handleDelete(n.id),className:"px-4 py-2 bg-error text-white rounded",children:c?(0,l.jsx)("div",{className:"mx-8 animate-spin h-6 w-6 border-4 border-t-transparent border-white rounded-full"}):"Delete"})]})]})})]})}var U=a(50683),W=a(65347);function LookbookAedits(){return(0,l.jsxs)("div",{className:"max-w-[320px] xxl:max-w-[410px]",children:[(0,l.jsx)("span",{className:"font-maison t-section-header text-black",children:"AI Plastic Surgeonâ¢"}),(0,l.jsxs)("div",{className:"flex flex-row items-baseline h-6",style:{gap:6},children:[(0,l.jsx)("span",{className:"t-overline leading-6",children:"Powered By"}),(0,l.jsx)(W.K,{width:36,height:8,fill:"black"})]}),(0,l.jsx)("p",{className:"mb-2 mt-8 t-subsection-header",children:"Get started with your lookbook"}),(0,l.jsx)("p",{className:"mb-8 t-body",children:"Our 3D Aesthetic Simulator allows you to 'try on' cosmetic procedures and instantly visualize possible results from the palm of your hand - anytime, anywhere, for free."}),(0,l.jsx)(U.Gu,{className:"app-store-btn"})]})}function MedspaMembershipStarIcon(e){let{className:t="",stroke:a="#E3B24D",strokeWidth:n=1.4,width:r=24,height:s=24,...i}=e;return(0,l.jsx)("svg",{className:t,width:r,height:s,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:(0,l.jsx)("path",{d:"m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2Z",stroke:a,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})})}function MembershipConfirmDialog(e){let{isOpen:t,onClose:a,title:n,body:r,confirmLabel:s,onConfirm:i,isConfirming:o=!1}=e;return(0,l.jsx)(u.Vq,{open:t,onOpenChange:e=>{e||a()},children:(0,l.jsxs)(u.cZ,{className:"bg-white rounded-xl p-8 max-w-[560px]",children:[(0,l.jsx)(u.$N,{className:"t-subsection-header text-black text-center",children:n}),(0,l.jsx)("p",{className:"t-body text-charcoal text-center italic mt-4",children:r}),(0,l.jsxs)("div",{className:"flex flex-col-reverse items-center justify-center gap-4 mt-8 sm:flex-row sm:gap-8",children:[(0,l.jsx)(m.z,{className:"px-7 py-3 whitespace-nowrap",onClick:a,children:"Keep Membership"}),(0,l.jsx)(m.z,{variant:"link-black",className:"px-7 py-3 whitespace-nowrap",onClick:i,disabled:o,children:s})]})]})})}function CancelMembershipModal(e){let{isOpen:t,onClose:a,membership:n,clientId:i,currentUser:o,updateUserSession:c}=e,[d,m]=(0,r.useState)(!1),handleCancelMembership=async()=>
1{if(!i){F.Am.error({title:"Membership data is unavailable. Please refresh and try again.",timeout:4e3});return}m(!0),await (0,x.SU)({makeRequest:()=>s.Oj.client.mutations.cancelMembership(i,{membershipId:String(n.id)}),successCallback:()=>{c(o,!1,!0),F.Am.success({title:"Membership cancelled!",timeout:4e3})},finallyCallback:()=>{m(!1),a()}})};return(0,l.jsx)(MembershipConfirmDialog,{isOpen:t,onClose:a,title:"Are you sure you want to cancel your membership?",body:"Your self-care â and your wallet â will miss your member benefits.",confirmLabel:"Cancel Membership",onConfirm:handleCancelMembership,isConfirming:d})}function membershipTitle(e){return(null!=e?e:"").replace(/well\s*\+/i,"WELL+").trim()}function PauseMembershipModal(e){let{isOpen:t,onClose:a,membership:n,clientId:i,currentUser:o,updateUserSession:c}=e,[d,m]=(0,r.useState)(!1),handlePauseMembership=async()=>{if(!i){F.Am.error({title:"Membership data is unavailable. Please refresh and try again.",timeout:4e3});return}m(!0),await (0,x.SU)({makeRequest:()=>s.Oj.client.mutations.pauseMembership(i,{id:String(n.id),unpauseOn:function(e){let t=new Date;return t.setMonth(t.getMonth()+1),t}(0)}),successCallback:()=>{c(o,!1,!0),F.Am.success({title:"Membership paused!",timeout:4e3})},finallyCallback:()=>{m(!1),a()}})};return(0,l.jsx)(MembershipConfirmDialog,{isOpen:t,onClose:a,title:"Are you sure you want to pause your membership?",body:"Before you pause, remember: your special member pricing will take a little break too.",confirmLabel:"Pause Membership",onConfirm:handlePauseMembership,isConfirming:d})}function DesktopActiveMembership(e){let{membership:t,perks:a,boulevardClientId:n,currentUser:s,updateUserSession:i}=e,[o,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),x=formatProfileDate(t.nextChargeDate),h=Math.ceil(a.length/2),p=a.slice(0,h),f=a.slice(h);return(0,l.jsxs)("section",{className:"bg-white w-full h-88",children:[(0,l.jsxs)("div",{className:"bg-ivory flex rounded-xl flex-row justify-between",children:[(0,l.jsxs)("div",{className:"p-6 rounded-l-xl w-full",children:[(0,l.jsxs)("div",{className:"flex justify-between",children:[(0,l.jsx)("h4",{className:"font-GT-Super-Display leading-8 text-[32px] text-green",children:membershipTitle(t.name)}),(0,l.jsxs)("div",{className:"flex flex-col items-end",children:[(0,l.jsx)("span",{className:"text-charcoal text-sm leading-6",children:"".concat((0,I.PF)(t.unitPrice),"/month")}),(0,l.jsx)("span",{className:"text-dark-gray text-xs",children:"Next billing date on ".concat(x)})]})]}),(0,l.jsx)("p",{className:"uppercase t-overline-sm mt-8 text-gold",children:"included in your plan"}),(0,l.jsxs)("div",{className:"flex justify-between",children:[(0,l.jsx)("div",{className:"flex flex-col w-full items-start",children:p.map(e=>(0,l.jsxs)("div",{className:"flex gap-2 items-baseline max-w-md",children:[(0,l.jsx)("span",{className:"w-2 h-2 bg-gold shrink-0"}),(0,l.jsx)("p",{className:"leading-8 text-charcoal font-maison",children:e.perkDescription})]},e.id))}),(0,l.jsx)("div",{className:"flex flex-col w-full items-start",children:f.map(e=>(0,l.jsxs)("div",{className:"flex gap-2 items-baseline max-w-md",children:[(0,l.jsx)("span",{className:"w-2 h-2 bg-gold shrink-0"}),(0,l.jsx)("p",{className:"leading-8 text-charcoal font-maison",children:e.perkDescription})]},e.id))})]}),(0,l.jsxs)("div",{className:"flex flex-row mt-8",children:[(0,l.jsx)(m.z,{type:"button",variant:"ghost-black",className:"px-7 py-3 max-h-10 t-body-sm leading-6 w-fit whitespace-nowrap",onClick:()=>u(!0),children:"Pause membership"}),(0,l.jsx)(m.z,{variant:"link-black",className:"px-7 py-3 leading-6 max-h-10 whitespace-nowrap w-fit",onClick:()=>c(!0),children:"Cancel membership"})]})]}),(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center bg-green px-10 rounded-r-xl",children:[(0,l.jsx)("div",{className:"mb-2",children:(0,l.jsx)(MedspaMembershipStarIcon,{"aria-hidden":!0})}),(0,l.jsx)("p",{className:"t-chiclet text-ivory text-center",children:"Membership dollars earned per month"}),(0,l.jsx)("p",{className:"font-maison font-semibold tracking-overline leading-6 text-4xl text-gold mt-4",children:(0,I.PF)(t.unitPrice)})]})]}),(0,l.jsx)(CancelMembershipModal,{isOpen:o,onClose:()=>c(!1),membership:t,clientId:n,currentUser:s,updateUserSession:i}),(0,l.jsx)(PauseMembershipModal,{isOpen:d,onClose:()=>u(!1),membership:t,clientId:n,currentUser:s,updateUserSession:i})]})}function MobileActiveMembership(e){let{membership:t,perks:a,boulevardClientId:n,currentUser:s,updateUserSession:i}=e,[o,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),x=formatProfileDate(t.nextChargeDate);return(0,l.jsxs)("section",{className:"bg-white w-full",children:[(0,l.jsxs)("div",{className:"bg-ivory flex rounded-xl flex-col mb-6",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center bg-green px-6 py-4 rounded-t-xl",children:[(0,l.jsx)("div",{className:"mb-2",children:(0,l.jsx)(MedspaMembershipStarIcon,{"aria-hidden":!0})}),(0,l.jsx)("p",{className:"t-chiclet text-ivory text-center",children:"Membership dollars earned per month"}),(0,l.jsx)("p",{className:"font-maison font-semibold tracking-overline leading-6 text-4xl text-gold mt-4",children:(0,I.PF)(t.unitPrice)})]}),(0,l.jsxs)("div",{className:"p-6 rounded-b-xl w-full",children:[(0,l.jsxs)("div",{className:"flex flex-col items-startv",children:[(0,l.jsx)("h4",{className:"font-GT-Super-Display leading-8 text-[32px]",children:membershipTitle(t.name)}),(0,l.jsx)("span",{className:"text-charcoal text-sm leading-6",children:"".concat((0,I.PF)(t.unitPrice),"/month")}),(0,l.jsx)("span",{className:"text-dark-gray text-xs",children:"Next billing date on ".concat(x)})]}),(0,l.jsx)("p",{className:"uppercase t-overline-sm mt-8 text-gold",children:"included in your plan"}),(0,l.jsx)("div",{className:"flex-wrap ",children:a.map(e=>(0,l.jsxs)("div",{className:"max-w-sm items-baseline flex gap-2",children:[(0,l.jsx)("span",{className:"w-2 h-2 bg-gold inline-block shrink-0"}),(0,l.jsx)("p",{className:"text-sm leading-8 text-charcoal font-maison",children:e.perkDescription})]},e.id))}),(0,l.jsxs)("div",{className:"flex flex-col w-full items-center mt-8 gap-y-2 ",children:[(0,l.jsx)(m.z,{type:"button",variant:"ghost-black",className:"px-7 py-3 max-h-10 t-body-sm leading-6 w-fit whitespace-nowrap",onClick:()=>u(!0),children:"Pause membership"}),(0,l.jsx)(m.z,{variant:"link-black",className:"px-7 py-3 leading-6 max-h-10 whitespace-nowrap w-fit",onClick:()=>c(!0),children:"Cancel membership"})]})]})]}),(0,l.jsx)(CancelMembershipModal,{isOpen:o,onClose:()=>c(!1),membership:t,clientId:n,currentUser:s,updateUserSession:i}),(0,l.jsx)(PauseMembershipModal,{isOpen:d,onClose:()=>u(!1),membership:t,clientId:n,currentUser:s,updateUserSession:i})]})}function ActiveMembershipCard(e){return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)("div",{className:"hidden lg:block",children:(0,l.jsx)(DesktopActiveMembership,{...e})}),(0,l.jsx)("div",{className:"block lg:hidden",children:(0,l.jsx)(MobileActiveMembership,{...e})})]})}var q=a(56e3),Y=a(39313);function MembershipUpgradeCard(e){let{pageH1:t,bannerImage:a,perks:n}=e;return(0,l.jsxs)("div",{className:"content-box",children:[(0,l.jsx)("span",{className:"mb-4 t-subsection-header leading-6 text-charcoal",children:"You don't have any active AEDIT Medspa memberships"}),(0,l.jsx)("p",{className:"font-GT-Super-Display text-[32px] font-normal leading-12 text-green md:mr-8",children:t}),(0,l.jsx)("span",{className:"my-4 text-charcoal t-body",children:"A curated monthly wellness and aesthetics program that delivers your best results and exclusive savings of up to $2,000 each year."}),(0,l.jsx)("div",{className:"h-auto w-full",children:(0,l.jsxs)("div",{className:"relative flex flex-col rounded-xl bg-ivory xl:flex-row",children:[(0,l.jsxs)("div",{className:"flex flex-col rounded-t-xl bg-cover bg-center bg-no-repeat px-4 py-6 text-white lg:px-12 xl:w-4/5 xl
1:rounded-l-xl xl:rounded-tr-none",style:{backgroundImage:(null==a?void 0:a.src)?"linear-gradient(0deg, rgba(28, 47, 44, 0.5), rgba(28, 47, 44, 0.5)), url('".concat(a.src,"')"):void 0},children:[(0,l.jsx)(Y.g,{}),(0,l.jsx)("p",{className:"mt-5 uppercase t-overline",children:"includes"}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-x-2 gap-y-2 sm:grid-cols-2 lg:grid-cols-3",children:n.map(e=>(0,l.jsx)(q.Z,{perk:e},e.perkDescription))})]}),(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 xl:w-1/5 xl:py-0",children:[(0,l.jsx)("h4",{className:"text-center whitespace-pre-wrap text-gold t-section-header",children:"AEDIT WELL+ membership"}),(0,l.jsx)("p",{className:"mb-5 uppercase text-green t-overline",children:"$199 monthly"}),(0,l.jsx)(m.z,{id:"aedition-button",type:"button",onClick:()=>(0,i.bi)("membership"),children:"Join AEDIT WELL+"})]})]})})]})}function PastMembershipCard(e){let{membership:t}=e;return(0,l.jsx)("section",{className:"mb-8 w-full bg-white",children:(0,l.jsxs)("div",{className:"flex w-full flex-col justify-between rounded-xl bg-ivory p-6 md:flex-row md:items-center",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start",children:[(0,l.jsx)("span",{className:"mb-2 inline-block w-fit rounded-xs bg-gold px-3 py-1 t-chiclet",children:t.status}),(0,l.jsx)("h4",{className:"font-GT-Super-Display text-[32px] leading-8 text-green",children:membershipTitle(t.name)}),(0,l.jsx)("span",{className:"t-body-sm to-charcoal",children:"Remaining balance: ".concat((0,I.PF)(t.accountCredit))}),(0,l.jsx)("span",{className:"font-maison text-xs font-medium leading-6 text-dark-gray",children:"Valid until ".concat(formatProfileDate(t.endOn))})]}),(0,l.jsxs)("div",{className:"flex flex-col items-end",children:[(0,l.jsx)("span",{className:"text-charcoal t-body-sm tabular-nums",children:"".concat((0,I.PF)(t.unitPrice),"/month")}),(0,l.jsx)("span",{className:"font-maison text-xs font-medium text-dark-gray",children:"Start date ".concat(formatProfileDate(t.startOn))}),t.nextChargeDate?(0,l.jsx)("span",{className:"font-maison text-xs font-medium text-dark-gray",children:"Renew date ".concat(formatProfileDate(t.nextChargeDate))}):null]})]})})}let H=[{key:"active",label:"ACTIVE"},{key:"past",label:"PAST MEMBERSHIPS"}];function RedeemedCheckIcon(e){let{className:t="",stroke:a="black",strokeWidth:n=2,width:r=16,height:s=12,...i}=e;return(0,l.jsx)("svg",{className:t,width:r,height:s,viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:(0,l.jsx)("path",{d:"M14.67 1 5.5 10.17 1.33 6",stroke:a,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})})}function DesktopPackage(e){let{medspaPackage:t,packageConcerns:a}=e,n=0===t.remainingProcedures.length,r=(0,T.Vm)(),s=(0,I.W1)(t.vouchers.map(e=>e.price)),handleClick=e=>{n?(0,i.bi)("packages",{initialName:e.contentfulPackage.treatmentName}):(0,i.wK)("package",{vouchers:e.vouchers,locationId:e.locations[0],redeemedVouchers:e.redeemedProcedures,remainingVouchers:e.remainingProcedures,contentfulPackage:e.contentfulPackage})};return(0,l.jsxs)("div",{className:"flex flex-row justify-between w-full bg-ivory rounded-xl mt-8 h-[295px] overflow-hidden",children:[(0,l.jsx)("div",{className:"w-1/6 relative",children:(0,l.jsx)(j(),{src:t.contentfulPackage.treatmentImage.src,alt:t.contentfulPackage.treatmentImage.title,className:"object-cover",fill:!0,unoptimized:!0})}),(0,l.jsxs)("div",{className:"p-6 w-3/6 flex flex-col justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("h3",{className:"font-GT-Super-Display text-4xl leading-8 text-green",children:[t.contentfulPackage.treatmentName,(0,l.jsxs)("span",{className:"ml-2 t-body-sm text-dark-gray tabular-nums",children:["Package savings ",(0,I.lb)(s)]})]}),(0,l.jsx)("span",{className:"mt-4 t-body-sm text-charcoal line-clamp-4 overflow-hidden text-ellipsis",children:t.contentfulPackage.mainBlurb})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-charcoal t-chiclet",children:"Concerns treated"}),(0,l.jsx)("div",{className:"flex flex-row gap-2 mt-2",children:a.map(e=>(0,l.jsx)("div",{className:"block t-chiclet bg-green rounded-full py-1 px-3 text-white text-nowrap",children:e.title},e.id))})]})]}),(0,l.jsxs)("div",{className:"py-6 pr-6 w-2/6 flex flex-col justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center h-[29px] mb-6 gap-2",children:[(0,l.jsxs)("h3",{className:"text-gold font-maison text-4xl",children:[t.redeemedCount," of ",t.totalCount]}),(0,l.jsx)("span",{className:"text-charcoal font-light leading-5 text-sm font-maison",children:"Redeemed"})]}),t.redeemedProcedures.map(e=>(0,l.jsxs)("div",{className:"border-b border-light-gray flex justify-between mb-4",children:[(0,l.jsx)("span",{className:"font-maison",children:e.procedureName}),(0,l.jsxs)("div",{className:"flex gap-4 items-center",children:[(0,l.jsx)("span",{className:"uppercase tracking-overline text-dark-gray t-overline",children:"On Sep 18"}),(0,l.jsx)("div",{className:"rounded-full flex bg-gold w-6 h-6 items-center justify-center",children:(0,l.jsx)(RedeemedCheckIcon,{"aria-hidden":!0})})]})]},e.id)),t.remainingProcedures.map(e=>(0,l.jsxs)("div",{className:"border-b border-light-gray flex justify-between mb-4",children:[(0,l.jsx)("span",{className:"font-maison",children:e.procedureName}),(0,l.jsx)("div",{className:"flex items-center h-8 w-fit",children:(0,l.jsx)("div",{className:"rounded-full border border-gold w-6 h-6"})})]},e.id))]}),(0,l.jsx)("div",{className:"flex items-center justify-center",children:(0,l.jsx)(m.z,{id:"buy-again-next-treatment-package",onClick:()=>handleClick(t),disabled:n&&!r,className:"px-7 py-3 t-body-sm w-fit whitespace-nowrap",children:n?r?"Buy Again":"Coming Soon":"Book Next Treatment"})})]})]})}function MobilePackage(e){let{medspaPackage:t,packageConcerns:a}=e,n=0===t.remainingProcedures.length,r=(0,T.Vm)(),s=(0,I.W1)(t.vouchers.map(e=>e.price)),handleClick=e=>
1{n?(0,i.bi)("packages",{initialName:e.contentfulPackage.treatmentName}):(0,i.wK)("package",{vouchers:e.vouchers,locationId:e.locations[0],redeemedVouchers:e.redeemedProcedures,remainingVouchers:e.remainingProcedures,contentfulPackage:e.contentfulPackage})};return(0,l.jsxs)("div",{className:"flex flex-col justify-between w-full bg-ivory rounded-xl mb-8 overflow-hidden",children:[(0,l.jsx)("div",{className:"h-20 w-full overflow-hidden relative",children:(0,l.jsx)(j(),{src:t.contentfulPackage.treatmentImage.src,alt:t.contentfulPackage.treatmentImage.title,className:"object-cover",fill:!0,unoptimized:!0})}),(0,l.jsxs)("div",{className:"p-6 mb-4 h-3/6 flex flex-col justify-between",children:[(0,l.jsxs)("h3",{className:"font-GT-Super-Display text-4xl leading-8 text-green flex flex-col gap-1",children:[t.contentfulPackage.treatmentName,(0,l.jsxs)("span",{className:"t-body-sm text-dark-gray tabular-nums",children:["Package savings ",(0,I.lb)(s)]})]}),(0,l.jsx)("span",{className:"mt-4 t-body-sm text-charcoal line-clamp-4 overflow-hidden text-ellipsis",children:t.contentfulPackage.mainBlurb}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-charcoal t-chiclet mt-6",children:"Concerns treated"}),(0,l.jsx)("div",{className:"flex flex-row flex-wrap gap-2 mt-2",children:a.map(e=>(0,l.jsx)("div",{className:"block t-chiclet bg-green rounded-full py-1 px-3 text-white text-nowrap",children:e.title},e.id))})]})]}),(0,l.jsxs)("div",{className:"pb-6 px-6 h-2/6 flex flex-col justify-between mt-6",children:[(0,l.jsxs)("div",{className:"flex items-center flex-row mb-6 h-[29px] gap-2",children:[(0,l.jsxs)("h3",{className:"text-gold font-maison text-4xl",children:[t.redeemedCount," of ",t.totalCount]}),(0,l.jsx)("span",{className:"text-charcoal font-light leading-5 text-sm font-maison",children:"Redeemed"})]}),t.redeemedProcedures.map(e=>(0,l.jsxs)("div",{className:"border-b border-light-gray border-spacing-y-2 flex flex-row justify-between mb-4",children:[(0,l.jsx)("span",{className:"font-maison",children:e.procedureName}),(0,l.jsxs)("div",{className:"flex flex-row gap-4 items-center justify-center",children:[(0,l.jsx)("span",{className:"uppercase tracking-overline text-dark-gray t-overline",children:"On Sep 18"}),(0,l.jsx)("div",{className:"rounded-full flex bg-gold w-6 h-6 items-center justify-center",children:(0,l.jsx)(RedeemedCheckIcon,{"aria-hidden":!0})})]})]},e.id)),t.remainingProcedures.map(e=>(0,l.jsxs)("div",{className:"border-b border-light-gray flex justify-between mb-4",children:[(0,l.jsx)("span",{className:"font-maison",children:e.procedureName}),(0,l.jsx)("div",{className:"flex items-center h-8 w-fit",children:(0,l.jsx)("div",{className:"rounded-full border border-gold w-6 h-6"})})]},e.id)),(0,l.jsx)("div",{className:"flex items-center justify-center",children:(0,l.jsx)(m.z,{id:"buy-again-next-treatment-package",onClick:()=>handleClick(t),disabled:n&&!r,className:"px-7 py-3 t-body-sm w-fit whitespace-nowrap",children:n?r?"Buy Again":"Coming Soon":"Book Next Treatment"})})]})]})}var G=a(57492),K=a(87536),$=a(16310);function AddCardModal(e){let{isOpen:t,setIsOpen:a,creditCard:n,setIsAddingNewCard:s}=e,i=(0,r.useRef)(null);return(0,l.jsx)(u.Vq,{open:t,onOpenChange:a,children:(0,l.jsxs)(u.cZ,{initialFocus:i,className:"bg-white flex-col gap-4 px-6 py-10 rounded-xl md:max-w-xl",style:{maxWidth:"min(calc(100vw - 48px), 36rem)"},closeButtonClassName:"top-4 right-4",children:[(0,l.jsx)(u.fK,{children:(0,l.jsx)(u.$N,{className:"text-black text-center t-subsection-header",children:"Replacing your current Credit Card"})}),(0,l.jsx)(u.Be,{className:"text-black text-center mb-4",children:(0,l.jsxs)("span",{className:"t-body",children:["Adding a new credit card will remove"," ",(0,l.jsx)("span",{className:"font-bold",children:"".concat(null==n?void 0:n.brand," ending in ").concat(null==n?void 0:n.last4)})," ","from your account"]})}),(0,l.jsxs)(u.cN,{className:"mx-auto flex flex-col-reverse md:flex-row justify-center items-center",children:[(0,l.jsx)(m.z,{variant:"link-black",onClick:()=>a(!1),children:"Cancel"}),(0,l.jsx)(m.z,{ref:i,title:"Add New Card Button",className:"",onClick:()=>{s(!0),a(!1)},children:"Add New Card"})]})]})})}function CreditCardCards(e){let{creditCard:t,addAction:a}=e,n="".concat(null==t?void 0:t.expMonth.toString().padStart(2,"0"),"/").concat(null==t?void 0:t.expYear.toString().slice(-2));return(0,l.jsxs)("div",{children:[t&&(0,l.jsx)("div",{className:"px-4 py-6 flex flex-row justify-between items-center mb-4 bg-ivory rounded-xl w-full md:max-w-md",children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("span",{className:"t-body leading-6 text-black",children:[null==t?void 0:t.brand," ending in ",null==t?void 0:t.last4]}),(0,l.jsxs)("span",{className:"t-body-sm leading-4 text-charcoal",children:["Exp ",n]})]})}),(0,l.jsxs)(m.z,{variant:"unstyled",className:"px-4 py-8 flex flex-row justify-between bg-ivory hover:bg-ivory-hover rounded-xl items-center w-full md:max-w-md cursor-pointer",onClick:a,children:[(0,l.jsx)("span",{className:"t-body leading-6 text-black",children:"Add a New Card"}),(0,l.jsx)(_.Z,{width:24,height:24,stroke:"#20685D"})]})]})}var X=a(44986),Q=a(69851),J=a(87030),ee=a(87035),et=a(27987);let ea=$.Ry({cardName:$.Z_().trim().required("This field is required"),
1cardNumber:$.Z_().required("This field is required").test("digits-range","Card number must be 12â19 digits",e=>{let t=(0,J.Jr)(e);return t.length>=12&&t.length<=19}),expiresOn:$.Z_().required("This field is required").test("exp-format","Invalid Format. Please input MM/YY",e=>!!e&&Q.CM.test(e)).test("exp-not-past","Card is expired",e=>{if(!e||!Q.CM.test(e))return!0;let t=Number(e.slice(0,2)),a=Number(e.slice(3,5)),l=new Date(2e3+a,t,0,23,59,59,999);return l>=new Date}).test("exp-not-too-far","Expiry too far in the future",e=>{if(!e||!Q.CM.test(e))return!0;let t=Number(e.slice(3,5));return 2e3+t<=new Date().getFullYear()+Q.n_}),cvv:$.Z_().required("This field is required").matches(/^\d{3,4}$/,"CVV must be 3â4 digits"),zipCode:$.Z_().required("This field is required").matches(/^\d{4,10}$/,"ZIP must be 4â10 digits")});function AddNewCardForm(e){let{boulevardClientId:t,updateUserSession:a,currentUser:n,setIsAddingNewCard:i}=e,[o,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(null),h=(0,K.cI)({resolver:(0,G.X)(ea),mode:"all"}),{control:p,formState:{isValid:f},handleSubmit:g,reset:b}=h,j=(0,r.useRef)(!1),onExpKeyDown=e=>{j.current="Backspace"===e.key||"Delete"===e.key},onSubmit=async e=>{c(!0),await (0,x.SU)({makeRequest:async()=>{let a={cardNumber:e.cardNumber,expiresOn:e.expiresOn,cvv:e.cvv,cardName:e.cardName,zipCode:e.zipCode},l=await (0,s.yo)(()=>s.Oj.payments.tokenizeCard(a));if(!(null==l?void 0:l.success)||!(null==l?void 0:l.token))throw(0,ee.LL)("VALIDATION_ERROR",{message:"Invalid card data. Check your data and please try again."});await (0,s.yo)(()=>s.Oj.client.mutations.createCreditCard(t,{vaultToken:l.token}))},successCallback:()=>{a(n,!1,!0),F.Am.success({title:"You have a new card saved!",timeout:4e3}),b(),i(!1)},errorCallback:(e,t)=>{u("VALIDATION_ERROR"===t.type?t.message:"Invalid card data. Check your data and please try again."),"VALIDATION_ERROR"!==t.type&&(0,et.UH)(e,{message:"[API Error] "+t.message,context:{code:t.code,type:t.type,httpStatus:t.httpStatus,details:t.details}})},hideErrorToast:!0,suppressReport:!0,finallyCallback:()=>{c(!1)}})};return(0,l.jsxs)(K.RV,{...h,children:[(0,l.jsx)("h3",{className:"t-subsection-header mb-6 mt-8",children:"Add a new card"}),(0,l.jsxs)("form",{className:"w-full flex flex-col relative",onSubmit:g(onSubmit),children:[(0,l.jsx)("div",{className:"mb-9",children:(0,l.jsx)(K.Qr,{name:"cardName",control:p,render:e=>{var t;let{field:a,fieldState:n}=e;return(0,l.jsx)(X.Z,{...a,label:"Name on card",placeholder:"Jane Smith",maxLength:40,autoComplete:"cc-name",inputMode:"text",onBeforeInput:J.Cv,onPaste:(0,J.Kp)(J.l1,e=>{h.setValue("cardName",e,{shouldDirty:!0,shouldValidate:!0})}),onChange:e=>{let t=(0,J.l1)(e.currentTarget.value);a.onChange(t);let l=(0,J.Hd)(t);l?h.setError("cardName",{type:"onChange",message:l}):h.clearErrors("cardName")},error:null===(t=n.error)||void 0===t?void 0:t.message})}})}),(0,l.jsx)("div",{className:"mb-9",children:(0,l.jsx)(K.Qr,{name:"cardNumber",control:p,render:e=>{var t;let{field:a,fieldState:n}=e;return(0,l.jsx)(X.Z,{...a,label:"Card Number",placeholder:"0000 0000 0000 0000",maxLength:23,autoComplete:"cc-number",inputMode:"numeric",onBeforeInput:J.QL,onPaste:(0,J.Kp)(J.fv,e=>{h.setValue("cardNumber",e,{shouldDirty:!0,shouldValidate:!0})}),onChange:e=>{let t=(0,J.fv)(e.currentTarget.value);a.onChange(t);let l=(0,J.BD)(t);l?h.setError("cardNumber",{type:"onChange",message:l}):h.clearErrors("cardNumber")},error:null===(t=n.error)||void 0===t?void 0:t.message})}})}),(0,l.jsxs)("div",{className:"w-full flex items-start gap-10 mb-9",children:[(0,l.jsx)(K.Qr,{name:"expiresOn",control:p,render:e=>{var t;let{field:a,fieldState:n}=e;return(0,l.jsx)(X.Z,{...a,label:"Expires On",placeholder:"MM/YY",maxLength:5,autoComplete:"cc-exp",inputMode:"numeric",onKeyDown:onExpKeyDown,onBeforeInput:J.QL,onPaste:(0,J.Kp)(J.ss,e=>{h.setValue("expiresOn",e,{shouldDirty:!0,shouldValidate:!0})}),onChange:e=>{let t=(0,J.Tf)(e.currentTarget.value,j.current);a.onChange(t);let l=(0,J.qQ)(t);l?h.setError("expiresOn",{type:"onChange",message:l}):h.clearErrors("expiresOn")},error:null===(t=n.error)||void 0===t?void 0:t.message})}}),(0,l.jsx)(K.Qr,{name:"cvv",control:p,render:e=>{var t;let{field:a,fieldState:n}=e;return(0,l.jsx)(X.Z,{...a,label:"CVV",placeholder:"000",maxLength:4,autoComplete:"cc-csc",inputMode:"numeric",onBeforeInput:J.QL,onPaste:(0,J.Kp)(J.yB,e=>{h.setValue("cvv",e,{shouldDirty:!0,shouldValidate:!0})}),onChange:e=>{let t=(0,J.yB)(e.currentTarget.value);a.onChange(t);let l=(0,J.c8)(t);l?h.setError("cvv",{type:"onChange",message:l}):h.clearErrors("cvv")},error:null===(t=n.error)||void 0===t?void 0:t.message})}})]}),(0,l.jsx)("div",{className:"mb-9",children:(0,l.jsx)(K.Qr,{name:"zipCode",control:p,render:e=>{var t;let{field:a,fieldState:n}=e;return(0,l.jsx)(X.Z,{...a,label:"Billing Zip Code",placeholder:"12345 or 12345-6789",maxLength:10,autoComplete:"postal-code",inputMode:"numeric",onBeforeInput:J.QL,onPaste:(0,J.Kp)(J.Ol,e=>{h.setValue("zipCode",e,{shouldDirty:!0,shouldValidate:!0})}),onChange:e=>{let t=(0,J.Ol)(e.currentTarget.value);a.onChange(t);let l=(0,J.hM)(t);l?h.setError("zipCode",{type:"onChange",message:l}):h.clearErrors("zipCode")},error:null===(t=n.error)||void 0===t?void 0:t.message})}})}),d&&(0,l.jsx)("p",{className:"t-overline-sm text-error w-full text-left py-2",children:d}),(0,l.jsxs)("div",{className:(0,v.cn)("w-full flex flex-row items-end justify-end gap-8",d?"mt-0":"mt-8"),children:[(0,l.jsx)(m.z,{type:"button",variant:"link-black",onClick:e=>{e.preventDefault(),e.stopPropagation(),i(!1)},children:"Cancel"}),(0,l.jsx)(m.z,{type:"submit",disabled:o||!f,children:"Add New Card"})]})]})]})}let el=$.Ry({cardName:$.Z_().required("This field is required"),
1cardNumber:$.Z_().test("length-check","Invalid Credit Card Format",e=>(null==e?void 0:e.length)===18||(null==e?void 0:e.length)===19).required("This field is required"),expiresOn:$.Z_().length(5,"Invalid Format. Please input MM/YY").required("This field is required"),cvv:$.Z_().required("This field is required"),zipCode:$.Z_().required("This field is required")});var en=a(50462),er=a(74865),es=a.n(er),ei=a(23164),eo=a(20979);function CheckboxGroup(e){var t;let{id:a,label:n,mustHaveValue:s=!0,options:i=[],alreadySelected:o=[]}=e,{setValue:c,formState:{errors:d}}=(0,K.Gc)(),[m,u]=(0,r.useState)(o||[]);(0,r.useEffect)(()=>{c(a,m)},[m,a,c]);let x=(0,r.useCallback)(e=>t=>{let a=t.target.checked;a?m.some(t=>t.id===e.id)||u(t=>[...t,{id:e.id,name:e.name}]):u(t=>t.filter(t=>t.id!==e.id))},[m]);return(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsxs)("label",{htmlFor:a,className:"font-medium t-overline text-black uppercase w-full text-left text-xs leading-6",children:[n," ",s&&(0,l.jsx)("span",{className:"text-error",children:"*"})]}),(0,l.jsx)("div",{className:"flex flex-col",children:i.map(e=>{let t=m.some(t=>t.id===e.id);return(0,l.jsxs)("label",{className:"flex items-center",children:[(0,l.jsx)("input",{type:"checkbox",checked:t,onChange:x(e),className:"my-3 cursor-pointer transition-all w-5 h-5 border border-gold duration-200"}),(0,l.jsx)("span",{className:"ml-2 font-normal text-base",children:e.label})]},e.id)})}),(null===(t=d[a])||void 0===t?void 0:t.message)&&(0,l.jsx)("span",{className:"t-overline-sm text-error mt-2 text-left",children:d[a].message})]})}function Dropdown(e){var t;let{id:a,label:n,options:r=[],placeholder:s,mustHaveValue:i=!0,valueKey:o="value",labelKey:c="label",...d}=e,{register:m,getValues:u,formState:{errors:x}}=(0,K.Gc)(),h=u(a),p=r.some(e=>e.value===h)?h:"";return(0,l.jsxs)("div",{className:"flex flex-col items-start w-full ",children:[(0,l.jsxs)("label",{htmlFor:a,className:"font-medium t-overline text-black uppercase w-full text-left mb-5 text-xs leading-6",children:[n," ",i&&(0,l.jsx)("span",{className:"text-error",children:"*"})]}),(0,l.jsxs)("select",{id:a,...m(a,{required:"".concat(n," is required")}),defaultValue:p,className:(0,v.cn)("rounded-xs bg-light-gray pl-4 pr-8 py-3 border-none t-body-sm w-full mb-9 text-black normal-case","disabled:text-dark-gray",'[&:has(option[value=""]:checked)]:text-dark-gray'),...d,children:[s&&(0,l.jsx)("option",{value:"",disabled:!0,hidden:!0,selected:!0,className:"text-dark-gray",children:s}),r.map(e=>(0,l.jsx)("option",{value:e[o],className:"text-black capitalize",children:e[c]},e[c]))]}),(null===(t=x[a])||void 0===t?void 0:t.message)&&(0,l.jsx)("span",{className:"t-overline-sm text-error mt-2 text-left",children:x[a].message})]})}function DropdownWithTags(e){var t;let{id:a,label:n,options:s=[],placeholder:i,mustHaveValue:o=!0,alreadyTaged:c=[],...d}=e,{setValue:m,formState:{errors:u}}=(0,K.Gc)(),[x,h]=(0,r.useState)(Array.isArray(c)&&Array.isArray(c[0])?c[0].filter(e=>e&&e.id&&e.name):[]);(0,r.useEffect)(()=>{m(a,x.map(e=>({name:e.name,id:e.id})))},[x,a,m]);let p=(0,r.useCallback)(e=>{let{value:t}=e.target;if(t){try{let e=JSON.parse(t);e&&!x.some(t=>t.id===e.id)&&h(t=>[...t,e])}catch(e){console.error("Error parsing option:",e)}e.target.value=""}},[x]),f=(0,r.useCallback)(e=>{h(t=>t.filter(t=>t.id!==e.id))},[]);return(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsxs)("label",{htmlFor:a,className:"font-medium t-overline text-black uppercase w-full text-left mb-5 text-xs leading-6",children:[n," ",o&&(0,l.jsx)("span",{className:"text-error",children:"*"})]}),(0,l.jsxs)("div",{className:"w-full flex flex-wrap items-center bg-light-gray rounded-xs mb-9 py-0 px-0 capitalize border border-transparent outline-hidden focus-within:border-[#2563eb]",children:[x.map(e=>(0,l.jsx)("div",{className:"m-1",children:(0,l.jsxs)("div",{className:"flex items-center border border-dark-gray rounded-xs",children:[(0,l.jsx)("span",{className:"px-2 py-1 t-body-sm text-black",children:e.name}),(0,l.jsx)("button",{type:"button",onClick:()=>f(e),className:"px-2 py-1 text-dark-gray hover:text-dark-gray-hover",children:"\xd7"})]})},e.id)),(0,l.jsxs)("select",{onChange:p,className:"bg-transparent outline-hidden border-none py-3 flex-1 px-4 t-body-sm text-dark-gray focus:ring-0",defaultValue:"",...d,children:[i&&(0,l.jsx)("option",{value:"",disabled:!0,hidden:!0,children:i}),s.flatMap(e=>x.some(t=>t.id===e.id)?[]:[(0,l.jsx)("option",{value:JSON.stringify(e),className:"text-black",children:e.name},e.id)])]})]}),(null===(t=u[a])||void 0===t?void 0:t.message)&&(0,l.jsx)("span",{className:"t-overline-sm text-error mt-2 text-left",children:u[a].message})]})}function TextInput(e){var t;let{id:a,placeholder:n,label:r,type:s="text",mustHaveValue:i=!0,...o}=e,{register:c,formState:{errors:d}}=(0,K.Gc)();return(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsxs)("label",{htmlFor:a,className:"font-medium t-overline text-black uppercase w-full text-left mb-5 text-xs leading-6",children:[r," ",i&&(0,l.jsx)("span",{className:"text-error",children:"*"})]}),(0,l.jsx)("input",{type:s,id:a,name:a,className:"rounded-xs bg-light-gray py-3 px-4 placeholder:text-dark-gray t-body-sm w-full border-none mb-9 disabled:text-dark-gray",placeholder:n,...c(a),...o}),(null===(t=d[a])||void 0===t?void 0:t.message)&&(0,l.jsx)("span",{className:"t-overline-sm text-error mt-2 text-left",children:d[a].message})]})}let ec=[{display_name:"English",id:"english"},{display_name:"Portuguese",id:"portuguese"},{display_name:"French",id:"french"},{display_name:"German",id:"german"},{display_name:"Spanish",id:"spanish"},{display_name:"Chinese",id:"chinese"},{display_name:"Japanese",id:"japanese"},{display_name:"Korean",id:"korean"},{display_name:"Hindi",id:"hindi"},{display_name:"Arabic",id:"arabic"},{display_name:"Russian",id:"russian"},{display_name:"Italian",id:"italian"},{display_name:"Dutch",id:"dutch"},{display_name:"Swedish",id:"swedish"},{display_name:"Turkish",id:"turkish"},{display_name:"Polish",id:"polish"}
1,{display_name:"Thai",id:"thai"},{display_name:"Greek",id:"greek"},{display_name:"Vietnamese",id:"vietnamese"},{display_name:"Indonesian",id:"indonesian"}],ed=[{id:272,address:"895 Park Avenue",address_two:null,city:"New York",state:"New York",state_abbreviation:"NY",postal_code:"10075",country:"US",latitude:40.77531,longitude:-73.96032,long_name:"895 Park Ave, New York, NY 10075, USA",short_name:"Park Ave",place_id:"ChIJ123example",suite_number:null,timezone:"America/New_York",_type:"location"},{id:273,address:"1600 Amphitheatre Pkwy",address_two:null,city:"Mountain View",state:"CA",state_abbreviation:"CA",postal_code:"94043",country:"US",latitude:37.422,longitude:-122.084,long_name:"1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",short_name:"Google HQ",place_id:"ChIJ2eUgeAK6j4ARbn5u_wAGqWA",timezone:"America/Los_Angeles",_type:"location"},{id:274,address:"350 Fifth Ave",address_two:null,city:"New York",state:"NY",state_abbreviation:"NY",postal_code:"10118",country:"US",latitude:40.748817,longitude:-73.985428,long_name:"350 5th Ave, New York, NY 10118, USA",short_name:"Empire State",timezone:"America/New_York",_type:"location"},{id:275,address:"1 Infinite Loop",city:"Cupertino",state:"CA",state_abbreviation:"CA",postal_code:"95014",country:"US",latitude:37.33182,longitude:-122.03118,long_name:"1 Infinite Loop, Cupertino, CA 95014, USA",short_name:"Apple HQ",timezone:"America/Los_Angeles",_type:"location"},{id:276,address:"405 Lexington Ave",city:"New York",state:"NY",state_abbreviation:"NY",postal_code:"10174",country:"US",latitude:40.75162,longitude:-73.975502,long_name:"405 Lexington Ave, New York, NY 10174, USA",short_name:"Chrysler Building",place_id:"ChIJD3_45-lZwokRzYZQ",timezone:"America/New_York",_type:"location"},{id:277,address:"500 Terry A Francois Blvd",city:"San Francisco",state:"CA",state_abbreviation:"CA",postal_code:"94158",country:"US",latitude:37.77,longitude:-122.386,long_name:"500 Terry A Francois Blvd, San Francisco, CA 94158, USA",short_name:"SF Office",timezone:"America/Los_Angeles",_type:"location"},{id:278,address:"1111 S Figueroa St",city:"Los Angeles",state:"CA",state_abbreviation:"CA",postal_code:"90015",country:"US",latitude:34.043017,longitude:-118.267254,long_name:"Crypto.com Arena, Los Angeles, CA 90015, USA",short_name:"Staples Center",timezone:"America/Los_Angeles",_type:"location"}];var em=a(6024);let eu=$.Ry({password:$.Z_().required("This field is required"),confirmPassword:$.Z_().oneOf([$.iH("password")],"Passwords must match").required("Please confirm your password")});function ResetPasswordForm(e){let{setResetPassword:t}=e,a=(0,K.cI)({resolver:(0,G.X)(eu),mode:"onChange"}),{handleSubmit:n}=a,submitHandler=async e=>{let a=(0,em.ej)(eo.LA),l=(0,em.ej)(eo.$A),n={password:e.password,token:a,type:l};await (0,x.SU)({makeRequest:async()=>{let{data:e}=await V.default.post("/v1/auth/reset-password",n);if(!(null==e?void 0:e.data))throw Error((null==e?void 0:e.message)||"Failed to reset password")},successCallback:()=>{F.Am.success({title:"Your changes have been saved."})},finallyCallback:()=>{t(!1)}})};return(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-green font-normal leading-10 font-GT-Super-Display mt-6 text-[1.75rem] items-center md:mt-0 md:text-[2.5rem]",children:"Password change"}),(0,l.jsx)(K.RV,{...a,children:(0,l.jsxs)("form",{className:"grid grid-cols-1 gap-y-2 pt-8",onSubmit:n(submitHandler),children:[(0,l.jsx)(TextInput,{id:"password",label:"Password",placeholder:"",type:"password"}),(0,l.jsx)(TextInput,{id:"confirmPassword",label:"confirm password",placeholder:"",type:"password"}),(0,l.jsxs)("div",{className:"flex items-start gap-4 w-fit mt-10",children:[(0,l.jsx)(m.z,{type:"button",variant:"ghost-gray",className:"max-h-10",onClick:()=>{t(!1)},children:"Cancel"}),(0,l.jsx)(m.z,{type:"submit",disabled:!a.formState.isValid,className:"max-h-10",children:"Change password"})]})]})})]})}let ex=$.Ry({firstName:$.Z_().required("This field is required"),lastName:$.Z_().required("This field is required"),email:$.Z_().email("Invalid email").required("This field is required"),dob:$.Z_().length(10,"Invalid Format. Please input MM/DD/YYYY").required("This field is required"),phone:$.Z_().length(14,"Invalid Format. Please input this format (XXX)-XXX-XXXX").required("This field is required"),gender:$.Z_().required("Select one of the options"),concerns:$.IX().of($.Ry().shape({name:$.Z_(),id:$.Z_()})),preferredLocation:$.Z_().nullable(),preferredLanguage:$.Z_().required("Select one of the options"),marketingCommunications:$.IX().of($.Ry().shape({name:$.Z_(),id:$.Z_()})),transacionalCommunications:$.IX().of($.Ry().shape({name:$.Z_(),id:$.Z_()}))});function CodeFrame(e){let{title:t,textCode:a,data:n="code"}=e,[s,i]=(0,r.useState)(!1);return(0,l.jsxs)("div",{className:"bg-green rounded-xl p-4 w-full min-w-[312px]",children:[(0,l.jsx)("span",{className:"uppercase t-overline text-white",children:t}),(0,l.jsxs)("div",{className:"bg-white flex flex-row justify-between w-full p-4",children:[(0,l.jsx)("span",{className:"t-body-sm text-dark-gray line-clamp-1 text-ellipsis",children:a}),(0,l.jsx)("div",{className:"h-6 w-6",children:(0,l.jsx)(L.Z,{className:"cursor-pointer group group-hover:fill-gold! transition-all",onClick:()=>{s||navigator.clipboard.writeText(a).then(()=>{i(!0),"code"===n?F.Am.success({title:"Code copied to clipboard."}):F.Am.success({title:"Link copied to clipboard."}),setTimeout(()=>{i(!1)},2e3)}
1).catch(e=>(0,x._N)(e,{skipReport:!0,message:"code"===n?"Failed to copy code.":"Failed to copy link."}))},fill:"black","aria-hidden":!0})})]})]})}var eh=a(5068),ep=a(77289),ef=a(43694),ev=a(77966);function ProviderInfoPanel(e){let{provider:t}=e;return(0,l.jsxs)("div",{className:"flex flex-col gap-4 bg-white rounded-xl p-4",children:[(0,l.jsx)("h4",{className:"t-overline text-green",children:"Provider Info"}),(0,l.jsxs)("div",{className:(0,v.cn)("flex flex-col gap-4","sm:flex-row sm:justify-between sm:items-center","md:flex-col md:justify-between md:items-stretch","xl:flex-row xl:justify-between xl:items-center"),children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[t.avatar?(0,l.jsx)(j(),{src:t.avatar,alt:t.name,width:56,height:56,sizes:"56px",className:"size-14 rounded-full object-cover shrink-0 bg-ivory"}):(0,l.jsx)("div",{className:"size-14 rounded-full shrink-0 bg-ivory"}),(0,l.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,l.jsx)("span",{className:"t-body text-black underline",children:t.name}),t.specialty&&(0,l.jsx)("span",{className:"t-chiclet text-charcoal",children:t.specialty}),t.location&&(0,l.jsxs)("span",{className:"flex items-center gap-1 text-charcoal",children:[(0,l.jsx)(z.Z,{width:12,height:12,stroke:"currentColor","aria-hidden":!0}),(0,l.jsx)("span",{className:"font-maison text-xxs leading-4 font-medium",children:t.location})]})]})]}),(0,l.jsx)("button",{type:"button",className:"shrink-0 border border-dark-gray rounded px-7 py-3 t-body-sm text-black hover:bg-ivory transition-colors whitespace-nowrap",children:"Book a Follow Up"})]})]})}function RefreshIcon(e){let{className:t="",fill:a="none",stroke:n="currentColor",strokeWidth:r=1.4,width:s=24,height:i=24,...o}=e;return(0,l.jsxs)("svg",{className:t,fill:a,stroke:n,strokeWidth:r,width:s,height:i,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 12a9 9 0 0 1 15-6.7L21 8m0-5v5h-5"}),(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 0 1-15 6.7L3 16m0 5v-5h5"})]})}
1var eg=a(71459);let eb=eg.object({source:eg.string(),code:eg.string(),message:eg.string()}).strip(),ej=eg.array(eb);eg.string().nullable(),eg.number().nullable(),eg.boolean().nullable();let ey=eg.object({id:eg.string(),name:eg.string().nullable().optional(),price:eg.number().nullable().optional(),imageUrl:eg.string().nullable().optional()}).strip(),ew=eg.object({products:eg.array(ey),errors:ej}).strip(),eN=eg.object({id:eg.string(),url:eg.string(),altText:eg.string().nullable()}).strip(),ek=eg.object({id:eg.string(),legacyResourceId:eg.string().nullable(),title:eg.string(),sku:eg.string().nullable(),price:eg.string().nullable(),inventoryQuantity:eg.number().int().nullable(),inventoryItemId:eg.string().nullable(),inventoryItemLegacyResourceId:eg.string().nullable()}).strip(),eC=eg.object({id:eg.string(),legacyResourceId:eg.string().nullable(),title:eg.string(),handle:eg.string(),descriptionHtml:eg.string().nullable(),productType:eg.string().nullable(),tags:eg.array(eg.string()),images:eg.array(eN),variants:eg.array(ek)}).strip(),eA=eg.object({product:eC.nullable(),errors:ej}).strip();function handleShopifyError(e){let t=(0,x.wh)(e);(0,et.UH)(e,{message:"[shopify-products] ".concat(t.message),context:{code:t.code,httpStatus:t.httpStatus,scope:"shopify-products"}}),F.Am.error({description:t.message})}async function fetchProducts(e){let t=await V.websiteApi.get(e);return ew.parse(t.data)}async function fetchProduct(e){let t=await V.websiteApi.get(e);return eA.parse(t.data)}let eP={treatments:{accent:"bg-[#bfa05f]",card:"bg-ivory"},wellness:{accent:"bg-[#8ca18d]",card:"bg-[#f6f7f6]"},products:{accent:"bg-[#bd7766]",card:"bg-[#fbf6f5]"}},eD="t-body-sm text-link underline hover:text-link-hover transition-colors self-start";function ProtocolCard(e){let t,{item:a,category:n}=e,r=eP[n],s="products"!==n,o=!!a.nextAppointment,{name:c,url:d}=function(e){var t,a,l;let n=function(e){if(!e)return null;try{let t="function"==typeof atob?atob(e):"",a=t.match(/ProductVariant\/(\d+)/);return a?a[1]:null}catch(e){return null}}(e),{products:r}=function(){var e,t;let{data:a,error:l,isLoading:n,mutate:r}=(0,eh.ZP)("/v2/shopify/products",fetchProducts,{revalidateOnFocus:!1,revalidateOnReconnect:!1,onError:handleShopifyError});return{products:null!==(e=null==a?void 0:a.products)&&void 0!==e?e:[],sourceErrors:null!==(t=null==a?void 0:a.errors)&&void 0!==t?t:[],isLoading:n,error:l,mutate:r}}(),s=n&&null!==(a=null===(t=r.find(e=>e.id.split(":")[1]===n))||void 0===t?void 0:t.id)&&void 0!==a?a:null,{product:i}=function(e){var t,a;let l=e?"/v2/shopify/products/".concat(encodeURIComponent(e)):null,{data:n,error:r,isLoading:s,mutate:i}=(0,eh.ZP)(l,fetchProduct,{revalidateOnFocus:!1,revalidateOnReconnect:!1,onError:handleShopifyError});return{product:null!==(t=null==n?void 0:n.product)&&void 0!==t?t:null,sourceErrors:null!==(a=null==n?void 0:n.errors)&&void 0!==a?a:[],isLoading:s,error:r,mutate:i}}(s),o=(null==i?void 0:i.handle)&&n?"".concat("https://aeditmedshop.myshopify.com","/products/").concat(i.handle,"?variant=").concat(n):null;return{name:null!==(l=null==i?void 0:i.title)&&void 0!==l?l:null,url:o}}(a.shopifyProductId),m=!s&&c?c:a.name,u=s&&a.procedureSlug?(0,l.jsx)(w(),{href:"/medspa/procedure/".concat(a.procedureSlug),className:"t-body text-black underline",children:m}):(0,l.jsx)("span",{className:"t-body text-black underline",children:m});return t=s?o?(0,l.jsx)(w(),{href:"/medspa-user/appointments",shallow:!0,className:eD,children:a.actionLabel}):(0,l.jsx)("button",{type:"button",onClick:()=>(0,i.bi)("booking",{initialName:a.name}),className:eD,children:a.actionLabel}):d?(0,l.jsx)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:eD,children:a.actionLabel}):(0,l.jsx)("button",{type:"button",className:eD,children:a.actionLabel}),(0,l.jsxs)("div",{className:"flex items-stretch",children:[(0,l.jsx)("div",{className:"w-3 rounded-l-xl shrink-0 ".concat(r.accent)}),(0,l.jsxs)("div",{className:"flex flex-col gap-6 rounded-r-xl px-4 py-2 flex-1 min-w-0 ".concat(r.card),children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[u,(0,l.jsx)("span",{className:"t-chiclet text-charcoal",children:a.description})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[a.lastSession&&(0,l.jsxs)("span",{className:"flex items-center gap-2 text-charcoal",children:[(0,l.jsx)(B.Z,{width:16,height:16,stroke:"currentColor","aria-hidden":!0}),(0,l.jsx)("span",{className:"t-chiclet",children:a.lastSession})]}),a.nextSession&&(0,l.jsxs)("span",{className:"flex items-center gap-2 text-charcoal",children:[(0,l.jsx)(RefreshIcon,{width:16,height:16,stroke:"currentColor","aria-hidden":!0}),(0,l.jsx)("span",{className:"t-chiclet",children:a.nextSession})]})]}),t]})]})]})}function ProtocolColumn(e){let{title:t,category:a,items:n}=e;return 0===n.length?null:(0,l.jsxs)("div",{className:"flex flex-col gap-4 bg-white rounded-xl p-4 w-full",children:[(0,l.jsx)("h5",{className:"t-overline text-green",children:t}),n.map(e=>(0,l.jsx)(ProtocolCard,{item:e,category:a},e.id))]})}function RecommendedProtocolSection(e){let{protocol:t}=e;return(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("h4",{className:"font-GT-Super-Display text-green text-[1.25rem] leading-8",children:"Recommended Protocol"}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,l.jsx)(ProtocolColumn,{title:"Treatments",category:"treatments",items:t.treatments}),(0,l.jsx)(ProtocolColumn,{title:"Wellness",category:"wellness",items:t.wellness}),(0,l.jsx)(ProtocolColumn,{title:"Products",category:"products",items:t.products})]})]})}function DocumentIcon(e){let{className:t="",fill:a="none",stroke:n="currentColor",strokeWidth:r=1.4,width:s=24,height:i=24,...o}=e;return(0,l.jsxs)("svg",{className:t,fill:a,stroke:n,strokeWidth:r,width:s,height:i,viewBox:"0 0 ".concat(s," ").concat(i),xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 2v6h6m-4 5H8m8 4H8m2-8H8"})]})}var eM=a(12062);function InfoRow(e){let{icon:t,label:a,children:n}=e;return(0,l.jsxs)("div",{className:"flex gap-4 items-start w-full",children:[(0,l.jsx)("span",{className:"shrink-0 text-green",children:t}),(0,l.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,l.jsx)("span",{className:"t-overline-sm text-dark-gray",children:a}),n]})]})}function TreatmentInformationPanel(e){let{information:t}=e;return(0,l.jsxs)("div",{className:"flex flex-col gap-4 bg-white rounded-xl p-4 flex-1",children:[(0,l.jsx)("h4",{className:"t-overline text-green",children:"Treatment Information"}),(0,l.jsx)(InfoRow,{icon:(0,l.jsx)(eM.Z,{width:24,height:24,"aria-hidden":!0}),label:"Primary Prescription",children:(0,l.jsx)("span",{className:"t-body-sm text-black",children:t.primaryPrescription})}),(0,l.jsx)(InfoRow,{icon:(0,l.jsx)(O.Z,{width:24,height:24,stroke:"currentColor","aria-hidden":!0}),label:"Duration",children:(0,l.jsx)("span",{className:"t-body-sm text-black",children:t.duration})}),(0,l.jsx)(InfoRow,{icon:(0,l.jsx)(DocumentIcon,{width:24,height:24,"aria-hidden":!0}),label:"Notes",children:(0,l.jsx)("ul",{className:"t-body-sm text-black pl-5",children:t.notes.map(e=>(0,l.jsx)("li",{children:e},e))})})]})}function UpcomingAppointmentsPanel(e){let{appointments:t}=e,a=t.length>4;return(0,l.jsxs)("div",{className:"flex flex-col gap-4 bg-white rounded-xl p-4",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("h4",{className:"t-overline text-green",children:"Upcoming Appointments"}),(0,l.jsxs)(E.h_,{children:[(0,l.jsx)(E.$F,{"aria-label":"Appointment options",className:"text-green flex items-center justify-center hover:opacity-70 transition-opacity",children:(0,l.jsx)(Z.Z,{width:24,height:24,"aria-hidden":!0})}),(0,l.jsx)(E.AW,{className:"bg-white p-0 t-body-sm rounded-none w-auto whitespace-nowrap shadow-[-4px_4px_8px_5px_rgba(0,0,0,0.1)] data-[side=bottom]:data-[open]:fade-in data-[side=bottom]:data-[closed]:fade-out",side:"bottom",align:"end",sideOffset:4,children:(0,l.jsx)(E.Xi,{className:"cursor-pointer px-4 py-3 rounded-none hover:bg-white-hover",children:(0,l.jsx)(w(),{"data-cy":"manage-appointments-link",href:"/medspa-user/appointments",shallow:!0,children:"Manage Appointments"})})})]})]}),0===t.length?(0,l.jsx)("p",{className:"t-body-sm text-charcoal",children:"No upcoming appointments scheduled"}):(0,l.jsx)("div",{className:(0,v.cn)("flex flex-col gap-4",a&&"max-h-[400px] overflow-y-auto"),children:t.map(e=>(0,l.jsxs)("div",{className:"flex items-stretch rounded-xl bg-ivory overflow-hidden shrink-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2 bg-green w-14 px-4 justify-center items-center shrink-0",children:[(0,l.jsx)("span",{className:"t-overline-sm text-gold",children:e.month}),(0,l.jsx)("span",{className:"t-overline-sm text-gold text-[26px] leading-none",children:e.day})]}),(0,l.jsxs)("div",{className:"flex flex-col justify-center py-4 pr-4 pl-4 min-w-0",children:[(0,l.jsx)("h5",{className:"t-subsection-header text-black",children:e.name}),(0,l.jsxs)("p",{className:"t-body-sm text-charcoal",children:[(0,l.jsx)("span",{className:"font-bold",children:e.time})," with ".concat(e.staff)]})]})]},e.id))})]})}function TreatmentPlanDetail(e){let{details:t}=e;return(0,l.jsxs)("div",{className:"flex flex-col gap-6 px-6 pb-6",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(TreatmentInformationPanel,{information:t.information}),(0,l.jsx)(ProviderInfoPanel,{provider:t.provider})]}),(0,l.jsx)(UpcomingAppointmentsPanel,{appointments:t.upcomingAppointments})]}),(0,l.jsx)(RecommendedProtocolSection,{protocol:t.recommendedProtocol})]})}function TreatmentPlanCard(e){let{plan:t}=e,[a,n]=(0,r.useState)(!1),s=!!t.details,toggle=()=>{s&&n(e=>!e)};return(0,l.jsxs)("div",{className:"rounded-xl overflow-hidden mb-8 bg-ivory",children:[(0,l.jsxs)("div",{role:"button",tabIndex:s?0:-1,"aria-expanded":a,"aria-disabled":!s,"aria-label":"".concat(a?"Collapse":"Expand"," ").concat(t.name),onClick:toggle,onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),toggle())},className:(0,v.cn)("group block outline-none",s&&"cursor-pointer"),children:[(0,l.jsx)("div",{className:(0,v.cn)("h-8 w-full bg-ivory bg-cover bg-center",s&&"transition-colors group-hover:bg-ivory-hover"),style:t.bannerImage?{backgroundImage:"url(".concat(t.bannerImage,")")}:void 0}),(0,l.jsxs)("div",{className:(0,v.cn)("flex flex-row items-center justify-between gap-4 px-6 py-4 bg-ivory",s&&"transition group-hover:bg-ivory-press"),children:[(0,l.jsx)("h3",{className:"text-green font-normal font-GT-Super-Display text-2xl leading-8 md:text-[1.75rem]",children:t.name}),(0,l.jsxs)("div",{className:"flex items-center gap-6 shrink-0",children:[(0,l.jsx)("span",{className:"text-dark-gray font-maison text-xs leading-6 whitespace-nowrap",children:"Created ".concat(t.createdAt)}),(0,l.jsx)("span",{className:(0,v.cn)("text-green flex items-center justify-center transition-opacity",s?"group-hover:opacity-70":"opacity-40"),children:a?(0,l.jsx)(ef.Z,{width:24,height:24,stroke:"currentColor","aria-hidden":!0}):(0,l.jsx)(ev.Z,{width:24,height:24,"aria-hidden":!0})})]})]})]}),a&&t.details&&(0,l.jsx)(TreatmentPlanDetail,{details:t.details})]})}function ActiveTreatmentPlans(e){let{treatmentPlans:t}=e;return t&&0!==t.length?(0,l.jsx)("div",{children:t.map(e=>(0,l.jsx)(TreatmentPlanCard,{plan:e},e.id))}):(0,l.jsx)("p",{className:"t-body",children:"You have no active treatment plans available"})}function getStartMs(e){var t;let a=new Date(null!==(t=e.startAt)&&void 0!==t?t:"").getTime();return Number.isFinite(a)?a:Number.NaN}function nodeMatches(e,t){var a;return(null!==(a=e.appointmentServices)&&void 0!==a?a:[]).map(e=>{var t,a;return null==e?void 0:null===(a=e.service)||void 0===a?void 0:null===(t=a.name)||void 0===t?void 0:t.toLowerCase()}).filter(e=>!!e).some(e=>t.has(e))}function formatChicletDate(e){var t,a;return new Date(null!==(a=e.startAt)&&void 0!==a?a:"").toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"2-digit",timeZone:(null===(t=e.location)||void 0===t?void 0:t.tz)||"UTC"})}function toTreatmentAppointment(e){var t,a,l,n,r;let s=null!==(t=e.staffName)&&void 0!==t?t:"",i=null!==(a=e.staffRole)&&void 0!==a?a:"";return{id:null!==(l=e.appointmentId)&&void 0!==l?l:"".concat(e.serviceName,"-").concat(e.startAt),month:null!==(n=e.month)&&void 0!==n?n:"",day:String(Number(e.day)||e.day||""),name:null!==(r=e.serviceName)&&void 0!==r?r:"",time:formatClockTo12h(e.startTime),staff:i?"".concat(s,", ").concat(i):s}}function parseRows(e,t){return s.Oj.mappers.parseAppointmentData(e,t)}function enrichProtocolItem(e,t,a,l){if(!e.procedureSlug)return e;let n=new Set([e.procedureSlug.toLowerCase()]),r=t.find(e=>nodeMatches(e,n)),s=a.find(e=>nodeMatches(e,n));return{...e,lastSession:s?"Last session ".concat(formatChicletDate(s)):void 0,nextSession:r?"Next appointment ".concat(formatChicletDate(r)):void 0,actionLabel:r?"Manage Appointment":"Book Now",nextAppointment:r?parseRows([r],l)[0]:void 0}}function mapProcedure(e){var t,a;if(!(null==e?void 0:e.procedureName))return null;let l=[e.procedureRecomendedFrequency,e.numberOfTreatments].filter(Boolean).join(" ⢠");return{id:null!==(a=null!==(t=e.id)&&void 0!==t?t:e.procedureSlug)&&void 0!==a?a:e.procedureName,name:e.procedureName,description:l,procedureSlug:e.procedureSlug,actionLabel:"Book Now"}}function mapProduct(e){var t;if(!(null==e?void 0:e.title))return null;let a=[e.frequency,e.duration].filter(Boolean).join(" ⢠");return{id:null!==(t=e.id)&&void 0!==t?t:e.title,name:e.title,description:a,shopifyProductId:e.shopifyProduct,actionLabel:"Order Now"}}function mapProcedures(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(mapProcedure).filter(e=>null!==e)}function PastTreatments(e){let{treatmentPlans:t}=e;return t&&0!==t.length?(0,l.jsx)("div",{children:t.map(e=>(0,l.jsx)(TreatmentPlanCard,{plan:e},e.id))}):(0,l.jsx)("p",{className:"t-body",children:"You have no past treatments available"})}let eI={active:{title:"AEDIT Well+ Member Benefits",description:"As an active AEDIT WELL+ Member, you earn exclusive credits and savings on all procedures.",cta:"View Membership",action:"link"},past:{title:"AEDIT Well+ Membership Credits",description:"Your former AEDIT WELL+ Membership gave you credits in procedure credits. Rejoin today to continue enjoying exclusive savings.",cta:"Rejoin AEDIT WELL+",action:"modal"},never:{title:"Discover AEDIT Well+",description:"Earn $99 per month towards exclusive membership pricing on AEDIT Medspa procedures",cta:"Become a Member",action:"modal"}};function MembershipAdCard(e){var t;let{membershipStatus:a}=e,n=null!==(t=eI[a])&&void 0!==t?t:eI.never;return"never"===a?(0,l.jsxs)("div",{className:"relative rounded-xl overflow-hidden bg-green",children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-cover opacity-90 brightness-90",style:{backgroundImage:"url('/aeditorlib/static/bg-wallet-image.jpeg')",filter:"blur(20px)"}}),(0,l.jsxs)("div",{className:"relative px-6 py-6 flex flex-row items-center justify-between gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("span",{className:"uppercase t-overline text-white",children:n.title}),(0,l.jsx)("span",{className:"text-ivory/80 font-maison text-sm leading-5",children:n.description})]}),(0,l.jsx)(m.z,{className:"shrink-0 whitespace-nowrap",onClick:()=>(0,i.bi)("membership"),children:n.cta})]})]}):(0,l.jsxs)("div",{className:"rounded-xl bg-ivory px-6 py-6 flex flex-row items-center justify-between gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("span",{className:"uppercase t-overline text-green",children:n.title}),(0,l.jsx)("span",{className:"text-charcoal font-maison text-sm leading-5",children:n.description})]}),"link"===n.action?(0,l.jsx)(w(),{href:"/medspa-user/memberships",children:(0,l.jsx)(m.z,{variant:"link-black",className:"shrink-0 whitespace-nowrap px-0",children:n.cta})}):(0,l.jsx)(m.z,{variant:"link-black",className:"shrink-0 whitespace-nowrap px-0",onClick:()=>(0,i.bi)("membership"),children:n.cta})]})}function WalletCard(e){let{title:t,description:a,ctaText:n,href:r}=e;return(0,l.jsxs)("div",{className:"rounded-xl bg-ivory px-6 py-6 flex flex-row items-center justify-between gap-6",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("span",{className:"uppercase t-overline text-green",children:t}),(0,l.jsx)("span",{className:"text-charcoal font-maison text-sm leading-5",children:a})]}),n&&r&&(0,l.jsx)(w(),{href:r,children:(0,l.jsx)(m.z,{variant:"link-black",className:"shrink-0 whitespace-nowrap px-0",children:n})})]})}function WalletAdCards(e){let{membershipStatus:t}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(MembershipAdCard,{membershipStatus:t}),(0,l.jsx)(WalletCard,{title:"Refer a Friend",description:"You earn $50 in referral credits each time a friend uses your code to avail the
1ir first service. ",ctaText:"Refer a Friend",href:"/medspa-user/referAFriend"}),(0,l.jsx)(WalletCard,{title:"Gift Cards",description:"Give the gift of self-care. Pick up an AEDIT gift card in-spa or call our team today."})]})}function Balance(e){let{membershipStatus:t,myAccountBalance:a}=e,n=(0,I.PE)(a);return"never"!==t?(0,l.jsxs)("div",{className:"relative rounded-xl overflow-hidden items-center justify-center bg-green min-w-[320px] rounded-b-none",children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-cover opacity-90 brightness-90",style:{backgroundImage:"url('/aeditorlib/static/bg-wallet-image.jpeg')",filter:"blur(20px)"}}),(0,l.jsxs)("div",{className:"relative px-10 py-8 flex flex-col items-center gap-4 xl:flex-row xl:justify-between xl:items-center",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center",children:[(0,l.jsx)("span",{className:"uppercase t-overline-sm text-ivory mb-4 text-center",children:"available balance"}),(0,l.jsx)("span",{className:"text-gold font-semibold tracking-overline leading-8 font-maison text-[40px] tabular-nums",children:(0,I.d5)(n)})]}),(0,l.jsx)("div",{children:(0,l.jsx)(m.z,{className:"px-8",onClick:()=>(0,i.bi)("booking"),children:"Book an Appointment"})})]})]}):(0,l.jsxs)("div",{className:"rounded-xl bg-ivory px-10 py-8 flex flex-col items-center gap-4 xl:flex-row xl:justify-between xl:items-center",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center",children:[(0,l.jsx)("span",{className:"uppercase t-overline-sm text-charcoal mb-4 font-semibold text-center",children:"available balance"}),(0,l.jsx)("span",{className:"text-gold font-semibold tracking-overline leading-8 font-maison text-[40px] tabular-nums",children:(0,I.d5)(n)})]}),(0,l.jsx)("div",{children:(0,l.jsx)(m.z,{className:"px-8",variant:"green",onClick:()=>(0,i.bi)("booking"),children:"Book an Appointment"})})]})}function CreditBreakdown(e){let{membershipCredit:t,referralCredit:a,giftCardCredit:n}=e;return(0,l.jsx)("div",{className:"rounded-xl bg-white px-6 py-4 border border-light-gray-hover border-t-0 rounded-t-none",children:[{label:"Membership Credit",value:t},{label:"Referral Credit",value:a},{label:"Gift Card Credit",value:n}].map((e,t)=>(0,l.jsxs)("div",{children:[t>0&&(0,l.jsx)("hr",{className:"border-light-gray-hover my-2"}),(0,l.jsxs)("div",{className:"flex items-center justify-between text-dark-gray uppercase",children:[(0,l.jsx)("span",{className:"t-overline-sm",children:e.label}),(0,l.jsx)("span",{className:"font-maison t-overline font-medium tabular-nums",children:(0,I.d5)(e.value)})]})]},e.label))})}let e_=new Set(["dashboard","profile","appointments","wallet","memberships","packages","treatmentPlans","referAFriend","paymentDetails","lookbook","bookmarks"]),eT=[{key:"dashboard",name:"Dashboard"},{key:"profile",name:"Profile"},{key:"appointments",name:"Appointments"},{key:"wallet",name:"Wallet"},{key:"memberships",name:"Memberships"},{key:"packages",name:"Packages"},{key:"referAFriend",name:"Refer a Friend"},{key:"paymentDetails",name:"Payment Details"},{key:"lookbook",name:"Lookbook"},{key:"bookmarks",name:"Bookmarks"}];var eS=a(95046);function EditUnderscoreIcon(e){let{className:t="",width:a=24,height:n=24,stroke:r="black",strokeWidth:s=1.4,...i}=e;return(0,l.jsxs)("svg",{className:t,width:a,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[(0,l.jsx)("path",{d:"M12 20h9",stroke:r,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M16.5 3.5a2.12 2.12 0 1 1 3 3L7 19l-4 1 1-4L16.5 3.5Z",stroke:r,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})]})}function ProfilePictureModal(e){let{open:t,onClose:a,userHasPhoto:n,firstButtonAction:r,secondButtonAction:s}=e;return(0,l.jsx)(u.Vq,{open:t,onOpenChange:a,children:(0,l.jsxs)(u.cZ,{className:"bg-white max-w-sm rounded-xl p-6 flex flex-col gap-4 items-center",closeButtonClassName:"top-4 right-4",children:[(0,l.jsx)(u.fK,{children:(0,l.jsx)(u.$N,{children:"Profile Picture"})}),(0,l.jsx)(u.Be,{children:n?"Please note that deleting a photo cannot be undone":"You currently do not have a photo."}),(0,l.jsxs)("footer",{className:"w-full flex justify-center gap-2 items-center",children:[(0,l.jsx)(m.z,{variant:"ghost-black",onClick:r,className:"flex-1",children:n?"Upload":"Cancel"}),(0,l.jsx)(m.z,{onClick:s,className:"flex-1",children:n?"Delete":"Upload"})]})]})})}var picture_selector=()=>{let{user:e,setUser:t}=(0,h.a)(),[a,n]=(0,r.useState)(!1),handleUpload=()=>{let e=document.getElementById("file-input");e.click(),e.onchange=async e=>{let a=e.target.files[0];if(a){if(a.size>2e6)return alert("File must be smaller than 2MB.");es().start(),await (0,x.SU)({makeRequest:async()=>{var e,l;let n=new FormData;n.append("profile_picture",a);let r=await V.default.put("/v1/user/me",n),s=null!==(l=null===(e=r.data)||void 0===e?void 0:e.data)&&void 0!==l?l:r.data;t({...s})},successCallback:()=>{ei.f.myProfileUpdated(),F.Am.success({title:"Your changes have been saved."})},finallyCallback:()=>{es().done(),n(!1)}})}}},deletePhoto=async()=>{es().start(),await (0,x.SU)({makeRequest:async()=>{var e,a;let l=await V.default.put("/v1/user/me",{profile_picture:""}),n=null!==(a=null===(e=l.data)||void 0===e?void 0:e.data)&&void 0!==a?a:l.data;t({...n})},successCallback:()=>{ei.f.myProfileUpdated(),F.Am.success({title:"Your changes have been saved."})},finallyCallback:()=>{es().done(),n(!1)}})},s=!!e.profile_picture;return(0,l.jsxs)("div",{id:"m__profile-image-selector",className:"flex justify-center items-center absolute right-0 bottom-0 w-6 h-6 bg-white cursor-pointer [&_.file-picker]:w-full",children:[(0,l.jsx)("button",{type:"button",onClick:()=>n(!0),children:(0,l.jsx)(EditUnderscoreIcon,{stroke:"black",strokeWidth:1.4,width:24,height:24})}),(0,l.jsx)("input",{id:"file-input",accept:"image/png, image/jpeg",type:"file",name:"profile_picture_upload",style:{display:"none"}}),(0,l.jsx)(ProfilePictureModal,{open:a,onClose:()=>n(!1),userHasPhoto:s,firstButtonAction:s?handleUpload:()=>n(!1),secondButtonAction:s?deletePhoto:handleUpload})]})},eL=a(39534);function Drawer(e){let{...t}=e;return(0,l.jsx)(eL.dy.Root,{"data-slot":"drawer",...t})}function DrawerTrigger(e){let{...t}=e;return(0,l.jsx)(eL.dy.Trigger,{"data-slot":"drawer-trigger",...t})}function DrawerPortal(e){let{...t}=e;return(0,l.jsx)(eL.dy.Portal,{"data-slot":"drawer-portal",...t})}function DrawerOverlay(e){let{className:t,...a}=e;return(0,l.jsx)(eL.dy.Overlay,{"data-slot":"drawer-overlay",className:(0,v.cn)("fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",t),...a})}function DrawerContent(e){let{className:t,children:a,...n}=e;return(0,l.jsxs)(DrawerPortal,{"data-slot":"drawer-portal",children:[(0,l.jsx)(DrawerOverlay,{}),(0,l.jsxs)(eL.dy.Content,{"data-slot":"drawer-content",className:(0,v.cn)("group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",t),...n,children:[(0,l.jsx)("div",{className:"mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),a]})]})}function DrawerTitle(e){let{className:t,...a}=e;return(0,l.jsx)(eL.dy.Title,{"data-slot":"drawer-title",className:(0,v.cn)("cn-font-heading text-base font-medium text-foreground",t),...a})}var submenu=e=>{let{activePage:t,items:a}=e,[n,s]=(0,r.useState)(!1),{name:i,key:o}=a.find(e=>e.key===t),c='relative overflow-hidden w-fit before:content-[""] before:absolute before:opacity-0 before:bottom-0 before:-left-10 before:w-full before:h-[1px] before:bg-black before:transition-all before:duration-200 hover:before:left-0 hover:before:opacity-100',d=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"flex flex-col shrink-0",children:a.map(e=>{let{key:a,name:n=a}=e;return(0,l.jsx)(w(),{"data-cy":"profile-".concat(a,"-link"),href:"/medspa-user/".concat(a),onClick:()=>s(!1),shallow:!0,className:(0,v.cn)("mb-2 ml-2 t-overline text-black flex items-center cursor-pointer",t===a?"underline font-bold underline-offset-[6px]":c),children:n},a)})}),(0,l.jsxs)("div",{className:"md:mt-auto flex flex-col shrink-0",children:[(0,l.jsx)(w(),{href:"/faq",className:(0,v.cn)("mb-2 ml-2 t-overline font-medium text-black flex items-center cursor-pointer",c),children:"FAQ"}),(0,l.jsx)(m.z,{className:(0,v.cn)("ml-2 t-overline font-medium text-black flex items-center cursor-pointer bg-transparent border-0 hover:bg-transparent p-0",c),children:"Sign Out"})]})]});return(0,l.jsxs)("div",{className:(0,v.cn)("flex h-12 bg-ivory","md:order-2 md:h-auto md:flex-col md:flex-1","relative"),children:[(0,l.jsxs)(Drawer,{open:n,onOpenChange:s,children:[(0,l.jsxs)("div",{className:(0,v.cn)("flex justify-between items-center px-6 w-full","md:hidden"),children:[(0,l.jsx)("h3",{className:"t-overline font-bold underline uppercase",children:i||o}),(0,l.jsx)(DrawerTrigger,{asChild:!0,children:(0,l.jsx)("button",{className:"group outline-hidden focu
1s:outline-hidden focus-visible:outline-hidden","aria-label":"Open menu",children:(0,l.jsx)(Z.Z,{stroke:"black",width:24,height:24,className:"group-hover:scale-110 transition-all"})})})]}),(0,l.jsxs)(DrawerContent,{className:"flex flex-col bg-white px-7 pb-6 border-t-0! outline-hidden focus:outline-hidden md:hidden",children:[(0,l.jsxs)(DrawerTitle,{className:"sr-only",children:[i||o," menu"]}),d]})]}),(0,l.jsx)("div",{className:"hidden md:flex md:flex-col md:flex-1 md:min-h-0 md:pb-6 md:pt-3 md:px-3",children:d})]})};let eE=["lookbook","bookmarks"];var rail=e=>{let{activePage:t,items:a}=e,{user:n}=(0,h.a)();if(!n)return null;let{first_name:r,last_name:s,referral_code:i}=n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("aside",{className:(0,v.cn)("relative flex bg-white border-b border-black mb-1","md:order-1",eE.includes(t)&&"max-md:hidden"),children:[(0,l.jsxs)("div",{className:"block relative",children:[(0,l.jsx)(eS.Z,{user:n,className:"w-[90px]! h-24! rounded-none!"}),(0,l.jsx)(picture_selector,{})]}),(0,l.jsxs)("span",{className:"flex flex-col justify-center ml-2 gap-1.5",children:[(0,l.jsxs)("span",{className:"t-body uppercase leading-3",children:[r," ",null==s?void 0:s[0],"."]}),(0,l.jsx)("p",{className:"t-overline leading-3 font-semibold",children:"Referral Code:"}),(0,l.jsx)("p",{className:"t-overline leading-3 font-semibold",children:i[0].code})]})]}),(0,l.jsx)(submenu,{activePage:t,items:a})]})};let eZ={dashboard:(0,l.jsx)(function(){var e,t,a,n,i,o,c,d,m,u,v,g,b,j,y,w,N,k,C,A,P;let{user:D}=(0,h.a)(),M=(0,p.G)(),I=(0,f.h)(),_=null!==(v=null==M?void 0:null===(e=M.boulevardClientData)||void 0===e?void 0:e.upcomingAppointments)&&void 0!==v?v:[],T=null!==(g=null==M?void 0:null===(t=M.boulevardClientData)||void 0===t?void 0:t.pastAppointments)&&void 0!==g?g:[],S=null!==(b=null==M?void 0:M.isLoading)&&void 0!==b&&b||null!==(j=null==I?void 0:I.isLoading)&&void 0!==j&&j,L=null!==(y=null==M?void 0:null===(a=M.boulevardClientData)||void 0===a?void 0:a.memberships)&&void 0!==y?y:[],E=null==M?void 0:null===(n=M.boulevardClientData)||void 0===n?void 0:n.accountBalance,Z=null!==(w=null==M?void 0:null===(i=M.boulevardClientData)||void 0===i?void 0:i.vouchers)&&void 0!==w?w:{},R=null!==(N=null==M?void 0:null===(o=M.boulevardClientData)||void 0===o?void 0:o.primaryLocation)&&void 0!==N?N:null,B=null!==(k=null==I?void 0:null===(c=I.contentfulMedspaData)||void 0===c?void 0:c.proceduresCategories)&&void 0!==k?k:[],O=null!==(C=null==I?void 0:null===(d=I.contentfulMedspaData)||void 0===d?void 0:d.medspaProcedures)&&void 0!==C?C:[],z=null!==(A=null==I?void 0:null===(m=I.contentfulMedspaData)||void 0===m?void 0:m.medspaTreatments)&&void 0!==A?A:[],V=null!==(P=null==I?void 0:null===(u=I.contentfulMedspaData)||void 0===u?void 0:u.membershipPage)&&void 0!==P?P:null,[U,W]=(0,r.useState)(!1),q=(0,r.useMemo)(()=>{if(!D||S||!Array.isArray(_)||0===_.length)return null;let e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...e].sort((e,t)=>dashboard_getStartAtTimestamp(e)-dashboard_getStartAtTimestamp(t))}(s.Oj.mappers.parseAppointmentData(_,O));return e.length>0?e[0]:null},[D,S,_,O]),Y=(0,r.useMemo)(()=>{if(!D||S||!Array.isArray(T)||0===T.length)return[];let e=s.Oj.mappers.parseAppointmentData(T,O);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...e].sort((e,t)=>dashboard_getStartAtTimestamp(t)-dashboard_getStartAtTimestamp(e))}(e)},[D,S,T,O]),H=(0,r.useMemo)(()=>{var e;if(S||!(null==L?void 0:L.length))return[];let t=null!=O?O:[],a=L.find(e=>"ACTIVE"===e.status);return a?(null!==(e=a.vouchers)&&void 0!==e?e:[]).flatMap(e=>{var a;return(null!==(a=e.services)&&void 0!==a?a:[]).map(a=>{var l,n;return{boulevard:{id:a.id,name:a.name,quantity:null!==(l=e.quantity)&&void 0!==l?l:0},contentful:null!==(n=t.find(e=>(null==e?void 0:e.procedureName)===(null==a?void 0:a.name.replace("Member ",""))))&&void 0!==n?n:null}})}):[]},[S,L,O]),G=(0,r.useMemo)(()=>{if(!H.length)return!1;let e=new Set(H.map(e=>e.boulevard.id));return _.some(t=>{var a;return(null!==(a=null==t?void 0:t.appointmentServices)&&void 0!==a?a:[]).some(t=>{let{service:a}=t;return e.has(null==a?void 0:a.id)})})},[H,_]),K=(0,r.useMemo)(()=>Object.fromEntries(Object.entries(Z).filter(e=>{let[t]=e;return"AEDIT Well+"!==t})),[Z]),$=(0,r.useMemo)(()=>enrichPackages(K,z,B),[K,z,B]),X=(0,r.useMemo)(()=>L.some(e=>e&&"ACTIVE"===e.status),[L]);return(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("h2",{className:"text-green font-GT-Super-Display font-normal capitalize text-[28px] mt-6 md:mt-0 md:text-[40px] mb-4",children:"Welcome".concat((null==D?void 0:D.first_name)?", ".concat(D.first_name):"")}),(0,l.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:justify-between ",children:[(0,l.jsx)(DashboardUpcomingAppointment,{isLoading:S,appointment:q}),(0,l.jsx)(DashboardBalance,{myAccountBalance:E,isLoading:S})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:justify-between",children:[(0,l.jsx)(DashboardAppointmentHistory,{oldAppointments:Y,isLoading:S}),(0,l.jsx)(DashboardProducts,{})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:justify-between",children:[(0,l.jsx)(DashboardMembership,{vouchers:H,isLoading:S,myPrimaryLocation:R,contentfulMembership:V,isMember:X,isBenefitBooked:G}
1),(0,l.jsx)(DashboardReferal,{currentUser:D,copyToClipboard:e=>{U||navigator.clipboard.writeText(e).then(()=>{W(!0),F.Am.success({title:"Link copied to clipboard."}),setTimeout(()=>{W(!1)},2e3)}).catch(e=>(0,x._N)(e,{skipReport:!0,message:"Failed to copy link."}))}})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:justify-between",children:[(0,l.jsx)(DashboardPackages,{packages:$,isLoading:S}),(0,l.jsx)(DashboardTreatments,{})]})]})},{}),profile:(0,l.jsx)(function(){let{user:e,setUser:t}=(0,h.a)(),{myConcerns:a,concerns:n,setMyConcerns:s}=(0,D.a)(),i=(0,K.cI)({resolver:(0,G.X)(ex),defaultValues:{firstName:e.first_name,lastName:e.last_name,email:e.email,phone:phoneModifier(e.phone)||null,dob:e.dob,gender:e.gender||"",concerns:a||[],preferredLocation:e.location.id||"",preferredLanguage:e.language||""},mode:"all"}),{handleSubmit:o,setValue:d}=i,{date_updated:u}=e,submitHandler=async e=>{var a;f(!0);let l=Object.values(null!==(a=e.concerns)&&void 0!==a?a:{}),n={concern_ids:l.map(e=>e.id)};es().start(),await (0,x.SU)({makeRequest:async()=>{var a,r;s(l);let i={first_name:e.firstName,last_name:e.lastName,dob:e.dob,phone:e.phone,gender:e.gender,languages_spoken:e.preferredLanguage,location_id:e.preferredLocation.id,marketingCommunications:[],transactionalCommunications:[]},o=await V.default.put("/v1/user/me",i),c=null!==(r=null===(a=o.data)||void 0===a?void 0:a.data)&&void 0!==r?r:o.data;if(!c)throw Error("Failed to update profile");t(c),await V.default.put("/v1/user/me/concerns",n)},successCallback:()=>{ei.f.myProfileUpdated(),F.Am.success({title:"Your changes have been saved."})},finallyCallback:()=>{es().done(),f(!1)}})},[p,f]=(0,r.useState)(!1),[g,b]=(0,r.useState)(!1);return g?(0,l.jsx)(ResetPasswordForm,{setResetPassword:b}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex flex-row justify-between mr-6",children:[(0,l.jsx)("h2",{className:"text-green font-normal leading-10 font-GT-Super-Display mt-6 text-[1.75rem] items-center md:mt-0 md:text-[2.5rem]",children:"Profile information"}),(0,l.jsx)("div",{className:"md:flex items-end hidden",children:(0,l.jsxs)("span",{className:"text-dark-gray text-xs leading-6",children:["Last updated at ",u?(0,c.ZP)((0,en.Z)(u),"MMM d, yyyy"):""]})})]}),(0,l.jsx)(K.RV,{...i,children:(0,l.jsxs)("form",{className:(0,v.cn)("pt-8 flex flex-col mb-4 gap-y-4","xxl:grid xxl:grid-cols-2 xxl:gap-x-6 xxl:max-w-[50rem]"),onSubmit:o(submitHandler),children:[(0,l.jsx)(TextInput,{id:"firstName",label:"first name",placeholder:"Jane"}),(0,l.jsx)(TextInput,{id:"lastName",label:"last name",placeholder:"Smith"}),(0,l.jsx)(TextInput,{id:"email",label:"primary email",placeholder:"[email protected]",type:"email",disabled:!0}),(0,l.jsx)(TextInput,{id:"phone",label:"phone",placeholder:"(000)-123-4567",type:"tel",onChange:e=>{let t=e.target.value.replace(/\D/g,""),a=phoneModifier(t);d("phone",a)},maxLength:14}),(0,l.jsx)(TextInput,{id:"dob",label:"date of birth",placeholder:"01/01/1985",type:"date"}),(0,l.jsx)(Dropdown,{id:"gender",label:"gender",placeholder:"Non-binary",options:eo.zH}),(0,l.jsx)("div",{id:"concerns",className:"col-span-2",children:(0,l.jsx)(DropdownWithTags,{id:"concerns",label:"concerns",placeholder:"Select concerns",mustHaveValue:!1,alreadyTaged:[a],options:n})}),(0,l.jsx)(Dropdown,{id:"preferredLocation",label:"preferred location",mustHaveValue:!1,options:ed,labelKey:"long_name",valueKey:"id",placeholder:p?"Loading locations...":"Select a location"}),(0,l.jsx)(Dropdown,{id:"preferredLanguage",label:"preferred language",mustHaveValue:!0,options:ec,valueKey:"id",labelKey:"display_name",placeholder:"Select a language"}),(0,l.jsx)(CheckboxGroup,{id:"marketingCommunications",label:"marketing communications",mustHaveValue:!1,options:[{id:"1",name:"sms",label:"SMS"},{id:"2",name:"email",label:"Email"}]}),(0,l.jsx)(CheckboxGroup,{id:"transactionalCommunications",label:"transactional communications",mustHaveValue:!1,options:[{id:"1",name:"sms",label:"SMS"},{id:"2",name:"email",label:"Email"}]}),(0,l.jsxs)("div",{id:"buttons",className:"col-span-2 flex items-start gap-4 w-fit mt-10",children:[(0,l.jsx)(m.z,{variant:"ghost-gray",onClick:()=>{b(!0)},className:"px-7 py-3 leading-4 max-h-10 ",children:"Change password"}),(0,l.jsx)(m.z,{type:"submit",className:"max-h-10",disabled:p,children:"Save Changes"})]})]})})]})})},{}),appointments:(0,l.jsx)(function(){var e,t,a,n,i,o;let{user:c,refreshUser:d}=(0,h.a)(),m=(0,p.G)(),u=(0,f.h)(),x=null!==(n=null==u?void 0:null===(e=u.contentfulMedspaData)||void 0===e?void 0:e.medspaProcedures)&&void 0!==n?n:[],b=null==m?void 0:null===(t=m.boulevardClientData)||void 0===t?void 0:t.upcomingAppointments,j=null==m?void 0:null===(a=m.boulevardClientData)||void 0===a?void 0:a.pastAppointments,y=null==m?void 0:m.boulevardClientId,w=null!==(i=null==m?void 0:m.isLoading)&&void 0!==i&&i||null!==(o=null==u?void 0:u.isLoading)&&void 0!==o&&o,{upcomingAppointments:N,completedCarryOver:k}=(0,r.useMemo)(()=>
1{if(!c||w||!Array.isArray(b)||0===b.length)return{upcomingAppointments:null,completedCarryOver:[]};let e=new Date,{completed:t,upcoming:a}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,a=[],l=[],n=t.getTime();for(let r of e){if((0,g._6)(r,t)){a.push(r);continue}let e=new Date((null==r?void 0:r.startAt)||"").getTime();(!Number.isFinite(e)||e>=n)&&l.push(r)}return{completed:a,upcoming:l}}(b,e),l=s.Oj.mappers.parseAppointmentData(a,x),n=s.Oj.mappers.parseAppointmentData(t,x);if((!l||0===l.length)&&(!n||0===n.length))return{upcomingAppointments:null,completedCarryOver:[]};let formatDayInTz=(e,t)=>new Intl.DateTimeFormat("en-CA",{timeZone:t||"UTC",year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(e)),formatDayOfNowInTz=t=>new Intl.DateTimeFormat("en-CA",{timeZone:t||"UTC",year:"numeric",month:"2-digit",day:"2-digit"}).format(e),r=[];return l.forEach(e=>{var t;let a=(null===(t=e.location)||void 0===t?void 0:t.tz)||"UTC",l=formatDayInTz(e.startAt,a),n=formatDayOfNowInTz(a);r.push({...e,rescheduleDisabled:l===n})}),{upcomingAppointments:r.length>0?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...e].sort((e,t)=>getStartAtTimestamp(e)-getStartAtTimestamp(t))}(r):null,completedCarryOver:n}},[c,w,b,x]),C=(0,r.useMemo)(()=>{if(!c||w)return[];let e=Array.isArray(j)?s.Oj.mappers.parseAppointmentData(j,x):[],t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[...e,...t]}(e,k);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...e].sort((e,t)=>getStartAtTimestamp(t)-getStartAtTimestamp(e))}(t)},[c,w,j,x,k]),[A,P]=(0,r.useState)("upcoming");return(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-green font-normal leading-10 font-GT-Super-Display mt-6 text-[1.75rem] items-center md:mt-0 md:text-[2.5rem]",children:"Appointments"}),(0,l.jsxs)("div",{className:"flex border-b border-light-gray text-xs leading-6 my-8 font-maison font-medium text-dark-gray",children:[(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',"upcoming"===A&&"text-black before:h-0.5"),onClick:()=>P("upcoming"),children:"UPCOMING"}),(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',"completed"===A&&"text-black before:h-0.5"),onClick:()=>P("completed"),children:"COMPLETED"})]}),"upcoming"===A&&(0,l.jsx)(UpcomingAppointments,{upcomingAppointments:N,isLoading:w,clientId:y,currentUser:c,updateUserSession:d}),"completed"===A&&(0,l.jsx)(CompletedAppointments,{completedAppointments:C,isLoading:w})]})},{}),wallet:(0,l.jsx)(function(){var e,t,a,n,r,s;let i=(0,p.G)(),c=null==i?void 0:null===(e=i.boulevardClientData)||void 0===e?void 0:e.accountBalance,d=null!==(n=null==i?void 0:null===(t=i.boulevardClientData)||void 0===t?void 0:t.memberships)&&void 0!==n?n:[],m=null!==(r=null==i?void 0:null===(a=i.boulevardClientData)||void 0===a?void 0:a.referralCredits)&&void 0!==r?r:0,u=null!==(s=null==i?void 0:i.isLoading)&&void 0!==s&&s,x=u?"never":function(e){let t=e.some(e=>e&&"ACTIVE"===e.status);return t?"active":e.length>0?"past":"never"}(d),h=(0,I.W1)(d.map(e=>(0,I.pQ)(null==e?void 0:e.accountCredit)));return(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-green font-normal leading-10 font-GT-Super-Display mt-6 text-[1.75rem] items-center md:mt-0 md:text-[2.5rem]",children:"Wallet"}),(0,l.jsxs)("span",{className:"t-body text-charcoal mt-2 mb-8 block",children:["To keep things accurate, your wallet balance is updated following appointments."," ",(0,l.jsx)(w(),{href:"/faq#credits",className:"underline text-charcoal hover:text-black",children:"Learn More"})]}),u?(0,l.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,l.jsx)(o.Z,{"aria-label":"Loading","aria-hidden":!0})}):(0,l.jsxs)("div",{className:"flex flex-col lg:flex-row gap-8",children:[(0,l.jsxs)("div",{className:"w-full lg:w-1/2",children:[(0,l.jsx)(Balance,{membershipStatus:x,myAccountBalance:c}),(0,l.jsx)(CreditBreakdown,{membershipCredit:h,referralCredit:m,giftCardCredit:0})]}),(0,l.jsx)("div",{className:"w-full lg:w-1/2 flex flex-col gap-4",children:(0,l.jsx)(WalletAdCards,{membershipStatus:x})})]})]})},{}),memberships:(0,l.jsx)(function(){var e,t,a,n,s,i,c;let d=(0,f.h)(),m=null!==(a=null==d?void 0:null===(e=d.contentfulMedspaData)||void 0===e?void 0:e.membershipPage)&&void 0!==a?a:{},u=null!==(n=m.perks)&&void 0!==n?n:[],{user:x,refreshUser:g}=(0,h.a)(),b=(0,p.G)(),j=null!==(s=null==b?void 0:null===(t=b.boulevardClientData)||void 0===t?void 0:t.memberships)&&void 0!==s?s:[],y=null!==(i=null==b?void 0:b.isLoading)&&void 0!==i&&i||null!==(c=null==d?void 0:d.isLoading)&&void 0!==c&&c,w=null==b?void 0:b.boulevardClientId,N=j.filter(e=>"ACTIVE"===e.status&&!e.statusReason),k=j.filter(e=>"ACTIVE"!==e.status||e.statusReason),[C,A]=(0,r.useState)("active");return(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-green font-normal leading-10 font-GT-Super-Display mt-6 text-[1.75rem] items-center md:mt-0 md:text-[2.5rem]",children:"Memberships"}),(0,l.jsx)("div",{className:"flex border-b border-light-gray text-xs leading-6 my-8 font-maison font-medium text-dark-gray",children:H.map(e=>(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',C===e.key&&"text-black before:h-0.5"),onClick:()=>A(e.key),children:e.label},e.key))}),"active"===C?y?(0,l.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,l.jsx)(o.Z,{"aria-label":"Loading","aria-hidden":!0})}):0===N.length?(0,l.jsx)(MembershipUpgradeCard,{pageH1:m.pageH1,bannerImage:m.bannerImage,perks:u}):N.map(e=>(0,l.jsx)(ActiveMembershipCard,{membership:e,perks:u,boulevardClientId:w,currentUser:x,updateUserSession:g},e.id)):y?(0,l.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,l.jsx)(o.Z,{"aria-label":"Loading","aria-hidden":!0})}):0===k.length?(0,l.jsx)("div",{className:"content-box",children:(0,l.jsx)("span",{className:"t-subsection-header leading-6 text-charcoal",children:"You don't have any past AEDIT Medspa memberships"})}):k.map(e=>(0,l.jsx)(PastMembershipCard,{membership:e},e.id))]})},{}),packages:(0,l.jsx)(function(){var e,t,a,n,r,s,i,c;let d=(0,p.G)(),m=(0,f.h)(),u=null!==(n=null==d?void 0:d.isLoading)&&void 0!==n&&n||null!==(r=null==m?void 0:m.isLoading)&&void 0!==r&&r,x=null!==(s=null==m?void 0:null===(e=m.contentfulMedspaData)||void 0===e?void 0:e.proceduresCategories)&&void 0!==s?s:[],h=null!==(i=null==m?void 0:null===(t=m.contentfulMedspaData)||void 0===t?void 0:t.medspaTreatments)&&void 0!==i?i:[],g=null!==(c=null==d?void 0:null===(a=d.boulevardClientData)||void 0===a?void 0:a.vouchers)&&void 0!==c?c:{},b=Object.fromEntries(Object.entries(g).filter(e=>{let[t]=e;return"AEDIT Well+"!==t})),j=enrichPackages(b,h,x);return(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:(0,v.cn)("text-green font-GT-Super-Display font-normal capitalize leading-10 mb-8 mt-6 text-[28px]","md:mt-0 md:text-[40px]"),children:"Packages"}),u?(0,l.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,l.jsx)(o.Z,{"aria-label":"Loading","aria-hidden":!0})}):(0,l.jsx)("div",{className:"overflow-y-auto",children:j.length>0?j.map(e=>{var t;let a=(null===(t=e.contentfulPackage)||void 0===t?void 0:t.concernsTreated)||[];return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"hidden xl:block",children:(0,l.jsx)(DesktopPackage,{packageConcerns:a,medspaPackage:e})}),(0,l.jsx)("div",{className:"block xl:hidden",children:(0,l.jsx)(MobilePackage,{packageConcerns:a,medspaPackage:e})})]},e.id)}):(0,l.jsx)("span",{className:"t-subsection-header leading-6 text-charcoal",children:"You don't have any active AEDIT Medspa packages"})})]})},{}),treatmentPlans:(0,l.jsx)(function(){var e,t;let[a,n]=(0,r.useState)("active"),i=(0,p.G)(),c=(0,f.h)(),d=null==i?void 0:i.boulevardClientId,m=null!==(t=null==c?void 0:null===(e=c.contentfulMedspaData)||void 0===e?void 0:e.medspaProcedures)&&void 0!==t?t:[],{data:u,isLoading:x}=(0,eh.ZP)("medspa-treatment-plans",async()=>(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter(e=>!!(null==e?void 0:e.title)).map(e=>{var t,a,l,n,r,s,i,o,c,d,m,u;return{id:null!==(i=null!==(s=e.id)&&void 0!==s?s:e.title)&&void 0!==i?i:"",name:null!==(o=e.title)&&void 0!==o?o:"",createdAt:function(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}(e.createdAt),bannerImage:null!==(c=null===(t=e.image)||void 0===t?void 0:t.src)&&void 0!==c?c:"",details:{information:{primaryPrescription:null!==(d=e.primaryPrescription)&&void 0!==d?d:"",duration:null!==(m=e.duration)&&void 0!==m?m:"",notes:Array.isArray(e.notes)?e.notes:[]},provider:{name:null!==(u=null===(a=e.provider)||void 0===a?void 0:a.name)&&void 0!==u?u:"",specialty:null===(l=e.provider)||void 0===l?void 0:l.specialty,avatar:null===(r=e.provider)||void 0===r?void 0:null===(n=r.profilePicture)||void 0===n?void 0:n.src,location:"AEDIT Medspa, LA"},upcomingAppointments:[],recommendedProtocol:{treatments:mapProcedures(e.treatmentProcedures),wellness:mapProcedures(e.wellnessProcedures),products:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(mapProduct).filter(e=>null!==e)}(e.products)}}}})})(await ep.dM.getMedspaTreatmentPlans()),{revalidateOnFocus:!1,revalidateOnReconnect:!1}),{data:h}=(0,eh.ZP)(d?["treatment-plan-appointments",d]:null,async e=>{let[,t]=e,a={quantity:50,hasCanceledQuery:!0,failed:!1},[l,n]=await Promise.all([s.Oj.client.getMyAppointments(t,{...a,startDate:new Date}),s.Oj.client.getMyAppointments(t,{...a,endDate:new Date})]);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>null==e?void 0:e.node).filter(e=>!!e)}([...l,...n])},{revalidateOnFocus:!1,revalidateOnReconnect:!1}),g=(0,r.useMemo)(()=>{let e=null!=u?u:[];return h?e.map(e=>(function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e.details)return e;let{treatments:l,wellness:n,products:r}=e.details.recommendedProtocol,s=new Set([...l,...n].map(e=>{var t;return null===(t=e.procedureSlug)||void 0===t?void 0:t.toLowerCase()}).filter(e=>!!e)),i=t.filter(e=>nodeMatches(e,s)),{upcoming:o,past:c}=function(e){let t=Date.now(),a=[],l=[];
1return e.forEach(e=>{let n=getStartMs(e);if(Number.isNaN(n))return;let r="FINAL"===e.state||n<=t;(r?l:a).push(e)}),a.sort((e,t)=>getStartMs(e)-getStartMs(t)),l.sort((e,t)=>getStartMs(t)-getStartMs(e)),{upcoming:a,past:l}}(i);return{...e,details:{...e.details,upcomingAppointments:parseRows(o,a).map(toTreatmentAppointment),recommendedProtocol:{treatments:l.map(e=>enrichProtocolItem(e,o,c,a)),wellness:n.map(e=>enrichProtocolItem(e,o,c,a)),products:r}}}})(e,h,m)):e},[u,h,m]);return(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-green font-normal leading-10 font-GT-Super-Display mt-6 text-[1.75rem] items-center md:mt-0 md:text-[2.5rem]",children:"Treatment plans"}),(0,l.jsxs)("div",{className:"flex border-b border-light-gray text-xs leading-6 my-8 font-maison font-medium text-dark-gray",children:[(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',"active"===a&&"text-black before:h-0.5"),onClick:()=>n("active"),children:"ACTIVE"}),(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',"past"===a&&"text-black before:h-0.5"),onClick:()=>n("past"),children:"PAST TREATMENTS"})]}),x?(0,l.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,l.jsx)(o.Z,{"aria-label":"Loading","aria-hidden":!0})}):(0,l.jsxs)(l.Fragment,{children:["active"===a&&(0,l.jsx)(ActiveTreatmentPlans,{treatmentPlans:g}),"past"===a&&(0,l.jsx)(PastTreatments,{treatmentPlans:[]})]})]})},{}),referAFriend:(0,l.jsx)(function(){var e,t;let{user:a}=(0,h.a)(),n=(0,p.G)(),r=null!==(t=null==n?void 0:null===(e=n.boulevardClientData)||void 0===e?void 0:e.referralCredits)&&void 0!==t?t:0;return(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-green font-normal leading-10 font-GT-Super-Display mt-6 text-[1.75rem] items-center md:mt-0 md:text-[2.5rem] mb-8",children:"Refer friends + get rewarded"}),(0,l.jsx)("span",{className:"t-body text-charcoal mt-2 mb-8",children:"Thereâs no limit to how many referrals you can be rewarded for. That one friend whoâs always asking why you look so refreshed? Your new-to-injectables in-law? Spread the word enough and your next treatment might just be on us!"}),(0,l.jsx)("div",{className:"overflow-y-auto mb-8",children:(0,l.jsxs)("div",{className:"flex justify-between w-full gap-8 flex-col xxl:flex-row",children:[(0,l.jsx)(CodeFrame,{title:"Referral code",textCode:a.referral_code[0].code,data:"code"}),(0,l.jsx)(CodeFrame,{title:"Invitation link",textCode:"http://booking.jectnyc.com/".concat(a.referral_code[0].code),data:"link"})]})}),(0,l.jsxs)("div",{className:"flex justify-between w-full gap-8 mb-8 flex-col xxl:flex-row",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"t-subsection-header text-green",children:"How it works"}),(0,l.jsx)("h4",{className:"t-overline text-gold uppercase",children:"For you"}),(0,l.jsx)("span",{className:"t-body-sm text-charcoal",children:"Youâll receive a $50 account credit towards future treatments for every referral to JECT"}),(0,l.jsx)("h4",{className:"t-overline text-gold uppercase",children:"For them"}),(0,l.jsx)("span",{className:"t-body-sm text-charcoal",children:"As a first timer, theyâll receive AEDIT Membership pricing (up to 20% off). Just have your friend use your unique code while booking"}),(0,l.jsx)("h4",{className:"t-overline text-gold uppercase",children:"The details"}),(0,l.jsx)("span",{className:"t-body-sm text-charcoal",children:"Referee must be a new client of AEDIT. Account credits expire after 12 months. Valid only on AEDIT services, not products."})]}),(0,l.jsxs)("div",{className:"bg-ivory rounded-xl h-fit p-4 max-w-[408px]",children:[(0,l.jsx)("span",{className:"uppercase t-overline text-green mb-4",children:"Referal credits"}),(0,l.jsxs)("div",{className:"flex flex-col justify-center items-center mb-4 pb-4 border-b border-b-light-gray",children:[(0,l.jsxs)("span",{className:"text-gold font-maison font-medium leading-8 text-[32px]",children:["$",r]}),(0,l.jsx)("span",{className:"text-charcoal text-sm font-light leading-[18px]",children:"Available balance"})]}),(0,l.jsx)("span",{className:"text-charcoal t-body-sm",children:"You earn $50 Gift Card each time a friend uses your code to avail the
1ir first service. As soon as they do, your credits will show up here."})]})]}),(0,l.jsx)("div",{className:"flex justify-center items-center py-3 mb-6",children:(0,l.jsx)(w(),{href:"/terms-and-conditions",children:(0,l.jsx)("span",{className:"text-link underline text-sm leading-6 font-maison",children:"Terms & Conditions"})})})]})},{}),paymentDetails:(0,l.jsx)(function(){var e,t;let{user:a,refreshUser:n}=(0,h.a)(),s=(0,p.G)(),i=null==s?void 0:null===(e=s.boulevardClientData)||void 0===e?void 0:e.creditCard,c=null==s?void 0:s.boulevardClientId,d=null!==(t=null==s?void 0:s.isLoading)&&void 0!==t&&t,m=(0,K.cI)({resolver:(0,G.X)(el)}),[u,x]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1);return(0,l.jsxs)("div",{className:"pb-6",children:[(0,l.jsx)("h2",{className:(0,v.cn)("text-green font-GT-Super-Display font-normal text-[28px] mt-6","md:text-[40px] md:mt-0"),children:"Payment details"}),d?(0,l.jsx)("div",{className:"flex items-center justify-center mt-10",children:(0,l.jsx)(o.Z,{"aria-label":"Loading","aria-hidden":!0})}):f?(0,l.jsx)(K.RV,{...m,children:(0,l.jsx)(AddNewCardForm,{setIsAddingNewCard:g,updateUserSession:n,currentUser:a,boulevardClientId:c})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"mt-8 mb-6 flex flex-col",children:[(0,l.jsx)("span",{className:"text-green t-subsection-header",children:"Credit card"}),(0,l.jsx)("span",{className:"text-charcoal t-body",children:"Manage your credit card and add payment options"})]}),(0,l.jsx)(CreditCardCards,{creditCard:i,addAction:()=>{i?x(!0):g(!0)}}),(0,l.jsx)(AddCardModal,{isOpen:u,setIsOpen:x,creditCard:i,setIsAddingNewCard:g})]})]})},{}),lookbook:(0,l.jsx)(function(){let[e,t]=(0,r.useState)("aedits");return(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-green font-normal leading-10 font-GT-Super-Display mt-6 text-[1.75rem] items-center md:mt-0 md:text-[2.5rem]",children:"Lookbook"}),(0,l.jsxs)("div",{className:"flex border-b border-light-gray text-xs leading-6 my-8 font-maison font-medium text-dark-gray",children:[(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',"aedits"===e&&"text-black before:h-0.5"),onClick:()=>t("aedits"),children:"MY AEDITS"}),(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',"uploads"===e&&"text-black before:h-0.5"),onClick:()=>t("uploads"),children:"MY PROGRESS PHOTOS"})]}),{aedits:(0,l.jsx)(LookbookAedits,{}),uploads:(0,l.jsx)(LookbookUploads,{})}[e]]})},{}),bookmarks:(0,l.jsx)(function(){let[e,t]=(0,r.useState)("aedition"),{favorites:a}=(0,D.a)(),{procedure:n,concern:s,aeditionArticles:i}=A()(formatFavorites(a),"_type");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-green font-normal leading-10 font-GT-Super-Display mt-6 text-[1.75rem] items-center md:mt-0 md:text-[2.5rem]",children:"Bookmarks"}),(0,l.jsxs)("div",{className:"flex border-b border-light-gray text-xs leading-6 my-8 font-maison font-medium text-dark-gray",children:[(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',"aedition"===e&&"text-black before:h-0.5"),onClick:()=>t("aedition"),children:"AEDITION"}),(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',"solutions"===e&&"text-black before:h-0.5"),onClick:()=>t("solutions"),children:"SOLUTIONS"}),(0,l.jsx)("button",{className:(0,v.cn)('p-3 t-overline relative before:content-[""] before:absolute before:bottom-0 before:left-0 before:w-full before:h-0 before:transition-all before:rounded-full before:bg-gold',"concerns"===e&&"text-black before:h-0.5"),onClick:()=>t("concerns"),children:"CONCERNS"})]}),{aedition:(0,l.jsx)(BookmarksAedition,{favorites:i}),solutions:(0,l.jsx)(BookmarksSolutions,{favorites:n}),concerns:(0,l.jsx)(BookmarksConcerns,{favorites:s})}[e]]})})},{})};var profile=e=>{let{activePage:t}=e,{user:a}=(0,h.a)(),{first_name:r,last_name:s}=a||{};return(0,l.jsxs)("div",{className:(0,v.cn)("flex flex-col overflow-y-auto bg-white","md:flex-row md:h-[calc(100vh-64px)] md:overflow-hidden md:m-0"),children:[(0,l.jsx)(n.Z,{title:"".concat(r," ").concat(s),description:"".concat(r," ").concat(s),canonicalPath:"user/profile"}),(0,l.jsx)("section",{className:(0,v.cn)("bg-ivory overflow-hidden flex flex-col w-full","md:w-[320px] md:border-r md:border-black md:h-full md:sticky md:top-0","xxl:min-w-[320px]"),children:(0,l.jsx)(rail,{activePage:t,items:eT})}),(0,l.jsx)("section",{className:(0,v.cn)("flex flex-col px-6 w-full pb-10","md:flex-[1_1_auto] md:overflow-y-auto md:overscroll-contain md:px-10 md:py-12 md:min-w-[500px] md:w-[calc(100vw-320px)] md:h-full"),children:eZ[t]})]})},eR=a(46543),eB=a(11163),eO=!0,_name_=()=>{var e,t;let a=(0,eB.useRouter)(),n="string"==typeof(t=null==a?void 0:null===(e=a.query
1)||void 0===e?void 0:e.name)&&e_.has(t)?a.query.name:"dashboard";return(0,eR.ZP)(),(0,l.jsx)(profile,{activePage:n})}},22653:function(e,t,a){"use strict";a.d(t,{Z:function(){return BookmarkIcon}});var l=a(85893);function BookmarkIcon(e){let{className:t="",fill:a="none",stroke:n="currentColor",strokeWidth:r=1.4,width:s=24,height:i=24,...o}=e;return(0,l.jsx)("svg",{className:t,fill:a,width:s,height:i,viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",...o,children:(0,l.jsx)("path",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:r,d:"m19 21-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16Z"})})}},5334:function(e,t,a){"use strict";a.d(t,{Z:function(){return CalendarIcon}});var l=a(85893);function CalendarIcon(e){let{className:t="",stroke:a="#1C2F2C",strokeWidth:n=1.4,width:r=24,height:s=24,...i}=e;return(0,l.jsxs)("svg",{className:t,width:r,height:s,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[(0,l.jsx)("path",{d:"M19 4H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Z",stroke:a,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M16 2v4",stroke:a,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M8 2v4",stroke:a,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M3 10h18",stroke:a,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"})]})}},762:function(e,t,a){"use strict";a.d(t,{Z:function(){return ClipboardIcon}});var l=a(85893);function ClipboardIcon(e){let{className:t="",width:a=24,height:n=24,fill:r="#000",...s}=e;return(0,l.jsx)("svg",{width:a,height:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:t,...s,children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7 1a.7.7 0 0 0-1.4 0v2.3H3A2.7 2.7 0 0 0 .3 6v12A2.7 2.7 0 0 0 3 20.7h8.3V23a.7.7 0 1 0 1.4 0v-2.3h.05a.7.7 0 1 0 0-1.4h-.05V4.7h.05a.7.7 0 1 0 0-1.4h-.05V1Zm-1.4 3.7H3A1.3 1.3 0 0 0 1.7 6v12A1.3 1.3 0 0 0 3 19.3h8.3V4.7Zm10.4-1.3a2.7 2.7 0 0 0-.7-.1h-.75a.7.7 0 1 0 0 1.4H21c.12 0 .23.01.34.04a.7.7 0 0 0 .36-1.35Zm-3.75.6a.7.7 0 0 0-.7-.7h-1.5a.7.7 0 1 0 0 1.4h1.5a.7.7 0 0 0 .7-.7Zm4.8.8a.7.7 0 0 0-.5.86c.04.11.05.22.05.34v1a.7.7 0 1 0 1.4 0V6c0-.24-.03-.47-.1-.7a.7.7 0 0 0-.85-.5Zm.25 5.5a.7.7 0 0 0-.7.7v2a.7.7 0 1 0 1.4 0v-2a.7.7 0 0 0-.7-.7Zm0 6a.7.7 0 0 0-.7.7v1c0 .12-.01.23-.04.34a.7.7 0 1 0 1.35.36c.06-.23.09-.46.09-.7v-1a.7.7 0 0 0-.7-.7Zm-.8 3.45a.7.7 0 0 0-.86-.5c-.11.04-.22.05-.34.05h-.75a.7.7 0 1 0 0 1.4H21c.24 0 .47-.03.7-.1a.7.7 0 0 0 .5-.85Zm-4.25.25a.7.7 0 0 0-.7-.7h-1.5a.7.7 0 1 0 0 1.4h1.5a.7.7 0 0 0 .7-.7Z",fill:r})})}},69880:function(e,t,a){"use strict";a.d(t,{Z:function(){return ClockIcon}});var l=a(85893);function ClockIcon(e){let{className:t="",fill:a="none",stroke:n="#000",strokeWidth:r=1.4,width:s=24,height:i=24,...o}=e;return(0,l.jsxs)("svg",{className:t,width:s,height:i,viewBox:"0 0 24 24",fill:a,xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,l.jsx)("path",{d:"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20Z",stroke:n,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M12 6v6l4 2",stroke:n,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"})]})}},5595:function(e,t,a){"use strict";a.d(t,{Z:function(){return EllipsisIcon}});var l=a(85893);function EllipsisIcon(e){let{className:t="",fill:a="currentColor",stroke:n="currentColor",strokeWidth:r=1.4,width:s=24,height:i=24,...o}=e;return(0,l.jsx)("svg",{className:t,fill:a,stroke:n,strokeWidth:r,width:s,height:i,viewBox:"0 0 ".concat(s," ").concat(i),xmlns:"http://www.w3.org/2000/svg",...o,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2m7 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2M5 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})})}},9962:function(e,t,a){"use strict";a.d(t,{Z:function(){return EyeOffIcon}});var l=a(85893);function EyeOffIcon(e){let{className:t="",fill:a="none",stroke:n="black",strokeWidth:r=1.4,width:s=24,height:i=24,...o}=e;return(0,l.jsx)("svg",{className:t,width:s,height:i,viewBox:"0 0 24 24",fill:a,xmlns:"http://www.w3.org/2000/svg",...o,children:(0,l.jsx)("path",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:r,d:"M9.9 4.24C10.59 4.08 11.3 4 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24m8.06 8.06c-1.7 1.3-3.8 2.02-5.94 2.06-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94zM1 1l22 22"})})}},65347:function(e,t,a){"use strict";a.d(t,{K:function(){return LogoIcon}});var l=a(85893),n=a(67294);function LogoIcon(e){let{className:t="",width:a=124,height:r=16,fill:s="black",markOpacity:i=.5,...o}=e,c=(0,n.useId)();return(0,l.jsxs)("svg",{width:a,height:r,className:t,viewBox:"0 0 108 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,l.jsxs)("g",{clipPath:"url(#".concat(c,")"),children:[(0,l.jsx)("path",{d:"M27.79 0H43.2v2.74H30.8v7.68h10.33v2.75H30.8v8.09h12.85V24H27.8V0Z",fill:s}),(0,l.jsx)("path",{d:"M51.34 0h7.16c2.48 0 4.64.5 6.46 1.5 1.84 1 3.25 2.39 4.22 4.2.98 1.8 1.48 3.9 1.48 6.3s-.5 4.48-1.48 6.3a10.24 10.24 0 0 1-4.22 4.23A13.4 13.4 0 0 1 58.5 24h-7.16V0Zm7.16 21.26c2.88 0 5.11-.84 6.7-2.5 1.59-1.67 2.38-3.93 2.38-6.76 0-2.83-.79-5.1-2.38-6.75-1.57-1.67-3.8-2.5-6.7-2.5h-4.15v18.5h4.15Z",fill:s}),(0,l.jsx)("path",{d:"M78.78 0h3v24h-3V0Z",fill:s}),(0,l.jsx)("path",{d:"M89.3 0H108v2.74h-7.84V24h-3.01V2.74h-7.84V0Z",fill:s}),(0,l.jsx)("path",{opacity:i,d:"M0 24 9.02 0h3.47l8.98 24h-3.14l-2.5-6.48H5.54L3.04 24H0Zm6.41-9.19h8.55L10.67 3.26 6.41 14.8Z",fill:s})]}),(0,l.jsx)("defs",{children:(0,l.jsx)("clipPath",{id:c,children:(0,l.jsx)("rect",{width:"108",height:"24",fill:"white"})})})]})}},39313:function(e,t,a){"use strict";a.d(t,{g:function(){return LogoWellPlusIcon}});var l=a(85893);function LogoWellPlusIcon(e){let{className:t="",width:a=217,height:n=32,...r}=e;return(0,l.jsxs)("svg",{width:a,height:n,viewBox:"0 0 217 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,...r,children:[(0,l.jsxs)("g",{clipPath:"url(#clip0_3133_16054)",children:[(0,l.jsx)("path",{d:"M37.05 0H57.6v3.66H41.06V13.9h13.78v3.65H41.06v10.8H58.2V32H37.05V0Z",fill:"white"}),(0,l.jsx)("path",{d:"M68.46 0H78c3.31 0 6.18.67 8.61 2.01a13.37 13.37 0 0 1 5.62 5.58A17.23 17.23 0 0 1 94.21 16c0 3.2-.66 5.97-1.98 8.41a13.66 13.66 0 0 1-5.62 5.62A17.88 17.88 0 0 1 78 32h-9.54V0ZM78 28.34c3.83 0 6.81-1.11 8.93-3.33 2.12-2.23 3.18-5.23 3.18-9.01 0-3.78-1.06-6.81-3.18-9-2.08-2.23-5.07-3.34-8.94-3.34h-5.52v24.68H78Z",fill:"white"}),(0,l.jsx)("path",{d:"M105.04 0h4v32h-4V0Z",fill:"white"}),(0,l.jsx)("path",{d:"M119.07 0H144v3.66h-10.46V32h-4V3.66h-10.47V0Z",fill:"white"}),(0,l.jsx)("path",{opacity:"0.6",d:"M0 32 12.02 0h4.64l11.97 32h-4.18l-3.33-8.64H7.39L4.05 32H0Zm8.55-12.25h11.4l-5.72-15.4-5.68 15.4Z",fill:"white"})]}),(0,l.jsx)("path",{d:"M158.98 18 156.4 4h1.7l2.06 11.38h.04L163.66 4h1.56l3.48 11.38h.04L170.8 4h1.7l-2.6 14h-2l-3.44-11.24h-.04L161 18h-2.02Zm15.64 0V4h8.4v1.56h-6.77v4.48h6.2v1.48h-6.2v4.92h6.76V18h-8.4Zm11.2 0V4h1.
165v12.44h6.31V18h-7.96Zm10.38 0V4h1.64v12.44h6.32V18h-7.96Zm19.23-8.02v1.34h-3.96v4.26h-1.42v-4.26h-3.98V9.98h3.98V5.72h1.42v4.26h3.96Z",fill:"white"}),(0,l.jsx)("line",{opacity:"0.3",x1:"156",y1:"31",x2:"186",y2:"31",stroke:"white",strokeWidth:"2"}),(0,l.jsx)("defs",{children:(0,l.jsx)("clipPath",{id:"clip0_3133_16054",children:(0,l.jsx)("rect",{width:"144",height:"32",fill:"white"})})})]})}},4301:function(e,t,a){"use strict";a.d(t,{Z:function(){return MagicWandIcon}});var l=a(85893);function MagicWandIcon(e){let{className:t="",fill:a="#E3B24D",width:n=16,height:r=16,strokeWidth:s=.5,stroke:i="#E3B24D",...o}=e;return(0,l.jsx)("svg",{className:t,width:n,height:r,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:(0,l.jsx)("path",{fill:a,stroke:i,strokeWidth:s,d:"m14.58 8.74-2-2.7 1.07-3.17a.41.41 0 0 0-.52-.52L9.95 3.42l-2.69-2a.41.41 0 0 0-.66.34l.04 3.35L3.9 7.05a.41.41 0 0 0 .12.73l2.76.86-5.33 5.32a.41.41 0 1 0 .59.59l5.32-5.33.86 2.76a.41.41 0 0 0 .73.12l1.94-2.74 3.36.04c.16 0 .3-.09.37-.23a.41.41 0 0 0-.04-.43Zm-3.9-.21a.4.4 0 0 0-.34.17l-1.58 2.24-.81-2.62v-.01a.4.4 0 0 0-.1-.16.4.4 0 0 0-.16-.1h-.01l-2.62-.81L7.3 5.66c.1-.08.17-.2.17-.35l-.03-2.73 2.2 1.63c.1.09.24.1.37.07l2.6-.88-.89 2.59a.42.42 0 0 0 .06.38l1.64 2.2z"})})}},45694:function(e,t,a){"use strict";a.d(t,{Z:function(){return MapPinIcon}});var l=a(85893);function MapPinIcon(e){let{className:t="",fill:a="none",stroke:n="#000",width:r=24,height:s=24,...i}=e;return(0,l.jsxs)("svg",{fill:a,stroke:n,width:r,height:s,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:t,...i,children:[(0,l.jsx)("path",{stroke:n,fill:"transparent",strokeLinejoin:"round",strokeLinecap:"round",strokeMiterlimit:"4",strokeWidth:"1.8667",d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 1 1 18 0Z"}),(0,l.jsx)("path",{stroke:n,fill:"transparent",strokeLinejoin:"round",strokeLinecap:"round",strokeMiterlimit:"4",strokeWidth:"1.8667",d:"M12 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"})]})}},43694:function(e,t,a){"use strict";a.d(t,{Z:function(){return MinusIcon}});var l=a(85893);function MinusIcon(e){let{className:t="",fill:a="none",stroke:n="currentColor",strokeWidth:r=1.4,width:s=25,height:i=24,...o}=e;return(0,l.jsx)("svg",{className:t,width:s,height:i,viewBox:"0 0 ".concat(s," ").concat(i),fill:a,xmlns:"http://www.w3.org/2000/svg",...o,children:(0,l.jsx)("path",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:r,d:"M5.22 12h14"})})}},77966:function(e,t,a){"use strict";a.d(t,{Z:function(){return PlusIcon}});var l=a(85893);function PlusIcon(e){let{className:t="",fill:a="none",stroke:n="currentColor",strokeWidth:r=1.4,width:s=24,height:i=24,...o}=e;return(0,l.jsx)("svg",{fill:a,stroke:n,strokeWidth:r,width:s,height:i,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:t,...o,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v14m-7-7h14"})})}},12062:function(e,t,a){"use strict";a.d(t,{Z:function(){return ProcedureIcon}});var l=a(85893);function ProcedureIcon(e){let{className:t="",fill:a="none",stroke:n="currentColor",strokeWidth:r=1.4,width:s=24,height:i=24,...o}=e;return(0,l.jsxs)("svg",{fill:a,stroke:n,strokeWidth:r,width:s,height:i,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:t,...o,children:[(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 2H9a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1m-3 14v-6m-3 3h6"})]})}},75268:function(e,t,a){"use strict";a.d(t,{Z:function(){return SpinnerIcon}});var l=a(85893);function SpinnerIcon(e){let{className:t=""}=e;return(0,l.jsxs)("svg",{className:"".concat(t," animate-spin h-8 w-8 text-green"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,l.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8v4a4 4 0 0 0-4 4H4z"})]})}},95046:function(e,t,a){"use strict";
1var l=a(85893),n=a(82200),r=a(90223),s=a(15469),i=a(70789);t.Z=e=>{let{user:t,hideBadge:a,type:o=null,lazy:c=!0,className:d=""}=e,m={...t,_type:null!=o?o:t._type},u=(0,r.wM)(m);return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("span",{className:(0,i.cn)("rounded-full bg-ivory relative w-30 h-30 flex items-center justify-center text-[54px]",d),children:[t.profile_picture_relative_url?(0,l.jsx)(s.Z,{publicId:t.profile_picture_relative_url,alt:u,width:"120",height:"120",gravity:"face",crop:"thumb",zoom:"0.7",lazy:c,className:"w-full h-full rounded-full"}):(0,l.jsx)("span",{className:"text-brown-300",children:(0,n.Qm)(t.first_name+" "+t.last_name)}),!!t.is_beauty_board_member&&!a&&(0,l.jsx)("span",{className:"t-overline-sm text-xxs! leading-4! uppercase absolute -bottom-4 left-1/2 -translate-x-1/2 bg-peach px-2",children:"board"})]})})}},13466:function(e,t,a){"use strict";a.d(t,{$F:function(){return DropdownMenuTrigger},AW:function(){return DropdownMenuContent},Xi:function(){return DropdownMenuItem},h_:function(){return DropdownMenu}});var l=a(85893);a(67294);var n=a(11698),r=a(32951),s=a(25843),i=a(7404),o=a(60840),c=a(23940),d=a(70789);function DropdownMenu(e){let{...t}=e;return(0,l.jsx)(n.Z,{"data-slot":"dropdown-menu",...t})}function DropdownMenuTrigger(e){let{...t}=e;return(0,l.jsx)(r.b,{"data-slot":"dropdown-menu-trigger",...t})}function DropdownMenuContent(e){let{align:t="start",alignOffset:a=0,side:n="bottom",sideOffset:r=4,positionMethod:c="absolute",collisionPadding:m=0,isFullWidth:u=!1,className:x,...h}=e;return(0,l.jsx)(s.M,{children:(0,l.jsx)(i.K,{className:(0,d.cn)("isolate z-50 outline-hidden",u&&"w-full"),align:t,alignOffset:a,side:n,sideOffset:r,positionMethod:c,collisionPadding:m,children:(0,l.jsx)(o.Z,{"data-slot":"dropdown-menu-content",className:(0,d.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-2 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-xl bg-ivory p-4 text-black shadow-2xl ring-1 duration-100 outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",x),...h})})})}function DropdownMenuItem(e){let{className:t,inset:a,variant:n="default",...r}=e;return(0,l.jsx)(c.s,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":n,className:(0,d.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2.5 rounded-xl px-3 py-2 text-sm outline-hidden select-none focus:text-black data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r})}a(80656),a(50158)},44986:function(e,t,a){"use strict";a.d(t,{Z:function(){return d}});var l=a(85893);function EyeIcon(e){let{className:t="",width:a=24,height:n=24,fill:r="none",stroke:s="black",strokeWidth:i=1.4,...o}=e;return(0,l.jsxs)("svg",{className:t,width:a,height:n,viewBox:"0 0 24 24",fill:r,xmlns:"http://www.w3.org/2000/svg",...o,children:[(0,l.jsx)("path",{stroke:s,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:i,d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8"}),(0,l.jsx)("path",{stroke:s,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:i,d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6"})]})}var n=a(9962),r=a(70789),s=a(45697),i=a.n(s),o=a(67294);let c=(0,o.forwardRef)(function(e,t){let{label:a,name:s,register:i,rules:c,error:d,helpText:m,className:u,containerClassName:x,required:h,inputRule:p,type:f,showPasswordToggle:v=!1,showIcon:g,hideIcon:b,endAdornment:j,...y}=e,w=i&&s?i(s,c):{},{ref:N,...k}=w,[C,A]=(0,o.useState)(!1),P="password"===f,D=P&&v?C?"text":"password":f,M=P&&(v||j);return(0,l.jsxs)("div",{className:(0,r.cn)("flex flex-col items-start w-full",x),children:[(0,l.jsxs)("label",{htmlFor:s,className:"font-medium t-overline leading-6 text-black uppercase w-full text-left",children:[a," ",h&&(0,l.jsx)("span",{className:"text-error",children:"*"})]}),p&&(0,l.jsx)("span",{className:"t-body-sm text-black mt-2 mb-5 text-left w-full",children:p}),(0,l.jsxs)("div",{className:(0,r.cn)("relative w-full h-12",!p&&"mt-5"),children:[(0,l.jsx)("input",{id:null!=s?s:null==y?void 0:y.name,name:s,ref:e=>{"function"==typeof N?N(e):N&&"object"==typeof N&&(N.current=e),"function"==typeof t?t(e):t&&"object"==typeof t&&(t.current=e)},type:D,required:h,"aria-required":h,className:(0,r.cn)("rounded-xs bg-light-gray px-4 py-3 placeholder:text-dark-gray t-body-sm w-full border-none focus:outline focus:outline-gold-hover focus:outline-1 focus:outline-offset-0 transform",M&&"pr-16",u),...k,...y}),P&&v&&(0,l.jsx)("button",{type:"button",className:(0,r.cn)("absolute inset-y-0 my-auto right-2 flex h-12 w-12 items-center justify-center leading-none"),onClick:()=>A(e=>!e),"aria-label":C?"Hide password":"Show password","aria-pressed":C,tabIndex:0,children:C?null!=b?b:(0,l.jsx)(n.Z,{className:(0,r.cn)("block h-6 w-6",C&&"opacity-40")}):null!=g?g:(0,l.jsx)(EyeIcon,{className:(0,r.cn)("block h-6 w-6",C&&"opacity-70")})}),!v&&j?(0,l.jsx)("div",{className:"absolute inset-y-0 my-auto right-2 flex h-12 w-12 items-center justify-center",children:j}):null]}),d?(0,l.jsx)("span",{className:"t-overline-sm text-error text-left",children:d}):null,m?(0,l.jsx)("span",{className:"w-full t-overline-sm text-dark-gray text-right",children:m}):null]})});c.displayName="Input",c.propTypes={label:i().oneOfType([i().string,i().node]),name:i().string,register:i().func,rules:i().object,error:i().oneOfType([i().string,i().node]),helpText:i().oneOfType([i().string,i().node]),className:i().string,containerClassName:i().string,required:i().bool,type:i().string,
1showPasswordToggle:i().bool,showIcon:i().node,hideIcon:i().node,endAdornment:i().node,inputRule:i().string},c.defaultProps={label:null,name:void 0,register:void 0,rules:void 0,error:null,helpText:null,className:void 0,containerClassName:void 0,required:!1,type:"text",showPasswordToggle:!1,showIcon:null,hideIcon:null,endAdornment:null,inputRule:null};var d=c},56e3:function(e,t,a){"use strict";a.d(t,{Z:function(){return PerkBox}});var l=a(85893),n=a(70789),r=a(93330);function PerkBox(e){var t,a;let{perk:s}=e,[i,...o]=null!==(a=null===(t=s.perkDescription)||void 0===t?void 0:t.split("\n"))&&void 0!==a?a:[""],c=null==i?void 0:i.match(/^(\$\d+(?:\.\d+)?|\d+(?:\.\d+)?%?)/),d=!!c,m=d&&c?c[1]:"",u=d?i.slice(m.length).trim():i,{headline:x,qualifier:h}=(0,r.B)(u,d&&0===o.length);return(0,l.jsxs)("div",{className:(0,n.cn)("rounded-xl p-4"),style:{background:"linear-gradient(178.7deg, rgba(255, 255, 255, 0.1) 13.53%, rgba(255, 255, 255, 0) 98.83%)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)"},children:[d?(0,l.jsxs)("div",{className:"flex items-center justify-start",children:[(0,l.jsx)("span",{className:"font-GT-Super-Display text-[34px] mr-1 leading-6",children:m}),(0,l.jsx)("span",{className:(0,n.cn)("font-GT-Super-Display leading-6","text-[18px]"),children:x})]}):(0,l.jsx)("div",{className:"font-GT-Super-Display leading-6 text-[20px]",children:i}),h?(0,l.jsx)("div",{className:"t-body-sm mt-2",children:h}):null,o.length>1?(0,l.jsx)(l.Fragment,{children:o[0].includes("AEDIT")?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"font-GT-Super-Display text-lg mt-2",children:o[0]}),(0,l.jsx)("ul",{children:o.slice(1).map((e,t)=>(0,l.jsx)("li",{className:"flex items-center justify-start",children:(0,l.jsx)("span",{className:"t-body-sm",children:e})},t))})]}):(0,l.jsx)("ul",{className:"mt-2",children:o.map((e,t)=>(0,l.jsxs)("li",{className:"flex items-center justify-start",children:[(0,l.jsx)("div",{className:"min-w-2 min-h-2 bg-gold mr-2"}),(0,l.jsx)("span",{className:"t-body-sm whitespace-nowrap",children:e})]},t))})}):(0,l.jsx)("div",{className:"t-body-sm mt-2",children:o[0]})]})}},93330:function(e,t,a){"use strict";function splitPerkHeadline(e,t){if(!t)return{headline:e,qualifier:""};let[a,...l]=e.split(" ");return{headline:null!=a?a:"",qualifier:l.join(" ")}}a.d(t,{B:function(){return splitPerkHeadline}})},74866:function(e,t,a){"use strict";a.d(t,{B:function(){return useBookmark}});var l=a(86308),n=a(28418),r=a(67294),s=a(23164),i=a(78070),o=a(12084),c=a(97221),d=a(1580),m=a(36951),u=a(93767);let x={aeditionArticles:"article",provider:"provider",procedure:"procedure",concern:"concern"},getEntityType=e=>(null==e?void 0:e.contentType)||(null==e?void 0:e._type),useBookmark=e=>{let t=null==e?void 0:e.id,a=getEntityType(e),h=x[a]||a,p=(0,r.useCallback)(a=>(null==a?void 0:a.id)===t&&getEntityType(a)===getEntityType(e),[t,e]),{user:f}=(0,m.a)(),{favorites:v,updateFavorites:g}=(0,u.a)();v=v.map(e=>(null==e?void 0:e.sys)?(0,o.Z)(e):e);let b=!!v.find(p),j=(null==f?void 0:f._type)==="provider",[y,w]=(0,r.useState)(!1),N=(0,r.useCallback)(async function(n){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];w(!0);try{let s={entity_type:a,entity_ids:[t]};n?await i.default.post("/v1/user/me/favorites",s):await i.default.delete("/v1/user/me/favorites",{data:s});let o=n?[...v,e]:v.filter(e=>!p(e));g(o),r&&l.Am.success({title:"This ".concat(h," has been ").concat(n?"added to":"removed from"," your bookmarks.")})}catch(e){(0,c.cM)("Failed to toggle user favorite",null,{error:e,entityType:a,entityId:t}),l.Am.error({title:e.message})}finally{w(!1)}},[a,t,v,e,p,g,h]),k=(0,n.Z)({postAuth:()=>N(!0,!0),source:d.pk.BOOKMARKS}),C=(0,r.useCallback)(()=>{if(j)return;let e=!b;s.f.favoriteClicked({value:e,entity_type:a,entity_id:t}),f?N(e,!0):k()},[j,b,a,t,f,N,k]);return{isFavorited:b,isLoading:y,toggle:C,entityName:h,isProvider:j}}},28418:function(e,t,a){"use strict";var l=a(67294),n=a(23164),r=a(36951);t.Z=e=>{let{postAuth:t=null,source:a,analytics:s}=e,i=null!=a?a:null==s?void 0:s.source,o={...s,source:i},[c,d]=(0,l.useState)(!1),[m,u]=(0,l.useState)(),{user:x,toggleAuth:h,openAuth:p}=(0,r.a)();i||o||console.warn("No tracking data provided");let attemptIsAuthedFn=e=>{if(x){if(null==x?void 0:x.completed_signup)try{null==t||t()}finally{d(!1)}else p("register",{hideWelcome:!0})}else try{h("login",{hideWelcome:!0})}finally{n.f.gatedContentClicked({...o,...e})}};return(0,l.useEffect)(()=>{c&&attemptIsAuthedFn(m)},[c,m,x]),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;c?attemptIsAuthedFn(e):(u(e),d(!0))}}},86748:function(e,t,a){"use strict";function toMoneyAmount(e){if("number"==typeof e)return Number.isFinite(e)?e:0;if("string"==typeof e){let t=e.trim();if(!t)return 0;let a=Number(t);return Number.isFinite(a)?a:0}return 0}function centsToMoneyAmount(e){return toMoneyAmount(e)/100}function sumMoney(e){let t=0;for(let a of e)t+=toMoneyAmount(a);return t}a.d(t,{PE:function(){return toMoneyAmount},PF:function(){return formatMoneyFromCents},W1:function(){return sumMoney}
1,d5:function(){return formatMoneyCompact},lb:function(){return formatMoney},pQ:function(){return centsToMoneyAmount}});let l=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}),n=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:2});function formatMoney(e){return l.format(toMoneyAmount(e))}function formatMoneyCompact(e){return n.format(toMoneyAmount(e))}function formatMoneyFromCents(e){return formatMoney(centsToMoneyAmount(e))}},69851:function(e,t,a){"use strict";a.d(t,{CM:function(){return l},n_:function(){return n}}),new RegExp("^[".concat("A-Za-z\\u00C0-\\u024F\\u1E00-\\u1EFF"," .'-]+$"));let l=/^(0[1-9]|1[0-2])\/\d{2}$/,n=20},82200:function(e,t,a){"use strict";a.d(t,{L5:function(){return ellipsized},Qm:function(){return getInitials},Yj:function(){return pluralizeTime},fZ:function(){return fullTitle},kC:function(){return capitalize}}),a(20979);var l=a(97221);let pluralizeTime=(e,t)=>{if(e=Number(e),!["hours","days","weeks","months","years"].includes(t.toLowerCase())||"number"!=typeof e){(0,l.cM)("Pluralize error: Not a valid period or count","error",{count:e,period:t});return}return 0===e?"Immediately":1===e?"".concat(e," ").concat(t.slice(0,-1)):"".concat(e," ").concat(t)};function capitalize(e){return e?e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}):""}function ellipsized(e,t){return e&&e.length>=t?e.substr(0,t)+"...":e}function getInitials(e){let t=e.trim().split(" ");return t.reduce((e,a,l)=>{if(0===l||l===t.length-1){let t=a.charAt(0).toUpperCase();e+=t}return e},"")}function fullTitle(e){let t="".concat(e.first_name," ").concat(e.last_name).concat(e.suffix?" "+e.suffix:"");return"".concat(t).concat(e.professional_title_short?", "+e.professional_title_short:"")}},90223:function(e,t,a){"use strict";a.d(t,{LI:function(){return getProviderAltText},X5:function(){return getBeforeAfterAltText},wM:function(){return getProfilePictureAltText}});var l=a(20979),n=a(82200);a(37538);var r=a(92950);let getBeforeAfterAltText=(e,t)=>{let{id:a,procedure:l,candidate_gender:r,candidate_age:s}=e||{};return"".concat(l.name," ").concat((0,n.kC)(t),", ").concat(r," ").concat(s," - ").concat(a)},getProfilePictureAltText=e=>e._type===l.Wg.PROVIDER?getProviderAltText(e):"profile picture",getProviderAltText=e=>{var t,a,l;let n=(0,r.N$)(e),s=null===(a=e.specialties)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:t.display_name,i=null===(l=e.primary_practice)||void 0===l?void 0:l.location,o=[null==i?void 0:i.city,null==i?void 0:i.state_abbreviation].filter(Boolean).join(", "),c=[s,o].filter(Boolean).join(" ");return[n,c].filter(Boolean).join(", ")}},1580:function(e,t,a){"use strict";a.d(t,{hA:function(){return getConsultationFee},pk:function(){return n}});var l=a(51241);let getConsultationFee=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{consultation_fee:t=0}=e;return(0,l.NM)(t,2,!0)},n={VOUCHERS:"vouchers",AEDITOR:"AEDITOR",PROVIDER_B_A:"provider_before_and_afters",PROCEDURE_B_A:"procedure_before_and_afters",AEDITION_B_A:"aedition_before_and_afters",B_A_PROVIDER_PAGE:"before_and_afters_provider_page",B_A_PROCEDURE_PAGE:"before_and_afters_procedure_page",BOOKMARKS:"bookmark"};n.PROVIDER_B_A,n.PROCEDURE_B_A,n.AEDITION_B_A,n.B_A_PROVIDER_PAGE,n.B_A_PROCEDURE_PAGE}},function(e){e.O(0,[9099,5851,4655,9702,9656,5097,8842,9774,2888,179],function(){return e(e.s=34985)}),_N_E=e.O()}]);
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.