1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5299],{53572:function(e,t,o){var i=o(59499),n=o(4730),a=o(24499),l=o(67162),d=o(10404),r=o(19907),c=o(25760),s=o(67294),u=o(31096),p=o(95734),v=o(70152),m=o(26329),h=o(3798),x=o(58352),f=o(47300),g=o(85893),b=["type","classTitle"];function y(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function j(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?y(Object(o),!0).forEach((function(t){(0,i.Z)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):y(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var P=u.ZP.div.withConfig({displayName:"PricingCard__Price",componentId:"sc-np28k2-0"})(["display:flex;justify-content:space-between;"]),k=u.ZP.div.withConfig({displayName:"PricingCard__PriceText",componentId:"sc-np28k2-1"})(["display:flex;justify-content:space-between;&:not(:last-child){margin-bottom:20px;}"]),T=(u.ZP.div.withConfig({displayName:"PricingCard__MobilePaymentSummary",componentId:"sc-np28k2-2"})(["background:#f8f6f5;padding:40px;"]),u.ZP.div.withConfig({displayName:"PricingCard__CardWrapper",componentId:"sc-np28k2-3"})(["flex:1;display:flex;flex-direction:column;gap:19.5px;max-width:376px;padding:28px;box-shadow:0px 4px 7px rgba(0,0,0,0.05);border-radius:12px;position:sticky;top:140px;background-color:",";color:",";"],(function(e){return e.theme.color.secondary.background}),(function(e){return e.theme.color.secondary.text})));u.ZP.div.withConfig({displayName:"PricingCard__FactsWrapper",componentId:"sc-np28k2-4"})(["padding:24px;background:#f8f6f5;border-radius:12px;"]);t.Z=function(e){var t,o,i=e.type,u=e.classTitle,y=(0,n.Z)(e,b),I=(0,l.vH)().textColor,N=(0,r.Z)().showPricing,w=(0,d.P)().isTabletOrMobile,Z=(0,a.Z)(i),S=Z.priceData,D=Z.isPayLater,L=Z.promoValues,E=(0,s.useState)(!1),F=E[0],V=E[1],H=y.locationId&&y.locationList?y.locationList.find((function(e){return e.value===y.locationId})).label:null===S||void 0===S?void 0:S.location,_=null!==S&&void 0!==S&&S.timeSlots?(null===S||void 0===S?void 0:S.timeSlots.length)<=3||F?null===S||void 0===S?void 0:S.timeSlots.length:3:void 0,M=(null===L||void 0===L?void 0:L.isVerified)&&(null===L||void 0===L?void 0:L.promoCode),z=D&&null!==S&&void 0!==S&&S.promoCode?null===S||void 0===S?void 0:S.total:M?null!==(t=null===L||void 0===L?void 0:L.paidAmount)&&void 0!==t?t:0:null!==(o=null===S||void 0===S?void 0:S.total)&&void 0!==o?o:0,W=function(e){var t;return(null===S||void 0===S?void 0:S.timeSlots)&&(null===S||void 0===S||null===(t=S.timeSlots)||void 0===t?void 0:t.length)>3&&e===_-1};return w?null:(0,g.jsxs)(T,{children:[i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{children:[(0,g.jsxs)(C,{children:[(0,g.jsx)(A,{fontSize:"12px",fontWeight:"700",lineHeight:"18px",children:null===S||void 0===S?void 0:S.category}),(null===S||void 0===S?void 0:S.isShareable)&&(0,g.jsx)(m.Z,{})]}),(0,g.jsx)(f.ZT,{fontSize:"20px",fontWeight:"700",mb:"12px",lineHeight:"30px",children:null===S||void 0===S?void 0:S.title}),(0,g.jsxs)(O,{children:[(0,g.jsx)("div",{children:null===H||void 0===H?void 0:H.split(",").map((function(e){return(0,g.jsx)(f.ZT,{fontSize:"14px",lineHeight:"21px",children:e},e)}))}),null!==S&&void 0!==S&&S.credits?(0,g.jsxs)(f.ZT,{fontSize:"14px",children:[null===S||void 0===S?void 0:S.credits," credit",(null===S||void 0===S?void 0:S.credits)>1?"s":""]}):null]})]}),(0,g.jsx)(x.Z,{type:"horizontal",color:(0,c.E)(I,.2)})]}):null,(0,g.jsxs)("div",{children:[(0,g.jsx)(f.ZT,{fontWeight:"700",fontSize:"16px",mb:"12px",children:i?"Price detail":"Payment Summary"}),null!==S&&void 0!==S&&S.timeSlots?(0,g.jsx)(g.Fragment,{children:new Array(_).fill(0).map((function(e,t){return(0,g.jsxs)("div",{className:"mt-3 first:mt-0",children:[(0,g.jsx)(p.Z,j(j({},null===S||void 0===S?void 0:S.timeSlots[t]),{},{facilityName:null===S||void 0===S?void 0:S.timeSlots[t].facilityName,date:new Date(null===S||void 0===S?void 0:S.timeSlots[t].startDate)})),W(t)?(0,g.jsx)(h.x,{type:"button",variant:"link",className:"px-0 text-xs underline",onClick:function(){return V(!F)},children:3===_?"View all bookings":"View Less"}):null]},t)}))}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(P,{children:["membership"===i||"package"===i?(0,g.jsx)(f.ZT,{lineHeight:"28px",children:(null===S||void 0===S?void 0:S.priceType)||(null===S||void 0===S?void 0:S.category)}):(0,g.jsx)(f.ZT,{lineHeight:"28px",children:u}),(0,g.jsx)(f.ZT,{lineHeight:"28px",children:N(null===S||void 0===S?void 0:S.price)})]}),(null===S||void 0===S?void 0:S.spotNameList)&&(null===S||void 0===S?void 0:S.spotNameList.length)>0&&(0,g.jsxs)("p",{className:"text-sm text-secondary/50",children:[(null===S||void 0===S?void 0:S.spotNameList.length)>1?"Spots":"Spot",": ",null===S||void 0===S?void 0:S.spotNameList.join(", ")
1]}),(null===S||void 0===S?void 0:S.hasJoiningFee)&&(0,g.jsxs)(P,{children:[(0,g.jsx)(f.ZT,{lineHeight:"28px",children:"Joining fee"}),(0,g.jsx)(f.ZT,{lineHeight:"28px",children:N(null===S||void 0===S?void 0:S.joiningFee)})]})]})]}),(0,g.jsx)(x.Z,{type:"horizontal",color:(0,c.E)(I,.2)}),(0,g.jsxs)("div",{children:[(0,g.jsxs)(P,{children:[(0,g.jsx)(f.ZT,{lineHeight:"28px",children:"Subtotal"}),(0,g.jsx)(f.ZT,{lineHeight:"28px",children:N(null===S||void 0===S?void 0:S.subTotal)})]}),(null===L||void 0===L?void 0:L.promoCode)&&(0,g.jsxs)(P,{children:[(0,g.jsxs)(f.ZT,{children:[null===L||void 0===L?void 0:L.promoCode.toUpperCase()," ","Percentage"===(null===L||void 0===L?void 0:L.discountType)?"(".concat(L.discountAmount,"%)"):"(".concat(N(L.discountAmount),")")]}),(0,g.jsxs)(f.ZT,{color:"#FE5F55",children:["-",N(null===L||void 0===L?void 0:L.discount)]})]}),null!==S&&void 0!==S&&S.hasTax&&null!==S&&void 0!==S&&S.taxInfo?S.taxInfo.map((function(e,t){return(0,g.jsxs)(P,{children:[(0,g.jsxs)(f.ZT,{lineHeight:"28px",children:[e.taxName," (",e.taxPercentage,"%) ",e.isPriceIncludeTax?" - Included ".concat(N(e.taxAmount)):""]}),e.isPriceIncludeTax?null:(0,g.jsx)(f.ZT,{lineHeight:"28px",children:N(e.taxAmount)})]},t)})):null!==S&&void 0!==S&&S.taxName&&null!==S&&void 0!==S&&S.taxPercentage&&null!==S&&void 0!==S&&S.taxAmount?(0,g.jsxs)(k,{className:"mt-1",children:[(0,g.jsxs)(f.ZT,{fontSize:"14px",children:[null===S||void 0===S?void 0:S.taxName," (",null===S||void 0===S?void 0:S.taxPercentage,"%)"," ",null!==S&&void 0!==S&&S.isPriceIncludeTax?" - Included ".concat(N((null===S||void 0===S?void 0:S.taxAmount)||0)):""]}),S.isPriceIncludeTax?null:(0,g.jsx)(f.ZT,{fontSize:"14px",children:N((null===S||void 0===S?void 0:S.taxAmount)||0)})]}):null,Number(null===S||void 0===S?void 0:S.storeCreditsAmount)>0&&(0,g.jsxs)(P,{children:[(0,g.jsx)(f.ZT,{lineHeight:"28px",children:"Wallet credit"}),(0,g.jsxs)(f.ZT,{color:"#FE5F55",children:["-",N(null===S||void 0===S?void 0:S.storeCreditsAmount)]})]})]}),(0,g.jsx)(x.Z,{type:"horizontal",color:(0,c.E)(I,.2)}),(0,g.jsx)("div",{children:(0,g.jsxs)(P,{children:[(0,g.jsx)(f.ZT,{fontWeight:"700",fontSize:"16px",children:"Total"}),(0,g.jsx)(f.ZT,{fontWeight:"700",fontSize:"16px",children:N(z)})]})}),null!==S&&void 0!==S&&S.expireAt&&!D?(0,g.jsx)("div",{className:"mt-5",children:(0,g.jsx)(v.Z,{expireAt:null===S||void 0===S?void 0:S.expireAt,onTimeup:y.onTimeup})}):null]})};var C=(0,u.ZP)("div").withConfig({displayName:"PricingCard___StyledDiv",componentId:"sc-np28k2-5"})(["display:flex;justify-content:space-between;align-items:center;margin-bottom:2px;"]),A=(0,u.ZP)(f.ZT).withConfig({displayName:"PricingCard___StyledTypography",componentId:"sc-np28k2-6"})(["opacity:0.6;text-transform:uppercase;"]),O=(0,u.ZP)("div").withConfig({displayName:"PricingCard___StyledDiv2",componentId:"sc-np28k2-7"})(["display:flex;justify-content:space-between;"])},15135:function(e,t,o){o.d(t,{B:function(){return r},Z:function(){return c}});var i=o(47300),n=o(17746),a=(o(67294),o(67288)),l=o(85893);var d=function(e){var t=e.width,o=e.height;return(0,l.jsx)("div",{className:"mx-auto text-center",children:(0,l.jsx)(a.nI,{style:{width:t,height:o,margin:"auto"},src:"/lotties/booking-loader.lottie",loop:!0,autoplay:!0})})},r=function(){return(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",minHeight:"40vh"},children:[(0,l.jsx)(d,{width:"200px",height:"200px"}),(0,l.jsx)(i.ZT,{fontSize:"16px",fontWeight:"700",mb:"10px",className:"header",children:"Your payment is processing!"}),(0,l.jsx)(i.ZT,{fontSize:"12px",fontWeight:"400",className:"header",children:"Please do not refresh or click back"})]})},c=function(){return(0,l.jsx)(n.Z,{title:"PaymentLoading",children:(0,l.jsx)(r,{})})}},95734:function(e,t,o){o.d(t,{Z:function(){return v}});var i=o(16835),n=o(67162),a=o(19907),l=o(25760),d=o(36596),r=o(31132),c=o(67294),s=o(29762),u=o(85893),p=function(e){var t=(0,d.TD)(e),o=(0,r.default)(t,"h:mmaaa");return o.endsWith(":00am")||o.endsWith(":00pm")?(0,r.default)(t,"haaa"):o};function v(e){var t=e.date,o=e.startTime,d=e.endTime,v=e.facilityName,m=e.price,h=e.bookingRef,x=e.onRemove,f=e.hidePrice,g=void 0!==f&&f,b=e.showTitle,y=void 0!==b&&b,j=e.credits,P=e.isBookingWithCredits,
1k=void 0!==P&&P,T=(0,a.Z)().showPricing,C=(0,n.vH)().textColor,A=(0,c.useMemo)((function(){var e=[];return h&&e.push(["Booking ref",h]),e.splice.apply(e,[e.length,0].concat([["Date",(0,r.default)(t,"EEE, d MMM")],["Time","".concat(p(o)," - ").concat(p(d))]])),v&&e.push(["Facility",v]),e}),[h,t,o,d,v]);return(0,u.jsxs)("div",{className:"flex justify-between ",children:[(0,u.jsx)("div",{className:"flex flex-1 flex-col gap-2",children:A.map((function(e,t){var o=(0,i.Z)(e,2),n=o[0],a=o[1];return(0,u.jsxs)("div",{className:"flex justify-between",children:[y&&(0,u.jsx)("h5",{style:{color:"Date"===n?C:(0,l.E)(C,.7)},children:n}),(0,u.jsx)("h5",{style:{color:"Date"===n?C:(0,l.E)(C,.7)},children:a})]},t)}))}),(0,u.jsxs)("div",{className:"flex gap-[0.75rem] text-sm font-medium",children:[g?null:(0,u.jsxs)("p",{children:[" ",k?"".concat(j," credit").concat(j&&j>1?"s":""):"".concat(T(m))," "]}),x?(0,u.jsx)(s.Z,{onClick:x,className:"cursor-pointer",color:C}):null]})]})}},70152:function(e,t,o){o(67294);var i=o(98130),n=o(85893);t.Z=function(e){var t=e.expireAt,o=e.onTimeup;return(0,n.jsx)("div",{className:"bg-secondary-bg p-3 text-center",children:(0,n.jsx)(i.ZP,{onComplete:o,date:new Date(t),renderer:function(e){var t=e.minutes,o=e.seconds;return e.completed?(0,n.jsx)("span",{className:"text-sm",children:"Time limit has exceeded!"}):(0,n.jsxs)("p",{className:"text-sm",children:["Time remaining: ",(0,n.jsx)("span",{className:"font-bold",children:t})," mins ",(0,n.jsx)("span",{className:"font-bold",children:o})," seconds"]})}})})}},24499:function(e,t,o){var i=o(59499),n=o(16835),a=o(57953),l=o(41392),d=o(44504),r=o(24399),c=o(11163),s=o(77333),u=o(67294),p=o(4480),v=o(63444),m=o(49910);function h(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function x(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?h(Object(o),!0).forEach((function(t){(0,i.Z)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}t.Z=function(e,t){var o,i,h,f,g,b,y,j,P=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Standard",k=(0,c.useRouter)(),T=(0,a.Tu)(),C=T.handleMutate,A=(T.loading,(0,d.Z)({shouldReset:!1})),O=A.promoValues,I=O.isVerified?O.promoCode:"",N=(0,p.Zl)(v.e),w=(0,l.useAuthContext)(),Z=w.isLoggedIn,S=w.profileData,D=k.query,L=D.scheduleId,E=D.selectedDate,F=D.bookingId,V=D.membershipId,H=D.packageId,_=D.id,M=D.transactionId,z=D.packagePriceId,W=D.membershipPriceId,R=(0,s.jU)(V),U=R.data,B=R.isLoading,q="appointment"===k.query.for,J="pay-later"===k.query.type,K=(0,p.FV)(v.Z),Y=(0,n.Z)(K,2),G=Y[0],Q=Y[1],X="membership"!==e||J?V:_,$="package"!==e||J?H:_,ee=(0,p.sJ)(m.b),te=ee.error||isNaN(Number(ee.storeCreditsAmount))?0:ee.storeCreditsAmount,oe=(0,u.useState)(te),ie=oe[0],ne=oe[1];(0,u.useEffect)((function(){var e=setTimeout((function(){ne(te)}),500);return function(){return clearTimeout(e)}}),[te]);var ae=(0,a.Ap)("/appt-schedule/get-booking-detail/".concat(F),{shouldFetch:q&&!!F,version:3}),le=ae.data,de=ae.isLoading,re=(0,u.useMemo)((function(){var e,t,o,i,n,a,l,d,r,c,s,u;if(null!==le&&void 0!==le&&le.data)return{data:{classId:"",className:null===le||void 0===le||null===(e=le.data)||void 0===e?void 0:e.apptName,scheduleId:null===le||void 0===le||null===(t=le.data)||void 0===t?void 0:t.bookingId,trainerName:null===le||void 0===le||null===(o=le.data)||void 0===o?void 0:o.staffName,startDate:null===le||void 0===le||null===(i=le.data)||void 0===i?void 0:i.startDate,startTime:null===le||void 0===le||null===(n=le.data)||void 0===n?void 0:n.startTime,checkInHour:null===le||void 0===le||null===(a=le.data)||void 0===a?void 0:a.checkInTime,checkInRule:"Check-in ".concat((null===le||void 0===le||null===(l=le.data)||void 0===l?void 0:l.checkInTime)>0?"".concat(null===le||void 0===le||null===(d=le.data)||void 0===d?void 0:d.checkInTime," hrs"):"anytime"," before appointment begins"),isOnsite:!0,locationName:null===le||void 0===le||null===(r=le.data)||void 0===r?void 0:r.location,facilityName:null===le||void 0===le||null===(c=le.data)||void 0===c?void 0:c.facility,duration:null===le||void 0===le||null===(s=le.data)||void 0===s?void 0:s.duration,description:null===le||void 0===le||null===(u=le.data)||void 0===u?void 0:u.apptDesc}}}),[le]),ce=(0,a.Ap)("/appt-schedule/calculate-pricing/".concat(F,"?storeCreditsAmount=").concat(te||0,"&promoCode=").concat(O.isVerified?O.promoCode:""),{shouldFetch:q&&!!F,version:3}),se=ce.data,ue=(ce.isLoading,(0,a.Ap)("/booking/customer-package-membership/".concat(L,"/").concat(E),{shouldFetch:!!L&&!q})),pe=ue.data,ve=ue.isLoading,me=(0,a.Ap)("/pricing/membership/".concat(X),{shouldFetch:!!X&&Z}),he=me.data,xe=me.isLoading,fe="membership"!==e||J?null===he||void 0===he||null===(h=he.data)||void 0===h||null===(f=h.membershipPricings[0])||void 0===f?void 0:f.membershipPriceId:t||W||(null===he||void 0===he||null===(o=he.data)||void 0===o||null===(i=o.membershipPricings[0])||void 0===i?void 0:i.membershipPriceId)||"",ge=(0,a.Ap)(J?"/pricing/membership/customer-membership-price/".concat(fe,"?transactionId=").concat(M):"/pricing/membership/membership-price/".concat(fe,"?storeCreditsAmount=").concat(te,"&promoCode=").concat(O.isVerified?O.promoCode:""),{shouldFetch:!!fe,keepPreviousData:!0}),be=ge.data,ye=ge.isLoading,je=(0,a.Ap)("/pricing/package/".concat($),{shouldFetch:!!$&&Z}),Pe=je.data,ke=je.isLoading,Te="package"!==e||J?null===Pe||void 0===Pe||null===(y=Pe.data)||void 0===y||null===(j=y.packagePricings[0])||void 0===j?void 0:j.packagePriceId:t||z||(null===Pe||void 0===Pe||null===(g=Pe.data)||void 0===g||null===(b=g.packagePricings[0])||void 0===b?void 0:b.packagePriceId),Ce=(0,a.Ap)(J?"/pricing/package/customer-package-price/".concat(Te,"?transactionId=").concat(M):"/pricing/package/package-price/".concat(Te,"?storeCreditsAmount=").concat(te,"&promoCode=").concat(O.isVerified?O.promoCode:""),{shouldFetch:!!Te,keepPreviousData:!0}),Ae=Ce.data,Oe=Ce.isLoading,Ie=function(e,t){var o,i,n,a,l,d,c,s,u,p,v,m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},h=null===t||void 0===t?void 0:t.bookingInfo,f=x(x({},null===h||void 0===h?void 0:h.ownerInfo),{},{name:(null===S||void 0===S||null===(o=S.data)||void 0===o?void 0:o.firstName)+" "+(null===S||void 0===S||null===(i=S.data)||void 0===i?void 0:i.lastName)}),g=(null===h||void 0===h||null===(n=h.childAccountInfoResponseModels)||void 0===n?void 0:n.map((function(e){return x({},e)})))||[],b=(null===h||void 0===h||null===(a=h.bookingGuestInfos)||void 0===a?void 0:a.map((function(e){return x({},e)})))||[],y=null===h||void 0===h?void 0:h.isIncludeMyself,j=Boolean((null===m||void 0===m||null===(l=m.allClassPricings)||void 0===l?void 0:l.length)>1),P={mySelf:y?f:null,familyAttendees:g,guestAttendees:b},k=x(x({title:["appt","class"].includes(e)?null===m||void 0===m?void 0:m.className:"package"===e?m.packageName:m.membershipName,subTotal:null===t||void 0===t?void 0:t.subTotal,isPriceIncludeTax:(null===t||void 0===t?void 0:t.isPriceIncludeTax)||!1,type:e},"class"===e&&{allAttendees:P,totalPax:(null===P||void 0===P||null===(d=P.guestAttendees)||void 0===d?void 0:d.length)+(null===P||void 0===P||null===(c=P.familyAttendees)||void 0===c?void 0:c.length)+(y?1:0),isMultiPricing:j}),{},{className:null===t||void 0===t||null===(s=t.bookingInfo)||void 0===s?void 0:s.className,category:"package"===e?(null===m||void 0===m?void 0:m.packageCategoryName)||m.packageName:(null===m||void 0===m?void 0:m.membershipCategoryName)||m.membershipName,isShareable:m.isShareable,location:["package","membership"].includes(e)?"Single"===m.outletAccessType?"Single location access":"All Location"===m.location?"All location access":"Single Location"===m.location?"Single location access":"Outlet"===m.serviceLocationType?m.membershipOutletAccessLocations.map((function(e){return e.locationName})).join(","):"".concat(m.location," ").concat("Selected"===m.locationAccessType?"":"access"):void 0,credits:m.numOfPass,priceType:["package","membership"].includes(e)?null===t||void 0===t?void 0:t.categoryName:void 0,price:null===t||void 0===t?void 0:t.price,taxName:null===t||void 0===t?void 0:t.taxName,taxPercentage:(null===t||void 0===t?void 0:t.taxPercentage)||(null===t||void 0===t?void 0:t.taxPercent),taxAmount:(null===t||void 0===t?void 0:t.taxAmount)||(null===t||void 0===t?void 0:t.totalTax),taxInfo:null===t||void 0===t?void 0:t.taxInfo,hasTax:null===t||void 0===t?void 0:t.hasTax,total:null!==(u=null===t||void 0===t?void 0:t.totalPrice)&&void 0!==u?u:null===t||void 0===t?void 0:t.grandTotal,expireAt:null!==(p=null===t||void 0===t?void 0:t.expireAt)&&void 0!==p?p:null===t||void 0===t?void 0:t.expiredAt,spotNameList:null===t||void 0===t||null===(v=t.bookingInfo)||void 0===v?void 0:v.spotNameList,timeSlots:null===t||void 0===t?void 0:t.t
1imeSlots,idempotencyKey:null===t||void 0===t?void 0:t.idempotencyKey,totalInUnitAmount:null===t||void 0===t?void 0:t.totalInUnitAmount,hasJoiningFee:null===t||void 0===t?void 0:t.hasJoiningFee,joiningFee:null===t||void 0===t?void 0:t.joiningFee,storeCreditsAmount:null===t||void 0===t?void 0:t.storeCreditsAmount,promoCode:null!==t&&void 0!==t&&t.promoCode?t.promoCode:null});if("class"===e){var T,C,A,O,I,N,w=(0,r.O)({guestCount:null!==(T=null===t||void 0===t||null===(C=t.bookingInfo)||void 0===C?void 0:C.guestCount)&&void 0!==T?T:0,familyList:null!==(A=null===t||void 0===t||null===(O=t.bookingInfo)||void 0===O||null===(I=O.childAccountInfoResponseModels)||void 0===I?void 0:I.map((function(e){return null===e||void 0===e?void 0:e.name})))&&void 0!==A?A:[],isOwnerBooked:!(null===t||void 0===t||null===(N=t.bookingInfo)||void 0===N||!N.isIncludeMyself)}),Z=w.totalPax,D=w.bookedPeople;k.totalPax=Z,k.bookedPeople=D,k.priceType="Single price (".concat(t.price/Z,") ").concat(Z?"x "+Z:"")}Q(k)};return(0,u.useEffect)((function(){if(L)C({url:"/pricing/booking/booking-product-price",data:{booking:{scheduleClassId:L,bookingCount:0,bookingId:F},storeCreditsAmount:ie||0,promoCode:I,priceType:P},onSuccess:function(e){var t;if(0===(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.code)){var o,i=e.data;i.data.promoCode&&N((function(e){var t,o;return x(x({},e),{},{isVerified:!0,promoCode:i.data.promoCode,discount:i.data.discount,discountAmount:i.data.discountAmount,discountType:i.data.discountType,hasTax:i.data.hasTax,taxPercentage:i.data.taxPercentage||i.data.taxPercent,taxName:i.data.taxName,isPriceIncludeTax:i.data.isPriceIncludeTax||!1,taxAmount:i.data.taxAmount||i.data.totalTax,paidAmount:null!==(t=i.data.paidAmount)&&void 0!==t?t:i.data.totalPrice,totalAmountAfterDiscount:i.data.totalAmountAfterDiscount,promoCodeDurationType:i.data.promoCodeDurationType,totalInUnitAmount:i.data.totalInUnitAmount,taxInfo:null===(o=i.data)||void 0===o?void 0:o.taxInfo,storeCreditsAmount:i.data.storeCreditsAmount,promoCodeState:O.promoCodeState||"prev"})})),Ie("class",null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.data,null===pe||void 0===pe?void 0:pe.data)}},onError:function(e){}});else{var e,t,o,i,n,a,l=null!==(e=null!==re&&void 0!==re?re:Pe)&&void 0!==e?e:he,d=null!==(t=null!==se&&void 0!==se?se:Ae)&&void 0!==t?t:be;if(l&&d&&!(!se&&(Ae?Oe:ye)))if(Ie(le?"appt":Pe?"package":"membership",d.data,l.data),null!==(o=d.data)&&void 0!==o&&o.promoCode)N({isVerified:!0,promoCode:d.data.promoCode,discount:d.data.discount,discountAmount:d.data.discountAmount,discountType:d.data.discountType,hasTax:d.data.hasTax,taxPercentage:d.data.taxPercentage||d.data.taxPercent,taxName:d.data.taxName,isPriceIncludeTax:d.data.isPriceIncludeTax||!1,taxAmount:d.data.taxAmount||d.data.totalTax,paidAmount:null!==(i=null!==(n=d.data.paidAmount)&&void 0!==n?n:d.data.totalPrice)&&void 0!==i?i:d.data.grandTotal,totalAmountAfterDiscount:d.data.totalAmountAfterDiscount,promoCodeDurationType:d.data.promoCodeDurationType,totalInUnitAmount:d.data.totalInUnitAmount,taxInfo:null===(a=d.data)||void 0===a?void 0:a.taxInfo,storeCreditsAmount:d.data.storeCreditsAmount,promoCodeState:O.promoCodeState||"prev"})}}),[L,pe,Pe,Ae,he,be,re,se,le,ie,I]),{isLoading:de||ve||xe||ke||B,appointmentData:re,isForAppointment:q,providerList:U,isPayLater:J,scheduleData:pe,priceData:G,setPriceData:Q,promoValues:O,packageData:Pe,packagePriceData:Ae,membershipData:he,membershipPriceData:be,membershipPriceId:fe,packagePriceId:Te}}},82336:function(e,t,o){var i=o(19907),n=o(32571),a=o(79377),l=o(63473),d=o(3798),r=o(17939),c=o(31742),s=o(85893);t.Z=function(e){var t,o=e.targetPrice,u=(0,a.t)().data,p=(0,i.Z)().data,v=(0,n.Z)({followThemeColor:!0,from:"booking",targetPrice:o}),m=v.toggle,h=v.view,x=(null===u||void 0===u||null===(t=u.data)||void 0===t?void 0:t.balance)||"0.00";return(0,s.jsxs)("div",{style:{border:o>Number(x)?"1px solid #e4732b":""},className:" flex items-center justify-between rounded-lg border border-accent-orange-500 bg-secondary-bg p-4",children:[h,(0,s.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex w-full items-center gap-3",children:[o>Number(x)?(0,s.jsx)(l.zt,{width:40,height:40}):(0,s.jsx)(l.l9,{width:40,height:40}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"text-grey body-small",children:"Your balance:"}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)("div",{className:(0,
1c.cn)("subheader-large",Number(x)<0&&"text-accent-red-600"),children:[null===p||void 0===p?void 0:p.currencySymbol,x]}),(0,s.jsx)("div",{className:"text-muted-foreground text-xs",children:"store credits"})]}),o>Number(x)&&(0,s.jsx)("p",{className:"text-sm text-accent-yellow-900",children:"Insufficient to pay in full"})]})]}),o>Number(x)?(0,s.jsx)(d.x,{variant:"fill",size:"default",onClick:m,children:(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(r.Z,{width:20,height:20}),(0,s.jsx)("span",{className:"text-xs",children:"Top-up"})]})}):null]})]})}},44504:function(e,t,o){var i=o(59499),n=o(16835),a=o(57953),l=o(81718),d=o(11163),r=o(67294),c=o(4480),s=o(63444);function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function p(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach((function(t){(0,i.Z)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldReset:!0},t=(0,a.Tu)(),o=t.handleMutate,i=(0,d.useRouter)(),u=(0,c.FV)(s.e),v=(0,n.Z)(u,2),m=v[0],h=v[1],x=(0,c.rb)(s.e),f=(0,l.q)(),g=f.reset,b=i.query.transactionId,y="pay-later"===i.query.type,j=function(e,t,i,n){o({url:"promocode/validation",method:"post",data:{packageId:"package"===t?i:null,membershipId:"membership"===t?i:null,packagePriceId:"package"===t?n:null,membershipPriceId:"membership"===t?n:null,bookingId:"class"===t?i:null,apptBookingId:"appointment"===t?i:null,promoCode:e.toUpperCase(),customerPaymentId:y?b:null},onSuccess:function(t){0===(null===t||void 0===t?void 0:t.data.code)&&(h({isVerified:!0,promoCode:e,discount:null===t||void 0===t?void 0:t.data.data.discount,discountAmount:null===t||void 0===t?void 0:t.data.data.discountAmount,discountType:null===t||void 0===t?void 0:t.data.data.discountType,hasTax:null===t||void 0===t?void 0:t.data.data.hasTax,isPriceIncludeTax:(null===t||void 0===t?void 0:t.data.data.isPriceIncludeTax)||!1,taxPercentage:null===t||void 0===t?void 0:t.data.data.taxPercentage,taxName:null===t||void 0===t?void 0:t.data.data.taxName,taxAmount:null===t||void 0===t?void 0:t.data.data.taxAmount,paidAmount:null===t||void 0===t?void 0:t.data.data.paidAmount,totalAmountAfterDiscount:null===t||void 0===t?void 0:t.data.data.totalAmountAfterDiscount,promoCodeDurationType:null===t||void 0===t?void 0:t.data.data.promoCodeDurationType,totalInUnitAmount:null===t||void 0===t?void 0:t.data.data.totalInUnitAmount,storeCreditsAmount:null===t||void 0===t?void 0:t.data.data.storeCreditsAmount,promoCodeState:"current"}),g())},onError:function(e){h((function(t){return p(p({},t),{},{errorText:e.data.message})}))}})},P=function(){return x()};return(0,r.useEffect)((function(){return function(){e.shouldReset&&P()}}),[]),{promoValues:m,handleApplyPromoCode:j,handleResetPromoCode:P}}},29762:function(e,t,o){o.d(t,{Z:function(){return d}});var i=o(59499),n=o(85893);function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function l(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach((function(t){(0,i.Z)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function d(e){return(0,n.jsxs)("svg",l(l({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[(0,n.jsx)("path",{d:"M11.4344 3.02734H6.97339V4.70876H11.4344V3.02734Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M4.50439 4.70898H13.9203",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.95264 6.92773V12.5016",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M10.4641 6.92773V12.5016",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}
1),(0,n.jsx)("path",{d:"M5.28955 4.70898V13.7975C5.28955 14.3498 5.73727 14.7975 6.28955 14.7975H12.1362C12.6884 14.7975 13.1362 14.3498 13.1362 13.7975V4.70898",stroke:"currentColor"})]}))}},17939:function(e,t,o){var i=o(59499),n=(o(67294),o(85893));function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function l(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach((function(t){(0,i.Z)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}t.Z=function(e){return(0,n.jsx)("svg",l(l({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,n.jsx)("path",{d:"M8.653 2.545c.3-.043.614-.067.873-.015a.94.94 0 0 1 .463.227c.17.16.246.37.246.575v2.057l-.011.118a.588.588 0 0 1-1.154 0l-.011-.118V3.686c-.066.005-.145.01-.24.024-.551.078-1.365.276-2.43.534l-.613.149c-.607.148-1.19.308-1.669.56q-.461.242-.689.558c-.146.203-.241.46-.241.816v.12c.04.077.103.192.222.32.255.272.853.706 2.238.706h5.775a.588.588 0 0 1 0 1.176H5.637c-1.124 0-1.911-.245-2.46-.572v11.304c0 .311.36.767 1.106.767h15.434c.746 0 1.106-.456 1.106-.767v-3.352a.589.589 0 0 1 1.177 0v3.352c0 1.193-1.147 1.943-2.283 1.943H4.283c-1.136 0-2.283-.75-2.283-1.943V6.327c0-.59.167-1.09.463-1.503.29-.404.684-.695 1.096-.912.6-.316 1.318-.512 1.953-.667l.6-.143c1.034-.252 1.919-.469 2.541-.557M6.706 13.089a1.177 1.177 0 1 1 0 2.353 1.177 1.177 0 0 1 0-2.353M17.883 2.5c.325 0 .588.264.588.589v7.968l2.527-2.504.092-.074a.59.59 0 0 1 .811.818l-.076.092-3.976 3.941-3.91-3.893-.077-.092a.59.59 0 0 1 .814-.818l.092.076 2.526 2.512V3.09a.59.59 0 0 1 .589-.589",fill:"
1currentColor"})}))}}}]);
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.