PageSourceSearch

https://shopstar.page/_next/static/chunks/38xlgyuj6qvef.js

js shopstar.page collected 2026-09-29 02:31:59 UTC 32,836 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="b32ab982-f89c-9647-6ded-178d955e2b60")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,411006,653831,289526,898912,e=>{"use strict";var t=e.i(843476),r=e.i(604570),n=e.i(271645),a=e.i(167881),o=e.i(23750),i=e.i(852917),s=e.i(514515);function l(e){return(0,t.jsxs)(i.SheetFooter,{className:"flex-col items-stretch space-y-4 pb-[max(1rem,env(safe-area-inset-bottom))] pl-[max(1rem,env(safe-area-inset-left))] pr-[max(1rem,env(safe-area-inset-right))] sm:pl-[max(1.5rem,env(safe-area-inset-left))] sm:pr-[max(1.5rem,env(safe-area-inset-right))]",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(o.Input,{"aria-label":"Promo code",name:"promoCode",placeholder:"Promo code",type:"text",value:e.promoInput,onChange:t=>e.onPromoInputChange(t.target.value),disabled:e.promoLoading||e.promoRevalidating||!!e.promoCode,className:"flex-1","data-testid":"promo-code-input"}),e.promoCode?(0,t.jsx)(a.Button,{type:"button",variant:"outline",onClick:e.onClearPromo,disabled:e.promoRevalidating,"data-testid":"remove-promo-button",children:"Remove"}):(0,t.jsx)(a.Button,{type:"button",onClick:e.onApplyPromo,disabled:e.promoLoading||!e.promoInput.trim(),"data-testid":"apply-promo-button",children:e.promoLoading?"Applying...":"Apply"})]}),e.promoError&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:e.promoError}),e.promoCode&&e.promoRevalidating?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Updating promo code..."}):e.promoCode?(0,t.jsxs)("p",{className:"text-xs text-green-600",children:['Promo code "',e.promoCode,'" applied']}):null,e.promoCode&&e.hasMembership&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"membership-promo-note",children:"Membership discounts apply to the first billing period only."})]}),(0,t.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Subtotal"}),(0,t.jsx)("span",{children:(0,s.formatPrice)(e.subtotal,e.currency)})]}),e.applicableDiscount>0&&(0,t.jsxs)("div",{className:"flex justify-between text-green-600",children:[(0,t.jsx)("span",{children:"Discount"}),(0,t.jsxs)("span",{children:["-",(0,s.formatPrice)(e.applicableDiscount,e.currency)]})]}),(0,t.jsxs)("div",{className:"flex justify-between font-bold text-lg pt-2 border-t",children:[(0,t.jsx)("span",{children:"Total"}),(0,t.jsx)("span",{"data-testid":"cart-total",children:(0,s.formatPrice)(e.total,e.currency)})]}),e.checkoutTotalsNote&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:e.checkoutTotalsNote})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(a.Button,{type:"button",size:"lg",className:"w-full",onClick:e.onCheckout,disabled:e.promoRevalidating,"data-testid":"cart-checkout-button",children:e.promoRevalidating?"Updating promo...":"Checkout"}),(0,t.jsx)(a.Button,{type:"button",variant:"outline",size:"lg",className:"w-full",onClick:e.onClose,"data-testid":"cart-continue-shopping",children:"Continue Shopping"})]})]})}var c=e.i(878894),u=e.i(299023),d=e.i(674558),p=e.i(107233),m=e.i(150965),h=e.i(871754),x=e.i(994179),f=e.i(618386),g=e.i(424665);function y(e){switch(e?.trim().toUpperCase()){case"MONTHLY":case"MONTHLY PLAN":case"MONTH":return{label:"Monthly",suffix:" / month",period:"/month",cadenceLabel:"monthly"};case"ANNUAL":case"ANNUAL PLAN":case"YEARLY":case"YEARLY PLAN":case"YEAR":return{label:"Annual",suffix:" / year",period:"/year",cadenceLabel:"annually"};default:return e?{label:e,suffix:"",period:"",cadenceLabel:null}:null}}function b(e,t){if(e&&0!==e.length)return e.find(e=>e.currency===t)}e.s(["buildMembershipPriceIds",0,function(e){if(!e||0===e.length)return;let t=e.reduce((e,t)=>
2(t.id&&!e[t.currency]&&(e[t.currency]=t.id),e),{});return Object.keys(t).length>0?t:void 0},"buildMembershipPriceOverrides",0,function(e){if(e&&0!==e.length)return e.reduce((e,t)=>(e[t.currency]||(e[t.currency]={priceAmount:t.amountCents,comparePriceAmount:null}),e),{})},"getMembershipBillingDisplay",0,y,"resolveMembershipBasePrice",0,function(e,t,r){return b(e,t)?.amountCents??e?.[0]?.amountCents??r},"resolveMembershipPriceByCurrency",0,b],653831);var v=e.i(998669),P=e.i(992263);function C({item:e,currency:r,timezone:n=f.PLATFORM_TIMEZONE,isTicketEventCapacityReached:o,onRemove:i,onUpdateQuantity:l,onEditPersonalization:b}){var v,N;let w,j,A,I,S="BOOKING"===e.productType,k="DIGITAL"===e.productType,T="MEMBERSHIP"===e.productType,L=S||k||T,O=T?y(e.subscriptionBillingPeriod??e.variant):null,R=O?.cadenceLabel?`1 membership \xb7 billed ${O.cadenceLabel}`:"1 membership",z=(0,P.getCartItemMaximumPurchaseQuantity)(e),E=o||null!==z&&e.quantity>=z,M=S&&e.bookingStartTime?new Intl.DateTimeFormat("en-US",{weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZone:n}).format(new Date(e.bookingStartTime)):null,$=(v=e,N=M,w=v.bookingResourceName?.trim()?v.bookingResourceName:v.variant,j="BOOKING"===v.productType?[N,w]:[v.variant,N,v.bookingResourceName],A=new Set,(I=j.reduce((e,t)=>{let r=t?.trim();return!r||A.has(r)||(A.add(r),e.push(r)),e},[])).length>0?`${v.name} (${I.join(", ")})`:v.name),D=S?(0,g.resolveBookingServiceDisplayUnitPrice)(e):e.price;return(0,t.jsxs)("div",{className:"flex gap-4","data-testid":`cart-item-${e.productId}`,children:[(0,t.jsx)("div",{className:"w-20 h-20 rounded-sm bg-muted flex-shrink-0 overflow-hidden",children:e.image?(0,t.jsx)(h.CdnImage,{src:e.image,alt:e.name,width:80,height:80,className:"object-cover w-full h-full"}):(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,t.jsx)(m.ShoppingBag,{className:"w-8 h-8 text-muted-foreground"})})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"font-medium text-sm line-clamp-2 mb-1",children:e.name}),!T&&!1===e.inStock&&(0,t.jsxs)(x.Badge,{variant:"destructive",className:"mb-2 gap-1","data-testid":`cart-item-out-of-stock-${e.productId}`,children:[(0,t.jsx)(c.AlertTriangle,{className:"h-3 w-3"}),"Out of Stock"]}),S&&e.bookingStartTime&&(0,t.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,t.jsx)("p",{className:"text-xs text-primary font-medium",children:M}),e.bookingResourceName&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.bookingResourceName})]}),S&&(e.bookingAddOns?.length??0)>0&&(0,t.jsx)("ul",{className:"mb-2 space-y-0.5 pl-2","data-testid":`cart-item-add-ons-${e.productId}`,children:e.bookingAddOns?.map(e=>{let n=(e.presentmentPriceAmount??e.priceAmount??0)*e.quantity;return(0,t.jsxs)("li",{className:"flex items-baseline justify-between gap-2 text-xs text-muted-foreground","data-testid":`cart-add-on-${e.addOnId}`,children:[(0,t.jsxs)("span",{className:"min-w-0",children:["+ ",e.name,e.quantity>1&&(0,t.jsxs)("span",{className:"tabular-nums",children:[" ×",e.quantity]})]}),(0,t.jsx)("span",{className:"shrink-0 tabular-nums",children:n>0?(0,s.formatPrice)(n,r):"Included"})]},e.addOnId)})}),!S&&e.variant&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:e.variant}),e.personalizationConfig&&b&&(0,t.jsx)("div",{className:"mb-2",children:e.personalization?(0,t.jsxs)("button",{type:"button",onClick:b,className:"group flex w-full items-start gap-1.5 rounded-sm bg-muted/60 px-2 py-1.5 text-left ring-1 ring-foreground/5 transition-colors hover:bg-muted","aria-label":`Edit ${e.personalizationConfig.label} for ${e.name}`,"data-testid":`cart-item-personalization-${e.id}`,children:[(0,t.jsx)(d.PenLine,{"aria-hidden":"true",className:"mt-0.5 h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 text-xs",children:[(0,t.jsx)("span",{className:"block text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:e.personalizationConfig.label}),(0,t.jsxs)("span",{className:"line-clamp-2 whitespace-pre-line break-words text-foreground",children:["“",e.personalization,"”"]}
2)]}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground underline-offset-2 group-hover:underline",children:"Edit"})]}):(0,t.jsxs)("button",{type:"button",onClick:b,className:"inline-flex min-h-[32px] items-center gap-1.5 text-xs text-muted-foreground underline-offset-2 transition-colors hover:text-foreground hover:underline","data-testid":`cart-item-personalization-add-${e.id}`,children:[(0,t.jsx)(d.PenLine,{"aria-hidden":"true",className:"h-3 w-3"}),e.personalizationConfig.label]})}),e.personalization&&(e.personalizationPriceAmount??0)>0&&(0,t.jsxs)("div",{className:"mb-2 flex items-baseline justify-between gap-2 text-xs text-muted-foreground","data-testid":`cart-item-personalization-surcharge-${e.id}`,children:[(0,t.jsx)("span",{children:"+ Personalization"}),(0,t.jsxs)("span",{className:"shrink-0 tabular-nums",children:[(0,s.formatPrice)(e.personalizationPriceAmount??0,r)," per item"]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[L?(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:S?`${e.quantity} ${1===e.quantity?"appointment":"appointments"}`:k?"1 digital item":R}):(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(a.Button,{type:"button",variant:"outline",size:"icon",className:"min-h-[44px] min-w-[44px] touch-manipulation",onClick:()=>{e.quantity>1&&l(e.quantity-1)},"aria-label":`Decrease quantity for ${$}`,"data-testid":`cart-item-decrease-${e.productId}`,children:(0,t.jsx)(u.Minus,{className:"h-4 w-4"})}),(0,t.jsx)("span",{className:"text-sm font-medium w-8 text-center","data-testid":`cart-item-quantity-${e.productId}`,children:e.quantity}),(0,t.jsx)(a.Button,{type:"button",variant:"outline",size:"icon",className:"min-h-[44px] min-w-[44px] touch-manipulation",onClick:()=>{l(e.quantity+1)},disabled:E,"aria-label":`Increase quantity for ${$}`,"data-testid":`cart-item-increase-${e.productId}`,children:(0,t.jsx)(p.Plus,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsxs)("p",{className:"font-medium text-sm tabular-nums",children:[(0,s.formatPrice)(D,r),O?.suffix]}),e.quantity>1&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,s.formatPrice)(D*e.quantity,r)," total"]})]})]}),(0,t.jsx)(a.Button,{type:"button",variant:"ghost",size:"sm",className:"min-h-[44px] px-2 mt-1 text-xs text-destructive hover:text-destructive touch-manipulation",onClick:i,"aria-label":`Remove ${$}`,"data-testid":`cart-item-remove-${e.productId}`,children:"Remove"})]})]})}function N(){return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,t.jsx)("div",{className:"w-20 h-20 rounded-sm bg-muted flex items-center justify-center mb-4",children:(0,t.jsx)(m.ShoppingBag,{className:"w-10 h-10 text-muted-foreground"})}),(0,t.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Your cart is empty"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground max-w-sm",children:"Add some products to your cart to get started"})]})}var w=e.i(630374),j=e.i(10708),A=e.i(184762),I=e.i(425907),S=e.i(891300);function k({open:e,onOpenChange:r,config:i,productName:l,initialValue:c="",priceAmount:u=0,currency:d,confirmLabel:p,cancelLabel:m="Cancel",onConfirm:h}){let[x,f]=(0,n.useState)(c),[g,y]=(0,n.useState)(null);(0,n.useEffect)(()=>{e&&(f(c),y(null))},[e,c]);let b=(0,I.resolvePersonalizationDisplayText)({productTitle:l,config:i,text:x}),v=g??(b.ok?null:b.error.message),P=null!==v,C=x.length>i.maxLength,N="ALPHA"===i.characterPolicy?"Use letters and spaces only.":"ALPHANUMERIC"===i.characterPolicy?"Use letters, numbers, and spaces only.":null,T=[N?"personalization-constraints":null,v?"personalization-validation-error":null].filter(Boolean).join(" "),L=()=>{!g&&b.ok&&h(b.personalization?.text??"")},O=c.trim().length>0,R=O?"Edit your personalisation":i.required?"Add your personal touch":"Would you like to add personalisation?",z=O?"Happy to change it — just update your text below.":i.required?"This item is made especially for you — tell us what you’d like on yours.":"Add a name, a word, or a short message — it’s completely optional.";return(0,t.jsx)(w.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(w.DialogContent,{"data-testid":"personalization-dialog",className:"sm:max-w-md",children:[(0,t.jsxs)(w.DialogHeader,{children:[(0,t.jsx)(w.DialogTitle,{children:R}),(0,t.jsxs)(w.DialogDescription,{children:[z,u>0&&d?` It adds ${(0,s.formatPrice)(u,d)} per item.`:""]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(j.Label,{htmlFor:"personalization-text-input",className:"text-sm font-medium",children:i.label}),"SINGLE_LINE"===i.inputMode?(0,t.jsx)(o.Input,{value:x,onChange:e=>{y(null),f((0,S.truncateUtf16Safely)(e.target.value,i.maxLength))},onPaste:e=>{let t=(0,I.resolvePersonalizationDisplayText)({productTitle:l,config:i,text:e.clipboardData.getData("text")});
2t.ok||"PERSONALIZATION_INVALID_CHARACTERS"!==t.error.code&&"PERSONALIZATION_MULTILINE_NOT_ALLOWED"!==t.error.code||(e.preventDefault(),y(t.error.message))},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),L())},maxLength:i.maxLength,autoFocus:!0,id:"personalization-text-input","aria-invalid":null!==v,"aria-describedby":T||void 0,"data-testid":"personalization-text-input"}):(0,t.jsx)(A.Textarea,{value:x,onChange:e=>{y(null),f((0,S.truncateUtf16Safely)(e.target.value,i.maxLength))},onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),L())},rows:3,maxLength:i.maxLength,autoFocus:!0,id:"personalization-text-input","aria-invalid":null!==v,"aria-describedby":T||void 0,"data-testid":"personalization-text-input"}),N&&(0,t.jsx)("p",{id:"personalization-constraints",className:"text-xs text-muted-foreground",children:N}),v&&(0,t.jsx)("p",{id:"personalization-validation-error",role:"alert",className:"text-sm text-destructive",children:v}),(0,t.jsxs)("p",{className:`text-right text-xs tabular-nums ${C?"text-destructive":"text-muted-foreground"}`,"data-testid":"personalization-counter","aria-live":"polite",children:[x.length,"/",i.maxLength]})]}),(0,t.jsxs)(w.DialogFooter,{children:[(0,t.jsx)(a.Button,{type:"button",variant:"outline",onClick:()=>r(!1),"data-testid":"personalization-cancel",children:m}),(0,t.jsx)(a.Button,{type:"button",onClick:L,disabled:P,"data-testid":"personalization-confirm",children:p})]})]})})}e.s(["PersonalizationDialog",0,k],289526);var T=e.i(848014);function L(e){let t={productId:e.productId,quantity:e.quantity,..."BOOKING"===e.productType?{unitPrice:e.promotionUnitPrice??e.price,discountCapacity:e.promotionDiscountCapacity??0}:{unitPrice:e.promotionUnitPrice??e.price,discountCapacity:e.promotionDiscountCapacity??e.price}};return"BOOKING"!==e.productType?[t]:[t,...(e.bookingAddOns??[]).flatMap(t=>{if("PRODUCT"!==t.kind||!t.sourceProductId)return[];let r=t.presentmentPriceAmount??t.priceAmount;return[{productId:t.sourceProductId,quantity:e.quantity*t.quantity,unitPrice:r,discountCapacity:r}]})]}let O="Promo refresh paused. Your last calculated discount is shown and will be confirmed at checkout.";function R(e){return 408===e.status||429===e.status||e.status>=500}e.s(["CartDrawer",0,function({isOpen:e,onClose:a,onCheckout:o,merchantId:s,timezone:c,storefrontColors:u}){let{selectedCurrency:d,getPresentmentPrice:p}=(0,T.useShopfrontCurrency)(),{items:m,removeItem:h,updateQuantity:x,updatePersonalization:f,clearPromo:g,refreshStockStatus:y,getMerchantPromoCode:b,getDiscount:w,getSubtotal:j}=(0,v.useCartStore)(),[A,I]=(0,n.useState)(""),[S,z]=(0,n.useState)(null),E=S?m.find(e=>e.id===S)??null:null,[M,$]=(0,n.useState)(!1),[D,U]=(0,n.useState)(!1),[q,B]=(0,n.useState)(null),[_,H]=(0,n.useState)(0),V=(0,n.useRef)(!1),F=(0,n.useRef)(""),G=(0,n.useRef)(""),Z=(0,n.useRef)(""),K=(0,n.useRef)(""),Y=(0,n.useRef)(0),W=(0,n.useRef)(""),J=m.filter(e=>e.merchantId===s),Q=J.map(e=>[e.id,e.productId,e.variantId??"",e.quantity,e.price,e.promotionUnitPrice??"",e.promotionDiscountCapacity??"",e.currency??""].join(":")).sort().join("|"),X=b(s);(0,n.useEffect)(()=>{e&&(!V.current||Q!==F.current)&&(V.current=!0,F.current=Q,y(s)),e||(V.current=!1)},[e,s,Q,y]);let ee=J.reduce((e,t)=>e+t.quantity,0),et=j(s),er=`${s}|${d}|${et}|${Q}`;W.current=er;let en=X?w(s):Math.min(_,et),ea=Math.max(0,et-en),eo=J.filter(e=>"BOOKING"===e.productType).reduce((e,t)=>e+t.quantity,0),ei=J.filter(e=>"BOOKING"!==e.productType).reduce((e,t)=>e+t.quantity,0),es=J.some(e=>"MEMBERSHIP"===e.productType),el=J.some(e=>"PHYSICAL"===e.productType||e.bookingAddOns?.some(e=>"PRODUCT"===e.kind));(0,n.useEffect)(()=>(W.current=er,Y.current+=1,B(null),$(!1),0===J.length&&I(""),()=>{W.current===er&&(Y.current+=1)}),[er,J.length]),(0,n.useEffect)(()=>{if(!e||!X||0===J.length){U(!1),G.current="";return}let t=`${X}|${d}|${et}|${Q}`;if(t===G.current||t===Z.current)return;G.current=t,U(!0);let r=!1,n=async()=>{try{let e=await fetch("/api/shopfront/promo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:X,subtotalCents:et,presentmentCurrency:d,items:J.flatMap(L)})}),n=await e.json();if(r)return;if(!e.ok&&R(e))return void B(O);if(!e.ok||!n.valid){g(s),Z.current=t,B(n.message||n.error||"This promo code is not val
2id for your order");return}v.useCartStore.getState().applyPromo(X,n.discountCents||0,s),Z.current=t,B(null)}catch(e){r||(console.error("Promo revalidation error:",e),B(O))}finally{G.current===t&&(G.current=""),r||U(!1)}},a=window.setTimeout(()=>{n()},300);return()=>{r=!0,window.clearTimeout(a),G.current===t&&(G.current="")}},[g,e,s,Q,X,d,et]),(0,n.useEffect)(()=>{if(!e||X||0===J.length){H(0),K.current="";return}let t=`${d}|${et}|${Q}`;if(t===K.current)return;K.current=t;let r=!1,n=async()=>{try{let e=await fetch("/api/shopfront/promo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({automatic:!0,subtotalCents:et,presentmentCurrency:d,items:J.flatMap(L)})}),t=await e.json();if(r)return;e.ok?H(t.valid&&t.discountCents||0):R(e)||H(0)}catch(e){}finally{K.current===t&&(K.current="")}},a=window.setTimeout(()=>{n()},300);return()=>{r=!0,window.clearTimeout(a),K.current===t&&(K.current="")}},[e,s,Q,X,d,et]);let ec=async()=>{if(!A.trim())return;let e=Y.current+1;Y.current=e,$(!0),B(null);try{let t=await fetch("/api/shopfront/promo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:A,subtotalCents:et,presentmentCurrency:d,items:J.flatMap(L)})}),r=await t.json();if(e!==Y.current||er!==W.current)return;if(!t.ok){let e=r.message||r.error||(404===t.status?"Promo code not found":400===t.status?"Invalid promo code format":410===t.status?"This promo code has expired":409===t.status?"This promo code has reached its usage limit":t.status>=500?"Unable to validate code. Please try again.":"Invalid promo code");B(e);return}if(!r.valid)return void B(r.message||"This promo code is not valid for your order");v.useCartStore.getState().applyPromo(A,r.discountCents||0,s),I("")}catch(t){if(e!==Y.current||er!==W.current)return;console.error("Promo code error:",t),B("Unable to apply code. Please check your connection and try again.")}finally{e===Y.current&&$(!1)}};return(0,t.jsx)(i.Sheet,{open:e,onOpenChange:a,children:(0,t.jsxs)(i.SheetContent,{size:"md",style:{...u,fontFamily:"Inter, sans-serif"},"data-testid":"cart-drawer",children:[(0,t.jsxs)(i.SheetHeader,{className:"pt-[max(1rem,env(safe-area-inset-top))] pl-[max(1rem,env(safe-area-inset-left))] pr-[max(3.5rem,env(safe-area-inset-right))] sm:pl-[max(1.5rem,env(safe-area-inset-left))] sm:pr-[max(4rem,env(safe-area-inset-right))]",children:[(0,t.jsx)(i.SheetTitle,{className:"text-xl",children:"Shopping Cart"}),(0,t.jsx)(i.SheetDescription,{className:"sr-only",children:"Review your cart items, apply a promo code, and continue to checkout."}),ee>0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"cart-drawer-count",children:eo>0&&0===ei?`${eo} ${1===eo?"appointment":"appointments"}`:eo>0&&ei>0?`${ei} ${1===ei?"item":"items"}, ${eo} ${1===eo?"appointment":"appointments"}`:`${ee} ${1===ee?"item":"items"}`})]}),(0,t.jsxs)(i.SheetBody,{className:"pl-[max(1rem,env(safe-area-inset-left))] pr-[max(1rem,env(safe-area-inset-right))] sm:pl-[max(1.5rem,env(safe-area-inset-left))] sm:pr-[max(1.5rem,env(safe-area-inset-right))]",children:[0===J.length?(0,t.jsx)(N,{}):(0,t.jsx)("div",{className:"space-y-4",children:J.map(e=>(0,t.jsx)(C,{item:e,currency:d,timezone:c,isTicketEventCapacityReached:(0,P.isTicketEventCapacityReached)(J,e),onRemove:()=>{r.default.capture("cart_item_removed",{product_id:e.productId,product_name:e.name,quantity:e.quantity,price:e.price,currency:e.currency,merchant_id:e.merchantId}),h(e.id)},onUpdateQuantity:t=>x(e.id,t),onEditPersonalization:e.personalizationConfig?()=>z(e.id):void 0},e.id))}),E?.personalizationConfig&&(0,t.jsx)(k,{open:!0,onOpenChange:e=>{e||z(null)},config:E.personalizationConfig,productName:E.name,initialValue:E.personalization??"",priceAmount:p(E.personalizationConfig.priceAmount).priceAmount,currency:d,confirmLabel:"Save",onConfirm:e=>{f(E.id,e,{basePriceAmount:E.personalizationConfig?.priceAmount??0,presentmentPriceAmount:p(E.personalizationConfig?.priceAmount??0).priceAmount}),z(null)}})]}),J.length>0&&(0,t.jsx)(l,{promoInput:A,promoLoading:M,promoRevalidating:D,promoError:q,promoCode:X??null,hasMembership:es,subtotal:et,applicableDiscount:en,total:ea,currency:d,checkoutTotalsNote:(es?null:el?"Shipping and tax calculated at checkout":"Tax calculated at checkout")??null,onPromoInputChange:e=>{I(e),B(null)},onClearPromo:()=>{g(s),I(""),B(null)},onApplyPromo:ec,onCheckout:()=>{a(),o()},onClose:a})]})})}],411006);var z=e.i(871689),E=e.i(647163);e.s(["StorefrontBackLink",0,function({onBack:e,label:r,placement:n="block",className:o}){return(0,t.jsxs)(a.Button,{type:"button",variant:"ghost",onClick:e,className:(0,E.cn)("h-9 gap-2 px-3 text-sm font-medium text-foreground
2/70 transition-colors hover:bg-foreground/5 hover:text-foreground","block"===n?"-ml-3 mb-4 sm:mb-6":"-mr-3 shrink-0",o),"data-testid":"product-back-button",children:[(0,t.jsx)(z.ArrowLeft,{className:"size-4 shrink-0","aria-hidden":"true"}),r]})}],898912)},425907,e=>{"use strict";var t=e.i(463088);function r(e){return e?.trim()||t.PERSONALIZATION_DEFAULT_LABEL}e.s(["buildProductPersonalizationDisplay",0,function(e){return e.personalizationEnabled?{label:r(e.personalizationLabel),maxLength:(0,t.resolvePersonalizationMaxLength)(e.personalizationMaxLength),required:e.personalizationRequired??!1,characterPolicy:e.personalizationCharacterPolicy??"ANY",inputMode:e.personalizationInputMode??"MULTILINE",priceAmount:Math.max(0,e.personalizationPriceAmount??0)}:null},"resolvePersonalizationDisplayText",0,function(e){return function(e){let n=e.text??"",a=(0,t.normalizePersonalizationText)(n),o=r(e.config.personalizationLabel);if(!e.config.personalizationEnabled)return a.length>0?{ok:!1,error:{code:"PERSONALIZATION_NOT_SUPPORTED",message:`"${e.productTitle}" does not offer personalization.`}}:{ok:!0,personalization:null};if((0,t.hasUnsupportedPersonalizationControlCharacter)(n))return{ok:!1,error:{code:"PERSONALIZATION_INVALID_CHARACTERS",message:`${o} for "${e.productTitle}" contains characters that are not allowed.`}};if(0===a.length)return e.config.personalizationRequired?{ok:!1,error:{code:"PERSONALIZATION_REQUIRED",message:`${o} is required for "${e.productTitle}".`}}:{ok:!0,personalization:null};if((e.config.personalizationInputMode??"MULTILINE")==="SINGLE_LINE"&&a.includes("\n"))return{ok:!1,error:{code:"PERSONALIZATION_MULTILINE_NOT_ALLOWED",message:`${o} for "${e.productTitle}" must be entered on a single line.`}};let i=e.config.personalizationCharacterPolicy??"ANY",s="ALPHA"===i?/^[\p{L}\p{Zs}\n]+$/u:"ALPHANUMERIC"===i?/^[\p{L}\p{N}\p{Zs}\n]+$/u:null;if(s&&!s.test(a))return{ok:!1,error:{code:"PERSONALIZATION_INVALID_CHARACTERS",message:`${o} for "${e.productTitle}" contains characters that are not allowed.`}};let l=(0,t.resolvePersonalizationMaxLength)(e.config.personalizationMaxLength);return a.length>l?{ok:!1,error:{code:"PERSONALIZATION_TOO_LONG",message:`${o} for "${e.productTitle}" must be ${l} characters or fewer.`}}:{ok:!0,personalization:{label:o,text:a,priceAmount:Math.max(0,e.config.personalizationPriceAmount??0)}}}({productTitle:e.productTitle,text:e.text,config:{personalizationEnabled:!0,personalizationLabel:e.config.label,personalizationMaxLength:e.config.maxLength,personalizationRequired:e.config.required,personalizationCharacterPolicy:e.config.characterPolicy,personalizationInputMode:e.config.inputMode,personalizationPriceAmount:e.config.priceAmount}})}])},424665,e=>{"use strict";var t=e.i(322239);function r({baseAmount:e,baseCurrency:n,presentmentCurrency:a,overrideAmount:o,exchangeRate:i,exchangeRateScale:s=t.RATE_SCALE_FACTOR}){return null!=o?{amount:o,source:"override"}:n.toUpperCase()===a.toUpperCase()?{amount:e,source:"base"}:{amount:(0,t.convertMinorUnitsWithRate)(e,i,s),source:"rate"}}function n(e){let t=e.resourcePriceModifier??0,n=Math.max(0,e.addOnPriceModifier??0),a=Math.max(0,e.basePriceAmount??0),o=Math.max(0,a+t),i=o+n;if(null!=e.presentmentOverrideAmount){let o=r({baseAmount:t,baseCurrency:e.baseCurrency,presentmentCurrency:e.presentmentCurrency,exchangeRate:e.exchangeRate,exchangeRateScale:e.exchangeRateScale}).amount,s=r({baseAmount:n,baseCurrency:e.baseCurrency,presentmentCurrency:e.presentmentCurrency,exchangeRate:e.exchangeRate,exchangeRateScale:e.exchangeRateScale}).amount,l=Math.max(0,e.presentmentOverrideAmount+o),c=Math.max(0,e.presentmentOverrideAmount),u=l+s;return e.baseCurrency.toUpperCase()===e.presentmentCurrency.toUpperCase()?{baseUnitPrice:u,presentmentUnitPrice:u,basePromotionUnitPrice:c,presentmentPromotionUnitPrice:c,presentmentServiceUnitPrice:l,presentmentAddOnAmount:s}:{baseUnitPrice:i,presentmentUnitPrice:u,basePromotionUnitPrice:a,presentmentPromotionUnitPrice:c,presentmentServiceUnitPrice:l,presentmentAddOnAmount:s}}let s=r({baseAmount:i,baseCurrency:e.baseCurrency,presentmentCurrency:e.presentmentCurrency,exchangeRate:e.exchangeRate,exchangeRateScale:e.exchangeRateScale}).amount,l=r({baseAmount:o,baseCurrency:e.baseCurrency,presentmentCurrency:e.presentmentCurrency,exchangeRate:e.exchangeRate,exchangeRateScale:e.exchangeRateScale}).amount,c=r({baseAmount:a,baseCurrency:e.baseCurrency,presentmentCurrency:e.presentmentCurrency,exchangeRate:e.exchangeRate,exchangeRateScale:e.exchangeRateScale}).amount;return{baseUnitPrice:i,presentmentUnitPrice:s,basePromotionUnitPrice:a,presentmentPromotionUnitPrice:c,presentmentServiceUnitPrice:l,presentmentAddOnAmount:s-l}}e.s(["allocateBookingAddOnPresentmentTotals",0,function(e,t,r){let n=e.map(e=>r(e.priceAmount*e.quantity));return n.length>0&&(n[n.length-1]+=t-n.reduce((e,t)=>
2e+t,0)),n},"resolveBookingPriceOverrides",0,function(e){if(!e.priceOverrides)return{};let t={},r={},a={};for(let[o,i]of Object.entries(e.priceOverrides)){let s=o===e.productCurrency?e.exchangeRateScale:e.exchangeRates[o];if(null==s){t[o]=i;continue}let l=n({baseCurrency:e.productCurrency,presentmentCurrency:o,exchangeRate:s,exchangeRateScale:e.exchangeRateScale,basePriceAmount:e.basePriceAmount,presentmentOverrideAmount:i.priceAmount,resourcePriceModifier:e.resourcePriceModifier,addOnPriceModifier:e.addOnPriceModifier});t[o]={...i,priceAmount:l.presentmentUnitPrice},r[o]={priceAmount:l.presentmentPromotionUnitPrice},a[o]={priceAmount:l.presentmentServiceUnitPrice}}return{priceOverrides:t,promotionPriceOverrides:r,promotionCapacityOverrides:a}},"resolveBookingServiceDisplayUnitPrice",0,function(e){let t=(e.bookingAddOns??[]).reduce((e,t)=>e+(t.presentmentPriceAmount??t.priceAmount??0)*t.quantity,0);return Math.max(0,e.price-t)},"resolveBookingUnitPrice",0,n],424665)},220555,e=>{"use strict";var t=e.i(768834),r=e.i(887598),n=e.i(795932);function a(e){if(!e)return"";let t=e.trim().toLowerCase();try{return new URL(t.includes("://")?t:`https://${t}`).hostname}catch{return t.split(":")[0]??""}}function o(){return(0,r.getPlatformDomainConfig)().storefrontPathDomain}function i(e,t,r=o()){let s=a(t);if(!s)return"";let l=(0,n.getStorefrontPathPrefixFromPathname)(e);return l&&s===a(r)?l:""}function s(e,t){let r,a=(r=(0,n.normalizeStorefrontPathPrefix)(t))||i(window.location.pathname,window.location.hostname);return a?(0,n.buildStorefrontPath)(e,a):e}let l=(0,t.create)()((e,t)=>({currentView:"grid",selectedProductId:null,previousView:null,previousProductId:null,scrollPosition:{grid:0,product:0,checkout:0},isCartDrawerOpen:!1,reservationExpiresAt:null,productSlugMap:{},merchantSubdomain:null,storefrontPathPrefix:"",selectedCollectionId:null,collectionGridPath:"/",initialize:(r,a,o,i,s)=>{let l=null!==t().merchantSubdomain&&t().merchantSubdomain!==r,u=o||"grid",d=(0,n.normalizeStorefrontPathPrefix)(s),p="grid"===u?c(a,d):null,m=p&&"grid"!==p.view?p.view:u,h="product"===m&&(p?.productId||i)||null;e({merchantSubdomain:r,productSlugMap:a,storefrontPathPrefix:d,currentView:m,selectedProductId:h,...l?{selectedCollectionId:null,collectionGridPath:"/"}:{}})},setView:(r,n)=>{let{currentView:a,selectedProductId:o,productSlugMap:i,storefrontPathPrefix:l,selectedCollectionId:c,collectionGridPath:u}=t();if(e({previousView:a,previousProductId:"product"===a?o:null,currentView:r,selectedProductId:n||null}),"product"===r&&n){let e=i[n];e&&window.history.pushState({view:r,productId:n},"",s(`/products/${e}`,l))}else"checkout"===r?window.history.pushState({view:r},"",s("/checkout",l)):"grid"===r&&window.history.pushState({view:r,collectionId:c},"",s(u,l))},setCollectionContext:(t,r)=>{e({selectedCollectionId:t,collectionGridPath:t?r:"/"})},goBack:()=>{let{previousView:r,previousProductId:n,productSlugMap:a,scrollPosition:o,storefrontPathPrefix:i,selectedCollectionId:l,collectionGridPath:c}=t(),u=r||"grid";if(e({currentView:u,previousView:null,selectedProductId:"product"===u?n:null,previousProductId:null}),"grid"===u)window.history.replaceState({view:u,collectionId:l},"",s(c,i));else if("checkout"===u)window.history.replaceState({view:u},"",s("/checkout",i));else if("product"===u&&n){let e=a[n];e&&window.history.replaceState({view:u,productId:n},"",s(`/products/${e}`,i))}let d=o[u];void 0!==d&&d>0&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{window.scrollTo({top:d,behavior:"instant"})})}),setTimeout(()=>{t().currentView===u&&window.scrollTo({top:d,behavior:"instant"})},350))},saveScrollPosition:(t,r)=>{e(e=>({scrollPosition:{...e.scrollPosition,[t]:r}}))},restoreScrollPosition:e=>{let{scrollPosition:r}=t(),n=r[e];void 0!==n&&window.scrollTo(0,n)},openCartDrawer:()=>e({isCartDrawerOpen:!0}),closeCartDrawer:()=>e({isCartDrawerOpen:!1}),toggleCartDrawer:()=>e(e=>({isCartDrawerOpen:!e.isCartDrawerOpen})),setReservationExpiry:t=>{t?e({reservationExpiresAt:"string"==typeof t?t:t.toISOString()}):e({reservationExpiresAt:null})},clearReservationExpiry:()=>e({reservationExpiresAt:null})}));function c(e,t){let r=function(e,t,r=o(),a){let s=(0,n.normalizeStorefrontPathPrefix)(a);if(s)return(0,n.stripStorefrontPath)(e,s);let l=i(e,t,r);return(0,n.stripStorefrontPath)(e,l)}(window.location.pathname,window.location.hostname,void 0,t),a=window.location.hash;if(r.startsWith("/products/")){let t=r.replace("/products/","").split("/")[0];return e?{view:"product",productId:Object.entries(e).find(([,e])=>e===t)?.[0]||null,productSlug:t}:{view:"product",productId:null,productSlug:t}}return"/checkout"===r?{view:"checkout",productId:null,productSlug:null}:a.startsWith("#product-")?{view:"product",productId:a.replace("#product-",""),productSlug:null}:"#checkout"===a?{view:"checkout",productId:null,productSlug:null}:{view:"grid",productId:null,productSlug:null}}e.s(["parseUrlToView",0,c,"useStorefrontViewStore",0,l])},664659,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDown",()=>t.default])},299023,e=>{"use strict";var t=e.i(642310);e.s(["Minus",()=>t.default])},185873,e=>{"use strict";let t=(0,e.i(475254).default)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);e.s(["default",0,t])},674558,e=>{"use strict";var t=e.i(185873);e.s(["PenLine",()=>t.default])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t])},107233,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default])}]);
3
4//# debugId=b32ab982-f89c-9647-6ded-178d955e2b60

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.