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]="411e5807-40d6-0959-db59-f268d7aa228e")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,511833,e=>{"use strict";var t=e.i(170696);let r=(0,t.createServerReference)("400ff31a7aaf89a1f826d8f6aa57b727d823eee120",t.callServer,void 0,t.findSourceMapURL,"getPersonDetailAction");e.s(["getPersonDetailAction",0,r])},941219,628876,713671,482069,682647,e=>{"use strict";var t=e.i(434073),r=e.i(918059),a=e.i(837800),s=e.i(775453),n=e.i(640459),i=e.i(764160),l=e.i(193315),o=e.i(312713),d=e.i(911234),c=e.i(730206),u=e.i(640963),m=e.i(993781),p=e.i(754970),h=e.i(264181),x=e.i(556855),f=e.i(6511),g=e.i(814188),y=e.i(465390),b=e.i(240811),v=e.i(609858),j=e.i(73772),w=e.i(709791),N=["Enter"," "],C=["ArrowUp","PageDown","End"],S=["ArrowDown","PageUp","Home",...C],k={ltr:[...N,"ArrowRight"],rtl:[...N,"ArrowLeft"]},P={ltr:["ArrowLeft"],rtl:["ArrowRight"]},M="Menu",[E,D,I]=(0,d.createCollection)(M),[z,L]=(0,i.createContextScope)(M,[I,x.createPopperScope,y.createRovingFocusGroupScope]),T=(0,x.createPopperScope)(),R=(0,y.createRovingFocusGroupScope)(),[A,_]=z(M),[B,F]=z(M),O=e=>{let{__scopeMenu:r,open:s=!1,children:n,dir:i,onOpenChange:l,modal:o=!0}=e,d=T(r),[u,m]=a.useState(null),p=a.useRef(!1),h=(0,v.useCallbackRef)(l),f=(0,c.useDirection)(i);return a.useEffect(()=>{let e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,t.jsx)(x.Root,{...d,children:(0,t.jsx)(A,{scope:r,open:s,onOpenChange:h,content:u,onContentChange:m,children:(0,t.jsx)(B,{scope:r,onClose:a.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:f,modal:o,children:n})})})};O.displayName=M;var $=a.forwardRef((e,r)=>{let{__scopeMenu:a,...s}=e,n=T(a);return(0,t.jsx)(x.Anchor,{...n,...s,ref:r})});$.displayName="MenuAnchor";var H="MenuPortal",[U,G]=z(H,{forceMount:void 0}),V=e=>{let{__scopeMenu:r,forceMount:a,children:s,container:n}=e,i=_(H,r);return(0,t.jsx)(U,{scope:r,forceMount:a,children:(0,t.jsx)(g.Presence,{present:a||i.open,children:(0,t.jsx)(f.Portal,{asChild:!0,container:n,children:s})})})};V.displayName=H;var W="MenuContent",[K,Y]=z(W),q=a.forwardRef((e,r)=>{let a=G(W,e.__scopeMenu),{forceMount:s=a.forceMount,...n}=e,i=_(W,e.__scopeMenu),l=F(W,e.__scopeMenu);return(0,t.jsx)(E.Provider,{scope:e.__scopeMenu,children:(0,t.jsx)(g.Presence,{present:s||i.open,children:(0,t.jsx)(E.Slot,{scope:e.__scopeMenu,children:l.modal?(0,t.jsx)(X,{...n,ref:r}):(0,t.jsx)(J,{...n,ref:r})})})})}),X=a.forwardRef((e,r)=>{let i=_(W,e.__scopeMenu),l=a.useRef(null),o=(0,n.useComposedRefs)(r,l);return a.useEffect(()=>{let e=l.current;if(e)return(0,j.hideOthers)(e)},[]),(0,t.jsx)(Q,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:(0,s.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})}),J=a.forwardRef((e,r)=>{let a=_(W,e.__scopeMenu);return(0,t.jsx)(Q,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),Z=(0,b.createSlot)("MenuContent.ScrollLock"),Q=a.forwardRef((e,r)=>{let{__scopeMenu:i,loop:l=!1,trapFocus:o,onOpenAutoFocus:d,onCloseAutoFocus:c,disableOutsidePointerEvents:h,onEntryFocus:f,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:v,onInteractOutside:j,onDismiss:N,disableOutsideScroll:k,...P}=e,M=_(W,i),E=F(W,i),I=T(i),z=R(i),L=D(i),[A,B]=a.useState(null),O=a.useRef(null),$=(0,n.useComposedRefs)(r,O,M.onContentChange),H=a.useRef(0),U=a.useRef(""),G=a.useRef(0),V=a.useRef(null),Y=a.useRef("right"),q=a.useRef(0),X=k?w.RemoveScroll:a.Fragment;a.useEffect(()=>()=>window.clearTimeout(H.current),[]),(0,m.useFocusGuards)();let J=a.useCallback(e=>{var t,r;return Y.current===V.current?.side&&(t=e,!!(r=V.current?.area)&&function(e,t){let{x:r,y:a}=e,s=!1;for(let e=0,n=t.length-1;e<t.length;n=e++){let i=t[e],l=t[n],o=i.x,d=i.y,c=l.x,u=l.y;d>a!=u>a&&r<(c-o)*(a-d)/(u-d)+o&&(s=!s)}return s}({x:t.clientX,y:t.clientY},r))},[]);return(0,t.jsx)(K,{scope:i,searchRef:U,onItemEnter:a.useCallback(e=>{J(e)&&e.preventDefault()},[J]),onItemLeave:a.useCallback(e=>{J(e)||(O.current?.focus(),B(null))},[J]),onTriggerLeave:a.useCallback(e=>{J(e)&&e.preventDefault()},[J]),pointerGraceTimerRef:G,onPointerGraceIntentChange:a.useCallback(e=>{V.current=e},[]),children:(0,t.jsx)(X,{...k?{as:Z,allowPinchZoom:!0}:void 0,children:(0,t.jsx)(p.FocusScope,{asChild:!0,trapped:o,onMountAutoFocus:(0,s.composeEventHandlers)(d,e=>{e.preventDefault(),O.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,t.jsx)(u.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:v,onInteractOutside:j,onDismiss:N,children:(0,t.jsx)(y.Root,{asChild:!0,...z,dir:E.dir,orientation:"vertical",loop:l,currentTabStopId:A,onCurrentTabStopIdChange:B,onEntryFocus:(0,s.composeEventHandlers)(f,e=>{E.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,t.jsx)(x.Content,{role:"menu","aria-orientation":"vertical","data-state":eS(M.open),"data-radix-menu-content":"",dir:E.dir,...I,...P,ref:$,style:{outline:"none",...P.style},onKeyDown:(0,s.composeEventHandlers)(P.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,a=1===e.ke
2y.length;if(t){var s;let t,n,i,l,o,d;"Tab"===e.key&&e.preventDefault(),!r&&a&&(s=e.key,t=U.current+s,n=L().filter(e=>!e.disabled),i=document.activeElement,l=n.find(e=>e.ref.current===i)?.textValue,o=function(e,t,r){var a;let s=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,n=r?e.indexOf(r):-1,i=(a=Math.max(n,0),e.map((t,r)=>e[(a+r)%e.length]));1===s.length&&(i=i.filter(e=>e!==r));let l=i.find(e=>e.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}(n.map(e=>e.textValue),t,l),d=n.find(e=>e.textValue===o)?.ref.current,function e(t){U.current=t,window.clearTimeout(H.current),""!==t&&(H.current=window.setTimeout(()=>e(""),1e3))}(t),d&&setTimeout(()=>d.focus()))}let n=O.current;if(e.target!==n||!S.includes(e.key))return;e.preventDefault();let i=L().filter(e=>!e.disabled).map(e=>e.ref.current);C.includes(e.key)&&i.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(i)}),onBlur:(0,s.composeEventHandlers)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(H.current),U.current="")}
2),onPointerMove:(0,s.composeEventHandlers)(e.onPointerMove,eM(e=>{let t=e.target,r=q.current!==e.clientX;e.currentTarget.contains(t)&&r&&(Y.current=e.clientX>q.current?"right":"left",q.current=e.clientX)}))})})})})})})});q.displayName=W;var ee=a.forwardRef((e,r)=>{let{__scopeMenu:a,...s}=e;return(0,t.jsx)(o.Primitive.div,{role:"group",...s,ref:r})});ee.displayName="MenuGroup";var et=a.forwardRef((e,r)=>{let{__scopeMenu:a,...s}=e;return(0,t.jsx)(o.Primitive.div,{...s,ref:r})});et.displayName="MenuLabel";var er="MenuItem",ea="menu.itemSelect",es=a.forwardRef((e,r)=>{let{disabled:i=!1,onSelect:l,...d}=e,c=a.useRef(null),u=F(er,e.__scopeMenu),m=Y(er,e.__scopeMenu),p=(0,n.useComposedRefs)(r,c),h=a.useRef(!1);return(0,t.jsx)(en,{...d,ref:p,disabled:i,onClick:(0,s.composeEventHandlers)(e.onClick,()=>{let e=c.current;if(!i&&e){let t=new CustomEvent(ea,{bubbles:!0,cancelable:!0});e.addEventListener(ea,e=>l?.(e),{once:!0}),(0,o.dispatchDiscreteCustomEvent)(e,t),t.defaultPrevented?h.current=!1:u.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),h.current=!0},onPointerUp:(0,s.composeEventHandlers)(e.onPointerUp,e=>{h.current||e.currentTarget?.click()}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{let t=""!==m.searchRef.current;i||t&&" "===e.key||N.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});es.displayName=er;var en=a.forwardRef((e,r)=>{let{__scopeMenu:i,disabled:l=!1,textValue:d,...c}=e,u=Y(er,i),m=R(i),p=a.useRef(null),h=(0,n.useComposedRefs)(r,p),[x,f]=a.useState(!1),[g,b]=a.useState("");return a.useEffect(()=>{let e=p.current;e&&b((e.textContent??"").trim())},[c.children]),(0,t.jsx)(E.ItemSlot,{scope:i,disabled:l,textValue:d??g,children:(0,t.jsx)(y.Item,{asChild:!0,...m,focusable:!l,children:(0,t.jsx)(o.Primitive.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":l||void 0,"data-disabled":l?"":void 0,...c,ref:h,onPointerMove:(0,s.c
2omposeEventHandlers)(e.onPointerMove,eM(e=>{l?u.onItemLeave(e):(u.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,s.composeEventHandlers)(e.onPointerLeave,eM(e=>u.onItemLeave(e))),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>f(!0)),onBlur:(0,s.composeEventHandlers)(e.onBlur,()=>f(!1))})})})}),ei=a.forwardRef((e,r)=>{let{checked:a=!1,onCheckedChange:n,...i}=e;return(0,t.jsx)(eh,{scope:e.__scopeMenu,checked:a,children:(0,t.jsx)(es,{role:"menuitemcheckbox","aria-checked":ek(a)?"mixed":a,...i,ref:r,"data-state":eP(a),onSelect:(0,s.composeEventHandlers)(i.onSelect,()=>n?.(!!ek(a)||!a),{checkForDefaultPrevented:!1})})})});ei.displayName="MenuCheckboxItem";var el="MenuRadioGroup",[eo,ed]=z(el,{value:void 0,onValueChange:()=>{}}),ec=a.forwardRef((e,r)=>{let{value:a,onValueChange:s,...n}=e,i=(0,v.useCallbackRef)(s);return(0,t.jsx)(eo,{scope:e.__scopeMenu,value:a,onValueChange:i,children:(0,t.jsx)(ee,{...n,ref:r})})});ec.displayName=el;var eu="MenuRadioItem",em=a.forwardRef((e,r)=>{let{value:a,...n}=e,i=ed(eu,e.__scopeMenu),l=a===i.value;return(0,t.jsx)(eh,{scope:e.__scopeMenu,checked:l,children:(0,t.jsx)(es,{role:"menuitemradio","aria-checked":l,...n,ref:r,"data-state":eP(l),onSelect:(0,s.c
2omposeEventHandlers)(n.onSelect,()=>i.onValueChange?.(a),{checkForDefaultPrevented:!1})})})});em.displayName=eu;var ep="MenuItemIndicator",[eh,ex]=z(ep,{checked:!1}),ef=a.forwardRef((e,r)=>{let{__scopeMenu:a,forceMount:s,...n}=e,i=ex(ep,a);return(0,t.jsx)(g.Presence,{present:s||ek(i.checked)||!0===i.checked,children:(0,t.jsx)(o.Primitive.span,{...n,ref:r,"data-state":eP(i.checked)})})});ef.displayName=ep;var eg=a.forwardRef((e,r)=>{let{__scopeMenu:a,...s}=e;return(0,t.jsx)(o.Primitive.div,{role:"separator","aria-orientation":"horizontal",...s,ref:r})});eg.displayName="MenuSeparator";var ey=a.forwardRef((e,r)=>{let{__scopeMenu:a,...s}=e,n=T(a);return(0,t.jsx)(x.Arrow,{...n,...s,ref:r})});ey.displayName="MenuArrow";var[eb,ev]=z("MenuSub"),ej="MenuSubTrigger",ew=a.forwardRef((e,r)=>{let i=_(ej,e.__scopeMenu),l=F(ej,e.__scopeMenu),o=ev(ej,e.__scopeMenu),d=Y(ej,e.__scopeMenu),c=a.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:m}=d,p={__scopeMenu:e.__scopeMenu},h=a.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return a.useEffect(()=>h,[h]),a.useEffect(()=>{let e=u.current;return()=>{window.clearTimeout(e),m(null)}},[u,m]),(0,t.jsx)($,{asChild:!0,...p,children:(0,t.jsx)(en,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":o.contentId,"data-state":eS(i.open),...e,ref:(0,n.composeRefs)(r,o.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),i.open||i.onOpenChange(!0))}
2,onPointerMove:(0,s.composeEventHandlers)(e.onPointerMove,eM(t=>{d.onItemEnter(t),!t.defaultPrevented&&(e.disabled||i.open||c.current||(d.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{i.onOpenChange(!0),h()},100)))})),onPointerLeave:(0,s.composeEventHandlers)(e.onPointerLeave,eM(e=>{h();let t=i.content?.getBoundingClientRect();if(t){let r=i.content?.dataset.side,a="right"===r,s=t[a?"left":"right"],n=t[a?"right":"left"];d.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:s,y:t.top},{x:n,y:t.top},{x:n,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(e),e.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,t=>{let r=""!==d.searchRef.current;e.disabled||r&&" "===t.key||k[l.dir].includes(t.key)&&(i.onOpenChange(!0),i.content?.focus(),t.preventDefault())})})})});ew.displayName=ej;var eN="MenuSubContent",eC=a.forwardRef((e,r)=>{let i=G(W,e.__scopeMenu),{forceMount:l=i.forceMount,...o}=e,d=_(W,e.__scopeMenu),c=F(W,e.__scopeMenu),u=ev(eN,e.__scopeMenu),m=a.useRef(null),p=(0,n.useComposedRefs)(r,m);return(0,t.jsx)(E.Provider,{scope:e.__scopeMenu,children:(0,t.jsx)(g.Presence,{present:l||d.open,children:(0,t.jsx)(E.Slot,{scope:e.__scopeMenu,children:(0,t.jsx)(Q,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:p,align:"start",side:"rtl"===c.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&m.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,s.composeEventHandlers)(e.onFocusOutside,e=>{e.target!==u.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:(0,s.composeEventHandlers)(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=P[c.dir].includes(e.key);t&&r&&(d.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});function eS(e){return e?"open":"closed"}function ek(e){return"indeterminate"===e}function eP(e){return ek(e)?"indeterminate":e?"checked":"unchecked"}function eM(e){return t=>"mouse"===t.pointerType?e(t):void 0}eC.displayName=eN;var eE="DropdownMenu",[eD,eI]=(0,i.createContextScope)(eE,[L]),ez=L(),[eL,eT]=eD(eE),eR=e=>{let{__scopeDropdownMenu:r,children:s,dir:n,open:i,defaultOpen:o,onOpenChange:d,modal:c=!0}=e,u=ez(r),m=a.useRef(null),[p,x]=(0,l.useControllableState)({prop:i,defaultProp:o??!1,onChange:d,caller:eE});return(0,t.jsx)(eL,{scope:r,triggerId:(0,h.useId)(),triggerRef:m,contentId:(0,h.useId)(),open:p,onOpenChange:x,onOpenToggle:a.useCallback(()=>x(e=>!e),[x]),modal:c,children:(0,t.jsx)(O,{...u,open:p,onOpenChange:x,dir:n,modal:c,children:s})})};eR.displayName=eE;var eA="DropdownMenuTrigger",e_=a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,disabled:i=!1,...l}=e,d=eT(eA,a),c=ez(a);return(0,t.jsx)($,{asChild:!0,...c,children:(0,t.jsx)(o.Primitive.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...l,ref:(0,n.composeRefs)(r,d.triggerRef),onPointerDown:(0,s.composeEventHandlers)(e.onPointerDown,e=>{!i&&0===e.button&&!1===e.ctrlKey&&(d.onOpenToggle(),d.open||e.preventDefault())}),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{!i&&(["Enter"," "].includes(e.key)&&d.onOpenToggle(),"ArrowDown"===e.key&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});e_.displayName=eA;var eB=e=>{let{__scopeDropdownMenu:r,...a}=e,s=ez(r);return(0,t.jsx)(V,{...s,...a})};eB.displayName="DropdownMenuPortal";var eF="DropdownMenuContent",eO=a.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...i}=e,l=eT(eF,n),o=ez(n),d=a.useRef(!1);return(0,t.jsx)(q,{id:l.contentId,"aria-labelledby":l.triggerId,...o,...i,ref:r,onCloseAutoFocus:(0,s.composeEventHandlers)(e.onCloseAutoFocus,e=>{d.current||l.triggerRef.current?.focus(),d.current=!1,e.preventDefault()}),onInteractOutside:(0,s.composeEventHandlers)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,a=2===t.button||r;(!l.modal||a)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eO.displayName=eF,a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(ee,{...n,...s,ref:r})}).displayName="DropdownMenuGroup";var e$=a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(et,{...n,...s,ref:r})});e$.displayName="DropdownMenuLabel";var eH=a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(es,{...n,...s,ref:r})});eH.displayName="DropdownMenuItem",a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(ei,{...n,...s,ref:r})}).displayName="DropdownMenuCheckboxItem",a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(ec,{...n,...s,ref:r})}).displayName="DropdownMenuRadioGroup",a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(em,{...n,...s,ref:r})}).displayName="DropdownMenuRadioItem",a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(ef,{...n,...s,ref:r})}).displayName="DropdownMenuItemIndicator";var eU=a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(eg,{...n,...s,ref:r})});eU.displayName="DropdownMenuSeparator",a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(ey,{...n,...s,ref:r})}).displayName="DropdownMenuArrow",a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);return(0,t.jsx)(ew,{...n,...s,ref:r})}).displayName="DropdownMenuSubTrigger",a.forwardRef((e,r)=>{let{__scopeDropdownMenu:a,...s}=e,n=ez(a);
2return(0,t.jsx)(eC,{...n,...s,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}).displayName="DropdownMenuSubContent",e.i(143982),e.i(277173),e.i(878247);var eG=e.i(152088);function eV({...e}){return(0,t.jsx)(eR,{"data-slot":"dropdown-menu",...e,"data-sentry-element":"DropdownMenuPrimitive.Root","data-sentry-component":"DropdownMenu","data-sentry-source-file":"dropdown-menu.tsx"})}function eW({...e}){return(0,t.jsx)(e_,{"data-slot":"dropdown-menu-trigger",...e,"data-sentry-element":"DropdownMenuPrimitive.Trigger","data-sentry-component":"DropdownMenuTrigger","data-sentry-source-file":"dropdown-menu.tsx"})}function eK({className:e,sideOffset:r=4,...a}){return(0,t.jsx)(eB,{"data-sentry-element":"DropdownMenuPrimitive.Portal","data-sentry-component":"DropdownMenuContent","data-sentry-source-file":"dropdown-menu.tsx",children:(0,t.jsx)(eO,{"data-slot":"dropdown-menu-content",sideOffset:r,className:(0,eG.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...a,"data-sentry-element":"DropdownMenuPrimitive.Content","data-sentry-source-file":"dropdown-menu.tsx"})})}function eY({className:e,inset:r,variant:a="default",...s}){return(0,t.jsx)(eH,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":a,className:(0,eG.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s,"data-sentry-element":"DropdownMenuPrimitive.Item","data-sentry-component":"DropdownMenuItem","data-sentry-source-file":"dropdown-menu.tsx"})}function eq({children:e,loading:r,className:a}){return(0,t.jsx)("span",{className:(0,eG.cn)("relative inline-flex items-center justify-center",r&&"text-shimmer",a),"aria-busy":r?"true":void 0,"data-sentry-component":"LabelOrSpinner","data-sentry-source-file":"LabelOrSpinner.tsx",children:e})}e.s(["DropdownMenu",0,eV,"DropdownMenuContent",0,eK,"DropdownMenuItem",0,eY,"DropdownMenuLabel",0,function({className:e,inset:r,...a}){return(0,t.jsx)(e$,{"data-slot":"dropdown-menu-label","data-inset":r,className:(0,eG.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...a,"data-sentry-element":"DropdownMenuPrimitive.Label","data-sentry-component":"DropdownMenuLabel","data-sentry-source-file":"dropdown-menu.tsx"})},"DropdownMenuSeparator",0,function({className:e,...r}){return(0,t.jsx)(eU,{"data-slot":"dropdown-menu-separator",className:(0,eG.cn)("bg-border -mx-1 my-1 h-px",e),...r,"data-sentry-element":"DropdownMenuPrimitive.Separator","data-sentry-component":"DropdownMenuSeparator","data-sentry-source-file":"dropdown-menu.tsx"})},"DropdownMenuTrigger",0,eW],628876),e.s(["LabelOrSpinner",0,eq],713671);var eX=e.i(111154),eJ=e.i(499581);function eZ({label:e,href:r,openInNewTab:a,loading:s,onClick:n,className:i}){let l=r||"#";return(0,t.jsx)(eJ.default,{className:i||"relative inline-block px-2.5 text-sm md:px-4 md:text-base",href:l,onClick:()=>{(0,eX.isRealHref)(r)&&n&&n(r)},...a?{target:"_blank",rel:"noopener noreferrer"}:{},"data-sentry-element":"Link","data-sentry-component":"NavLink","data-sentry-source-file":"NavLink.tsx",children:(0,t.jsx)(eq,{loading:!!s,"data-sentry-element":"LabelOrSpinner","data-sentry-source-file":"NavLink.tsx",children:e})})}e.s(["NavLink",0,eZ],482069),e.s(["NavDropdown",0,function({item:e,loadingItems:a,onItemClick:s,offset:n=20}){let i=(0,eX.anyChildLoading)(e,a);return(0,t.jsxs)(eV,{modal:!1,"data-sentry-element":"DropdownMenu","data-sentry-component":"NavDropdown","data-sentry-source-file":"NavDropdown.tsx",children:[(0,t.jsxs)(eW,{className:"cursor-pointer flex items-center h-full px-2 text-sm whitespace-nowrap md:px-4 md:text-base gap-1 text-primary hover:text-zinc-600 dark:hover:text-neutral-300 transition-colors duration-200","data-sentry-element":"DropdownMenuTrigger","data-sentry-source-file":"NavDropdown.tsx",children:[(0,t.jsx)(eq,{loading:i,"data-sentry-element":"LabelOrSpinner","data-sentry-source-file":"NavDropdown.tsx",children:e.label}),(0,t.jsx)(r.ChevronDown,{className:"size-4 text-muted-foreground","data-sentry-element":"ChevronDown","data-sentry-source-file":"NavDropdown.tsx"})]}),(0,t.jsx)(eK,{sideOffset:n,"data-sentry-element":"DropdownMenuContent","data-sentry-source-file":"NavDropdown.tsx",children:e.subLinks.map(e=>{let r=e.href||"#",n=(0,eX.isRealHref)(e.href)&&a.has(r);return(0,t.jsx)(eY,{asChild:!0,className:"py-2.5",children:(0,t.jsx)(eZ,{label:e.label,href:r,openInNewTab:e.openInNewTab,loading:!!n,onClick:s,className:"relative block"})},e.label)})})]})}],941219);var eQ=e.i(352551);let e0=(0,a.memo)(function({ctaButton:e}){return e?.buttons?.length?(0,t.jsx)(eQ.SanityButtons,{buttons:e.buttons.map(e=>({...e,buttonClassName:(0,eG.cn)("rounded-full px-4 py-2 font-medium text-sm transition-colors duration-200 whitespace-nowrap",{"bg-black text-white hover:bg-zinc-800":"default"===e.variant})})),className:"flex flex-row gap-4"}):null});e.s(["CTAButton",0,e0],682647)},592116,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(299204),s=e.i(507850),n=e.i(474986),i=e.i(466958),l=e.i(747089),o=e.i(152088),d=e.i(824406),c=e.i(878489),u=e.i(707836),m=e.i(345656),p=e.i(502119);let h=({camp:e})=>{let r=(0,p.usePathname)();if(!e||!e.sport)return(0,t.jsx)("div",{className:"table-cell px-4 py-2 bg-neutral-100 dar
2k:bg-neutral-800 aspect-9/8 min-h-22"});let a=!!e.registrationUrl,s=null!=e.spotsLeft&&e.spotsLeft<1,n=(0,t.jsx)("div",{className:(0,o.cn)("block h-full px-4 py-2 rounded-lg lg:rounded-none lg:border-0 ",{"table-cell bg-background hover:bg-neutral-50 dark:hover:bg-neutral-700":!a,"bg-neutral-100 dark:bg-neutral-800 text-neutral-500":s&&a}),children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"font-medium flex items-center gap-2",children:[(0,t.jsx)(u.IconComponent,{name:(0,o.normalizeSportName)(e.sport.name),className:"size-4 shrink-0"}),(0,t.jsx)("span",{children:e.name.replace(/School Break Camp|\s*\([^)]*\)/g,"").trim()})]}),e.endDate&&(0,t.jsx)("span",{className:"text-sm",children:(0,o.getTimeRangeSentence)(e.startDate,e.endDate,e.classTime)}),null!=e.ageRangeMin&&null!=e.ageRangeMax&&(0,t.jsxs)("span",{className:"text-sm",children:["Ages"," ",(0,o.formatAgeRange)(e.ageRangeMin,e.ageRangeMax,e.ageRangeMinUnits,e.ageRangeMaxUnits)]}),(0,t.jsxs)("span",{className:"text-sm",children:["$",e.pricePerSession]})]})});return a?(0,t.jsx)(m.UTMLink,{href:e.registrationUrl,target:"_blank",className:"table-cell cursor-pointer transition-transform duration-150 ease-in-out bg-background hover:bg-neutral-50 dark:hover:bg-neutral-700 active:scale-[0.98] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/50 rounded-lg border lg:rounded-none lg:border-0","data-class-name":e.name,"data-sport":e.sport.name,"data-location":(0,o.getLocationFromPath)(r),"data-sentry-element":"UTMLink","data-sentry-component":"CampTableCell","data-sentry-source-file":"CampTableCell.tsx",children:n}):n};var x=e.i(875348),f=e.i(985902),g=e.i(890042);let y=()=>{let e=(0,x.useIsTablet)(),r=e?3:2,a=e?2:5;return e?(0,t.jsx)("div",{className:"flex flex-col w-full gap-y-6 py-4",children:Array.from({length:r}).map((e,r)=>(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(g.Skeleton,{className:"h-6 w-32"}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2",children:Array.from({length:a}).map((e,r)=>(0,t.jsxs)("div",{className:"bg-white rounded-lg p-3 border border-neutral-200",children:[(0,t.jsx)(g.Skeleton,{className:"h-4 w-3/4 mb-2"}),(0,t.jsx)(g.Skeleton,{className:"h-3 w-1/2 mb-1"}),(0,t.jsx)(g.Skeleton,{className:"h-3 w-2/3"})]},r))})]},r))}):(0,t.jsxs)("div",{className:"w-full border rounded-t-xl bg-neutral-200 dark:bg-neutral-700 border-neutral-200 dark:border-neutral-700","data-sentry-component":"CampTableSkeleton","data-sentry-source-file":"CampTable.tsx",children:[(0,t.jsx)("div",{className:"flex gap-px border-b",children:Array.from({length:a}).map((e,r)=>(0,t.jsx)("div",{className:(0,o.cn)("w-[calc(100%/5)] bg-background py-2 text-center",{"first:rounded-tl-[calc(theme(borderRadius.xl)-var(--spacing)*0.25)]":0===r},{"last:rounded-tr-[calc(theme(borderRadius.xl)-var(--spacing)*0.25)]":4===r}),children:(0,t.jsx)(g.Skeleton,{className:"h-4 w-12 mx-auto"})},r))}),(0,t.jsx)("div",{className:"flex flex-col gap-px bg-neutral-200",children:Array.from({length:r}).map((e,r)=>(0,t.jsx)("div",{className:"flex gap-px",children:Array.from({length:a}).map((e,r)=>(0,t.jsx)("div",{className:"w-[calc(100%/5)]",children:(0,t.jsxs)("div",{className:"bg-white p-3 h-20",children:[(0,t.jsx)(g.Skeleton,{className:"h-3 w-3/4 mb-2"}),(0,t.jsx)(g.Skeleton,{className:"h-2 w-1/2 mb-1"}),(0,t.jsx)(g.Skeleton,{className:"h-2 w-2/3"})]})},r))},r))}),(0,t.jsx)("div",{className:"flex justify-center items-center w-full border-x border-b rounded-b-xl border-neutral-200 dark:border-neutral-700 py-4",children:(0,t.jsx)(g.Skeleton,{className:"h-4 w-24","data-sentry-element":"Skeleton","data-sentry-source-file":"CampTable.tsx"})})]})},b=({startDate:e,endDate:u,sports:m})=>{let[p,g]=(0,r.useState)(!1),y=(0,x.useIsTablet)(),b=u?function(e,t){(0,n.default)(1,arguments);var r,a=e||{},i=(0,s.default)(a.start),l=(0,s.default)(a.end).getTime();if(!(i.getTime()<=l))throw RangeError("Invalid interval");var o=[];i.setHours(0,0,0,0);var d=Number(null!=(r=null==t?void 0:t.step)?r:1);if(d<1||isNaN(d))throw RangeError("`options.step` must be a number greater than 1");for(;i.getTime()<=l;)o.push((0,s.default)(i)),i.setDate(i.getDate()+d),i.setHours(0,0,0,0);return o}({start:e,end:u}):[e];if(!m||0===m.length)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex flex-col w-full gap-y-6 py-4 text-center lg:hidden",children:(0,t.jsx)("h3",{className:"text-xl font-bold",children:"There are no camps for this break period."})}),(0,t.jsxs)("table",{className:"hidden lg:table w-full border-separate border-spacing-0.25 rounded-xl bg-neutral-200 dark:bg-neutral-700 border-neutral-200 dark:border-neutral-700",children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{className:"text-center text-neutral-500 uppercase text-xs font-bold",children:b.map((e,r)=>(0,t.jsx)("th",{scope:"col",...1===b.length?{colSpan:5}:{}
2,className:(0,o.cn)("bg-background py-2",{"first:rounded-tl-[calc(theme(borderRadius.xl)-var(--spacing)*0.25)]":0===r},{"last:rounded-tr-[calc(theme(borderRadius.xl)-var(--spacing)*0.25)]":r===b.length-1}),children:(0,t.jsx)("h3",{children:(0,a.format)(e,"EEE, MMM d")})},r))})}),(0,t.jsx)("tbody",{children:(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:7,className:"text-center h-[150px] bg-background font-bold rounded-b-[calc(theme(borderRadius.xl)-var(--spacing)*0.25)]",children:(0,t.jsx)("span",{className:"mr-2",children:"There are no camps for this break period."})})})})]})]});let v=[];if(b.length>1){let e=[];b.forEach(t=>{e.push(m.filter(e=>(0,l.isSameDay)(t,(0,i.parseISO)(e.startDate?.split("T")?.[0]))))}),v=y?e:e.length>0?Array.from({length:Math.max(...e.map(e=>e.length))},(t,r)=>e.map(e=>e[r]||null)):e}else v=y?[m]:Array.from({length:Math.ceil(m.length/5)},(e,t)=>{let r=m.slice(5*t,(t+1)*5);return Array.from({length:5},(e,t)=>r[t]||null)});let j=v.length>2;if(y){let e=v.map(e=>e.filter(e=>null!==e));return(0,t.jsx)("div",{className:"flex flex-col w-full gap-y-6 py-4",children:b.map((r,s)=>(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h3",{className:"text-xl font-bold",children:(0,a.format)(r,"ccc, MMMM d")},s),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[e[s].slice(0,2).map((e,r)=>(0,t.jsx)(h,{camp:e},r)),p&&e[s].slice(2).map((e,r)=>(0,t.jsx)(h,{camp:e},r))]}),v[s].length>2&&(0,t.jsxs)(f.Button,{variant:"ghost",className:"bg-white border text-black w-full cursor-pointer",onClick:()=>g(!p),children:[p?"Show less":"See more times",(0,t.jsx)(d.ChevronDownIcon,{className:(0,o.cn)({"rotate-180":p})})]})]},s))})}return(0,t.jsxs)(c.Collapsible,{open:p,onOpenChange:g,className:"group","data-sentry-element":"Collapsible","data-sentry-component":"CampTable","data-sentry-source-file":"CampTable.tsx",children:[(0,t.jsxs)("table",{className:(0,o.cn)("w-full border-separate border-spacing-0.25 rounded-t-xl bg-neutral-200 dark:bg-neutral-700 border-neutral-200 dark:border-neutral-700",{"rounded-b-xl [&_tbody_tr:last-child_td:first-child_.table-cell]:rounded-bl-[calc(theme(borderRadius.xl)-var(--spacing)*0.25)] [&_tbody_tr:last-child_td:last-child_.table-cell]:rounded-br-[calc(theme(borderRadius.xl)-var(--spacing)*0.25)]":!j}),children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{className:"text-center text-neutral-500 uppercase text-xs font-bold",children:b.map((e,r)=>(0,t.jsx)("th",{scope:"col",...1===b.length?{colSpan:5}:{},className:(0,o.cn)("w-[calc(100%/7)] bg-background py-2",{"first:rounded-tl-[calc(theme(borderRadius.xl)-var(--spacing)*0.25)]":0===r},{"last:rounded-tr-[calc(theme(borderRadius.xl)-var(--spacing)*0.25)]":r===b.length-1}),children:(0,t.jsx)("h3",{children:(0,a.format)(e,"EEE, MMM d")})},r))})}),(0,t.jsxs)("tbody",{children:[!m.length&&(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:b.length,className:"text-center",children:"No camps found"})}),v.slice(0,2).map((e,r)=>(0,t.jsx)("tr",{children:e.map((e,r)=>(0,t.jsx)("td",{className:"contents",children:(0,t.jsx)(h,{camp:e})},`${r}`))},r)),v.slice(2).map((e,r)=>(0,t.jsx)(c.CollapsibleContent,{asChild:!0,children:(0,t.jsx)("tr",{children:e.map((e,r)=>(0,t.jsx)("td",{className:"contents",children:(0,t.jsx)(h,{camp:e})},`${r}`))})},r))]})]}),j&&(0,t.jsxs)(c.CollapsibleTrigger,{className:"flex justify-center items-center w-full border-x border-b rounded-b-lg border-neutral-200 dark:border-neutral-700 py-4 text-neutral-900 dark:text-neutral-200 font-bold",children:[(0,t.jsx)("span",{className:"mr-2",children:p?"Show less":"See more times"}),(0,t.jsx)(d.ChevronDownIcon,{className:"group-data-[state=open]:rotate-180"})]})]})};var v=e.i(470575),j=e.i(947223),w=e.i(305313);function N({camp:e,handleClick:r}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-[1_1_25%]",children:[(0,t.jsx)("h2",{className:"font-bold text-xl lg:text-2xl",children:e.name}),(0,t.jsx)("p",{className:"font-medium text-xl",children:(0,o.getSchoolBreakCampDateRangeFormatted)(e.startDate,e.endDate)}),(0,t.jsx)(f.Button,{className:"mt-5 w-full lg:hidden",onClick:()=>r(e),"data-sentry-element":"Button","data-sentry-source-file":"SchoolBreakCampSchedule.tsx",children:"View Schedule"})]},e.name),(0,t.jsx)("div",{className:(0,o.cn)("flex-[0_1_75%]",{"flex-1":"Summer Break"==e.name}),children:(0,t.jsx)("div",{className:"hidden lg:block",children:(0,t.jsx)(b,{startDate:e.startDate,endD
2ate:e.endDate,sports:e.sports,"data-sentry-element":"CampTable","data-sentry-source-file":"SchoolBreakCampSchedule.tsx"})})})]})}var C=e.i(352551),S=e.i(198945);function k({callout:e}){if(!e)return null;let{name:r,startDate:a,endDate:s,supportingText:n,buttons:i,image:l}=e;return(0,t.jsxs)("div",{className:"mt-5 lg:mt-0 grid grid-cols-1 md:grid-cols-2 bg-secondary overflow-hidden rounded-lg relative","data-sentry-component":"CampCallout","data-sentry-source-file":"CampCallout.tsx",children:[(0,t.jsx)("div",{className:"w-full h-full flex flex-col items-center justify-center p-8 order-2 md:order-1",children:(0,t.jsxs)("div",{className:" max-w-lg text-center",children:[r&&(0,t.jsx)("h2",{className:"text-2xl font-bold mb-2",children:r}),a&&(0,t.jsx)("p",{className:"mb-2",children:(0,o.getSchoolBreakCampDateRangeFormatted)(a,s)}),i&&i.length>0&&(0,t.jsx)(C.SanityButtons,{buttons:i,buttonClassName:"bg-black rounded-full",className:"justify-center mb-2"}),n&&(0,t.jsx)("p",{className:"text-sm",children:n})]})}),l&&l.id&&(0,t.jsx)(S.Image,{id:l.id,alt:l.alt??"",className:"w-full h-full aspect-2/1 object-cover order-1 md:order-2",width:948,height:260})]})}var P=e.i(289847);let M=()=>(0,t.jsx)("div",{className:"p-5 lg:p-12","data-sentry-component":"SchoolBreakCampListSkeleton","data-sentry-source-file":"SchoolBreakCampList.tsx",children:(0,t.jsx)("div",{className:"container mx-auto",children:[1,2,3].map(e=>(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row py-5 lg:py-13 border-b border-neutral-200 dark:border-neutral-700",children:[(0,t.jsxs)("div",{className:"flex-[1_1_25%] mb-4 lg:mb-0",children:[(0,t.jsx)(g.Skeleton,{className:"h-8 w-48 mb-2"}),(0,t.jsx)(g.Skeleton,{className:"h-6 w-32"}),(0,t.jsx)(g.Skeleton,{className:"h-10 w-full mt-5 lg:hidden"})]}),(0,t.jsx)("div",{className:"flex-[0_1_75%]",children:(0,t.jsx)("div",{className:"hidden lg:block",children:(0,t.jsx)(y,{})})})]},e))})});e.s(["SchoolBreakCampList",0,function({camps:e}){let[a,s]=(0,r.useState)(void 0),{isNavigating:n,hasNavigationTimeout:i,setHasNavigationTimeout:l}=(0,w.useLoadingFilterResults)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.TimeoutToast,{showTimeout:i,onDismiss:()=>l(!1),"data-sentry-element":"TimeoutToast","data-sentry-source-file":"SchoolBreakCampList.tsx"}),n?(0,t.jsx)(M,{}):e?.length===0?(0,j.emptyState)("No school break camps available","Please check back later for updates."):(0,t.jsxs)("div",{className:"container mx-auto",children:[e.map(e=>(0,t.jsx)("div",{className:"flex flex-col lg:flex-row py-5 lg:py-13 border-b border-neutral-200 dark:border-neutral-700",children:e.isCallout?(0,t.jsx)(k,{callout:e}):(0,t.jsx)(N,{camp:e,handleClick:s})},e.id)),a&&(0,t.jsx)(v.default,{title:a.name,handleDrawerClose:()=>s(void 0),isOpen:!!a,showSheet:!1,children:(0,t.jsx)("div",{className:"w-full overflow-scroll px-[24px] py-2 border-b bg-white",children:(0,t.jsx)(b,{startDate:a.startDate,endDate:a.endDate,sports:a.sports})})})]})]})},"SchoolBreakCampListSkeleton",0,M],592116)},255891,e=>{"use strict";var t=e.i(434073),r=e.i(985902),a=e.i(298520),s=e.i(871679),n=e.i(520281),i=e.i(743807),l=e.i(320313),o=e.i(837800),d=e.i(420521),c=e.i(152088),u=e.i(890042);let m=({discountPercentage:e,isMemberDiscount:r,isDrawerOpen:a=!1})=>{let s=e>0;if(s||r)return(0,t.jsxs)("div",{className:`flex gap-1 flex-wrap ${a?"":"pt-1.5"}`,"data-sentry-component":"DiscountChip","data-sentry-source-file":"DiscountChip.tsx",children:[s&&(0,t.jsxs)(p,{children:[e,"% off"]}),r&&(0,t.jsx)(p,{children:"Members discount available"})]})},p=({children:e})=>(0,t.jsx)("span",{className:"bg-blue-100 text-blue-800 rounded-sm px-1.5 py-0.5 text-xs font-medium","data-sentry-component":"Chip","data-sentry-source-file":"DiscountChip.tsx",children:e}),h=({listPrice:e,discountedPrice:r,stacked:a=!1})=>{let s=null!=r,n=(0,c.cn)({flex:s,"flex-col":a&&s,"items-center":!a&&s,"items-end":a&&s}),i=a?"order-2":"order-1",l=a?"order-1":"order-2";return(0,t.jsx)("div",{className:n,"data-sentry-component":"DiscountPrice","data-sentry-source-file":"DiscountPrice.tsx",children:s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:(0,
2c.cn)("text-sm text-gray-500 line-through",i,{"mr-2":!a}),children:["$",(0,c.formatPrice)(e)]}),(0,t.jsx)(x,{price:r,className:l})]}):(0,t.jsx)(x,{price:e})})},x=({price:e,className:r})=>(0,t.jsxs)("span",{className:(0,c.cn)("font-bold text-lg text-black",r),"data-sentry-component":"PriceText","data-sentry-source-file":"DiscountPrice.tsx",children:["$",(0,c.formatPrice)(e)]}),f=()=>(0,t.jsxs)("div",{className:"relative bg-white overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700 flex flex-col md:flex-row","data-sentry-component":"SummerCampListCardSkeleton","data-sentry-source-file":"SummerCampListCard.tsx",children:[(0,t.jsx)("div",{className:"relative w-full h-[203px] md:w-[267px] md:h-auto md:self-stretch md:flex-shrink-0",children:(0,t.jsx)(u.Skeleton,{className:"w-full h-full","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"})}),(0,t.jsxs)("div",{className:"flex-1 p-4 flex flex-col gap-4 w-full",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,t.jsx)(u.Skeleton,{className:"h-6 w-3/4","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"}),(0,t.jsxs)("div",{className:"relative w-full md:max-w-[75%]",children:[(0,t.jsx)(u.Skeleton,{className:"h-4 w-full mb-1","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"}),(0,t.jsx)(u.Skeleton,{className:"h-4 w-2/3","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-y-1 lg:gap-x-4 lg:gap-y-4 lg:flex-row",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.Skeleton,{className:"h-4 w-4","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"}),(0,t.jsx)(u.Skeleton,{className:"h-4 w-24","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.Skeleton,{className:"h-3 w-3","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"}),(0,t.jsx)(u.Skeleton,{className:"h-4 w-32","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"})]})]})]}),(0,t.jsxs)("div",{className:"shrink absolute right-2 top-[183px] md:flex md:flex-row md:relative md:top-0 md:right-0 md:gap-x-4 md:items-center md:pr-4 md:flex-wrap",children:[(0,t.jsx)("div",{className:"hidden md:flex flex-col items-end",children:(0,t.jsx)(u.Skeleton,{className:"h-4 w-20 mb-2","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"})}),(0,t.jsx)(u.Skeleton,{className:"h-10 w-24 rounded-full","data-sentry-element":"Skeleton","data-sentry-source-file":"SummerCampListCard.tsx"})]})]}),g=({camp:e,handleClick:u,discount:p,roundingMultiple:x})=>{let[f,g]=(0,o.useState)(!1),[y,b]=(0,o.useState)(null),v=e.classesList[0],j=v?.totalPrice,w=v?.memberDiscountPercentage||0,{listPrice:N,discountedPrice:C}=p&&j?(0,c.calculatePriceWithDiscount)(j,p.discount,x):{listPrice:j,discountedPrice:void 0},S=p&&p.discount?(0,c.getDiscountPercentageFromConfig)(p.discount):0,k=v?.ageRangeMin!=null&&v?.ageRangeMax!=null?`${(0,c.formatAgeRange)(v.ageRangeMin,v.ageRangeMax,v.ageRangeMinUnits,v.ageRangeMaxUnits)} old`:"",P=(0,c.getTimeRangeSentence)(v?.startDate,v?.endDate,v?.classTime);return(0,o.useEffect)(()=>{if(y){let e=parseInt(getComputedStyle(y).lineHeight);g(y.scrollHeight>2*e)}},[v?.description,y]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:" relative bg-white overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700 flex flex-col md:flex-row",children:[(0,t.jsx)("div",{className:"relative w-full h-[203px] md:w-[267px] md:h-auto md:self-stretch md:flex-shrink-0",children:(0,t.jsx)(n.default,{src:e.image.src||"",alt:e.image.alt||"",fill:!0,priority:!1,placeholder:"blur",blurDataURL:l.DEFAULT_BLUR_DATA_URL,className:"object-cover w-[267px] h-[178px]","data-sentry-element":"Image","data-sentry-source-file":"SummerCampListCard.tsx"})}),(0,t.jsxs)("div",{className:"p-4 flex flex-col lg:flex-row grow",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col gap-4 w-full pb-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,t.jsx)("h3",{className:"text-xl font-bold text-black",children:v?.name}),(0,t.jsxs)("div",{className:"flex items-end w-full md:max-w-[75%]",children:[(0,t.jsx)("div",{className:"text-sm w-fit text-neutral-500 max-h-[40px] line-clamp-2 break-words",children:(0,t.jsx)(d.default,{ref:b,htmlString:v?.description||e.description||"",hideImages:!0,"data-sentry-element":"HtmlContent","data-sentry-source-file":"SummerCampListCard.tsx"})}),(v?.description||e.description)&&f&&(0,t.jsx)("div",{className:"w-fit h-fit leading-none",children:(0,t.jsx)(i.InfoToolTip,{className:"inline",text:v?.description||e.description,hideImages:!0})})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-y-1 lg:gap-x-4 lg:gap-y-4 lg:flex-row",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Cake,{className:"size-4 text-neutral-500","data-sentry-element":"Cake","data-sentry-source-file":"SummerCampListCard.tsx"}),(0,t.jsx)("span",{className:"text-sm text-neutral-500",children:k})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.Clock,{className:"size-3 text-neutral-500","data-sentry-element":"Clock","data-sentry-source-file":"SummerCampListCard.tsx"}),(0,t.jsx)("span",{className:"text-sm text-neutral-500",children:P})]})]})]}),(0,t.jsxs)("div",{className:"shrink border-t flex flex-col lg:border-none md:flex-row gap-4 pt-4 md:items-center md:pr-4 md:flex-wrap",children:[(0,t.jsxs)("div",{className:"flex flex-col md:items-end md:pt-0",children:[N&&(0,t.jsx)(h,{listPrice:N,discountedPrice:x&&C?(0,c.roundDiscountedPrice)(C,x):C}),(0,t.jsx)(m,{discountPercentage:S,isMemberDiscount:w>0,isDrawerOpen:!0,"data-sentry-element":"DiscountChip","data-sentry-source-file":"SummerCampListCard.tsx"})]}),(0,t.jsx)(r.Button,{onClick:()=>u(e),className:"bg-[#0061E9] hover:bg-blue-700 text-white rounded-full px-4 py-2","data-sentry-element":"Button","data-sentry-source-file":"SummerCampListCard.tsx",children:"View details"})]})]})]})})};var y=e.i(947223),b=e.i(470575),v=e.i(840854),j=e.i(197470),w=e.i(589989);let N=(0,e.i(951034).default)("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);var C=e.i(502119),S=e.i(57127),k=e.i(851271),P=e.i(707836),M=e.i(299204),E=e.i(305313),D=e.i(289847),I=e.i(806803),z=e.i(507850),L=e.i(544763),T=e.i(474986),R=e.i(205706);function A({sessionsData:e}){let r=function(e){if(!e||0===e.length)return[];let t=new Map,r=[],a=[];return e.sort((e,t)=>
2new Date(e.eventStart).getTime()-new Date(t.eventStart).getTime()),e.forEach(e=>{let s=new Date(e.eventStart||""),n=e.eventEnd?new Date(e.eventEnd):s,i=(function(e,t){(0,T.default)(1,arguments);var r,a,s,n,i,l,o,d,c=(0,R.getDefaultOptions)(),u=(0,L.default)(null!=(r=null!=(a=null!=(s=null!=(n=null==t?void 0:t.weekStartsOn)?n:null==t||null==(i=t.locale)||null==(l=i.options)?void 0:l.weekStartsOn)?s:c.weekStartsOn)?a:null==(o=c.locale)||null==(d=o.options)?void 0:d.weekStartsOn)?r:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,z.default)(e),p=m.getDay();return m.setDate(m.getDate()-(7*(p<u)+p-u)),m.setHours(0,0,0,0),m})(s,{weekStartsOn:1}).getTime();if(!t.has(i)){t.set(i,[]);let e=r.findIndex(e=>e>i);-1===e?r.push(i):r.splice(e,0,i),a.push({weekNum:r.length,weekStart:s,weekEnd:n})}t.get(i).push(e);let l=r.indexOf(i);if(-1!==l){let e=a[l];s<e.weekStart&&(e.weekStart=s),n>e.weekEnd&&(e.weekEnd=n)}}),a}(e);return e&&0!==e.length?(0,t.jsxs)("div",{className:"w-full flex flex-col gap-4 bg-white px-8 py-4","data-sentry-component":"SummerCampScheduleTable","data-sentry-source-file":"SummerCampScheduleTable.tsx",children:[(0,t.jsx)("h3",{className:"text-xl font-semibold",children:"Schedule"}),(0,t.jsxs)("table",{className:"w-full border-separate border-spacing-[1px] bg-zinc-200 rounded-lg text-center",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"bg-zinc-100 rounded-tl-lg border-zinc-200 h-8 px-4 font-medium",children:"Week"}),(0,t.jsx)("th",{className:"bg-zinc-100 rounded-tr-lg border-zinc-200 h-8 px-4 font-medium",children:"Dates"})]})}),(0,t.jsx)("tbody",{children:r.map((e,a)=>{let s=a===r.length-1,n=(0,I.endOfDay)(e.weekEnd).getTime()<Date.now();return(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:(0,c.cn)("h-9 px-4 bg-white text-sm",{"rounded-bl-lg":s,"line-through text-zinc-400":n}),children:`Week ${e.weekNum}`}),(0,t.jsxs)("td",{className:(0,c.cn)("h-9 px-4 bg-white text-sm",{"rounded-br-lg":s,"line-through text-zinc-400":n}),children:[(0,M.format)(e.weekStart,"MMM d")," â"," ",(0,M.format)(e.weekEnd,"MMM d")]})]},e.weekNum)})})]})]}):(0,t.jsxs)("div",{className:"w-full flex flex-col gap-4 bg-white p-4",children:[(0,t.jsx)("h3",{className:"text-xl font-semibold",children:"Schedule"}),(0,t.jsx)("p",{className:"text-zinc-500 text-center py-4",children:"No schedule information available"})]})}var _=e.i(689729),B=e.i(345656);let F=({icon:e,children:r,noBorder:a=!1})=>(0,t.jsxs)("div",{className:(0,c.cn)("flex items-center gap-3 h-11",{"border-b":!a,"h-fit py-3":a}),"data-sentry-component":"DetailRow","data-sentry-source-file":"SummerCampList.tsx",children:[(0,t.jsx)("div",{className:"basis-6 shrink-0",children:e}),(0,t.jsx)("p",{children:r})]}),O=({campGroup:e})=>{let r=e.classesList[0],a=r.startDate&&r.endDate?(0,c.getTimeRangeSentence)(r.startDate,r.endDate,r.classTime):(0,M.format)(new Date(r.startDate),"h:mm a");return(0,t.jsxs)("div",{className:"bg-white p-6","data-sentry-component":"SummerCampDetails","data-sentry-source-file":"SummerCampList.tsx",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:r.name}),(0,t.jsx)(v.default,{text:r.description||e.description||"",isHTML:!0,"data-sentry-element":"CollapsibleText","data-sentry-source-file":"SummerCampList.tsx"}),r.startDate&&(0,t.jsx)(F,{icon:(0,t.jsx)(N,{color:"#71717A",className:"size-4"}),children:(0,c.getCampDatesSentence)(r.startDate)}),(0,t.jsx)(F,{icon:(0,t.jsx)(j.Clock9,{color:"#71717A",className:"size-4"}),"data-sentry-element":"DetailRow","data-sentry-source-file":"SummerCampList.tsx",children:a}),(0,t.jsx)(F,{icon:(0,t.jsx)(P.GenderIcon,{color:"#71717A"}),"data-sentry-element":"DetailRow","data-sentry-source-file":"SummerCampList.tsx",children:k.genderMap[r.gender||"Coed"]}),(0,t.jsx)(F,{icon:(0,t.jsx)(s.Cake,{color:"#71717A",className:"size-4"}),"data-sentry-element":"DetailRow","data-sentry-source-file":"SummerCampList.tsx",children:(0,S.getAgeRangeSentence)(r)}),(0,t.jsx)(F,{icon:(0,t.jsx)(w.Info,{color:"#71717A",className:"size-4"}),noBorder:!0,"data-sentry-element":"DetailRow","data-sentry-source-file":"SummerCampList.tsx",children:"Signed waiver by caregiver or parent required"})]})},$=({listPrice:e,discountedPrice:r,discountPercentage:a,hasBorder:s=!1})=>
2(0,t.jsxs)("div",{className:(0,c.cn)("text-right flex flex-col items-end gap-2",{"border-b pb-4":s}),"data-sentry-component":"PriceCell","data-sentry-source-file":"SummerCampList.tsx",children:[(0,t.jsx)(h,{listPrice:e,discountedPrice:r,stacked:!0,"data-sentry-element":"DiscountPrice","data-sentry-source-file":"SummerCampList.tsx"}),(0,t.jsx)(m,{discountPercentage:a,"data-sentry-element":"DiscountChip","data-sentry-source-file":"SummerCampList.tsx"})]}),H=({totalPrice:e,membershipDiscountPercentage:r,bulkPrice:a,discount:s,roundingMultiple:n})=>{let i=!!a&&a>0&&a!==e,l=r>0,o=!!s,d=e=>e*(1-r/100),{listPrice:u,discountedPrice:m}=o?(0,c.calculatePriceWithDiscount)(e,s.discount,n):{listPrice:e,discountedPrice:void 0},{listPrice:p,discountedPrice:h}=o&&a?(0,c.calculatePriceWithDiscount)(a,s.discount,n):{listPrice:a,discountedPrice:void 0},x=d(e),f=a?d(a):void 0,{listPrice:g,discountedPrice:y}=m?{listPrice:d(u),discountedPrice:d(m)}:{listPrice:e,discountedPrice:x},{listPrice:b,discountedPrice:v}=h?{listPrice:d(p),discountedPrice:d(h)}:{listPrice:a,discountedPrice:f},j=o?(0,c.getDiscountPercentageFromConfig)(s.discount):0;return(0,t.jsxs)("div",{className:"bg-white p-8 space-y-4 items-center","data-sentry-component":"PricingSummary","data-sentry-source-file":"SummerCampList.tsx",children:[l&&(0,t.jsx)("h2",{className:"text-xl font-bold",children:"Price Per Week"}),(0,t.jsxs)("div",{className:(0,c.cn)("grid grid-cols-2 gap-y-4",{"grid-cols-3":i}),children:[i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-sm text-right font-medium col-span-2",children:"1-3 Weeks"}),(0,t.jsx)("div",{className:"text-sm text-right font-medium",children:"4+ Weeks"})]}),l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"font-medium border-b pt-[3px]",children:"Members"}),(0,t.jsx)($,{listPrice:g||x,discountedPrice:y,discountPercentage:j,hasBorder:!0}),i&&b&&(0,t.jsx)($,{listPrice:b,discountedPrice:v,discountPercentage:j,hasBorder:!0})]}),(0,t.jsx)("div",{className:(0,c.cn)("text-base font-medium pt-[3px]",{"text-xl":!l&&!i}),children:l?"Non-member":"Price per week"}),(0,t.jsx)($,{listPrice:u||e,discountedPrice:m,discountPercentage:j,"data-sentry-element":"PriceCell","data-sentry-source-file":"SummerCampList.tsx"}),i&&(0,t.jsx)($,{listPrice:p||a,discountedPrice:n&&h?(0,c.roundDiscountedPrice)(h,n):h,discountPercentage:j})]})]})};e.s(["SummerCampList",0,function({camps:e,searchParams:r,discount:a,roundingMultiple:s,pageSlug:n}){let{isNavigating:i,hasNavigationTimeout:l,setHasNavigationTimeout:d}=(0,E.useLoadingFilterResults)(),[u,m]=(0,o.useState)(null),p=!!u,h=u?.classesList?.[0],x=(0,o.useMemo)(()=>u&&0!==u.classesList.length?u.classesList.flatMap(e=>(e.filteredSessionEvents||[]).map(t=>({id:"",name:t.name||"",classTime:e.classTime||"",startDate:e.startDate||"",endDate:e.endDate||"",eventStart:t.eventStart||"",eventEnd:t.eventEnd||"",price:e.price||0,sportName:e.sport||""}))):[],[u]),v=(0,C.useRouter)(),j=(0,C.usePathname)(),w=(0,C.useSearchParams)(),N=(0,c.getLocationFromPath)(j),S=u?.registrationUrl,k=!!S&&S.includes("bond"),P=S?k?`/${N}/summer-camps/${u.id}/${(0,c.convertToSlug)(u.name)}`:S:null;(0,o.useEffect)(()=>{if(!r)return;let t=r.camp;if(!t||u?.id===t)return;let a=e.find(e=>e.id===t);a&&m(a)},[r,e]),(0,o.useEffect)(()=>{if(!u)return;let e=new URLSearchParams(w.toString()),t=u.id;e.get("camp")!==t&&(e.set("camp",t),v.replace(`?${e.toString()}`,{scroll:!1}))},[u,v,w]);let M=e=>{m(e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.TimeoutToast,{showTimeout:l,onDismiss:()=>d(!1),"data-sentry-element":"TimeoutToast","data-sentry-source-file":"SummerCampList.tsx"}),i?(0,t.jsx)("div",{className:"flex flex-col py-4 gap-y-4",children:Array(_.DEFAULT_TAKE).fill(null).map((e,r)=>(0,t.jsx)(f,{},`skeleton-${r}`))}):(0,t.jsxs)("div",{className:"flex flex-col p-4 gap-y-4",children:[e.map(e=>(0,t.jsx)(g,{camp:e,handleClick:M,discount:a,roundingMultiple:s},e.id)),0===e.length&&(0,y.emptyState)("No Summer Camps Found","We couldn`t find any summer camps matching your current selection. <br /> Try adjusting your filters or check back later!","min-h-0"),(0,t.jsx)(b.default,{title:"Register",showSheet:!0,isOpen:p,handleDrawerClose:()=>{m(null);let e=new URLSearchParams(w.toString());e.delete("camp"),v.replace(`?${e.toString()}`,{scroll:!1})},children:u&&h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 overflow-x-hidden overflow-y-auto shrink",children:[(0,t.jsx)(O,{campGroup:u}),(0,t.jsx)(H,{totalPrice:h?.totalPrice||0,membershipDiscountPercentage:h?.memberDiscountPercentage||0,bulkPrice:h?.bulkPricePerSession,discount:a,roun
2dingMultiple:s}),(0,t.jsx)(A,{sessionsData:x})]}),(0,t.jsx)("div",{className:"mt-auto flex flex-col gap-2 p-4 items-center bg-white border-t shrink-0",children:P&&(0,t.jsx)(B.UTMLink,{href:P,...!k?{target:"_blank",rel:"noopener noreferrer"}:{},className:"bg-[#0061e9] text-white text-center w-fit h-fit rounded-full p-4 text-sm font-medium","data-class-name":h?.name||"","data-sport":h?.sport||"","data-location":N,"data-time":h?.classTime||"","data-age":`${h?.ageRangeMin||""}-${h?.ageRangeMax||""}`,"data-season":h.season?.name||"","data-page-type":n,children:"Register"})})]})})]})]})}],255891)},167048,e=>{"use strict";var t=e.i(434073),r=e.i(499581),a=e.i(152088),s=e.i(305313),n=e.i(497524),i=e.i(478827);e.s(["DropInGoToTodayLink",0,function({windowDates:e,todayDate:l,navBaseUrl:o,searchParams:d}){let{navigate:c,pendingUrl:u}=(0,s.useLoadingFilterResults)(),m=null!==u,{activeId:p}=(0,i.useDropInStickyScroll)(e),h=p===`day-${l}`,x=e.includes(l),f=(0,n.buildHref)(o,d,l);return(0,t.jsx)(r.default,{href:f,"aria-hidden":h,onClick:e=>{(e.preventDefault(),x)?(0,i.scrollToDay)(l):m||c(f)},className:(0,a.cn)("flex h-9 shrink-0 items-center rounded-full border border-zinc-300 bg-white px-4 text-sm font-medium text-zinc-950 transition-opacity hover:bg-zinc-50",h?"pointer-events-none opacity-0":"opacity-100"),"data-sentry-element":"Link","data-sentry-component":"DropInGoToTodayLink","data-sentry-source-file":"DropInGoToTodayLink.tsx",children:"Go to Today"})}])},410730,e=>{"use strict";var t=e.i(434073),r=e.i(499581),a=e.i(837800),s=e.i(264167),n=e.i(163387),i=e.i(152088),l=e.i(557166),o=e.i(305313),d=e.i(497524);function c({windowDates:e,activeId:r,onSelectDay:a}){return(0,t.jsx)("div",{className:"flex gap-2 lg:hidden","data-sentry-component":"DropInDayPillCarousel","data-sentry-source-file":"DropInDayPillCarousel.tsx",children:e.map(e=>{let s=r===`day-${e}`;return(0,t.jsxs)("button",{id:`pill-${e}`,type:"button","aria-current":s?"true":void 0,onClick:()=>a(e),className:(0,i.cn)("flex min-w-0 flex-1 flex-col items-center gap-0.5 rounded-xl border p-2",s?"border-zinc-800 bg-zinc-950":"border-zinc-200 bg-white"),children:[(0,t.jsx)("span",{className:(0,i.cn)("text-xs font-medium",s?"text-zinc-300":"text-zinc-700"),children:(0,i.parseMMDDYY)(e).toLocaleDateString("en-US",{weekday:"short"})}),(0,t.jsx)("span",{className:(0,i.cn)("text-xl font-medium tracking-tight",s?"text-zinc-50":"text-zinc-950"),children:(0,i.parseMMDDYY)(e).getDate()})]},e)})})}var u=e.i(478827);e.s(["DropInStickyHeader",0,function({windowDates:e}){let r=e[0],{isNavigating:s}=(0,o.useLoadingFilterResults)(),{activeId:n}=(0,u.useDropInStickyScroll)(e),[i,l]=(0,a.useState)(null),d=i?`day-${i}`:n,m=(0,a.useCallback)(e=>{l(e),(0,u.scrollToDay)(e)},[]);(0,a.useEffect)(()=>{if(!i)return;let e=()=>l(null),t=["wheel","touchmove","keydown"];return t.forEach(t=>window.addEventListener(t,e,{passive:!0,once:!0})),()=>t.forEach(t=>window.removeEventListener(t,e))},[i]),(0,a.useEffect)(()=>l(null),[r]);let p=(0,a.useRef)(r);return(0,a.useEffect)(()=>{s||p.current!==r&&(p.current=r,(0,u.scrollToDay)(r))},[r,s]),(0,t.jsx)("div",{className:"flex flex-col pb-4 lg:hidden","data-sentry-component":"DropInStickyHeader","data-sentry-source-file":"DropInStickyHeader.tsx",children:(0,t.jsx)(c,{windowDates:e,activeId:d,onSelectDay:m,"data-sentry-element":"DropInDayPillCarousel","data-sentry-source-file":"DropInStickyHeader.tsx"})})},"DropInWeekRangeNav",0,function({windowDates:e,navBaseUrl:a,searchParams:c,todayDate:u,disableNext:m}){let p=e[0],h=(0,l.isRangeAtToday)(p,u),{navigate:x,pendingUrl:f}=(0,o.useLoadingFilterResults)(),g=null!==f,y=(0,d.buildHref)(a,c,(0,l.clampAnchorToToday)((0,l.shiftDate)(p,-e.length),u)),b=(0,d.buildHref)(a,c,(0,l.shiftDate)(p,e.length)),v="grid size-10 shrink-0 place-items-center rounded-full border border-zinc-200 bg-white text-zinc-950 hover:bg-zinc-50";return(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4 pb-4 lg:hidden","data-sentry-component":"DropInWeekRangeNav","data-sentry-source-file":"DropInStickyHeader.tsx",children:[(0,t.jsx)(r.default,{href:y,"aria-label":"Previous week","aria-disabled":g||h||void 0,onClick:e=>{e.preventDefault(),g||h||x(y)},className:(0,i.cn)(v,(g||h)&&"pointer-events-none opacity-50"),"data-sentry-element":"Link","data-sentry-source-file":"DropInStickyHeader.tsx",children:(0,t.jsx)(s.ChevronLeft,{className:"size-5","data-sentry-element":"ChevronLeft","data-sentry-source-file":"DropInStickyHeader.tsx"})}),(0,t.jsx)(d.DropInWeekRangeLabel,{windowDates:e,className:"text-base font-medium text-zinc-950","data-sentry-element":"DropInWeekRangeLabel","data-sentry-source-file":"DropInStickyHeader.tsx"}),(0,t.jsx)(r.default,{href:b,"aria-label":"Next week","aria-disabled":g||m||void 0,onClick:e=>{e.preventDefault(),g||m||x(b)},className:(0,i.cn)(v,(g||m)&&"pointer-events-none opacity-50"),"data-sentry-element":"Link","data-sentry-source-file":"DropInStickyHeader.tsx",children:(0,t.jsx)(n.ChevronRight,{className:"size-5","data-sentry-element":"ChevronRight","data-sentry-source-file":"DropInStickyHeader.tsx"})})]})}],410730)},497524,557166,e=>{"use strict";var t=e.i(434073),r=e.i(499581),a=e.i(264167),s=e.i(163387),n=e.i(152088);let i=e=>e>=1024&&e<1280?5:7,l=(e,t)=>
2{let r=(0,n.parseMMDDYY)(e),a=(0,n.parseMMDDYY)(t);return r.getTime()<a.getTime()?t:e},o=(e,t)=>{let r=(0,n.parseMMDDYY)(e),a=(0,n.parseMMDDYY)(t);return r.getTime()<=a.getTime()},d=(e,t)=>{let r=(0,n.parseMMDDYY)(e);r.setDate(r.getDate()+t);let a=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0"),i=r.getFullYear();return`${a}-${s}-${i}`};e.s(["VISIBLE_DAY_COUNT_XL",0,7,"clampAnchorToToday",0,l,"getVisibleDayCount",0,i,"isRangeAtToday",0,o,"shiftDate",0,d],557166);var c=e.i(305313),u=e.i(837800);function m(){let[e,t]=(0,u.useState)(7);return(0,u.useEffect)(()=>{let e=()=>t(i(window.innerWidth));return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let p=(e,t,r)=>{let a=new URLSearchParams(t);return a.set("date",r),`${e}?${a.toString()}`},h=e=>(0,n.parseMMDDYY)(e).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"});e.s(["DropInWeekNavControls",0,function({baseURL:e,searchParams:i,windowDates:u,todayDate:h,disableNext:x}){let f=u[0],g=m(),y=o(f,h),{navigate:b,pendingUrl:v}=(0,c.useLoadingFilterResults)(),j=p(e,i,l(d(f,-g),h)),w=p(e,i,d(f,g)),N=p(e,i,h),C=null!==v,S=(e,t)=>r=>{r.preventDefault(),t||C||b(e)};return(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2","data-sentry-component":"DropInWeekNavControls","data-sentry-source-file":"DropInWeekNav.tsx",children:[(0,t.jsx)(r.default,{href:j,"aria-label":"Previous week","aria-disabled":C||y||void 0,onClick:S(j,y),className:(0,n.cn)("grid size-9 place-items-center rounded-full border border-zinc-300 bg-white text-zinc-950 hover:bg-zinc-50",(C||y)&&"pointer-events-none opacity-50"),"data-sentry-element":"Link","data-sentry-source-file":"DropInWeekNav.tsx",children:(0,t.jsx)(a.ChevronLeft,{className:"size-3.5","data-sentry-element":"ChevronLeft","data-sentry-source-file":"DropInWeekNav.tsx"})}),(0,t.jsx)(r.default,{href:N,"aria-disabled":C||void 0,onClick:S(N),className:(0,n.cn)("flex h-9 shrink-0 items-center rounded-full border border-zinc-300 bg-white px-4 text-sm font-medium text-zinc-950 transition-opacity hover:bg-zinc-50",C&&"pointer-events-none opacity-50"),"data-sentry-element":"Link","data-sentry-source-file":"DropInWeekNav.tsx",children:"Today"}),(0,t.jsx)(r.default,{href:w,"aria-label":"Next week","aria-disabled":C||x||void 0,onClick:S(w,x),className:(0,n.cn)("grid size-9 place-items-center rounded-full border border-zinc-300 bg-white text-zinc-950 hover:bg-zinc-50",(C||x)&&"pointer-events-none opacity-50"),"data-sentry-element":"Link","data-sentry-source-file":"DropInWeekNav.tsx",children:(0,t.jsx)(s.ChevronRight,{className:"size-3.5","data-sentry-element":"ChevronRight","data-sentry-source-file":"DropInWeekNav.tsx"})})]})},"DropInWeekRangeLabel",0,function({windowDates:e,className:r}){let a=m(),s=e.slice(0,a),n=s[0],i=s[s.length-1];return(0,t.jsxs)("p",{className:r,"data-sentry-component":"DropInWeekRangeLabel","data-sentry-source-file":"DropInWeekNav.tsx",children:[h(n)," â ",h(i)]})},"buildHref",0,p],497524)},977957,e=>{"use strict";var t=e.i(434073),r=e.i(305313),a=e.i(289847),s=e.i(152088);function n({date:e,isToday:r}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-7 lg:px-4 lg:py-3","data-sentry-component":"DropInDayHeader","data-sentry-source-file":"DropInDayHeader.tsx",children:[(0,t.jsx)("span",{className:(0,s.cn)("text-lg font-medium tracking-tight whitespace-nowrap",r&&"lg:text-blue-600"),children:(0,s.parseMMDDYY)(e).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})}),r&&(0,t.jsx)("span",{className:"inline-flex h-5 shrink-0 items-center rounded-full bg-blue-600 px-2 text-xs leading-none font-semibold tracking-wide text-white",children:"Today"})]})}function i({isToday:e}){return(0,t.jsx)("div",{className:(0,s.cn)("flex flex-col items-center px-4 pt-8 pb-8 text-center text-base leading-tight font-medium text-balance lg:pt-[17px] lg:pb-6 lg:text-sm lg:leading-tight","rounded-xl bg-zinc-100 lg:rounded-none lg:bg-transparent",e?"text-brand-blue-500":"text-zinc-500"),"data-sentry-component":"DropInEmptyDayState","data-sentry-source-file":"DropInDayHeader.tsx",children:"No drop-ins on this day"})}var l=e.i(345656),o=e.i(57127);function d({session:e}){let r=e.eventEnd?new Date(e.eventEnd):null,a=r&&!isNaN(r.getTime())?`${(0,s.formatTimeInEastern)(new Date(e.eventStart))} - ${(0,s.formatTimeInEastern)(r)}`:(0,s.formatTimeInEastern)(new Date(e.eventStart)),n=e.hasAgeRange&&null!=e.ageRangeMin&&null!=e.ageRangeMax?`Ages ${(0,s.formatAgeRange)(e.ageRangeMin,e.ageRangeMax,e.ageRangeMinUnits,e.ageRangeMaxUnits)}`:null,i="flex w-full flex-col gap-0.5 rounded-xl border border-zinc-300 bg-white p-4 transition-transform duration-150 ease-in-out hover:bg-zinc-50 active:scale-[0.98]",c=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mb-0.5 text-base leading-tight font-medium text-zinc-950 lg:text-sm lg:leading-tight",children:e.title}),(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 text-sm leading-tight text-zinc-700",children:[(0,t.jsx)("span",{children:a}),n&&(0,t.jsx)("span",{children:n})]}),(0,t.jsx)("span",{className:"mt-0.5 text-sm leading-tight text-zinc-950",children:(0,o.formatPrice)(e.price)})]});return e.registrationUrl?(0,t.jsx)(l.UTMLink,{href:e.registrationUrl,target:"_blank",rel:"noopener noreferrer","data-class-name":e.title,"data-time":
2a,className:i,"data-sentry-element":"UTMLink","data-sentry-component":"DropInSessionCard","data-sentry-source-file":"DropInSessionCard.tsx",children:c}):(0,t.jsx)("div",{className:i,children:c})}function c({windowDates:e,todayDate:r,sessionsByDay:a}){return(0,t.jsx)("div",{className:"hidden px-4 lg:grid lg:min-h-[50svh] lg:grid-cols-5 xl:grid-cols-7","data-sentry-component":"DropInWeekGridDesktop","data-sentry-source-file":"DropInWeekGridDesktop.tsx",children:e.map((l,o)=>{let c=l===r,u=o>0&&e[o-1]===r,m=a[l]||[];return(0,t.jsxs)("div",{className:(0,s.cn)("flex flex-col self-stretch pb-4",o>=5&&"hidden xl:flex",o>0&&!u&&"border-l border-zinc-200",c&&"rounded-b-xl bg-blue-50"),children:[(0,t.jsx)("div",{className:(0,s.cn)("border-b",c?"border-blue-200":"border-zinc-200"),children:(0,t.jsx)(n,{date:l,isToday:c})}),(0,t.jsx)("div",{className:"flex flex-col gap-3 p-4",children:0===m.length?(0,t.jsx)(i,{isToday:c}):m.map(e=>(0,t.jsx)(d,{session:e},e.id))})]},l)})})}function u({windowDates:e,todayDate:r,sessionsByDay:a}){return(0,t.jsx)("div",{className:"flex flex-col px-4 lg:hidden","data-sentry-component":"DropInWeekListMobile","data-sentry-source-file":"DropInWeekListMobile.tsx",children:e.map(e=>{let s=e===r,l=a[e]||[];return(0,t.jsxs)("div",{id:`day-${e}`,className:"flex flex-col border-b border-zinc-200 pb-2 last:border-b-0",children:[(0,t.jsx)(n,{date:e,isToday:s}),(0,t.jsx)("div",{className:"flex flex-col gap-2 py-4",children:0===l.length?(0,t.jsx)(i,{}):l.map(e=>(0,t.jsx)(d,{session:e},e.id))})]},e)})})}var m=e.i(890042);function p(){return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-0.5 rounded-xl border border-zinc-300 bg-white p-4","data-sentry-component":"DropInSessionCardSkeleton","data-sentry-source-file":"DropInWeekSkeleton.tsx",children:[(0,t.jsx)(m.Skeleton,{className:"mb-0.5 h-4 w-3/4","data-sentry-element":"Skeleton","data-sentry-source-file":"DropInWeekSkeleton.tsx"}),(0,t.jsx)(m.Skeleton,{className:"h-3.5 w-1/2","data-sentry-element":"Skeleton","data-sentry-source-file":"DropInWeekSkeleton.tsx"}),(0,t.jsx)(m.Skeleton,{className:"mt-0.5 h-3.5 w-1/3","data-sentry-element":"Skeleton","data-sentry-source-file":"DropInWeekSkeleton.tsx"})]})}function h(){let e=Array.from({length:7}),r=Array.from({length:7});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"hidden px-4 lg:grid lg:min-h-[50svh] lg:grid-cols-5 xl:grid-cols-7",children:e.map((e,r)=>(0,t.jsxs)("div",{className:(0,s.cn)("flex flex-col self-stretch pb-4",r>=5&&"hidden xl:flex",r>0&&"border-l border-zinc-200"),children:[(0,t.jsx)("div",{className:"border-b border-zinc-200",children:(0,t.jsx)("div",{className:"flex items-center justify-between gap-3 pt-7 lg:px-4 lg:py-3",children:(0,t.jsx)(m.Skeleton,{className:"h-6 w-20"})})}),(0,t.jsx)("div",{className:"flex flex-col gap-3 p-4",children:Array.from({length:7}).map((e,r)=>(0,t.jsx)(p,{},r))})]},r))}),(0,t.jsx)("div",{className:"flex flex-col px-4 lg:hidden",children:r.map((e,r)=>(0,t.jsxs)("div",{className:"flex flex-col border-b border-zinc-200 pb-2 last:border-b-0",children:[(0,t.jsx)("div",{className:"flex items-center justify-between gap-3 pt-7",children:(0,t.jsx)(m.Skeleton,{className:"h-6 w-32"})}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 py-4",children:[(0,t.jsx)(p,{}),(0,t.jsx)(p,{})]})]},r))})]})}e.s(["ProgramItemListClientDropIns",0,function({sessionsByDay:e,windowDates:s,todayDate:n}){let{isNavigating:i,hasNavigationTimeout:l,setHasNavigationTimeout:o}=(0,r.useLoadingFilterResults)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.TimeoutToast,{showTimeout:l,onDismiss:()=>o(!1),"data-sentry-element":"TimeoutToast","data-sentry-source-file":"ProgramItemListClientDropIns.tsx"}),i?(0,t.jsx)(h,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{windowDates:s,todayDate:n,sessionsByDay:e}),(0,t.jsx)(u,{windowDates:s,todayDate:n,sessionsByDay:e})]})]})}],977957)},478827,e=>{"use strict";var t=e.i(837800),r=e.i(305313);let a="dropins-sticky-container",s=()=>{let e=document.getElementById(a);return e?(parseFloat(getComputedStyle(e).top)||0)+e.getBoundingClientRect().height:0};e.s(["scrollToDay",0,e=>{let t=document.getElementById(`day-${e}`);if(!t)return;let r=s(),a=t.getBoundingClientRect().top+window.scrollY-r;window.scrollTo({top:a,behavior:"smooth"})},"useDropInStickyScroll",0,function(e){let[n,i]=(0,t.useState)(0),{isNavigating:l}=(0,r.useLoadingFilterResults)();(0,t.useEffect)(()=>{let e=document.getElementById(a);if(!e)return;i(s());let t=new ResizeObserver(()=>{i(s())});return t.observe(e),()=>t.disconnect()},[]);let{activeId:o}=function(e,{rootMarginTop:r=0,threshold:a=.15}={}){let[s,n]=(0,t.useState)(e[0]??null);return(0,t.useEffect)(()=>{let t=[];
2return e.forEach(e=>{let s=document.getElementById(e);if(!s)return;let i=new IntersectionObserver(t=>{t[0].isIntersecting&&n(e)},{rootMargin:`-${r}px 0px -25% 0px`,threshold:a});i.observe(s),t.push(i)}),()=>{t.forEach(e=>e.disconnect())}},[e,r,a]),{activeId:s}}((0,t.useMemo)(()=>l?[]:e.map(e=>`day-${e}`),[e,l]),{rootMarginTop:Math.max(n-12,0),threshold:.01});return{activeId:o}}],478827)},58038,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(985902),n=e.i(152088),i=e.i(305313),l=e.i(264167),o=e.i(163387);function d({onPrev:e,onNext:r,canPrev:a,canNext:s}){return(0,t.jsxs)("div",{className:"flex items-center gap-1.5","data-sentry-component":"CarouselControls","data-sentry-source-file":"CarouselControls.tsx",children:[(0,t.jsx)("button",{type:"button",onClick:e,disabled:!a,"aria-label":"Previous days",className:(0,n.cn)("grid size-9 place-items-center rounded-full border border-zinc-200 bg-white text-zinc-500 transition-opacity",{"opacity-40":!a,"hover:bg-zinc-50":a}),children:(0,t.jsx)(l.ChevronLeft,{className:"size-3.5","data-sentry-element":"ChevronLeft","data-sentry-source-file":"CarouselControls.tsx"})}),(0,t.jsx)("button",{type:"button",onClick:r,disabled:!s,"aria-label":"Next days",className:(0,n.cn)("grid size-9 place-items-center rounded-full border border-zinc-200 bg-white text-zinc-500 transition-opacity",{"opacity-40":!s,"hover:bg-zinc-50":s}),children:(0,t.jsx)(o.ChevronRight,{className:"size-3.5","data-sentry-element":"ChevronRight","data-sentry-source-file":"CarouselControls.tsx"})})]})}function c({day:e,selected:r,onSelect:a}){return(0,t.jsxs)(s.Button,{variant:"ghost",type:"button",onClick:()=>a(e.iso),"aria-pressed":r,className:(0,n.cn)("flex h-[76px] min-w-0 flex-1 basis-0 flex-col gap-0.5 rounded-lg border pb-[13px] pt-[11px] md:h-[92px] md:flex-none md:basis-[186px]",{"border-transparent bg-zinc-900 text-white hover:bg-zinc-900 hover:text-white":r,"border-zinc-200 bg-white text-zinc-900 hover:bg-zinc-50 hover:text-zinc-900":!r}),"data-sentry-element":"Button","data-sentry-component":"DayCard","data-sentry-source-file":"DateStrip.tsx",children:[(0,t.jsxs)("span",{className:(0,n.cn)("text-sm font-medium tracking-normal",{"text-zinc-400":r,"text-zinc-600":!r}),children:[(0,t.jsx)("span",{className:"lg:hidden",children:e.weekdayShort}),(0,t.jsx)("span",{className:"hidden lg:inline",children:e.weekdayLong})]}),(0,t.jsx)("span",{className:"text-3xl font-medium leading-none tracking-tight",children:e.dayNumber})]})}e.s(["DateStrip",0,function({days:e,selectedIso:s,eyebrow:n,title:l}){let{navigate:o}=(0,i.useLoadingFilterResults)(),u=(0,a.useSearchParams)(),m=(0,a.usePathname)(),[p,h]=(0,r.useState)(0);function x(e){let t=new URLSearchParams(u.toString());t.delete("page"),t.set("day",e),o(`${m}?${t.toString()}`)}let f=p+3<e.length,g=e.slice(p,p+3),y=(0,t.jsx)(d,{onPrev:()=>h(e=>Math.max(0,e-3)),onNext:()=>h(t=>Math.min(Math.max(0,e.length-3),t+3)),canPrev:p>0,canNext:f}),b=(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[n&&(0,t.jsx)("p",{className:"font-united text-sm font-semibold uppercase tracking-wide text-zinc-600 dark:text-zinc-400",children:n}),l&&(0,t.jsx)("h1",{className:"text-balance text-4xl font-bold tracking-tight text-zinc-900 md:text-[40px] md:leading-tight",children:l})]});return(0,t.jsxs)("div",{className:"flex flex-col gap-4 md:gap-10","data-sentry-component":"DateStrip","data-sentry-source-file":"DateStrip.tsx",children:[(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsx)("div",{className:"min-w-0 flex-1",children:b}),y]}),(0,t.jsx)("div",{className:"-mx-4 overflow-x-auto px-4",children:(0,t.jsx)("div",{className:"flex gap-2",children:g.map(e=>(0,t.jsx)(c,{day:e,selected:e.iso===s,onSelect:x},e.iso))})})]})}),(0,t.jsxs)("div",{className:"hidden md:flex md:flex-col md:gap-10",children:[b,(0,t.jsx)("div",{className:"flex gap-2 md:grid md:grid-cols-7",children:e.map(e=>(0,t.jsx)(c,{day:e,selected:e.iso===s,onSelect:x},e.iso))})]})]})}],58038)},540668,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(305313),n=e.i(985902),i=e.i(493843),l=e.i(337837),o=e.i(245715),d=e.i(875348),c=e.i(918059),u=e.i(3656),m=e.i(152088);function p({option:e,checked:r,onToggle:a}){return(0,t.jsxs)("label",{className:"flex h-10 cursor-pointer items-center gap-3 px-4","data-sentry-component":"OptionRow","data-sentry-source-file":"FilterPopover.tsx",children:[(0,t.jsx)(i.Checkbox,{className:"rounded-full [&_[data-state]]:rounded-full",checked:r,onCheckedChange:()=>a(e.value),"data-sentry-element":"Checkbox","data-sentry-source-file":"FilterPopover.tsx"}),(0,t.jsx)("span",{className:"text-sm text-zinc-900",children:e.label})]})}function h({label:e,groups:r,draft:a,onToggle:s,onClear:i,onApply:l,onClose:o}){return(0,t.jsxs)("div",{className:"flex max-h-[70vh] flex-col md:max-h-[480px]","data-sentry-component":"FilterPanel","data-sentry-source-file":"FilterPopover.tsx",children:[(0,t.jsxs)("div",{className:"flex h-[68px] shrink-0 items-center justify-between border-b border-zinc-200 px-4",children:[(0,t.jsx)("span",{className:"text-base font-semibold text-zinc-900",children:e}),(0,t.jsx)("button",{type:"button",onClick:o,"aria-label":"Close",className:"grid size-9 cursor-pointer place-items-center rounded-full text-zinc-500 hover:bg-zinc-100",children:(0,t.jsx)(u.X,{className:"size-4","data-sentry-element":"X","data-sentry-source-file":"FilterPopover.tsx"})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto py-2",children:r.map((e,r)=>(0,t.jsxs)("div",{children:[e.heading&&(0,t.jsx)("p",{className:"border-b border-zinc-200 px-4 pb-1 pt-3 text-xs font-semibold uppercase tracking-wide text-zinc-500",children:e.heading}),e.options.map(e=>(0,t.jsx)(p,{option:e,checked:a.includes(e.value),onToggle:s},e.value))]},e.heading??r))}),(0,t.jsxs)("div",{className:"flex h-[68px] shrink-0 items-center justify-between border-t border-zinc-200 px-4",children:[(0,t.jsx)("button",{type:"button",onClick:i,className:"cursor-pointer text-sm font-bold text-zinc-900 underline hover:text-zinc-700",children:"Reset"}),(0,t.jsx)(n.Button,{size:"sm",className:"h-9 px-5",onClick:l,"data-sentry-element":"Button","data-sentry-source-file":"FilterPopover.tsx",children:"Apply"})]})]})}function x({label:e,count:r}){return(0,t.jsxs)("span",{className:(0,m.cn)("flex h-10 shrink-0 cursor-pointer items-center gap-2 whitespace-nowrap rounded-full pl-4 pr-3 text-sm font-normal text-zinc-900",{"border-0 bg-neutral-200":r>0,"border border-zinc-200 bg-white":0===r}),"data-sentry-component":"TriggerPill","data-sentry-source-file":"FilterPopover.tsx",children:[(0,t.jsx)("span",{className:"whitespace-nowrap",children:e}),r>1&&(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-full bg-zinc-900 text-[11px] font-semibold text-white",children:r}),(0,t.jsx)(c.ChevronDown,{className:"size-3.5 shrink-0 text-zinc-500","data-sentry-element":"ChevronDown","data-sentry-source-file":"FilterPopover.tsx"})]})}function f({config:e,searchParams:a,onApply:s}){let n,i=(0,r.useMemo)(()=>a[e.paramKey]?a[e.paramKey].split(",").map(e=>
2e.trim()).filter(Boolean):[],[e.paramKey,a]);n=e.alphabetize?Object.entries(e.options.reduce((e,t)=>{let r=t.label.charAt(0).toUpperCase();return(e[r]??=[]).push(t),e},{})).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({heading:e,options:[...t].sort((e,t)=>e.label.localeCompare(t.label))})):[{options:e.options}];let c=(0,d.useIsMobile)(),[u,m]=(0,r.useState)(!1),[p,g]=(0,r.useState)(i),y=i.join(","),b=(0,r.useRef)(y);function v(e){m(e)}(0,r.useEffect)(()=>{b.current!==y&&(b.current=y,g(i))},[y,i]);let j=1===i.length?e.options.find(e=>e.value===i[0])?.label??e.label:e.label,w=(0,t.jsx)(h,{label:e.label,groups:n,draft:p,onToggle:function(e){g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onClear:function(){g([])},onApply:function(){s(p),m(!1)},onClose:()=>m(!1)});return c?(0,t.jsxs)(o.Sheet,{open:u,onOpenChange:v,children:[(0,t.jsx)(o.SheetTrigger,{"aria-label":`Filter by ${e.label}`,children:(0,t.jsx)(x,{label:j,count:i.length})}),(0,t.jsxs)(o.SheetContent,{side:"bottom",className:"rounded-t-2xl p-0",children:[(0,t.jsx)(o.SheetTitle,{className:"sr-only",children:e.label}),w]})]}):(0,t.jsxs)(l.Popover,{open:u,onOpenChange:v,"data-sentry-element":"Popover","data-sentry-component":"FilterPopover","data-sentry-source-file":"FilterPopover.tsx",children:[(0,t.jsx)(l.PopoverTrigger,{"aria-label":`Filter by ${e.label}`,"data-sentry-element":"PopoverTrigger","data-sentry-source-file":"FilterPopover.tsx",children:(0,t.jsx)(x,{label:j,count:i.length,"data-sentry-element":"TriggerPill","data-sentry-source-file":"FilterPopover.tsx"})}),(0,t.jsx)(l.PopoverContent,{align:"start",className:"w-[440px] overflow-hidden p-0","data-sentry-element":"PopoverContent","data-sentry-source-file":"FilterPopover.tsx",children:w})]})}e.s(["FilterBar",0,function({filters:e,searchParams:n}){let{navigate:i}=(0,s.useLoadingFilterResults)(),l=(0,a.usePathname)(),o=(0,r.useCallback)((e,t)=>{let r=new URLSearchParams(n);r.delete("page"),t.length?r.set(e,t.join(",")):r.delete(e);let a=r.toString();i(a?`${l}?${a}`:l)},[i,l,n]);return(0,t.jsx)("div",{className:"no-scrollbar -mx-4 mb-10 flex gap-2 overflow-x-auto border-x-0 border-y-[0.333333px] border-zinc-200 px-4 py-3 md:mx-0 md:px-0","data-sentry-component":"FilterBar","data-sentry-source-file":"FilterBar.tsx",children:e.map(e=>(0,t.jsx)(f,{config:e,searchParams:n,onApply:t=>o(e.paramKey,t)},e.paramKey))})}],540668)},641087,e=>{"use strict";var t=e.i(434073),r=e.i(502119),a=e.i(305313),s=e.i(837800),n=e.i(918059),i=e.i(307141),l=e.i(152088);function o({fitnessClass:e,expanded:r,onToggle:a}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>a(e.id),"aria-expanded":r,className:(0,l.cn)("w-full cursor-pointer border-b border-zinc-200 text-left transition-none",r?"bg-zinc-100":"bg-white hover:bg-zinc-50"),children:[(0,t.jsxs)("div",{className:"hidden grid-cols-[120px_1fr_140px_auto] items-start gap-4 px-7 py-6 md:grid lg:grid-cols-[200px_minmax(0,640px)_minmax(160px,1fr)_auto]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[17px] font-normal text-zinc-900",children:(0,l.getTimeString)(e.startTime)}),(0,t.jsxs)("p",{className:"text-sm text-zinc-600",children:[e.durationMinutes," min"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[17px] font-normal text-zinc-900",children:e.name}),(0,t.jsx)("p",{className:"text-sm text-zinc-600",children:e.modality})]}),(0,t.jsx)("span",{className:"text-[17px] text-zinc-900",children:e.location}),(0,t.jsx)("span",{className:"grid size-8 place-items-center justify-self-end self-center text-zinc-500",children:r?(0,t.jsx)(i.ChevronUp,{className:"size-4"}):(0,t.jsx)(n.ChevronDown,{className:"size-4"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-[auto_1fr_auto] items-start gap-3 p-6 md:hidden",children:[(0,t.jsxs)("div",{className:"mr-2 flex w-16 flex-col gap-0.5",children:[(0,t.jsx)("p",{className:"text-base font-normal leading-6 text-zinc-900",children:(0,l.getTimeString)(e.startTime)}),(0,t.jsxs)("p",{className:"text-sm leading-5 text-zinc-600",children:[e.durationMinutes," min"]})]}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("p",{className:(0,l.cn)("text-base leading-6 text-zinc-900",r?"whitespace-normal":"truncate"),children:e.name}),(0,t.jsx)("p",{className:"text-sm leading-5 text-zinc-600",children:e.modality})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-0.5",children:[(0,t.jsx)("span",{className:"grid size-6 place-items-center text-zinc-500",children:r?(0,t.jsx)(i.ChevronUp,{className:"size-4"}):(0,t.jsx)(n.ChevronDown,{className:"size-4"})}),(0,t.jsx)("span",{className:"text-sm leading-5 text-zinc-600",children:e.location})]})]})]}),r&&(0,t.jsx)("div",{onClick:()=>a(e.id),className:"cursor-pointer border-b border-zinc-200 bg-zinc-100 px-6 py-6 md:px-7",children:(0,t.jsx)("p",{className:"max-w-[75ch] text-pretty text-base leading-relaxed text-zinc-900",children:e.description})})]})}function d({classes:e}
2){let[r,a]=(0,s.useState)(null);function n(e){a(t=>t===e?null:e)}return(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-zinc-200","data-sentry-component":"ClassList","data-sentry-source-file":"ClassAccordion.tsx",children:e.map(e=>(0,t.jsx)(o,{fitnessClass:e,expanded:r===e.id,onToggle:n},e.id))})}var c=e.i(890042);function u(){return(0,t.jsxs)("div",{className:"border-b border-zinc-200","data-sentry-component":"ClassRowSkeleton","data-sentry-source-file":"ClassListSkeleton.tsx",children:[(0,t.jsxs)("div",{className:"hidden h-[89px] grid-cols-[160px_1fr_200px_160px_auto] items-center gap-4 px-4 md:grid",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(c.Skeleton,{className:"h-4 w-16","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"}),(0,t.jsx)(c.Skeleton,{className:"h-3 w-10","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(c.Skeleton,{className:"h-4 w-40","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"}),(0,t.jsx)(c.Skeleton,{className:"h-3 w-24","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Skeleton,{className:"size-9 rounded-full","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-28","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"})]}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-24","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"}),(0,t.jsx)(c.Skeleton,{className:"size-8 rounded","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"})]}),(0,t.jsxs)("div",{className:"grid h-20 grid-cols-[auto_1fr_auto] items-center gap-3 px-4 md:hidden",children:[(0,t.jsxs)("div",{className:"w-16 space-y-1.5",children:[(0,t.jsx)(c.Skeleton,{className:"h-4 w-14","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"}),(0,t.jsx)(c.Skeleton,{className:"h-3 w-10","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(c.Skeleton,{className:"h-4 w-32","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"}),(0,t.jsx)(c.Skeleton,{className:"h-3 w-40","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"})]}),(0,t.jsx)(c.Skeleton,{className:"size-8 rounded","data-sentry-element":"Skeleton","data-sentry-source-file":"ClassListSkeleton.tsx"})]})]})}function m(){return(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-zinc-200","data-sentry-component":"ClassListSkeleton","data-sentry-source-file":"ClassListSkeleton.tsx",children:Array.from({length:10}).map((e,r)=>(0,t.jsx)(u,{},r))})}function p(){let e=(0,r.useRouter)(),a=(0,r.useSearchParams)();return(0,t.jsxs)("div",{className:"flex min-h-[480px] w-full flex-col items-center justify-center gap-6 rounded-2xl border border-zinc-200 bg-white","data-sentry-component":"EmptyState","data-sentry-source-file":"EmptyState.tsx",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[(0,t.jsx)("h3",{className:"text-2xl font-bold text-zinc-900",children:"No classes found"}),(0,t.jsx)("p",{className:"text-base text-zinc-600",children:"Try adjusting your filters or choosing a different date."})]}),(0,t.jsx)("button",{type:"button",onClick:function(){let t=a.get("day"),r=new URLSearchParams;t&&r.set("day",t),e.push("?"+r.toString())},className:"h-11 rounded-full bg-black/[0.08] px-4 text-sm font-medium text-zinc-900 backdrop-blur-xl",children:"Clear filters"})]})}var h=e.i(416084);e.s(["FitnessClassListClient",0,function({classes:e,totalCount:s,currentPage:n,take:i,searchParams:l}){let o=(0,r.usePathname)(),{isNavigating:c}=(0,a.useLoadingFilterResults)();return c?(0,t.jsx)(m,{}):0===e.length?(0,t.jsx)(p,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d,{classes:e,"data-sentry-element":"ClassList","data-sentry-source-file":"FitnessClassListClient.tsx"}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(h.default,{currentPage:n,totalCount:s,perPage:i,baseUrl:o,searchParams:l,"data-sentry-element":"ClassesPagination","data-sentry-source-file":"FitnessClassListClient.tsx"})})]})}],641087)},447936,e=>{"use strict";var t=e.i(434073),r=e.i(520281),a=e.i(535371),s=e.i(890042),n=e.i(305313);function i({imageUrl:e,name:a}){return e?(0,t.jsx)(r.default,{src:e,alt:`${a} - Personal trainer photo`,width:120,height:120,className:"object-cover w-full h-full rounded-full"}):(0,t.jsx)("div",{className:"w-full h-full bg-muted rounded-full flex items-center justify-center","aria-label":`No photo available for ${a}`,"data-sentry-component":"PersonalTrainerAvatar","data-sentry-source-file":"personal-trainers-index-coaches-grid.tsx",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:a?.charAt(0).toUpperCase()})})}function l(){return(0,t.jsxs)("div",{className:"flex items-center gap-4","data-sentry-component":"PersonalTrainerCardSkeleton","data-sentry-source-file":"personal-trainers-index-coaches-grid.tsx",children:[(0,t.jsx)(s.Skeleton,{className:"size-[72px] shrink-0 rounded-full","data-sentry-element":"Skeleton","data-sentry-source-file":"personal-trainers-index-coaches-grid.tsx"}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsx)(s.Skeleton,{className:"h-4 w-32","data-sentry-element":"Skeleton","data-sentry-source-file":"personal-trainers-index-coaches-grid.tsx"}),(0,t.jsx)(s.Skeleton,{className:"h-3 w-24","data-sentry-element":"Skeleton","data-sentry-source-file":"personal-trainers-index-coaches-grid.tsx"})]})]})}function o(){return(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3","data-sentry-component":"PersonalTrainerListSkeleton","data-sentry-source-file":"personal-trainers-index-coaches-grid.tsx",children:Array.from({length:9}).map((e,r)=>(0,t.jsx)(l,{},r))})}function d(){let{navigate:e}=(0,n.useLoadingFilterResults)();return(0,t.jsxs)("div",{className:"flex min-h-[480px] w-full flex-col items-center justify-center gap-6 rounded-2xl border border-zinc-200 bg-white","data-sentry-component":"PersonalTrainersEmptyState","data-sentry-source-file":"personal-trainers-index-coaches-grid.tsx",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[(0,t.jsx)("h3",{className:"text-2xl font-bold text-zinc-900",children:"No trainers found"}),(0,t.jsx)("p",{className:"text-base text-zinc-600",children:"Try adjusting your filters to
2see more trainers."})]}),(0,t.jsx)("button",{type:"button",onClick:function(){e("?")},className:"h-11 rounded-full bg-black/[0.08] px-4 text-sm font-medium text-zinc-900 backdrop-blur-xl",children:"Clear filters"})]})}e.s(["PersonalTrainersIndexCoachesGrid",0,function({trainers:e}){let{isNavigating:r}=(0,n.useLoadingFilterResults)();return r?(0,t.jsx)(o,{}):0===e.length?(0,t.jsx)(d,{}):(0,t.jsx)(a.CoachesGrid,{id:"personal-trainers-index-coaches-grid",ariaLabel:"Personal trainers","data-sentry-element":"CoachesGrid","data-sentry-component":"PersonalTrainersIndexCoachesGrid","data-sentry-source-file":"personal-trainers-index-coaches-grid.tsx",children:e.map(e=>(0,t.jsx)(a.CoachesGridCard,{href:e.slug?`/fitness/training/personal-training/coaches/${e.slug}`:"#",name:e.name,detailLines:[(e.specialties??[]).slice(0,2).join(" · "),(e.locations??[]).map(e=>e.name).join(", ")],cardAriaLabel:`View profile for ${e.name}, personal trainer`,nameAriaLabel:`Name: ${e.name}`,image:(0,t.jsx)(i,{imageUrl:e.imageUrl,name:e.name})},e.id))})}])},778923,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(508930),n=e.i(170696);let i=(0,n.createServerReference)("404d1f3eff3e39adad96d10a40a8ea051c27a12ade",n.callServer,void 0,n.findSourceMapURL,"resolveAppSessionIdentityAction");var l=e.i(630106),o=e.i(68031),d=e.i(369721);let c="__CP_APP_SESSION__",u="membershipCancellation:session";function m(){try{let e=sessionStorage.getItem(u);if(!e)return null;let t=JSON.parse(e);if(t.identity)return{identity:t.identity}}catch{}return h(),null}function p(e){var t={identity:e};try{sessionStorage.setItem(u,JSON.stringify(t))}catch{}}function h(){try{sessionStorage.removeItem(u)}catch{}}var x=e.i(985902),f=e.i(610012),g=e.i(173554),y=e.i(878016),b=e.i(356617);let v="membership-cancellation-login-error";function j({onResolved:e,onForgotPassword:a}){let[s,n]=(0,r.useState)(""),[i,l]=(0,r.useState)(""),[o,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(null),p=async t=>{if(t.preventDefault(),!o){c(!0),m(null);try{let t=await (0,y.resolveExerpIdentity)({credentials:{email:s,password:i},flow:"membership-cancellation"});if("resolved"===t.status)return void e(t);if("unresolved"===t.status)return void m("We couldn't find your account. Please contact your club for help.");m((0,b.getLoginErrorMessage)(t.error))}catch(e){(0,d.reportClientError)(e,{operation:"membershipCancellation.login"}),m((0,b.getLoginErrorMessage)(null))}finally{c(!1)}}};return(0,t.jsxs)("section",{className:"mt-10 max-w-[620px] border-t border-border pt-9","aria-label":"Member login","data-sentry-component":"MembershipCancellationLoginForm","data-sentry-source-file":"membership-cancellation-login-form.tsx",children:[(0,t.jsxs)("form",{onSubmit:p,noValidate:!0,children:[(0,t.jsx)("h2",{className:"text-2xl font-black sm:text-3xl",children:"Log in to continue"}),(0,t.jsx)("p",{className:"mt-2 text-muted-foreground",children:"Use the email and password tied to your Chelsea Piers membership."}),(0,t.jsx)(g.Label,{htmlFor:"email",className:"mt-7 block text-lg font-medium","data-sentry-element":"Label","data-sentry-source-file":"membership-cancellation-login-form.tsx",children:"Email"}),(0,t.jsx)(f.Input,{id:"email",type:"email",placeholder:"Enter your email",autoComplete:"email",value:s,onChange:e=>{n(e.target.value),m(null)},required:!0,"aria-invalid":!!u,"aria-describedby":u?v:void 0,className:"mt-2 h-14 w-full","data-sentry-element":"Input","data-sentry-source-file":"membership-cancellation-login-form.tsx"}),(0,t.jsx)(g.Label,{htmlFor:"password",className:"mt-5 block text-lg font-medium","data-sentry-element":"Label","data-sentry-source-file":"membership-cancellation-login-form.tsx",children:"Password"}),(0,t.jsx)(f.Input,{id:"password",type:"password",placeholder:"Enter your password",autoComplete:"current-password",value:i,onChange:e=>{l(e.target.value),m(null)},required:!0,minLength:6,"aria-invalid":!!u,"aria-describedby":u?v:void 0,className:"mt-2 h-14 w-full","data-sentry-element":"Input","data-sentry-source-file":"membership-cancellation-login-form.tsx"}),(0,t.jsx)(x.Button,{type:"button",variant:"link",className:"mt-2 h-auto px-0 text-[#275DE6]",onClick:()=>a(s),"data-sentry-element":"Button","data-sentry-source-file":"membership-cancellation-login-form.tsx",children:"Forgot password?"}),u&&(0,t.jsx)("div",{id:v,role:"alert",className:"mt-5 rounded-md border border-destructive/20 bg-destructive/5 p-3",children:(0,t.jsx)("p",{className:"text-sm text-destructive",children:u})}),(0,t.jsx)(x.Button,{type:"submit",disabled:o||!s||!i,className:"mt-6 h-12 w-full rounded-full px-8 text-base","data-sentry-element":"Button","data-sentry-source-file":"membership-cancellation-login-form.tsx",children:o?"Logging in...":"Log in"})]}),(0,t.jsxs)("p",{className:"mt-9 border-t border-border pt-6 text-sm leading-6 text-muted-foreground",children:["Don't remember your Chelsea Piers login? Contact Member Services at"," ",(0,t.jsx)("a",{href:"mailto:[email protected]",className:"text-[#275DE6] underline",children:"[email protected]"}),"."]})]})}var w=e.i(402157);let N={13:"Chelsea",14:"Downtown Brooklyn",15:"Prospect Heights",16:"Flatiron",17:"Hudson Square"};function C({identity:e}){let a,s,n=((a=new URLSearchParams).set("zf_rszfm","1"),a.set("SingleLine2",String(e.identity.personId)),e.person.personId.externalId&&a.set("SingleLine3",e.person.personId.externalId),e.person.firstName&&a.set("Name_First",e.person.firstName),e.person.lastName&&a.set("Name_Last",e.person.lastName),e.communication?.email&&a.set("Email",e.communication.email),(s=N[e.identity.center])&&a.set("Dropdown",s),`https://forms.zohopublic.com/chelseapiers/form/CPFCancellationRequestCopy/formperma/ah6xTwswZdipFdOgVjdJNoJMH84cRTXTtQNsKOt9if4?${a.toString()}`);return(0,r.useEffect)(()=>{n||(0,d.reportClientError)(Error("NEXT_PUBLIC_ZOHO_CANCELLATION_FORM_URL is not configured"),{operation:"membershipCancellation.zohoForm"})},[n]),(0,t.jsxs)("section",{className:"mx-auto my-6 w-full max-w-[650px] overflow-hidden lg:max-w-none rounded-md border border-border bg-white shadow-sm","data-sentry-component":"MembershipCancellationZohoForm","data-sentry-source-file":"membership-cancellation-zoho-form.tsx",children:[(0,t.jsxs)("header",{className:"border-b border-border px-7 py-6",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"Membership Cancellation Request"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"Please complete the form below to request a cancellation of your membership."})]}),(0,t.jsx)("div",{className:"px-7 py-5",children:n?(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)(w.ZohoEmbedSkeleton,{}),children:(0,t.jsx)(w.ZohoEmbed,{formUrl:n,formHeight:780,pageSlug:"membership-cancellation",autoResize:!0,className:"block w-full"})}):(0,t.jsx)("div",{role:"alert",className:"rounded-md border border-destructive/20 bg-destructive/5 p-3",children:(0,t.jsx)("p",{className:"text-sm text-destructive",children:"The cancellation form is temporarily unavailable. Please try again later or contact your club for assistance."})})})]})}let S=["login","form"],k="step";e.s(["CANCELLATION_STEP_PARAM",0,k,"MembershipCancellationFlow",0,function(){var e;let n=(0,a.useRouter)(),u=(0,a.usePathname)(),x=(0,a.useSearchParams)(),f=(e=x.get(k),S.includes(e)?e:null),g=f??"login",[y,b]=(0,r.useState)(),[v,w]=(0,r.useState)(null),N=(0,r.useCallback)((e,{replace:t=!1}={})=>{let r=new URLSearchParams(x.toString());r.set(k,e);let a=`${u}?${r.toString()}`;t?n.replace(a,{scroll:!1}):n.push(a,{scroll:!1})},[u,n,x]),P=(0,r.useRef)(void 0);return((0,r.useEffect)(()=>
2{if(void 0===P.current){let e=function(){let e=window,t=e[c];if(void 0===t)return null;try{delete e[c]}catch{e[c]=void 0}if("object"!=typeof t||null===t)return null;let{exerpUsername:r,accessToken:a}=t;return"string"==typeof r&&"string"==typeof a&&r&&a?{exerpUsername:r,accessToken:a}:null}();P.current=e?i(e):null}let e=P.current;if(!e)return void b(m());let t=!1;return e.catch(e=>((0,d.reportClientError)(e,{operation:"membershipCancellation.appSession"}),{status:"error",error:"Request failed"})).then(e=>{if(!t){if("resolved"===e.status){let t={status:"resolved",exerpUsername:e.exerpUsername,identity:e.identity,person:e.person,communication:e.communication};p(t),b({identity:t});return}"error"===e.status&&(0,d.reportClientError)(Error(e.error),{operation:"membershipCancellation.appSession"}),b(m())}}),()=>{t=!0}},[]),(0,r.useEffect)(()=>{"login"===g&&(h(),b(null))},[g]),(0,r.useEffect)(()=>{void 0!==y&&(f&&("form"!==f||y)||N("login",{replace:!0}))},[N,y,f]),(0,r.useEffect)(()=>{if("form"===g&&y)return p(y.identity),()=>h()},[g,y]),"form"===g)?y?(0,t.jsx)(C,{identity:y.identity}):null:null!==v?(0,t.jsx)("div",{className:"mt-10 max-w-[620px]",children:(0,t.jsx)(l.MembershipForgotPasswordForm,{initialEmail:v,onBack:()=>w(null),errorOperation:"membershipCancellation.forgotPassword",onSubmit:async e=>s.startSpan({op:"ui.action",name:"membership.recoverPassword.submit",attributes:{flow:"membership-cancellation"}},async()=>{let[,t]=await (0,o.recoverPassword)(e);if(t)throw Error(t.message)})})}):(0,t.jsx)(j,{onResolved:e=>{let t={status:e.status,exerpUsername:e.exerpUsername,identity:e.identity,person:e.person,communication:e.communication};p(t),b({identity:t}),w(null),N("form")},onForgotPassword:w,"data-sentry-element":"MembershipCancellationLoginForm","data-sentry-component":"MembershipCancellationFlow","data-sentry-source-file":"membership-cancellation-flow.tsx"})}],778923)},325262,e=>{"use strict";var t=e.i(434073),r=e.i(95858);e.s(["ClassMadnessAlreadyRegistered",0,function({userName:e}){return(0,t.jsx)("div",{className:"w-full max-w-md mx-auto","data-sentry-component":"ClassMadnessAlreadyRegistered","data-sentry-source-file":"ClassMadnessAlreadyRegistered.tsx",children:(0,t.jsxs)("div",{className:"bg-zinc-900 rounded-lg border border-zinc-800 p-6 space-y-6",children:[(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("div",{className:"w-16 h-16 bg-green-900/50 rounded-full flex items-center justify-center",children:(0,t.jsx)(r.CircleCheck,{className:"w-8 h-8 text-green-400","data-sentry-element":"CircleCheck","data-sentry-source-file":"ClassMadnessAlreadyRegistered.tsx"})})}),(0,t.jsxs)("div",{className:"text-center space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-zinc-50",children:"You're already registered!"}),(0,t.jsxs)("p",{className:"text-zinc-300",children:["Hey ",e,", you've already signed up for the Class Madness challenge."]})]}),(0,t.jsxs)("div",{className:"bg-zinc-800/50 rounded-lg p-4 space-y-2",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-zinc-200",children:"What's next?"}),(0,t.jsxs)("ul",{className:"text-sm text-zinc-400 space-y-1",children:[(0,t.jsx)("li",{children:"Keep an eye on your email for challenge updates"}),(0,t.jsx)("li",{children:"The challenge begins soon - get ready!"}),(0,t.jsx)("li",{children:"Track your progress once the challenge starts"})]})]})]})})}])},888158,e=>{"use strict";var t=e.i(434073),r=e.i(707836),a=e.i(985902);e.s(["ClassMadnessConfirmation",0,function({onClose:e}){return(0,t.jsxs)("div",{className:"w-full space-y-6","data-sentry-component":"ClassMadnessConfirmation","data-sentry-source-file":"ClassMadnessConfirmation.tsx",children:[(0,t.jsx)("div",{className:"bg-zinc-900 rounded-[12px] border border-zinc-800 p-6",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-6",children:[(0,t.jsx)("div",{className:"w-20 h-20 rounded-full border-2 border-blue-600 bg-zinc-950/90 flex items-center justify-center flex-shrink-0",children:(0,t.jsx)(r.LogoBadgeIcon,{className:"w-[50px] h-[30px] text-white","data-sentry-element":"LogoBadgeIcon","data-sentry-source-file":"ClassMadnessConfirmation.tsx"})}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center",children:[(0,t.jsx)("h2",{className:"text-2xl font-black text-white leading-[30px]",children:"You're registered!"}),(0,t.jsx)("p",{className:"text-sm text-[#9F9FA9] leading-5",children:"You're in for Class Madness 2026! Starting March 1, sign in here to check your progress today through March 31st."})]})]})}),e&&(0,t.jsx)(a.Button,{onClick:e,className:"w-full h-11 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium",children:"Close drawer"})]})}])},305946,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(70806),n=e.i(951034);let i=(0,n.default)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),l=(0,n.default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var o=e.i(985902),d=e.i(152088),c=e.i(545720),u=e.i(325788),m=e.i(296955),p=e.i(143982),h=e.i(198945);let x={"break-a-sweat":"from-orange-900 to-orange-700","power-pace":"from-red-900 to-red-700","find-your-rhythm":"from-purple-900 to-purple-700","build-muscle":"from-blue-900 to-blue-700","master-a-skill":"from-emerald-900 to-emerald-700","restore-recover":"from-teal-900 to-teal-700","mindful-movement":"from-indigo-900 to-indigo-700","lengthen-strengthen":"from-pink-900 to-pink-700","in-a-hurry":"from-
2amber-900 to-amber-700"};function f({category:e,image:r,onClick:a}){let s=x[e.categoryKey]||"from-zinc-800 to-zinc-700",n=r?.id,i=e.isCompleted;return(0,t.jsxs)("button",{type:"button",onClick:a,className:` 3 relative aspect-square w-full rounded-xl overflow-hidden 4 border border-zinc-800/50 5 transition-transform duration-200 ease-out 6 hover:scale-[1.02] 7 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-zinc-950 8 group 9 `,"data-sentry-component":"CategoryCard","data-sentry-source-file":"CategoryCard.tsx",children:[n?(0,t.jsx)(h.Image,{id:r.id,alt:r.alt||e.displayName,className:` 10 absolute inset-0 w-full h-full object-cover 11 ${!i?"grayscale":""} 12 `,width:400,height:400,hotspot:r.hotspot||void 0,crop:r.crop||void 0}):(0,t.jsx)("div",{className:` 13 absolute inset-0 bg-gradient-to-br ${s} 14 ${!i?"grayscale":""} 15 `}),(0,t.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(0deg, rgba(9, 9, 11, 0.95) 11%, rgba(9, 9, 11, 0.9) 22%, rgba(9, 9, 11, 0.75) 38%, rgba(9, 9, 11, 0) 100%)"}}),i&&(0,t.jsx)("div",{className:"absolute top-3 right-3 w-8 h-8 bg-green-600 rounded-full flex items-center justify-center z-10",children:(0,t.jsx)(p.Check,{className:"w-5 h-5 text-white",strokeWidth:3})}),(0,t.jsxs)("div",{className:"absolute inset-x-0 bottom-0 p-4",children:[(0,t.jsx)("h3",{className:` 16 text-lg font-bold drop-shadow-lg text-left 17 ${i?"text-zinc-50 mb-4":"text-[#9f9fa9]"} 18 `,children:e.displayName}),!i&&(0,t.jsx)("p",{className:"text-left text-[10px] font-semibold text-[#2b7fff] mt-1",children:"See category classes â"})]})]})}var g=e.i(3656),y=e.i(707836),b=e.i(547608),v=e.i(245715);function j({category:e,qualifyingClasses:r,onClose:a}){return(0,t.jsxs)("div",{className:"flex flex-col h-full","data-sentry-component":"IncompleteView","data-sentry-source-file":"CategoryDetailModal.tsx",children:[(0,t.jsxs)("div",{className:"px-6 pt-6 pb-4",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-white",children:e.displayName}),(0,t.jsx)("p",{className:"text-sm text-zinc-400 mt-1",children:"Qualifying Classes"})]}),(0,t.jsx)("div",{className:"flex-1 px-6 overflow-y-auto max-h-[55vh]",children:(0,t.jsx)("div",{className:"space-y-2",children:r.length>0?r.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 bg-zinc-800 rounded-lg",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-blue-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-white text-sm",children:e})]},r)):(0,t.jsx)("p",{className:"text-zinc-500 text-sm text-center py-4",children:"No qualifying classes configured for this category."})})}),(0,t.jsx)("div",{className:"p-6 mt-auto",children:(0,t.jsx)(o.Button,{onClick:a,className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3","data-sentry-element":"Button","data-sentry-source-file":"CategoryDetailModal.tsx",children:"Got it"})})]})}function w({category:e,image:r,onClose:a,onShare:s}){return(0,t.jsxs)("div",{className:"flex flex-col h-full","data-sentry-component":"CompleteView","data-sentry-source-file":"CategoryDetailModal.tsx",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center pt-8 pb-4 px-6",children:[(0,t.jsx)("div",{className:"w-20 h-20 rounded-full border-2 border-[#51a2ff] bg-[rgba(9,9,11,0.9)] flex items-center justify-center mb-4",children:(0,t.jsx)(y.LogoBadgeIcon,{className:"w-[61px] h-[37px] text-white","data-sentry-element":"LogoBadgeIcon","data-sentry-source-file":"CategoryDetailModal.tsx"})}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-500 uppercase tracking-wider mb-2",children:"Category Unlocked"}),(0,t.jsx)("h2",{className:"text-2xl font-bold text-white text-center",children:e.displayName}),(0,t.jsx)("p",{className:"text-sm text-zinc-400 text-center mt-2",children:"You crushed this category! One step closer to the Grand Prize."})]}),(0,t.jsx)("div",{className:"flex-1 px-6 py-4",children:(0,t.jsxs)("div",{className:"relative w-full aspect-video rounded-xl overflow-hidden",children:[r?.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Image,{id:r.id,alt:r.alt||e.displayName,className:"absolute inset-0 w-full h-full object-cover",width:600,height:400,hotspot:r.hotspot||void 0,crop:r.crop||void 0}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-zinc-950/60 to-transparent"})]}):(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-zinc-800 to-zinc-700"}),(0,t.jsx)("div",{className:"absolute bottom-3 left-0 right-0 flex justify-center",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1 bg-[#0061e9] rounded-full shadow-lg",children:[(0,t.jsx)(p.Check,{className:"w-3 h-3 text-white",strokeWidth:3,"data-sentry-element":"Check","data-sentry-source-file":"CategoryDetailModal.tsx"}),(0,t.jsx)("span",{className:"text-xs font-bold text-white",children:"Completed"})]})})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-3",children:[s&&(0,t.jsx)(o.Button,{onClick:s,className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3",children:"Share results"}),(0,t.jsx)(o.Button,{onClick:a,className:"w-full bg-[#0061e9] hover:bg-[#0051c9] text-white font-medium py-3","data-sentry-element":"Button","data-sentry-source-file":"CategoryDetailModal.tsx",children:"Close"})]})]})}function N({category:e,image:r,qualifyingClasses:a,onClose:s,onShare:n}){return e.isCompleted?(0,t.jsx)(w,{category:e,image:r,onClose:s,onShare:n}):(0,t.jsx)(j,{category:e,qualifyingClasses:a,onClose:s,"data-sentry-element":"IncompleteView","data-sentry-component":"ModalContent","data-sentry-source-file":"CategoryDetailModal.tsx"})}function C({category:e,image:a,qualifyingClasses:s=[],isOpen:n,onClose:i,onShare:l}
18){let o=function(e=768){let[t,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let t=()=>{a(window.innerWidth<e)};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),t}();return e?o?(0,t.jsx)(v.Sheet,{open:n,onOpenChange:e=>!e&&i(),children:(0,t.jsxs)(v.SheetContent,{side:"bottom",className:"bg-zinc-900 border-t border-zinc-800 rounded-t-2xl h-[85vh] p-0",children:[(0,t.jsxs)(v.SheetTitle,{className:"sr-only",children:[e.displayName," Details"]}),(0,t.jsxs)(v.SheetClose,{className:"absolute right-4 top-4 z-10 p-2 rounded-full bg-zinc-800 hover:bg-zinc-700 transition-colors",children:[(0,t.jsx)(g.X,{className:"h-5 w-5 text-zinc-400"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]}),(0,t.jsx)("div",{className:"flex justify-center pt-3 pb-1",children:(0,t.jsx)("div",{className:"w-10 h-1 bg-zinc-700 rounded-full"})}),(0,t.jsx)(N,{category:e,image:a,qualifyingClasses:s,onClose:i,onShare:l})]})}):(0,t.jsx)(b.Dialog,{open:n,onOpenChange:e=>!e&&i(),"data-sentry-element":"Dialog","data-sentry-component":"CategoryDetailModal","data-sentry-source-file":"CategoryDetailModal.tsx",children:(0,t.jsxs)(b.DialogContent,{className:"bg-zinc-900 border border-zinc-800 rounded-2xl max-w-md overflow-hidden p-0 gap-0","data-sentry-element":"DialogContent","data-sentry-source-file":"CategoryDetailModal.tsx",children:[(0,t.jsxs)(b.DialogTitle,{className:"sr-only","data-sentry-element":"DialogTitle","data-sentry-source-file":"CategoryDetailModal.tsx",children:[e.displayName," Details"]}),(0,t.jsx)(N,{category:e,image:a,qualifyingClasses:s,onClose:i,onShare:l,"data-sentry-element":"ModalContent","data-sentry-source-file":"CategoryDetailModal.tsx"})]})}):null}function S(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}function k({categories:e,categoryImages:r,title:a="Your Progress by Category",subtitle:s="Complete one class from each category to earn the Grand Prize.",onCategoryClick:n}){let i=[...e].sort((e,t)=>e.displayOrder-t.displayOrder),l=new Map;if(r)for(let[e,t]of Object.entries(r)){let r=S(e);l.set(r,t)}return(0,t.jsxs)("section",{className:"w-full","data-sentry-component":"CategoryGrid","data-sentry-source-file":"CategoryGrid.tsx",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-zinc-50 mb-2",children:a}),(0,t.jsx)("p",{className:"text-zinc-400",children:s})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:i.map(e=>{let r=S(e.categoryKey),a=l.get(r)??null;return(0,t.jsx)(f,{category:e,image:a,onClick:()=>{var t;return t=e.categoryKey,void(n&&n(t))}},e.categoryKey)})})]})}function P({categoriesCompleted:e,totalCategories:r,noShowPenalty:a}){let s=e>=r,n=Math.min(e/r*100,100);return(0,t.jsxs)("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl p-6","data-sentry-component":"CategoryProgressCard","data-sentry-source-file":"CategoryProgressCard.tsx",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-zinc-400 uppercase tracking-wider",children:"Category Progress"}),(0,t.jsxs)("p",{className:"text-2xl font-bold text-zinc-50",children:[e,(0,t.jsxs)("span",{className:"text-zinc-600",children:[" / ",r]})]})]}),a?(0,t.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-red-900/50 border border-red-700 text-red-300",children:"Prize Unavailable"}):s?(0,t.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-green-900/50 border border-green-700 text-green-300",children:"Eligible: Grand Prize"}):(0,t.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-blue-900/50 border border-blue-700 text-blue-300","data-sentry-component":"getBadge","data-sentry-source-file":"CategoryProgressCard.tsx",children:"Not Yet Eligible"})]}),(0,t.jsx)("div",{className:"h-2 bg-zinc-700 rounded-full overflow-hidden mb-3",children:(0,t.jsx)("div",{className:"h-full rounded-full transition-all duration-300 bg-blue-600",style:{width:`${n}%`}})}),(0,t.jsx)("p",{className:"text-xs text-zinc-400",children:a?"Your prize eligibility has been forfeited due to a no-show.":s?"Goal reached - you're eligible for the grand prize.":"Complete all 9 categories to be eligible for the grand prize."})]})}function M({totalParticipations:e,noShowPenalty:r}){let a=Math.min(e,6),s=e>=6,n=Math.min(e/6*100,100);return(0,t.jsxs)("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl p-6","data-sentry-component":"ClassPrizeCard","data-sentry-source-file":"ClassPrizeCard.tsx",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-zinc-400 uppercase tracking-wider",children:"Classes Completed"}),(0,t.jsxs)("p",{className:"text-2xl font-bold text-zinc-50",children:[a,(0,t.jsxs)("span",{className:"text-zinc-600",children:[" / ",6]})]})]}
18),r?(0,t.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-red-900/50 border border-red-700 text-red-300",children:"Prize Unavailable"}):s?(0,t.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-green-900/50 border border-green-700 text-green-300",children:"Eligible: Refuel Pack"}):(0,t.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-green-900/50 border border-green-700 text-green-300","data-sentry-component":"getBadge","data-sentry-source-file":"ClassPrizeCard.tsx",children:"Not Yet Eligible"})]}),(0,t.jsx)("div",{className:"h-2 bg-zinc-700 rounded-full overflow-hidden mb-3",children:(0,t.jsx)("div",{className:"h-full rounded-full transition-all duration-300 bg-green-600",style:{width:`${n}%`}})}),(0,t.jsx)("p",{className:"text-xs text-zinc-400",children:r?"Your prize eligibility has been forfeited due to a no-show.":s?"Goal reached - you've earned the Refuel + Refresh Pack!":"Complete 6 classes to earn the Refuel + Refresh Pack."})]})}function E({rankings:e,isLoading:r=!1}){let a=e.find(e=>e.isUserHomeClub),s=a?.facility.shortName,n=a?.rank;return r?(0,t.jsxs)("div",{className:"flex items-center gap-4 roun
18ded-lg border border-zinc-800 bg-zinc-900 px-4 py-3",children:[(0,t.jsxs)("div",{className:"w-16",children:[(0,t.jsx)("div",{className:"h-3 w-12 animate-pulse rounded bg-zinc-800"}),(0,t.jsx)("div",{className:"mt-1 h-5 w-14 animate-pulse rounded bg-zinc-800"})]}),(0,t.jsx)("div",{className:"h-8 w-px bg-zinc-800"}),(0,t.jsxs)("div",{className:"w-16",children:[(0,t.jsx)("div",{className:"h-3 w-12 animate-pulse rounded bg-zinc-800"}),(0,t.jsx)("div",{className:"mt-1 h-5 w-8 animate-pulse rounded bg-zinc-800"})]})]}):(0,t.jsxs)("div",{className:"flex items-center gap-4 rounded-lg border border-zinc-800 bg-zinc-900 px-4 py-3","data-sentry-component":"HomeClubCard","data-sentry-source-file":"HomeClubCard.tsx",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500",children:"Home Club"}),(0,t.jsx)("p",{className:"truncate text-base font-semibold text-white",children:s||"â"})]}),(0,t.jsx)("div",{className:"h-8 w-px shrink-0 bg-zinc-800"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs text-zinc-500",children:"Club Rank"}),(0,t.jsx)("p",{className:`text-base font-semibold ${n?function(e){switch(e){case 1:return"text-[#FE9A00]";case 2:return"text-zinc-400";case 3:return"text-amber-700";default:return"text-zinc-500"}}(n):"text-zinc-500"}`,children:n?`#${n}`:"â"})]})]})}function D({visible:e}){return e?(0,t.jsx)("div",{className:"w-full bg-red-900/50 border border-red-800 rounded-xl p-4","data-sentry-component":"NoShowBanner","data-sentry-source-file":"NoShowBanner.tsx",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(y.LockIcon,{className:"w-8 h-8 text-red-400 flex-shrink-0","data-sentry-element":"LockIcon","data-sentry-source-file":"NoShowBanner.tsx"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-semibold text-red-300",children:"Prize Eligibility Forfeited"}),(0,t.jsx)("p",{className:"text-sm text-red-400/80",children:"A no-show has been recorded on your account. You are no longer eligible for prizes."})]})]})}):null}var I=e.i(369721),z=e.i(300372);e.s(["ClassMadnessDashboard",0,function({pageBuilder:e}){let n=(0,a.useRouter)(),[p,h]=(0,r.useState)({isAuthenticated:!1,exerpUsername:null,accessToken:null,userName:null}),[x,f]=(0,r.useState)("login"),[g,y]=(0,r.useState)(!1),[b,v]=(0,r.useState)(null),[j,w]=(0,r.useState)(null),[N,S]=(0,r.useState)(null),[L,T]=(0,r.useState)(!0),[R,A]=(0,r.useState)(null),[_,B]=(0,r.useState)([]),[F,O]=(0,r.useState)(!0),[$,H]=(0,r.useState)(null),[U,G]=(0,r.useState)(!1),V=(0,r.useRef)(null),W=p.userName||"Member",{categoryImages:K,categoryQualifyingClasses:Y,categoryGridTitle:q,categoryGridSubtitle:X}=(0,r.useMemo)(()=>{let t,r,a={},s={},n=e.find(e=>"classMadnessDashboardCategoryGridBlock"===e._type);if(n&&"categories"in n){for(let e of("title"in n&&n.title&&(t=n.title),"subtitle"in n&&n.subtitle&&(r=n.subtitle),n.categories||[]))if(e.categoryKey){let t=(0,d.cleanString)(e.categoryKey);e.image?.asset?._ref&&(a[t]={id:e.image.asset._ref,alt:null,hotspot:e.image.hotspot,crop:e.image.crop}),e.qualifyingClasses&&e.qualifyingClasses.length>0&&(s[t]=e.qualifyingClasses)}}return{categoryImages:a,categoryQualifyingClasses:s,categoryGridTitle:t,categoryGridSubtitle:r}},[e]),J=(0,r.useCallback)(async()=>{if(p.exerpUsername&&p.accessToken)try{let[e,t]=await (0,u.getMyParticipation)(p.exerpUsername,p.accessToken);if(t){A(t.message||"Failed to load progress data."),T(!1);return}if(e){if("isEnrolled"in e&&!e.isEnrolled){f("not-registered"),setTimeout(()=>{n.push("/challenges/class-madness")},2e3);return}S(e),A(null)}T(!1)}catch(e){(0,I.reportClientError)(e,{operation:"classMadness.fetchProgress"}),A("An unexpected error occurred loading progress."),T(!1)}},[p.exerpUsername,p.accessToken,n]),Z=(0,r.useCallback)(async()=>{if(p.exerpUsername&&p.accessToken)try{O(!0);let[e,t]=await (0,u.getClubRankings)(p.exerpUsername,p.accessToken);if(t){B([]),O(!1);return}e&&B(e.rankings),O(!1)}catch(e){(0,I.reportClientError)(e,{operation:"classMadness.fetchRankings"}),B([]),O(!1)}},[p.exerpUsername,p.accessToken]);(0,r.useEffect)(()=>
18{if("dashboard"===x)return J(),Z(),V.current=setInterval(()=>{J()},6e4),()=>{V.current&&(clearInterval(V.current),V.current=null)}},[x,J,Z]);let Q=(0,r.useCallback)(async(e,t)=>{y(!0),v(null);try{let[r,a]=await (0,c.login)({email:e,password:t},{flow:"class-madness"});if(a)return v(a.message||"Login failed. Please try again."),y(!1),!1;if(r){z.setUser({username:r.exerpUsername});let e={isAuthenticated:!0,exerpUsername:r.exerpUsername,accessToken:r.accessToken,userName:null};return h(e),f("checking-enrollment"),await ee(r.exerpUsername,r.accessToken),!0}return v("Login failed. Please try again."),y(!1),!1}catch(e){return(0,I.reportClientError)(e,{operation:"classMadness.login"}),v("An unexpected error occurred. Please try again."),y(!1),!1}},[]),ee=async(e,t)=>{try{let[r,a]=await (0,u.getMyParticipation)(e,t);if(a){w(a.message||"Failed to check registration status."),f("error"),y(!1);return}if(r){if("isEnrolled"in r&&!r.isEnrolled){f("not-registered"),y(!1),setTimeout(()=>{n.push("/challenges/class-madness")},2e3);return}h(e=>({...e,userName:r.participant.name||null})),S(r),T(!1),f("dashboard"),y(!1)}else f("not-registered"),y(!1),setTimeout(()=>{n.push("/challenges/class-madness")},2e3)}catch(e){(0,I.reportClientError)(e,{operation:"classMadness.register"}),w("An unexpected error occurred. Please try again."),f("error"),y(!1)}},et=()=>{f("login"),w(null),v(null),S(null),A(null),T(!0),B([]),O(!0),h({isAuthenticated:!1,exerpUsername:null,accessToken:null,userName:null})},er=()=>{A(null),T(!0),J()};return(0,t.jsx)("div",{className:"min-h-screen bg-zinc-950","data-sentry-component":"ClassMadnessDashboard","data-sentry-source-file":"ClassMadnessDashboard.tsx",children:(()=>{switch(x){case"loading":return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] space-y-4",children:[(0,t.jsx)(s.Loader2,{className:"h-8 w-8 animate-spin text-blue-500"}),(0,t.jsx)("p",{className:"text-zinc-400",children:"Loading..."})]});case"login":return(0,t.jsxs)("div",{className:"max-w-md mx-auto py-12 px-4",children:[(0,t.jsxs)("div",{className:"mb-8 text-center",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-zinc-50 mb-2",children:"Class Madness Dashboard"}),(0,t.jsx)("p",{className:"text-zinc-400",children:"Sign in to view your progress"})]}),(0,t.jsx)("div",{className:"bg-zinc-900 rounded-lg border border-zinc-800 p-6",children:(0,t.jsx)(m.ClassMadnessLoginForm,{onContinue:Q,isLoading:g,errorMessage:b,onClearError:()=>v(null),title:"Sign In",subtitle:"Enter your Chelsea Piers credentials",buttonText:"Sign In"})})]});case"checking-enrollment":return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] space-y-4",children:[(0,t.jsx)(s.Loader2,{className:"h-8 w-8 animate-spin text-blue-500"}),(0,t.jsx)("p",{className:"text-zinc-400",children:"Checking your registration..."})]});case"not-registered":return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] space-y-4 text-center px-4",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-yellow-900/50 rounded-full flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-2xl",children:"!"})}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-zinc-50",children:"Not Registered"}),(0,t.jsx)("p",{className:"text-zinc-400 max-w-md",children:"You haven't registered for Class Madness yet. Redirecting you to the registration page..."}),(0,t.jsx)(s.Loader2,{className:"h-5 w-5 animate-spin text-zinc-500"})]});case"error":return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] space-y-4 text-center px-4",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-red-900/50 rounded-full flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-2xl text-red-400",children:"X"})}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-zinc-50",children:"Something Went Wrong"}),(0,t.jsx)("p",{className:"text-zinc-400 max-w-md",children:j||"An unexpected error occurred."}),(0,t.jsx)(o.Button,{onClick:et,className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Try Again"})]});case"dashboard":let e=N?.summary.categoriesCompleted??0,r=N?.summary.totalCategories??9,a=N?.summary.totalParticipations??0,n=N?.summary.hasNoShowPenalty??!1;return(0,t.jsx)("div",{className:"min-h-screen bg-zinc-950",children:(0,t.jsxs)("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-2xl sm:text-3xl font-bold text-zinc-50",children:["Welcome back, ",W]}),(0,t.jsx)("p",{className:"text-zinc-400 mt-1",children:"Track your Class Madness progress"})]}),(0,t.jsx)(E,{rankings:_,isLoading:F})]}),L&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 space-y-4",children:[(0,t.jsx)(s.Loader2,{className:"h-8 w-8 animate-spin text-blue-500"}),(0,t.jsx)("p",{className:"text-zinc-400",children:"Loading your progress..."})]}),R&&!L&&(0,t.jsx)("div",{className:"bg-zinc-900 rounded-lg border border-zinc-800 p-8",children:(0,t.jsxs)("div",{className:"flex flex-col items-center text-center space-y-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-red-900/50 rounded-full flex items-center justify-center",children:(0,t.jsx)(i,{className:"h-6 w-6 text-red-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-zinc-50 mb-1",children:"Unable to Load Progress"}),(0,t.jsx)("p",{className:"text-zinc-400 text-sm max-w-md",children:R})]}),(0,t.jsxs)(o.Button,{onClick:er,className:"bg-blue-600 hover:bg-blue-700 text-white",children:[(0,t.jsx)(l,{className:"h-4 w-4 mr-2"}),"Retry"]})]})}),!L&&!R&&N&&(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsx)(D,{visible:n}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsx)(P,{categoriesCompleted:e,totalCategories:r,noShowPenalty:n}),(0,t.jsx)(M,{totalParticipations:a,noShowPenalty:n})]}),(0,t.jsx)(k,{categories:N.categories,categoryImages:K,title:q,subtitle:X,onCategoryClick:e=>{let t=N.categories.find(t=>t.categoryKey===e);t&&(H(t),G(!0))}}),(0,t.jsx)(C,{category:$,image:$&&K[(0,d.cleanString)($.categoryKey)]||null,qualifyingClasses:$?.categoryKey&&Y[(0,d.cleanString)($.categoryKey)]||[],isOpen:U,onClose:()=>{G(!1),H(null)}})]})]})})}})()})}],305946)},296955,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(985902),s=e.i(610012),n=e.i(173554),i=e.i(369721);let l="class-madness-login-error";e.s(["ClassMadnessLoginForm",0,function({onContinue:e,isLoading:o=!1,errorMessage:d=null,onClearError:c,title:u="Register for Class Madness",
18subtitle:m="Sign in with your Chelsea Piers membership email to join the challenge.",buttonText:p="Register & Join"}){let[h,x]=(0,r.useState)(""),[f,g]=(0,r.useState)(""),[y,b]=(0,r.useState)(!1),[v,j]=(0,r.useState)(null),w=()=>{j(null),c?.()},N=async t=>{if(t&&(t.preventDefault(),t.stopPropagation()),!y&&!o){b(!0),j(null);try{let t=e(h,f);if(t instanceof Promise){let e=await t;if(!1===e)return void b(!1)}else if(!1===t)return void b(!1)}catch(e){(0,i.reportClientError)(e,{operation:"classMadness.loginForm"}),j(e instanceof Error?e.message:"An error occurred"),b(!1);return}finally{b(!1)}}},C=v||d;return(0,t.jsxs)("div",{className:"space-y-6","data-sentry-component":"ClassMadnessLoginForm","data-sentry-source-file":"ClassMadnessLoginForm.tsx",children:[(0,t.jsx)("h1",{className:"text-3xl font-medium text-white leading-10",children:u}),(0,t.jsx)("p",{className:"text-sm text-zinc-400 leading-5",children:m}),(0,t.jsxs)("div",{className:"space-y-4 bg-zinc-900 p-4 rounded-xl border border-zinc-800",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(n.Label,{className:"text-sm font-normal text-zinc-400",htmlFor:"cm-email","data-sentry-element":"Label","data-sentry-source-file":"ClassMadnessLoginForm.tsx",children:"Email"}),(0,t.jsx)(s.Input,{id:"cm-email",type:"email",placeholder:"Enter your email",value:h,onChange:e=>{x(e.target.value),w()},onKeyDown:e=>{"Enter"!==e.key||o||y||(e.preventDefault(),N())},required:!0,className:"h-12 bg-zinc-800 border-zinc-700 text-white placeholder:text-zinc-500 focus:border-zinc-600 focus:ring-zinc-600","aria-invalid":!!C,"aria-describedby":C?l:void 0,"data-sentry-element":"Input","data-sentry-source-file":"ClassMadnessLoginForm.tsx"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(n.Label,{className:"text-sm font-normal text-zinc-400",htmlFor:"cm-password","data-sentry-element":"Label","data-sentry-source-file":"ClassMadnessLoginForm.tsx",children:"Password"}),(0,t.jsx)(s.Input,{id:"cm-password",type:"password",placeholder:"Enter your password",value:f,onChange:e=>{g(e.target.value),w()},onKeyDown:e=>{"Enter"!==e.key||o||y||(e.preventDefault(),N())},required:!0,className:"h-12 bg-zinc-800 border-zinc-700 text-white placeholder:text-zinc-500 focus:border-zinc-600 focus:ring-zinc-600",minLength:6,"aria-invalid":!!C,"aria-describedby":C?l:void 0,"data-sentry-element":"Input","data-sentry-source-file":"ClassMadnessLoginForm.tsx"})]})]}),C&&(0,t.jsx)("div",{id:l,role:"alert",className:"p-3 bg-red-900/50 border border-red-700 rounded-lg",children:(0,t.jsx)("p",{className:"text-sm text-red-200",children:C})}),(0,t.jsx)(a.Button,{className:"w-full h-11 text-base font-medium bg-blue-600 hover:bg-blue-700 text-white rounded-lg",disabled:o||y||!h||!f,onClick:()=>N(),"data-sentry-element":"Button","data-sentry-source-file":"ClassMadnessLoginForm.tsx",children:o||y?"Signing in...":p})]})}])},662908,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(394447),s=e.i(989167);e.s(["ClassMadnessPage",0,function({pageBuilder:e,pageId:n,pageType:i,challengeId:l}){let[o,d]=(0,r.useState)(!1),c=(0,r.useCallback)(()=>{d(!0)},[]);return(0,r.useEffect)(()=>(window.addEventListener("openClassMadnessRegistration",c),()=>{window.removeEventListener("openClassMadnessRegistration",c)}),[c]),(0,t.jsxs)("div",{className:"min-h-screen bg-zinc-950","data-sentry-component":"ClassMadnessPage","data-sentry-source-file":"ClassMadnessPage.tsx",children:[e&&e.length>0?(0,t.jsx)(a.PageBuilder,{pageBuilder:e,id:n,type:i}):(0,t.jsxs)("div",{className:"container mx-auto px-4 py-16 text-center",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold text-zinc-50 mb-4",children:"Class Madness"}),(0,t.jsx)("p",{className:"text-zinc-400",children:"Content is being set up. Please check back soon!"})]}),(0,t.jsx)(s.ClassMadnessRegistrationDrawer,{open:o,onOpenChange:d,challengeId:l,"data-sentry-element":"ClassMadnessRegistrationDrawer","data-sentry-source-file":"ClassMadnessPage.tsx"})]})}])},989167,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(3656),n=e.i(875348),i=e.i(985902),l=e.i(245715),o=e.i(85130),d=e.i(545720),c=e.i(325788),u=e.i(296955),m=e.i(325262),p=e.i(888158),h=e.i(369721);e.s(["ClassMadnessRegistrationDrawer",0,function({open:e,onOpenChange:x,challengeId:f}){let g=(0,n.useIsMobile)(),y=(0,a.useRouter)(),b=(0,a.useSearchParams)(),[v,j]=(0,r.useState)({isAuthenticated:!1,exerpUsername:null,accessToken:null,userName:null}),[w,N]=(0,r.useState)("login"),[C,S]=(0,r.useState)(!1),[k,P]=(0,r.useState)(null),[M,E]=(0,r.useState)(void 0),D=v.userName||"Member";(0,r.useEffect)(()=>{"true"!==b.get("register")||e||x(!0)},[b,e,x]);let I=(0,r.useCallback)(e=>
18{if(x(e),!e&&"true"===b.get("register")){let e=new URL(window.location.href);e.searchParams.delete("register"),y.replace(e.pathname+e.search,{scroll:!1})}},[x,b,y]),z=async(e,t)=>{S(!0),P(null);try{let[r,a]=await (0,d.login)({email:e,password:t},{flow:"class-madness"});if(a)return P(a.message||"Login failed. Please try again."),S(!1),!1;if(r){let e={isAuthenticated:!0,exerpUsername:r.exerpUsername,accessToken:r.accessToken,userName:null};return j(e),N("loading"),await L(r.exerpUsername,r.accessToken),!0}return P("Login failed. Please try again."),S(!1),!1}catch(e){return(0,h.reportClientError)(e,{operation:"classMadness.drawerLogin"}),P("An unexpected error occurred. Please try again."),S(!1),!1}},L=async(e,t)=>{try{let[r,a]=await (0,c.checkEnrollmentStatus)(e,t,f);if(a){E(a.message||"Failed to check registration status."),N("error"),S(!1);return}if(r&&(r.participantName&&j(e=>({...e,userName:r.participantName||null})),r.isEnrolled)){N("already-registered"),S(!1);return}let[s,n]=await (0,c.registerForChallenge)(e,t,f);if(n){E(n.message||"Registration failed."),N("error"),S(!1);return}s&&(s.participantName&&j(e=>({...e,userName:s.participantName||e.userName})),s.alreadyEnrolled?N("already-registered"):N("confirmation")),S(!1)}catch(e){(0,h.reportClientError)(e,{operation:"classMadness.drawerRegister"}),E("An unexpected error occurred. Please try again."),N("error"),S(!1)}},T=()=>{N("login"),E(void 0),P(null),j({isAuthenticated:!1,exerpUsername:null,accessToken:null,userName:null})},R=()=>{switch(w){case"login":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(u.ClassMadnessLoginForm,{onContinue:z,isLoading:C,errorMessage:k,onClearError:()=>P(null)})});case"loading":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsxs)("div",{className:"bg-zinc-900 rounded-lg border border-zinc-800 p-8 text-center",children:[(0,t.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-blue-500 border-t-transparent rounded-full mx-auto mb-4"}),(0,t.jsx)("p",{className:"text-zinc-300",children:"Registering you for Class Madness..."})]})});case"error":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsxs)("div",{className:"bg-zinc-900 rounded-lg border border-zinc-800 p-6 text-center space-y-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-red-900/50 rounded-full flex items-center justify-center mx-auto",children:(0,t.jsx)(s.X,{className:"w-6 h-6 text-red-400"})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-zinc-50",children:"Registration Failed"}),(0,t.jsx)("p",{className:"text-zinc-400 text-sm",children:M||"Something went wrong. Please try again."})]}),(0,t.jsx)(i.Button,{onClick:T,className:"w-full h-11 bg-blue-600 hover:bg-blue-700 text-white rounded-lg",children:"Try Again"})]})});case"already-registered":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(m.ClassMadnessAlreadyRegistered,{userName:D})});case"confirmation":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(p.ClassMadnessConfirmation,{onClose:()=>I(!1)})})}},A=()=>{switch(w){case"login":return"Sign in to Register";case"loading":return"Registering...";case"already-registered":return"Already Registered";case"confirmation":return"Registration Complete!";case"error":return"Registration Failed"}};return g?(0,t.jsx)(o.Drawer,{open:e,onOpenChange:I,repositionInputs:!1,children:(0,t.jsxs)(o.DrawerContent,{className:"bg-zinc-950 border-zinc-800 max-h-[100vh] max-h-[100dvh] flex flex-col",children:[(0,t.jsx)(o.DrawerHeader,{className:"border-b border-zinc-800 px-6 py-4",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(o.DrawerTitle,{className:"text-zinc-50 text-lg font-semibold",children:A()}),(0,t.jsx)(o.DrawerClose,{asChild:!0,children:(0,t.jsxs)(i.Button,{variant:"ghost",size:"icon",className:"text-zinc-400 hover:text-zinc-50 hover:bg-zinc-800",children:[(0,t.jsx)(s.X,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain",children:R()})]})}):(0,t.jsx)(l.Sheet,{open:e,onOpenChange:I,"data-sentry-element":"Sheet","data-sentry-component":"ClassMadnessRegistrationDrawer","data-sentry-source-file":"ClassMadnessRegistrationDrawer.tsx",children:(0,t.jsxs)(l.SheetContent,{side:"right",className:"w-[448px] max-w-full bg-zinc-950 border-l border-zinc-800 p-0 shadow-[0px_20px_25px_-5px_rgba(0,0,0,0.1),0px_8px_10px_-6px_rgba(0,0,0,0.1)]","data-sentry-element":"SheetContent","data-sentry-source-file":"ClassMadnessRegistrationDrawer.tsx",children:[(0,t.jsx)(l.SheetHeader,{className:"sticky top-0 z-10 bg-zinc-950 border-b border-zinc-800 px-6 py-4","data-sentry-element":"SheetHeader","data-sentry-source-file":"ClassMadnessRegistrationDrawer.tsx",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(l.SheetTitle,{className:"text-zinc-50 text-lg font-semibold","data-sentry-element":"SheetTitle","data-sentry-source-file":"ClassMadnessRegistrationDrawer.tsx",children:A()}),(0,t.jsx)(l.SheetClose,{asChild:!0,"data-sentry-element":"SheetClose","data-sentry-source-file":"ClassMadnessRegistrationDrawer.tsx",children:(0,t.jsxs)(i.Button,{variant:"ghost",size:"icon",className:"text-zinc-400 hover:text-zinc-50 hover:bg-zinc-800","data-sentry-element":"Button","data-sentry-source-file":"ClassMadnessRegistrationDrawer.tsx",children:[(0,t.jsx)(s.X,{className:"h-5 w-5","data-sentry-element":"X","data-sentry-source-file":"ClassMadnessRegistrationDrawer.tsx"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:R()})]})})}])},946155,e=>{"use strict";var t=e.i(434073),r=e.i(985902);e.s(["ClassMadnessRegistrationForm",0,function({userName:e,onRegister:a,isLoading:s=!1,error:n}){return(0,t.jsx)("div",{className:"w-full max-w-md mx-auto","data-sentry-component":"ClassMadnessRegistrationForm","data-sentry-source-file":"ClassMadnessRegistrationForm.tsx",children:(0,t.jsxs)("div",{className:"bg-zinc-900 rounded-lg border border-zinc-800 p-6 space-y-6",children:[(0,t.jsxs)("div",{className:"text-center space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-zinc-50",children:"Ready to join the challenge?"}),(0,t.jsx)("p",{className:"text-zinc-300",children:"You'll be registered as:"}),(0,t.jsx)("p",{className:"text-lg font-medium text-zinc-50",children:e})]}),n&&(0,t.jsx)("div",{className:"bg-red-900/50 border border-red-700 rounded-lg p-3",children:(0,t.jsx)("p",{className:"text-red-200 text-sm text-center",children:n})}),(0,t.jsx)(r.Button,{onClick:a,disabled:s,className:"w-full h-12 bg-blue-600 hover:bg-blue-700 text-white font-medium text-base rounded-full","data-sentry-element":"Button","data-sentry-source-file":"ClassMadnessRegistrationForm.tsx",children:s?"Registering...":"Register for Challenge"}),(0,t.jsx)("p",{className:"text-xs text-zinc-400 text-center",children:"By registering, you agree to participate in the Class Madness challenge."})]})})}])},262137,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(264167),n=e.i(163387),i=e.i(941219),l=e.i(482069),o=e.i(111154);function d({items:e,pathname:a,loadingItems:c,onItemClick:u}){let m=(0,r.useRef)(null),p=(0,r.useRef)(null),h=(0,r.useRef)(null),[x,f]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1);function b(e){let t=m.current;t&&t.scrollBy({left:"left"===e?-(.6*t.clientWidth):.6*t.clientWidth,behavior:"smooth"})}return(0,r.useEffect)(()=>{let e=m.current;if(!e)return;function t(){let e=m.current;if(!e)return;let t=e.scrollLeft>0,r=e.scrollLeft+e.clientWidth<e.scrollWidth-1;t||document.activeElement!==p.current||h.current?.focus(),r||document.activeElement!==h.current||p.current?.focus(),f(t),y(r)}t(),e.addEventListener("scroll",t,{passive:!0});let r=new ResizeObserver(t);return r.observe(e),()=>{e.removeEventListener("scroll",t),r.disconnect()}},[]),(0,r.useEffect)(()=>{let e=m.current;if(!e)return;let t=new IntersectionObserver(e=>{for(let t of e)t.target.querySelectorAll("a, button").forEach(e
18=>{e.tabIndex=t.isIntersecting?0:-1})},{root:e,threshold:.5});return Array.from(e.children).forEach(e=>t.observe(e)),()=>t.disconnect()},[]),(0,t.jsxs)("div",{className:"relative shrink grow overflow-hidden pl-1.5","data-sentry-component":"FitnessHorizontalNavBar","data-sentry-source-file":"fitness-horizontal-nav-bar.tsx",children:[x&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 left-0 z-20 w-[60px]",children:[(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 w-9 bg-background"}),(0,t.jsx)("div",{className:"absolute inset-y-0 left-9 w-6 bg-gradient-to-r from-background to-transparent"})]}),(0,t.jsx)("button",{ref:p,type:"button",onClick:()=>b("left"),"aria-label":"Scroll navigation left",className:"pointer-events-auto absolute inset-y-0 left-0 z-20 flex w-11 items-center justify-center pl-4 pr-2",children:(0,t.jsx)(s.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})})]}),(0,t.jsx)("ul",{ref:m,className:"flex items-center overflow-x-auto no-scrollbar",children:e.map(e=>(0,t.jsx)("li",{className:a===e.href?"border-b-2 border-primary py-4 whitespace-nowrap":"py-4 whitespace-nowrap",children:e.subLinks?.length?(0,t.jsx)(i.NavDropdown,{item:e,loadingItems:c,onItemClick:u}):(0,t.jsx)(l.NavLink,{label:e.label,href:e.href,openInNewTab:e.openInNewTab,loading:(0,o.isRealHref)(e.href)&&c.has(e.href),onClick:u,className:"px-2.5 text-sm md:px-4 md:text-base relative z-10 text-primary transition-colors duration-200 inline-block"})},(0,o.isRealHref)(e.href)?e.href:e.label))}),g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 right-0 z-20 w-[60px]",children:[(0,t.jsx)("div",{className:"absolute inset-y-0 right-9 w-6 bg-gradient-to-l from-background to-transparent"}),(0,t.jsx)("div",{className:"absolute inset-y-0 right-0 w-9 bg-background"})]}),(0,t.jsx)("button",{ref:h,type:"button",onClick:()=>b("right"),"aria-label":"Scroll navigation right",className:"pointer-events-auto absolute inset-y-0 right-0 z-20 flex w-11 items-center justify-center pr-4 pl-2",children:(0,t.jsx)(n.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})})]})]})}var c=e.i(682647),u=e.i(499581),m=e.i(918059),p=e.i(628876);let h=(0,r.memo)(function({subLabel:e,showAllFitnessLink:a,clubsByLocation:s,homeSlug:n}){return(0,t.jsxs)(p.DropdownMenu,{modal:!1,children:[(0,t.jsxs)(p.DropdownMenuTrigger,{className:"w-full h-full flex flex-wrap items-center gap-2 text-left pl-4 pr-4 sm:px-0",children:[(0,t.jsx)("span",{className:"font-bold text-xl whitespace-nowrap block",children:"Fitness"}),(0,t.jsxs)("span",{className:"flex items-center gap-2 flex-1",children:[(0,t.jsx)("span",{className:"shrink truncate text-sm md:mt-1",children:e}),(0,t.jsx)(m.ChevronDown,{className:"shrink-0 inline size-4 md:size-5 md:mt-1"})]})]}),(0,t.jsxs)(p.DropdownMenuContent,{sideOffset:20,align:"end",children:[a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.DropdownMenuLabel,{className:"font-semibold",children:"All Fitness"}),(0,t.jsx)(p.DropdownMenuItem,{asChild:!0,className:"py-2.5",children:(0,t.jsx)(u.default,{href:n,children:(0,t.jsx)("span",{className:"text-sm text-primary",children:"Home"})})}),(0,t.jsx)(p.DropdownMenuSeparator,{})]}),Object.entries(s).map(([e,a],s)=>(0,t.jsxs)(r.default.Fragment,{children:[s>0&&(0,t.jsx)(p.DropdownMenuSeparator,{}),(0,t.jsx)(p.DropdownMenuLabel,{className:"font-semibold",children:e}),a.map(e=>(0,t.jsx)(p.DropdownMenuItem,{asChild:!0,className:"py-2.5",children:(0,t.jsx)(u.default,{href:e.slug,children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm text-primary",children:e.club}),e.isComingSoon&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Coming Soon"})]})})},e.slug))]},e))]})]})});var x=e.i(152088);let f=["New York, NY","Brooklyn, NY","Stamford, CT"];e.s(["FitnessSubNavigationClient",0,function({subNavigation:e,currentClub:s,showAllFitnessLink:n,bordered:i}){var l;let u=(0,a.usePathname)(),[m,p]=(0,r.useState)(new Set),g=(0,r.useCallback)(e=>{p(t=>{let r=new Set(t);return r.add(e),r})},[]);if((0,r.useEffect)(()=>p(new Set),[u]),!e)return null;let y=s?s.title:"Clubs",b=e.homeSlug||"/fitness",v=(e.clubs??[]).filter(e=>!!e.slug&&!!e.city&&!!e.state).map(e=>({slug:e.slug,club:e.club,location:`${(0,x.cleanString)(e.city)}, ${(0,x.cleanString)(e.state)}`,isComingSoon:e.isComingSoon??!1})).sort((e,t)=>
18(e.club??"").localeCompare(t.club??"")),j=(l=(0,o.groupFacilitiesByLocation)(v,s?.slug),Object.fromEntries([...f.filter(e=>e in l),...Object.keys(l).filter(e=>!f.includes(e)).sort()].map(e=>[e,l[e]]))),w=(0,o.buildNavItemsFromColumns)((e.columns??[]).map(e=>({title:e.title??"",links:e.links.map(e=>({title:e.title??"",href:e.href,openInNewTab:e.openInNewTab}))})));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,x.cn)("items-stretch bg-background w-full sticky top-0 md:top-0 lg:top-17 z-21 border-b-[0.5px] border-border h-16",i&&"border-b border-zinc-200"),children:(0,t.jsxs)("div",{className:"w-full md:flex md:items-center md:justify-start container mx-auto h-full",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden w-full md:hidden h-full",children:[(0,t.jsx)("div",{className:"sm:px-4 shrink grow min-w-0 h-full flex items-center",children:(0,t.jsx)(h,{subLabel:y,showAllFitnessLink:n,clubsByLocation:j,homeSlug:b,"data-sentry-element":"ClubDropdown","data-sentry-source-file":"fitness-sub-navigation-client.tsx"})}),e.ctaButton?.buttons?.length?(0,t.jsx)("div",{className:"px-4 py-3 flex-shrink-0 ml-auto",children:(0,t.jsx)(c.CTAButton,{ctaButton:e.ctaButton})}):null]}),(0,t.jsx)("div",{className:"px-4 py-4 hidden shrink-0 md:block",children:(0,t.jsx)(h,{subLabel:y,showAllFitnessLink:n,clubsByLocation:j,homeSlug:b,"data-sentry-element":"ClubDropdown","data-sentry-source-file":"fitness-sub-navigation-client.tsx"})}),(0,t.jsx)("div",{className:"hidden md:flex shrink grow min-w-0",children:(0,t.jsx)(d,{items:w,pathname:u,loadingItems:m,onItemClick:g,"data-sentry-element":"FitnessHorizontalNavBar","data-sentry-source-file":"fitness-sub-navigation-client.tsx"})}),e.ctaButton?.buttons?.length?(0,t.jsx)("div",{className:"px-4 py-3 hidden shrink-0 md:block",children:(0,t.jsx)(c.CTAButton,{ctaButton:e.ctaButton})}):null]})}),(0,t.jsx)("div",{className:"md:hidden bg-background w-full border-b-[0.5px] border-border h-14",children:(0,t.jsx)("div",{className:"container mx-auto flex h-full items-center",children:(0,t.jsx)(d,{items:w,pathname:u,loadingItems:m,onItemClick:g,"data-sentry-element":"FitnessHorizontalNavBar","data-sentry-source-file":"fitness-sub-navigation-client.tsx"})})})]})}],262137)},335375,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(152088);e.s(["InfoTOC",0,function({items:e,containerClassName:s}){let[n,i]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let t=[];return e.forEach(e=>{if(!e._key)return;let r=document.getElementById(`section-${e._key}`);if(!r)return;let a=new IntersectionObserver(t=>{t[0].isIntersecting&&i(e._key)},{rootMargin:"-25% 0px -25% 0px",threshold:.15});a.observe(r),t.push(a)}),()=>{t.forEach(e=>e.disconnect())}},[e]),e.some(e=>e.title||e.headline))?(0,t.jsx)("div",{className:(0,a.cn)("relative py-4 md:py-[40px] lg:block hidden",s),"data-sentry-component":"InfoTOC","data-sentry-source-file":"info-toc.tsx",children:(0,t.jsxs)("div",{className:"sticky top-[150px]",children:[(0,t.jsx)("h2",{className:"text-4xl font-bold mb-12",children:"Info"}),(0,t.jsx)("ul",{className:"space-y-2",children:e.map(e=>{let r=e.title||e.headline;return r?(0,t.jsx)("li",{children:(0,t.jsx)("a",{href:`#section-${e._key}`,className:(0,a.cn)("block transition-colors text-zinc-600 hover:text-zinc-900 hover:font-medium text-nowrap",n===e._key&&"font-medium text-zinc-900"),onClick:t=>{t.preventDefault(),document.getElementById(`section-${e._key}`)?.scrollIntoView({behavior:"smooth"})},children:r})},e._key):null})})]})}):null}])},549640,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(499581),s=e.i(198945),n=e.i(594077),i=e.i(152088);function l({sport:e,isSelectedLeague:r}){let n=e.leagues[0]?.slug||"#";return(0,t.jsxs)(a.default,{href:n,className:"flex flex-col items-center gap-1 p-3 rounded-xl hover:bg-zinc-100 transition-colors focus:outline-none data-[selected=true]:bg-secondary","data-selected":r,"data-sentry-element":"Link","data-sentry-component":"LeagueSportCard","data-sentry-source-file":"league-sport-navigation-client.tsx",children:[(0,t.jsx)("div",{className:"w-7 h-7 relative flex-shrink-0",children:e.image.id&&(0,t.jsx)(s.Image,{id:e.image.id,alt:e.image.alt??"Sport icon",...(0,s.getSanityImageTransformations)(e.image),className:"w-full h-full object-contain"})}),(0,t.jsx)("p",{className:"text-sm font-medium text-zinc-900",children:e.title})]})}
18e.s(["LeagueSportNavigationClient",0,function({data:e,slug:a}){let[s,o]=(0,r.useState)(null),[d,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(s){c(s.canScrollNext()),m(s.canScrollPrev());let e=()=>{c(s.canScrollNext()),m(s.canScrollPrev())};return s.on("select",e),s.on("reInit",e),()=>{s.off("select",e),s.off("reInit",e)}}},[s]),(0,t.jsxs)(n.Carousel,{setApi:e=>o(e),opts:{slidesToScroll:"auto",dragFree:!0,containScroll:"trimSnaps",align:"start",skipSnaps:!1,inViewThreshold:.7},className:"px-0 pt-6 border-none","data-sentry-element":"Carousel","data-sentry-component":"LeagueSportNavigationClient","data-sentry-source-file":"league-sport-navigation-client.tsx",children:[(0,t.jsx)(n.CarouselPrevious,{className:(0,i.cn)("hidden",{"lg:inline-flex":u}),"data-sentry-element":"CarouselPrevious","data-sentry-source-file":"league-sport-navigation-client.tsx"}),(0,t.jsx)(n.CarouselContent,{className:"ml-0 scroll-smooth touch-pan-x","data-sentry-element":"CarouselContent","data-sentry-source-file":"league-sport-navigation-client.tsx",children:e?.leagues?.map(e=>(0,t.jsx)(n.CarouselItem,{className:"basis-auto pl-0 pr-3 min-w-0 flex-shrink-0",children:(0,t.jsx)(l,{sport:e,isSelectedLeague:e.leagues.flatMap(e=>e.slug).includes(a)})},e._key))}),(0,t.jsx)(n.CarouselNext,{className:(0,i.cn)("hidden",{"lg:inline-flex":d}),"data-sentry-element":"CarouselNext","data-sentry-source-file":"league-sport-navigation-client.tsx"})]})}])},65963,e=>{"use strict";var t=e.i(434073),r=e.i(502119),a=e.i(313318),s=e.i(837800);e.s(["LeaguesNavigationTabs",0,function({leagues:e}){let{currentSport:n,currentLeagueSlug:i,leagueTabs:l,navigateToLeague:o}=function(e){let t=(0,r.usePathname)(),a=(0,r.useRouter)(),{currentSport:n,currentLeagueSlug:i,leagueTabs:l,venueSlug:o}=(0,s.useMemo)(()=>{let r=t.split("/").filter(Boolean),a=r[0],s=r[r.length-1],n=s;if("leagues"===s&&e.length>0){let t=e[0];t?.leagues?.length>0&&(n=t.leagues[0].slug.split("/").pop()||s)}if(r.length<2||0===e.length)return{currentSport:null,currentLeagueSlug:null,leagueTabs:[],venueSlug:a};let i=null,l=null;for(let t of e)if(t.leagues.find(e=>e.slug.split("/").pop()===n)){i=t,l=n;break}!i&&e.length>0&&(i=e[0]).leagues.length>0&&(l=i.leagues[0].slug.split("/").pop()||null);let o=i?i.leagues.map(e=>{let t=e.slug.split("/").pop()||e.slug;return{title:e.title||"Untitled League",slug:t}}):[];return{currentSport:i,currentLeagueSlug:l,leagueTabs:o,venueSlug:a}},[e,t]);return{currentSport:n,currentLeagueSlug:i,leagueTabs:l,navigateToLeague:e=>{if(!o)return;let t=`/${o}/leagues/${e}`;a.push(t)}}}(e??[]);return!n||l.length<=1?null:(0,t.jsx)("div",{className:"mt-4","data-sentry-component":"LeaguesNavigationTabs","data-sentry-source-file":"leagues-navigation-tabs.tsx",children:(0,t.jsx)(a.Tabs,{value:i||void 0,onValueChange:o,className:"w-full px-4 container mx-auto ","data-sentry-element":"Tabs","data-sentry-source-file":"leagues-navigation-tabs.tsx",children:(0,t.jsx)(a.TabsList,{className:"h-12 bg-transparent p-0 justify-start","data-sentry-element":"TabsList","data-sentry-source-file":"leagues-navigation-tabs.tsx",children:l.map(e=>(0,t.jsx)(a.TabsTrigger,{value:e.slug,className:"h-12 px-6 rounded-none border-b-2 border-transparent data-[state=active]:border-blue-600 data-[state=active]:bg-transparent bg-transparent hover:bg-zinc-50 data-[state=active]:text-blue-600 font-medium transition-colors",children:e.title},e.slug))})})})}])},630106,878016,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(237179),a=a,s=e.i(985902),n=e.i(610012),i=e.i(173554),l=e.i(369721),o=e.i(298520);function d(){return(0,t.jsxs)("div",{role:"note",className:"mt-4 flex items-start gap-4 roun
18ded-lg border border-blue-200 bg-blue-50/60 px-5 py-4","data-sentry-component":"PasswordResetEmailNotice","data-sentry-source-file":"PasswordResetEmailNotice.tsx",children:[(0,t.jsx)(o.Clock,{className:"mt-0.5 size-5 shrink-0 text-blue-600","aria-hidden":"true","data-sentry-element":"Clock","data-sentry-source-file":"PasswordResetEmailNotice.tsx"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-foreground",children:"The email may take a few minutes to arrive"}),(0,t.jsx)("p",{className:"mt-1 text-sm leading-5 text-muted-foreground",children:"If you don't see it in your inbox right away, please check your spam folder and wait a few minutes before requesting a new link."})]})]})}e.s(["MembershipForgotPasswordForm",0,function({initialEmail:e="",onSubmit:o,onBack:c,errorOperation:u}){let[m,p]=(0,r.useState)(e),[h,x]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1),[y,b]=(0,r.useState)(null),v=async e=>{if(e&&(e.preventDefault(),e.stopPropagation()),!h&&m){x(!0),b(null);try{await o(m),g(!0)}catch(e){(0,l.reportClientError)(e,{operation:u,component:"MembershipForgotPasswordForm"}),b("Something went wrong. Please try again.")}finally{x(!1)}}};return f?(0,t.jsxs)("div",{className:"flex flex-col h-full min-h-[60vh] px-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center text-center flex-1 gap-3 py-12",children:[(0,t.jsx)(a.default,{className:"w-14 h-14 text-green-600 mb-2",strokeWidth:1.5}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-zinc-900",children:"Check your email"}),(0,t.jsxs)("p",{className:"text-zinc-600 text-sm leading-relaxed max-w-[280px]",children:["Instructions on how to reset your password were sent to"," ",(0,t.jsx)("span",{className:"text-zinc-900",children:m})]})]}),(0,t.jsx)("div",{className:"pb-8",children:(0,t.jsx)(s.Button,{variant:"outline",className:"w-full h-14 text-base font-medium rounded-full border-zinc-200 bg-transparent hover:bg-white text-zinc-900",onClick:c,children:"Back to login"})})]}):(0,t.jsxs)("div",{className:"px-4 py-6 space-y-6","data-sentry-component":"MembershipForgotPasswordForm","data-sentry-source-file":"membership-forgot-password-form.tsx",children:[(0,t.jsx)("h1",{className:"text-3xl font-medium text-zinc-900 leading-[40px]",children:"Forgot password?"}),(0,t.jsx)("p",{className:"text-zinc-600",children:"Enter your email address and we'll send you a link to reset your password."}),(0,t.jsxs)("form",{onSubmit:v,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"bg-white p-4 rounded-xl",children:[(0,t.jsx)(i.Label,{className:"font-normal",htmlFor:"forgot-email","data-sentry-element":"Label","data-sentry-source-file":"membership-forgot-password-form.tsx",children:"Email"}),(0,t.jsx)(n.Input,{id:"forgot-email",type:"email",placeholder:"Enter your email",value:m,onChange:e=>{p(e.target.value),b(null)},onKeyDown:e=>{"Enter"===e.key&&v()},required:!0,className:"h-12 shadow-none mt-2","data-sentry-element":"Input","data-sentry-source-file":"membership-forgot-password-form.tsx"})]}),y&&(0,t.jsx)("div",{role:"alert",className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:(0,t.jsx)("p",{className:"text-sm text-red-700",children:y})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(s.Button,{type:"submit",className:"w-full h-14 text-base font-medium bg-[#040711] hover:bg-zinc-900 text-white rounded-full",disabled:h||!m,"data-sentry-element":"Button","data-sentry-source-file":"membership-forgot-password-form.tsx",children:h?"Sending...":"Send reset link"}),(0,t.jsx)(d,{"data-sentry-element":"PasswordResetEmailNotice","data-sentry-source-file":"membership-forgot-password-form.tsx"})]})]})]})}],630106);var c=e.i(508930),u=e.i(300372),m=e.i(511833),p=e.i(545720);let h="Service is temporarily unavailable. Please try again later.";async function x({credentials:e,flow:t}){return c.startSpan({op:"service.function",name:"exerpIdentity.resolve",attributes:{flow:t}},async()=>{let[r,a]=await (0,p.login)(e,{flow:t});if(!r)return{status:"error",stage:"login",error:a??h};let{exerpUsername:s,accessToken:n}=r;u.setUser({username:s});let i=function(e){if(!e?.trim())return null;let t=e.replace(/\[.*\]$/,"").trim().match(/^(\d+)p(\d+)$/);if(!t)return null;let r=parseInt(t[1],10),a=parseInt(t[2],10);return Number.isNaN(r)||Number.isNaN(a)?null:{center:r,personId:a}}(s);if(!i)return{status:"unresolved",accessToken:n,exerpUsername:s,identity:null};
18try{let e=await (0,m.getPersonDetailAction)({center:i.center,id:i.personId});if(e.error)return{status:"error",stage:"person",error:e.error};if(!e.data)return{status:"error",stage:"person",error:h};let{person:t,personCommunication:r}=e.data;return{status:"resolved",accessToken:n,exerpUsername:s,identity:{center:t.personId.center,personId:t.personId.id},person:t,communication:r}}catch(e){return(0,l.reportClientError)(e,{operation:"exerpIdentity.resolve"},t?{flow:t}:void 0),{status:"error",stage:"person",error:e instanceof Error?e.message:h}}})}e.s(["resolveExerpIdentity",0,x],878016)},457605,e=>{"use strict";var t=e.i(434073),r=e.i(95858);e.s(["OctoberCheckInAlreadyRegistered",0,function({userName:e}){return(0,t.jsx)("div",{className:"w-full max-w-md mx-auto","data-sentry-component":"OctoberCheckInAlreadyRegistered","data-sentry-source-file":"OctoberCheckInAlreadyRegistered.tsx",children:(0,t.jsxs)("div",{className:"bg-zinc-900 rounded-lg border border-zinc-800 p-6 space-y-6",children:[(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("div",{className:"w-16 h-16 bg-green-900/50 rounded-full flex items-center justify-center",children:(0,t.jsx)(r.CircleCheck,{className:"w-8 h-8 text-green-400","data-sentry-element":"CircleCheck","data-sentry-source-file":"OctoberCheckInAlreadyRegistered.tsx"})})}),(0,t.jsxs)("div",{className:"text-center space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-zinc-50",children:"You're already registered!"}),(0,t.jsxs)("p",{className:"text-zinc-300",children:["Hey ",e,", you've already signed up for the Fall Into Fitness challenge."]})]}),(0,t.jsxs)("div",{className:"bg-zinc-800/50 rounded-lg p-4 space-y-2",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-zinc-200",children:"What's next?"}),(0,t.jsxs)("ul",{className:"text-sm text-zinc-400 space-y-1",children:[(0,t.jsx)("li",{children:"Keep an eye on your email for challenge updates."}),(0,t.jsx)("li",{children:"The challenge begins soon - get ready!"}),(0,t.jsx)("li",{children:"Track your progress once the challenge starts."})]})]})]})})}])},22339,e=>{"use strict";var t=e.i(434073),r=e.i(707836),a=e.i(985902);e.s(["OctoberCheckInConfirmation",0,function({onClose:e}){return(0,t.jsxs)("div",{className:"w-full space-y-6","data-sentry-component":"OctoberCheckInConfirmation","data-sentry-source-file":"OctoberCheckInConfirmation.tsx",children:[(0,t.jsx)("div",{className:"bg-zinc-900 rounded-[12px] border border-zinc-800 p-6",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-6",children:[(0,t.jsx)("div",{className:"w-20 h-20 rounded-full border-2 border-blue-600 bg-zinc-950/90 flex items-center justify-center flex-shrink-0",children:(0,t.jsx)(r.LogoBadgeIcon,{className:"w-[50px] h-[30px] text-white","data-sentry-element":"LogoBadgeIcon","data-sentry-source-file":"OctoberCheckInConfirmation.tsx"})}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center",children:[(0,t.jsx)("h2",{className:"text-2xl font-black text-white leading-[30px]",children:"You're registered!"}),(0,t.jsx)("p",{className:"text-sm text-[#9F9FA9] leading-5",children:"You're in for the Fall Into Fitness Challenge! Track your progress from the Chelsea Piers Fitness mobile app."})]})]})}),e&&(0,t.jsx)(a.Button,{onClick:e,className:"w-full h-11 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium",children:"Close drawer"})]})}])},167265,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(394447),s=e.i(719619);e.s(["OctoberCheckInPage",0,function({pageBuilder:e,pageId:n,pageType:i}){let[l,o]=(0,r.useState)(!1),d=(0,r.useCallback)(()=>{o(!0)},[]);return(0,r.useEffect)(()=>(window.addEventListener("openOctoberCheckInRegistration",d),()=>{window.removeEventListener("openOctoberCheckInRegistration",d)}),[d]),(0,t.jsxs)("div",{className:"min-h-screen bg-zinc-950","data-sentry-component":"OctoberCheckInPage","data-sentry-source-file":"OctoberCheckInPage.tsx",children:[e&&e.length>0?(0,t.jsx)(a.PageBuilder,{pageBuilder:e,id:n,type:i}):(0,t.jsxs)("div",{className:"container mx-auto px-4 py-16 text-center",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold text-zinc-50 mb-4",children:"October Check-In Challenge"}),(0,t.jsx)("p",{className:"text-zinc-400",children:"Content is being set up. Please check back soon!"})]}),(0,t.jsx)(s.OctoberCheckInRegistrationDrawer,{open:l,onOpenChange:o,"data-sentry-element":"OctoberCheckInRegistrationDrawer","data-sentry-source-file":"OctoberCheckInPage.tsx"})]})}])},719619,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(3656),n=e.i(875348),i=e.i(985902),l=e.i(245715),o=e.i(85130),d=e.i(545720),c=e.i(325788),u=e.i(296955),m=e.i(457605),p=e.i(22339),h=e.i(369721);function x(){return"a673b04f-c02a-4618-a563-0c9d9c7555fb"}e.s(["OctoberCheckInRegistrationDrawer",0,function({open:e,onOpenChange:f}){let g=(0,n.useIsMobile)(),y=(0,a.useRouter)(),b=(0,a.useSearchParams)(),[v,j]=(0,r.useState)({isAuthenticated:!1,exerpUsername:null,accessToken:null,userName:null}),[w,N]=(0,r.useState)("login"),[C,S]=(0,r.useState)(!1),[k,P]=(0,r.useState)(null),[M,E]=(0,r.useState)(void 0),D=v.userName||"Member";(0,r.useEffect)(()=>{"true"!==b.get("register")||e||f(!0)},[b,e,f]);let I=(0,r.useCallback)(e=>{if(f(e),!e&&"true"===b.get("register")){let e=new URL(window.location.href);e.searchParams.delete("register"),y.replace(e.pathname+e.search,{scroll:!1})}},[f,b,y]),z=async(e,t)=>{S(!0),P(null);try{let[r,a]=await (0,d.login)({email:e,password:t});if(a)return P(a.message||"Login failed. Please try again."),S(!1),!1;
18if(r){let e={isAuthenticated:!0,exerpUsername:r.exerpUsername,accessToken:r.accessToken,userName:null};return j(e),N("loading"),await L(r.exerpUsername,r.accessToken),!0}return P("Login failed. Please try again."),S(!1),!1}catch(e){return(0,h.reportClientError)(e,{operation:"octoberCheckIn.drawerLogin"}),P("An unexpected error occurred. Please try again."),S(!1),!1}},L=async(e,t)=>{let r=x();try{let[a,s]=await (0,c.checkEnrollmentStatus)(e,t,r);if(s){E(s.message||"Failed to check registration status."),N("error"),S(!1);return}if(a&&(a.participantName&&j(e=>({...e,userName:a.participantName||null})),a.isEnrolled)){N("already-registered"),S(!1);return}let[n,i]=await (0,c.registerForChallenge)(e,t,r);if(i){E(i.message||"Registration failed."),N("error"),S(!1);return}n&&(n.participantName&&j(e=>({...e,userName:n.participantName||e.userName})),n.alreadyEnrolled?N("already-registered"):N("confirmation")),S(!1)}catch(e){(0,h.reportClientError)(e,{operation:"octoberCheckIn.drawerRegister"}),E("An unexpected error occurred. Please try again."),N("error"),S(!1)}},T=()=>{N("login"),E(void 0),P(null),j({isAuthenticated:!1,exerpUsername:null,accessToken:null,userName:null})},R=()=>{switch(w){case"login":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(u.ClassMadnessLoginForm,{onContinue:z,isLoading:C,errorMessage:k,onClearError:()=>P(null),title:"Register for the Fall Into Fitness Challenge",subtitle:"Sign in with your Chelsea Piers membership email to join the challenge.",buttonText:"Register & Join"})});case"loading":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsxs)("div",{className:"bg-zinc-900 rounded-lg border border-zinc-800 p-8 text-center",children:[(0,t.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-blue-500 border-t-transparent rounded-full mx-auto mb-4"}),(0,t.jsx)("p",{className:"text-zinc-300",children:"Registering you for the Fall Into Fitness Challenge..."})]})});case"error":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsxs)("div",{className:"bg-zinc-900 rounded-lg border border-zinc-800 p-6 text-center space-y-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-red-900/50 rounded-full flex items-center justify-center mx-auto",children:(0,t.jsx)(s.X,{className:"w-6 h-6 text-red-400"})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-zinc-50",children:"Registration Failed"}),(0,t.jsx)("p",{className:"text-zinc-400 text-sm",children:M||"Something went wrong. Please try again."})]}),(0,t.jsx)(i.Button,{onClick:T,className:"w-full h-11 bg-blue-600 hover:bg-blue-700 text-white rounded-lg",children:"Try Again"})]})});case"already-registered":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(m.OctoberCheckInAlreadyRegistered,{userName:D})});case"confirmation":return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(p.OctoberCheckInConfirmation,{onClose:()=>I(!1)})})}},A=()=>{switch(w){case"login":return"Sign in to Register";case"loading":return"Registering...";case"already-registered":return"Already Registered";case"confirmation":return"Registration Complete!";case"error":return"Registration Failed"}};return g?(0,t.jsx)(o.Drawer,{open:e,onOpenChange:I,repositionInputs:!1,children:(0,t.jsxs)(o.DrawerContent,{className:"bg-zinc-950 border-zinc-800 max-h-[100vh] max-h-[100dvh] flex flex-col",children:[(0,t.jsx)(o.DrawerHeader,{className:"border-b border-zinc-800 px-6 py-4",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(o.DrawerTitle,{className:"text-zinc-50 text-lg font-semibold",children:A()}),(0,t.jsx)(o.DrawerClose,{asChild:!0,children:(0,t.jsxs)(i.Button,{variant:"ghost",size:"icon",className:"text-zinc-400 hover:text-zinc-50 hover:bg-zinc-800",children:[(0,t.jsx)(s.X,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain",children:R()})]})}):(0,t.jsx)(l.Sheet,{open:e,onOpenChange:I,"data-sentry-element":"Sheet","data-sentry-component":"OctoberCheckInRegistrationDrawer","data-sentry-source-file":"OctoberCheckInRegistrationDrawer.tsx",children:(0,t.jsxs)(l.SheetContent,{side:"right",className:"w-[448px] max-w-full bg-zinc-950 border-l border-zinc-800 p-0 shadow-[0px_20px_25px_-5px_rgba(0,0,0,0.1),0px_8px_10px_-6px_rgba(0,0,0,0.1)]","data-sentry-element":"SheetContent","data-sentry-source-file":"OctoberCheckInRegistrationDrawer.tsx",children:[(0,t.jsx)(l.SheetHeader,{className:"sticky top-0 z-10 bg-zinc-950 border-b border-zinc-800 px-6 py-4","data-sentry-element":"SheetHeader","data-sentry-source-file":"OctoberCheckInRegistrationDrawer.tsx",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(l.SheetTitle,{className:"text-zinc-50 text-lg font-semibold","data-sentry-element":"SheetTitle","data-sentry-source-file":"OctoberCheckInRegistrationDrawer.tsx",children:A()}),(0,t.jsx)(l.SheetClose,{asChild:!0,"data-sentry-element":"SheetClose","data-sentry-source-file":"OctoberCheckInRegistrationDrawer.tsx",children:(0,t.jsxs)(i.Button,{variant:"ghost",size:"icon",className:"text-zinc-400 hover:text-zinc-50 hover:bg-zinc-800","data-sentry-element":"Button","data-sentry-source-file":"OctoberCheckInRegistrationDrawer.tsx",children:[(0,t.jsx)(s.X,{className:"h-5 w-5","data-sentry-element":"X","data-sentry-source-file":"OctoberCheckInRegistrationDrawer.tsx"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:R()})]})})},"getOctoberCheckInChallengeId",0,x])},394447,e=>{"use strict";var t=e.i(434073),r=e.i(635150),a=e.i(291131),s=e.i(139061);let n=(0,a.default)(()=>e.A(102455).then(e=>
18({default:e.ActivitiesCarousel})),{loadableGenerated:{modules:[850478]}}),i=(0,a.default)(()=>e.A(821040).then(e=>({default:e.ActivitiesCarouselThreeTab})),{loadableGenerated:{modules:[793212]}}),l=(0,a.default)(()=>e.A(864962).then(e=>({default:e.AddOnBlock})),{loadableGenerated:{modules:[772811]}}),o=(0,a.default)(()=>e.A(944155).then(e=>({default:e.BluePricingPromo})),{loadableGenerated:{modules:[459409]}}),d=(0,a.default)(()=>e.A(220727).then(e=>({default:e.BrandIntroduction})),{loadableGenerated:{modules:[323591]}}),c=(0,a.default)(()=>e.A(644082).then(e=>({default:e.BookingCta})),{loadableGenerated:{modules:[835641]}}),u=(0,a.default)(()=>e.A(733528).then(e=>({default:e.BusinessBlock})),{loadableGenerated:{modules:[495486]}}),m=(0,a.default)(()=>e.A(370153).then(e=>({default:e.CampPromo})),{loadableGenerated:{modules:[673884]}}),p=(0,a.default)(()=>e.A(139880).then(e=>({default:e.CardCarousel})),{loadableGenerated:{modules:[370124]}}),h=(0,a.default)(()=>e.A(501895).then(e=>({default:e.CenteredRichText})),{loadableGenerated:{modules:[166436]}}),x=(0,a.default)(()=>e.A(169940).then(e=>({default:e.RichTextLegal})),{loadableGenerated:{modules:[888293]}}),f=(0,a.default)(()=>e.A(701143).then(e=>({default:e.ClassesBlock})),{loadableGenerated:{modules:[564076]}}),g=(0,a.default)(()=>e.A(676350).then(e=>({default:e.CoachesCarousel})),{loadableGenerated:{modules:[826974]}}),y=(0,a.default)(()=>e.A(620423).then(e=>({default:e.CoachesListView})),{loadableGenerated:{modules:[601968]}}),b=(0,a.default)(()=>e.A(428706).then(e=>({default:e.ContactBlock})),{loadableGenerated:{modules:[163290]}}),v=(0,a.default)(()=>e.A(687133).then(e=>({default:e.ContentBlock})),{loadableGenerated:{modules:[188387]}}),j=(0,a.default)(()=>e.A(843854).then(e=>({default:e.CtaWithBenefits})),{loadableGenerated:{modules:[547468]}}),w=(0,a.default)(()=>e.A(822006).then(e=>({default:e.DifferentSportBlock})),{loadableGenerated:{modules:[615743]}}),N=(0,a.default)(()=>e.A(529833).then(e=>({default:e.FacilitiesCarousel})),{loadableGenerated:{modules:[954776]}}),C=(0,a.default)(()=>e.A(942983).then(e=>({default:e.FaqAccordion})),{loadableGenerated:{modules:[148343]}}),S=(0,a.default)(()=>e.A(358288).then(e=>({default:e.FeatureCarousel})),{loadableGenerated:{modules:[443911]}}),k=(0,a.default)(()=>e.A(931725).then(e=>({default:e.FormBlock})),{loadableGenerated:{modules:[150425]}}),P=(0,a.default)(()=>e.A(220416).then(e=>({default:e.FormHero})),{loadableGenerated:{modules:[695455]}}),M=(0,a.default)(()=>e.A(654029).then(e=>({default:e.FourVerticalMediaCards})),{loadableGenerated:{modules:[646354]}}),E=(0,a.default)(()=>e.A(249273).then(e=>({default:e.HeroBlock})),{loadableGenerated:{modules:[632082]}}),D=(0,a.default)(()=>e.A(140758).then(e=>({default:e.HeroCenteredText})),{loadableGenerated:{modules:[520805]}}),I=(0,a.default)(()=>e.A(89576).then(e=>({default:e.HeroTextBlock})),{loadableGenerated:{modules:[177120]}}),z=(0,a.default)(()=>e.A(267955).then(e=>({default:e.HoursBlock})),{loadableGenerated:{modules:[704689]}}),L=(0,a.default)(()=>e.A(924304).then(e=>({default:e.HowItWorksBlock})),{loadableGenerated:{modules:[700010]}}),T=(0,a.default)(()=>e.A(968579).then(e=>({default:e.InfoTable})),{loadableGenerated:{modules:[576649]}}),R=(0,a.default)(()=>e.A(807668).then(e=>({default:e.JoinSeasonTable})),{loadableGenerated:{modules:[690108]}}),A=(0,a.default)(()=>e.A(70465).then(e=>({default:e.MembershipBenefits})),{loadableGenerated:{modules:[871727]}}),_=(0,a.default)(()=>e.A(840157).then(e=>({default:e.MembershipFeatures})),{loadableGenerated:{modules:[654220]}}),B=(0,a.default)(()=>e.A(109697).then(e=>({default:e.PricingTableBlock})),{loadableGenerated:{modules:[169501]}}),F=(0,a.default)(()=>e.A(974684).then(e=>({default:e.OffersCarousel})),{loadableGenerated:{modules:[746615]}}),O=(0,a.default)(()=>e.A(361087).then(e=>({default:e.ProgramListBlock})),{loadableGenerated:{modules:[236702]}}),$=(0,a.default)(()=>e.A(482383).then(e=>({default:e.ProgressionPath})),{loadableGenerated:{modules:[825067]}}),H=(0,a.default)(()=>e.A(210736).then(e=>({default:e.ProgressionPathList})),{loadableGenerated:{modules:[980999]}}),U=(0,a.default)(()=>e.A(182512).then(e=>({default:e.ProgressionGroupList})),{loadableGenerated:{modules:[919159]}}),G=(0,a.default)(()=>e.A(484349).then(e=>({default:e.PromoBar})),{loadableGenerated:{modules:[961151]}}),V=(0,a.default)(()=>e.A(844947).then(e=>({default:e.PromoCard})),{loadableGenerated:{modules:[403461]}}),W=(0,a.default)(()=>e.A(719694).then(e=>({default:e.QuoteBlock})),{loadableGenerated:{modules:[745072]}}),K=(0,a.default)(()=>e.A(230977).then(e=>({default:e.RegistrationDatesBlock})),{loadableGenerated:{modules:[40125]}}),Y=(0,a.default)(()=>e.A(245808).then(e=>({default:e.RulesAccordion})),{loadableGenerated:{modules:[919574]}}),q=(0,a.default)(()=>e.A(330417).then(e=>({default:e.SectionHeadline})),{loadableGenerated:{modules:[759893]}}),X=(0,a.default)(()=>e.A(672123).then(e=>({default:e.SignUpByDateBlock})),{loadableGenerated:{modules:[845097]}}),J=(0,a.default)(()=>e.A(400890).then(e=>({default:e.ImageGalleryComponent})),{loadableGenerated:{modules:[833863]}}),Z=(0,a.default)(()=>e.A(985193).then(e=>({default:e.ImageCarouselBlock})),{loadableGenerated:{modules:[711832]}}),Q=(0,a.default)(()=>e.A(449547).then(e=>({default:e.SplitFeature})),{loadableGenerated:{modules:[888409]}}),ee=(0,a.default)(()=>e.A(28923).then(e=>({default:e.PersonSpotlightCard})),{loadableGenerated:{modules:[247701]}}),et=(0,a.default)(()=>e.A(376774).then(e=>({default:e.SponsorsBlock})),{loadableGenerated:{modules:[486969]}}),er=(0,a.default)(()=>e.A(87215).then(e=>
18({default:e.SportsCarousel})),{loadableGenerated:{modules:[431763]}}),ea=(0,a.default)(()=>e.A(967437).then(e=>({default:e.ThreeImageAndTitleCards})),{loadableGenerated:{modules:[170298]}}),es=(0,a.default)(()=>e.A(894882).then(e=>({default:e.ThreeStepTextBlock})),{loadableGenerated:{modules:[27392]}}),en=(0,a.default)(()=>e.A(932637).then(e=>({default:e.ToggleImageCard})),{loadableGenerated:{modules:[397548]}}),ei=(0,a.default)(()=>e.A(514550).then(e=>({default:e.VenueAmenities})),{loadableGenerated:{modules:[42122]}}),el=(0,a.default)(()=>e.A(214543).then(e=>({default:e.VenueBusinesses})),{loadableGenerated:{modules:[256361]}}),eo=(0,a.default)(()=>e.A(270951).then(e=>({default:e.VenueHeroBlock})),{loadableGenerated:{modules:[750479]}}),ed=(0,a.default)(()=>e.A(885942).then(e=>({default:e.ImageWall})),{loadableGenerated:{modules:[365664]}}),ec=(0,a.default)(()=>e.A(89556).then(e=>({default:e.ToggleCardsWithDescriptionAndLinks})),{loadableGenerated:{modules:[122424]}}),eu=(0,a.default)(()=>e.A(444923).then(e=>({default:e.ImageShowcase})),{loadableGenerated:{modules:[54963]}}),em=(0,a.default)(()=>e.A(610120).then(e=>({default:e.ThumbnailList})),{loadableGenerated:{modules:[900930]}}),ep=(0,a.default)(()=>e.A(819780).then(e=>({default:e.Divider})),{loadableGenerated:{modules:[716372]}}),eh=(0,a.default)(()=>e.A(233736).then(e=>({default:e.LeagueTryOutTable})),{loadableGenerated:{modules:[963591]}}),ex=(0,a.default)(()=>e.A(638360).then(e=>({default:e.SinglePhotoSlideshow})),{loadableGenerated:{modules:[212725]}}),ef=(0,a.default)(()=>e.A(69559).then(e=>({default:e.PricingPromoCard})),{loadableGenerated:{modules:[137623]}}),eg=(0,a.default)(()=>e.A(625751).then(e=>({default:e.LargePromoCard})),{loadableGenerated:{modules:[380821]}}),ey=(0,a.default)(()=>e.A(597469).then(e=>({default:e.TestimonialCarousel})),{loadableGenerated:{modules:[169360]}}),eb=(0,a.default)(()=>e.A(164917).then(e=>({default:e.BasicTestimonialCarousel})),{loadableGenerated:{modules:[453139]}}),ev=(0,a.default)(()=>e.A(878406).then(e=>({default:e.PhotoSlideshow})),{loadableGenerated:{modules:[231340]}}),ej=(0,a.default)(()=>e.A(424561).then(e=>({default:e.ClassMadnessHowItWorksBlock})),{loadableGenerated:{modules:[352937]}}),ew=(0,a.default)(()=>e.A(451858).then(e=>({default:e.ClassMadnessPrizesBlock})),{loadableGenerated:{modules:[819697]}}),eN=(0,a.default)(()=>e.A(261678).then(e=>({default:e.ClassMadnessCategoriesBlock})),{loadableGenerated:{modules:[239390]}}),eC=(0,a.default)(()=>e.A(161980).then(e=>({default:e.ClassMadnessFaqBlock})),{loadableGenerated:{modules:[416636]}}),eS=(0,a.default)(()=>e.A(61968).then(e=>({default:e.ClassMadnessBottomCtaBlock})),{loadableGenerated:{modules:[653636]}}),ek=(0,a.default)(()=>e.A(47318).then(e=>({default:e.ClassMadnessHeroBlock})),{loadableGenerated:{modules:[347685]}}),eP=(0,a.default)(()=>e.A(8474).then(e=>({default:e.OctoberCheckinHeroBlock})),{loadableGenerated:{modules:[888096]}}),eM=(0,a.default)(()=>e.A(779501).then(e=>({default:e.OctoberCheckinBottomCtaBlock})),{loadableGenerated:{modules:[905729]}}),eE={heroBlock:E,heroCenteredText:D,heroTextBlock:I,activitiesCarousel:n,contentBlock:v,businessBlock:u,bookingCta:c,brandIntroduction:d,campPromo:m,faqAccordion:C,rulesAccordion:Y,centeredRichText:h,richTextLegal:x,ctaWithBenefits:j,venueAmenities:ei,sponsorsBlock:et,facilitiesBlock:N,hoursBlock:z,formBlock:k,coachesCarousel:g,coachesListView:y,promoBar:G,bluePricingPromo:o,howItWorksBlock:L,offersCarousel:F,contactBlock:b,venueBusinesses:el,sportsCarousel:er,differentSportBlock:w,sectionHeadline:q,classesBlock:f,registrationDatesBlock:K,promoCardBlock:V,progressionPath:$,progressionPathList:H,progressionGroupList:U,activitiesCarouselThreeTab:i,addOnBlock:l,threeStepTextBlock:es,venueHero:eo,programListBlock:O,cardCarousel:p,quoteBlock:W,splitFeature:Q,personSpotlightCard:ee,joinSeasonTable:R,threeImageAndTitleCards:ea,membershipBenefits:A,membershipFeatures:_,featureCarousel:S,formHero:P,infoTable:T,pricingTableBlock:B,toggleImageCard:en,signUpByDateBlock:X,imageGalleryComponent:J,imageCarouselBlock:Z,imageWall:ed,toggleCardsWithDescriptionAndLinks:ec,imageShowcase:eu,fourVerticalMediaCards:M,thumbnailList:em,divider:ep,leagueTryOutTable:eh,pricingPromoCard:ef,largePromoCard:eg,testimonialCarousel:ey,singlePhotoSlideshow:ex,photoSlideshow:ev,basicTestimonialCarousel:eb,classMadnessHowItWorksBlock:ej,classMadnessPrizesBlock:ew,classMadnessCategoriesBlock:eN,classMadnessFaqBlock:eC,classMadnessBottomCtaBlock:eS,classMadnessHeroBlock:ek,classMadnessDashboardCategoryGridBlock:(0,a.default)(()=>e.A(723656).then(e=>({default:e.ClassMadnessDashboardCategoryGridBlock})),{loadableGenerated:{modules:[293887]}}),octoberCheckinHeroBlock:eP,octoberCheckinBottomCtaBlock:eM,progressionWave:(0,a.default)(()=>e.A(423537).then(e=>({default:e.ProgressionWave})),{loadableGenerated:{modules:[669884]}}),valueTable:(0,a.default)(()=>e.A(310694).then(e=>({default:e.ValueTable})),{loadableGenerated:{modules:[327741]}}),ctaBanner:(0,a.default)(()=>e.A(364769).then(e=>({default:e.CtaBanner})),{loadableGenerated:{modules:[53793]}})};e.s(["PageBuilder",0,function({pageBuilder:e,id:a,type:n,slug:i}
18){let l=new Map;return(0,t.jsx)("div",{"data-sanity":(0,r.createDataAttribute)({id:a,baseUrl:s.studioUrl,projectId:s.projectId,dataset:s.dataset,type:n,path:"pageBuilder"}).toString(),"data-sentry-component":"PageBuilder","data-sentry-source-file":"pagebuilder.tsx",children:e.map(e=>{let o=eE[e._type],d=(l.get(e._type)||0)+1;l.set(e._type,d);let c=`${e._type}${d}`;return o?(0,t.jsx)("div",{id:c,"data-sanity":(0,r.createDataAttribute)({id:a,baseUrl:s.studioUrl,projectId:s.projectId,dataset:s.dataset,type:n,path:`pageBuilder[_key=="${e._key}"]`}).toString(),children:(0,t.jsx)(o,{...e,pageSlug:i})},`${e._type}-${e._key}`):(0,t.jsxs)("div",{id:c,className:"flex items-center justify-center p-8 text-center text-muted-foreground bg-muted rounded-lg",children:["Component not found for block type: ",(0,t.jsx)("code",{children:e._type})]},`${e._type}-${e._key}`)})})}])},838369,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(369721);function n(e){let t=e?.digest;return"string"==typeof t&&t.startsWith("NEXT_")}function i({onReset:e}){let r=(0,a.useRouter)();return(0,t.jsxs)("div",{className:"container mx-auto flex min-h-[400px] flex-col items-center justify-center gap-4 px-4 text-center","data-sentry-component":"ScheduleErrorFallback","data-sentry-source-file":"schedule-error-boundary.tsx",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"We couldn't load the schedule"}),(0,t.jsx)("p",{className:"text-base text-muted-foreground",children:"Something went wrong loading this schedule. Please try again."}),(0,t.jsx)("button",{onClick:()=>{r.refresh(),e()},className:"rounded-md bg-zinc-900 px-4 py-2 text-sm font-medium text-white hover:bg-zinc-800",children:"Try again"})]})}class l extends r.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){n(e)||(0,s.reportClientError)(e instanceof Error?e:Error(String(e)),{operation:this.props.operation??"schedule-error-boundary"})}reset=()=>this.setState({error:null});render(){let{error:e}=this.state;if(e){if(n(e))throw e;return(0,t.jsx)(i,{onReset:this.reset,"data-sentry-element":"ScheduleErrorFallback","data-sentry-component":"ScheduleErrorBoundary","data-sentry-source-file":"schedule-error-boundary.tsx"})}return this.props.children}}e.s(["ScheduleErrorBoundary",0,l])},38036,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(629184);function n(){return(n=Object.assign.bind()).apply(this,arguments)}function i(e,t){if(null==e)return{};var r,a,s={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(s[r]=e[r]);return s}var l=function(e,t){var r=t;return Array.isArray(r)&&1===r.length&&(r=n({},t[0])),{__html:JSON.stringify(Array.isArray(r)?r.map(function(t){return o(e,t)}):o(e,r),m)}},o=function(e,t){var r=t.id,a=n({},(void 0===r?void 0:r)?{"@id":t.id}:{},t);return delete a.id,n({"@context":"https://schema.org","@type":e},a)},d=Object.freeze({"&":"&","<":"<",">":">",'"':""","'":"'"}),c=RegExp("["+Object.keys(d).join("")+"]","g"),u=function(e){return d[e]},m=function(e,t){switch(typeof t){case"object":if(null===t)return;return t;case"number":case"boolean":case"bigint":return t;case"string":return t.replace(c,u);default:return}},p=["type","keyOverride","scriptKey","scriptId","dataArray","useAppDir"];function h(e){var t=e.type,a=void 0===t?"Thing":t,o=e.keyOverride,d=e.scriptKey,c=e.scriptId,u=void 0===c?void 0:c,m=e.dataArray,h=e.useAppDir,x=i(e,p),f=function(){return r.default.createElement("script",{type:"application/ld+json",id:u,"data-testid":u,dangerouslySetInnerHTML:l(a,void 0===m?n({},x):m),key:"jsonld-"+d+(o?"-"+o:"")})};return void 0!==h&&h?r.default.createElement(f,null):r.default.createElement(s.default,null,f())}function x(e){if("string"==typeof e)return{"@type":"Person",name:e};if(e.name){var t;return{"@type":null!=(t=null==e?void 0:e.type)?t:"Person",name:e.name,url:null==e?void 0:e.url}}}var f=["reviewRating","author","publisher"];function g(e){return"string"==typeof e?e:n({"@type":"PostalAddress"},e)}function y(e){if(e)return{"@type":"GeoCircle",geoMidpoint:{"@type":"GeoCoordinates",latitude:e.geoMidpoint.latitude,longitude:e.geoMidpoint.longitude},geoRadius:e.geoRadius}}function b(e){if(e)return n({},e,{"@type":"Offer",priceSpecification:function(e){if(e)return{"@type":e.type,priceCurrency:e.priceCurrency,price:e.price}}(e.priceSpecification),itemOffered:function(e){if(e)return n({},e,{"@type":"Service"})}(e.itemOffered)})}function v(e){if(e)return n({},e,{"@type":"OpeningHoursSpecification"})}var j=["type","keyOverride","address","geo","rating","review","action","areaServed","makesOffer","openingHours","images"];function w(e){var t=e.type,a=e.keyOverride,s=e.address,l=e.geo,o=e.rating,d=e.review,c=e.action,u=e.areaServed,m=e.makesOffer,p=e.openingHours,w=e.images,N=i(e,j),C=n({},N,{image:w,address:function(e){if(e)return Array.isArray(e)?1===e.length?g(e[0]):e.map(g):g(e)}(s),geo:function(e){if(e)return n({},e,{"@type":"GeoCoordinates"})}(l),aggregateRating:function(e){if(e)return{"@type":"AggregateRating",ratingCount:e.ratingCount,reviewCount:e.reviewCount,bestRating:e.bestRating,ratingValue:e.ratingValue,worstRating:e.worstRating}}(o),review:function(e){function t(e){var t=e.reviewRating,r=e.author,a=e.publisher,s=i(e,f);return n({},s,{"@type":"Review"},r&&{author:Array.isArray(r)?r.map(function(e){return x(e)}).filter(function(e){return!!e}):r?x(r):void 0},t&&{reviewRating:function(e){if(e)return n({},e,{"@type":"Rating"})}(t)},a&&{publisher:function(e){if(e)return{"@type":"Organization",name:e,logo:function(e){if(e)return{"@type":"ImageObject",url:e}}(void 0)}}(a.name)})}return Array.isArray(e)?e.map(t):e?t(e):void 0}(d),potentialAction:function(e){if(e)return{"@type":e.actionType,name:e.actionName,target:e.target}}(c),areaServed:u&&u.map(y),makesOffer:null==m?void 0:m.map(b),openingHoursSpecification:Array.isArray(p)?p.map(v):v(p)});
18return r.default.createElement(h,n({type:void 0===t?"LocalBusiness":t,keyOverride:a},C,{scriptKey:"LocalBusiness"}))}var N=["type","keyOverride","itemListElements"];function C(e){var t=e.type,a=e.keyOverride,s=e.itemListElements,l=i(e,N),o=n({},l,{itemListElement:function(e){if(e&&e.length)return e.map(function(e){return{"@type":"ListItem",position:e.position,item:e.item,name:e.name}})}(s)});return r.default.createElement(h,n({type:void 0===t?"BreadcrumbList":t,keyOverride:a},o,{scriptKey:"breadcrumb"}))}var S=e.i(941219),k=e.i(482069),P=e.i(918059),M=e.i(628876),E=e.i(713671),D=e.i(111154);function I({hiddenItems:e,loadingItems:r,onItemClick:a}){if(!e.length)return null;let s=(0,D.anyGroupLoading)(e,r);return(0,t.jsxs)(M.DropdownMenu,{modal:!1,"data-sentry-element":"DropdownMenu","data-sentry-component":"MoreMenu","data-sentry-source-file":"MoreMenu.tsx",children:[(0,t.jsxs)(M.DropdownMenuTrigger,{className:"cursor-pointer flex items-center h-full px-2.5 text-sm md:text-base gap-1 text-primary hover:text-zinc-600 dark:hover:text-neutral-300 transition-colors duration-200","data-sentry-element":"DropdownMenuTrigger","data-sentry-source-file":"MoreMenu.tsx",children:[(0,t.jsx)(E.LabelOrSpinner,{loading:s,"data-sentry-element":"LabelOrSpinner","data-sentry-source-file":"MoreMenu.tsx",children:"More"}),(0,t.jsx)(P.ChevronDown,{className:"size-4 text-muted-foreground","data-sentry-element":"ChevronDown","data-sentry-source-file":"MoreMenu.tsx"})]}),(0,t.jsx)(M.DropdownMenuContent,{sideOffset:2,"data-sentry-element":"DropdownMenuContent","data-sentry-source-file":"MoreMenu.tsx",children:e.map(e=>{if(e.subLinks?.length){let s=(0,D.anyChildLoading)(e,r);return(0,t.jsx)(M.DropdownMenuItem,{asChild:!0,className:"py-2.5",children:(0,t.jsx)("a",{className:"relative block",href:e.href||"#",onClick:t=>{(0,D.isRealHref)(e.href)&&(t.preventDefault(),a(e.href),window.location.href=e.href)},children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(E.LabelOrSpinner,{loading:s,children:e.label}),(0,t.jsx)(P.ChevronDown,{className:"size-4"})]})})},e.label)}let s=(0,D.isRealHref)(e.href)&&r.has(e.href);return(0,t.jsx)(M.DropdownMenuItem,{asChild:!0,className:"py-2.5",children:(0,t.jsx)(k.NavLink,{label:e.label,href:e.href||"#",openInNewTab:e.openInNewTab,loading:!!s,onClick:a,className:"relative block"})},e.label)})})]})}function z({items:e,pathname:a,loadingItems:s,onItemClick:n,variant:i}){let l="desktop"===i?D.VISIBLE_ITEMS_DESKTOP:D.VISIBLE_ITEMS_MOBILE,{wrapRef:o,listRef:d,fitCount:c,measuring:u}=function(e,t,a){let s=(0,r.useRef)(null),n=(0,r.useRef)(null),i=(0,r.useRef)([]),l=(0,r.useRef)(0),o=(0,r.useRef)(""),[d,c]=(0,r.useState)({signature:"",fitCount:e}),u=d.signature!==a,m=u?Math.min(e,t):d.fitCount,p=(0,r.useCallback)(()=>{let e=s.current,r=n.current;if(!e||!r||0===e.clientWidth)return!1;if(o.current!==a){let e=Array.from(r.children),t=e[e.length-1],s=t?.firstElementChild??t;l.current=s?s.getBoundingClientRect().width:0,i.current=e.slice(0,-1).map(e=>e.getBoundingClientRect().width),o.current=a}let d=getComputedStyle(e),u=e.clientWidth-parseFloat(d.paddingLeft||"0")-parseFloat(d.paddingRight||"0"),m=i.current,p=m.length,h=1;for(let e=p;e>=1;e--){let r=0;for(let t=0;t<e;t++)r+=m[t]??0;if(p-e+(t-p)>0&&(r+=l.current),r<=u+.5){h=e;break}}return c(e=>e.signature===a&&e.fitCount===h?e:{signature:a,fitCount:h}),!0},[a,t]),h=(0,r.useCallback)(()=>{p()||requestAnimationFrame(()=>{p()})},[p]);return(0,r.useLayoutEffect)(()=>{let e=s.current;if(!e)return;h();let t=new ResizeObserver(h);return t.observe(e),window.addEventListener("resize",h),()=>{t.disconnect(),window.removeEventListener("resize",h)}},[h]),{wrapRef:s,listRef:n,fitCount:m,measuring:u}}(l,e.length,e.map(e=>e.label).join("|")),m=e.slice(0,Math.min(l,c)),p=e.slice(m.length),h=u&&!p.length?e.slice(-1):p,x=h!==p;return"desktop"===i?(0,t.jsx)("div",{ref:o,className:"pl-1.5 shrink grow overflow-hidden hidden md:flex h-full",children:(0,t.jsxs)("ul",{ref:d,className:"items-center overflow-x-auto hidden md:flex h-full",children:[m.map(e=>(0,t.jsxs)("li",{className:"relative h-full flex items-center whitespace-nowrap",children:[a===e.href&&(0,t.jsx)("span",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-0.5 bg-primary"}),e.subLinks?.length?(0,t.jsx)(S.NavDropdown,{item:e,loadingItems:s,onItemClick:n,offset:2}):(0,t.jsx)(k.NavLink,{label:e.label,href:e.href,openInNewTab:e.openInNewTab,loading:(0,D.isRealHref)(e.href)&&s.has(e.href),onClick:n,className:"flex items-center h-full px-2.5 text-sm md:px-4 md:text-base relative z-10 text-primary transition-colors duration-200 hover:text-zinc-600 dark:hover:text-neutral-300"})]},`d-${e.label}`)),h.length>0&&(0,t.jsx)("li",{className:"h-full flex items-center","aria-hidden":x||void 0,children:(0,t.jsx)(I,{hiddenItems:h,loadingItems:s,onItemClick:n})})]})}):(0,t.jsx)("div",{ref:o,className:"pl-1.5 shrink grow overflow-hidden flex md:hidden h-full","data-sentry-component":"HorizontalNavBar","data-sentry-source-file":"HorizontalNavBar.tsx",children:(0,t.jsxs)("ul",{ref:d,className:"flex items-center overflow-x-auto md:hidden h-full w-full",children:[m.map(e=>(0,t.jsxs)("li",{className:"relative h-full flex items-center whitespace-nowrap",children:[a===e.href&&(0,t.jsx)("span",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-0.5 bg-primary"}),e.subLinks?.length?(0,t.jsx)(S.NavDropdown,{item:e,loadingItems:s,onItemClick:n,offset:2}):(0,t.jsx)(k.NavLink,{label:e.label,href:e.href,openInNewTab:e.openInNewTab,loading:(0,D.isRealHref)(e.href)&&s.has(e.href),onClick:n,className:"flex items-center h-full px-2.5 text-sm md:px-4 md:text-base relative z-10 text-primary transition-colors duration-200 hover:text-zinc-600 dark:hover:text-neutral-300"})]},`m-${e.label}`)),h.length>0&&(0,t.jsx)("li",{className:"flex-1 h-full flex items-center","aria-hidden":x||void 0,children:(0,t.jsx)(I,{hiddenItems:h,loadingItems:s,onItemClick:n})})]})})}var L=e.i(499581);let T=(0,r.memo)(function({venue:e,location:a,facilitiesByLocation:s,currentTabSlug:n}){return(0,t.jsxs)(M.DropdownMenu,{modal:!1,children:[(0,t.jsxs)(M.DropdownMenuTrigger,{className:"cursor-pointer w-full h-full flex flex-wrap items-center gap-2 text-left pl-4 pr-4 sm:px-0 text-primary hover:text-zinc-600 dark:hover:text-neutral-300 transition-colors duration-200",children:[(0,t.jsx)("span",{className:"font-bold text-xl whitespace-nowrap block",children:e}),(0,t.jsxs)("span",{className:"flex items-center gap-2 min-w-30 flex-1",children:[(0,t.jsx)("span",{className:"shrink truncate text-sm",children:a}),(0,t.jsx)(P.ChevronDown,{className:"shrink-0 inline size-4 text-muted-foreground"})]})]}),(0,t.jsx)(M.DropdownMenuContent,{sideOffset:2,align:"start",collisionPadding:16,className:"min-w-56 z-30",children:Object.entries(s).map(([e,a],s)=>(0,t.jsxs)(r.default.Fragment,{children:[s>0&&(0,t.jsx)(M.DropdownMenuSeparator,{}),(0,t.jsx)(M.DropdownMenuLabel,{className:"font-semibold",children:e}),a.map(e=>(0,t.jsx)(M.DropdownMenuItem,{asChild:!0,className:"py-2.5",children:(0,t.jsx)(L.default,{href:`${e.slug}${n?`/${n}`:""}`,children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-sm text-primary",children:e.venue}),e.subtitle&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:e.subt
18itle})]})})},e.slug))]},e))})]})});var R=e.i(682647),A=e.i(152088);e.s(["VenueLayoutSubNavigation",0,function({subNavigation:e,currentTabSlug:s}){let n=(0,a.usePathname)(),[i,l]=(0,r.useState)(new Set),o=(0,r.useCallback)(e=>{l(t=>{let r=new Set(t);return r.add(e),r})},[]);if((0,r.useEffect)(()=>l(new Set),[n]),!e?.columns?.length)return null;let{venue:d,location:c,facilities:u,slug:m,metadata:p}=e,h=(0,D.buildNavItemsFromColumns)(e.columns),x=(0,D.groupFacilitiesByLocation)(u,m);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"items-stretch bg-background w-full sticky top-[var(--venue-nav-top)] z-21 h-[var(--venue-nav-height)] border-b-[0.5px] border-border",children:(0,t.jsxs)("div",{className:"w-full h-full flex items-stretch md:items-center md:justify-start lg:container lg:mx-auto",children:[p?.address&&(0,t.jsx)(w,{type:"SportsActivityLocation",id:`https://www.chelseapiers.com${m}`,name:d,address:p.address,description:`${d} - ${c}`,telephone:p.telephone,useAppDir:!0}),(0,t.jsx)(C,{useAppDir:!0,itemListElements:[{position:1,name:"Home",item:"https://www.chelseapiers.com"},{position:2,name:`${d} - ${c}`,item:`https://www.chelseapiers.com${m}`},...n.slice((m||"").length).split("/").filter(Boolean).map((t,r)=>{let a=`${m}/${t}`;return{position:r+3,name:e.columns.find(e=>e.links.some(e=>e.href===a))?.links.find(e=>e.href===a)?.title||t.replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase()),item:`https://www.chelseapiers.com${a}`}})]}),(0,t.jsxs)("div",{className:"flex items-center overflow-hidden w-full h-full md:hidden",children:[(0,t.jsx)("div",{className:(0,A.cn)("sm:px-4 shrink grow min-w-0 h-full flex items-center",{"[@media(max-width:435px)]:max-w-4":!e.ctaButton?.buttons}),children:(0,t.jsx)(T,{venue:d,location:c,facilitiesByLocation:x,currentTabSlug:s,"data-sentry-element":"VenueDropdown","data-sentry-source-file":"venue-layout-sub-navigation.tsx"})}),(0,t.jsx)("div",{className:"px-4 flex-shrink-0 flex items-center",children:(0,t.jsx)(R.CTAButton,{ctaButton:e.ctaButton,"data-sentry-element":"CTAButton","data-sentry-source-file":"venue-layout-sub-navigation.tsx"})})]}),(0,t.jsx)("div",{className:"px-4 hidden shrink-0 md:flex md:items-center h-full",children:(0,t.jsx)(T,{venue:d,location:c,facilitiesByLocation:x,currentTabSlug:s,"data-sentry-element":"VenueDropdown","data-sentry-source-file":"venue-layout-sub-navigation.tsx"})}),(0,t.jsx)(z,{items:h,pathname:n,loadingItems:i,onItemClick:o,variant:"desktop","data-sentry-element":"HorizontalNavBar","data-sentry-source-file":"venue-layout-sub-navigation.tsx"}),(0,t.jsx)("div",{className:"px-4 hidden shrink-0 md:flex md:items-center h-full",children:(0,t.jsx)(R.CTAButton,{ctaButton:e.ctaButton,"data-sentry-element":"CTAButton","data-sentry-source-file":"venue-layout-sub-navigation.tsx"})})]})}),(0,t.jsx)("div",{className:"md:hidden bg-background w-full h-14 border-b-[0.5px] border-border",children:(0,t.jsx)("div",{className:"lg:container lg:mx-auto h-full",children:(0,t.jsx)(z,{items:h,pathname:n,loadingItems:i,onItemClick:o,variant:"mobile","data-sentry-element":"HorizontalNavBar","data-sentry-source-file":"venue-layout-sub-navigation.tsx"})})})]})},"VenueLayoutSubNavigationError",0,function({error:e}){return(0,t.jsx)("div",{className:"w-full bg-zinc-100 dark:bg-zinc-800 px-4 py-3 text-center","data-sentry-component":"VenueLayoutSubNavigationError","data-sentry-source-file":"venue-layout-sub-navigation.tsx",children:(0,t.jsxs)("p",{className:"text-sm text-zinc-700 dark:text-zinc-300",children:["Unable to load navigation."," ",e?.message||"Please try refreshing the page."]})})}],38036)},858290,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(985902),n=e.i(493843),i=e.i(571155),i=i;let l=(0,e.i(951034).default)("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var o=e.i(70806),d=e.i(707836),c=e.i(969212),u=e.i(152088),m=e.i(495583),p=e.i(299204),h=e.i(356617),x=e.i(369721),f=e.i(217906),g=e.i(674356),y=e.i(323700),b=e.i(327910);
18class v extends Error{code;constructor(e,t){super(e),this.code=t,this.name="PaymentRefusedError"}}e.s(["MembershipCheckout",0,function({pricing:e,className:j}){let w=(0,a.usePathname)(),{state:{userData:N,paymentMethod:C,selectedPlan:S,startDate:k,shoppingBasketKey:P,stepStack:M},pushStep:E,rewindToStep:D}=(0,m.useMembershipFlow)(),[I,z]=(0,r.useState)(!1),[L,T]=(0,r.useState)(null),R=e=>{if(!M.includes(e))return;D(e);let t=c.STEP_TO_QUERY_PARAM[e];t?window.history.replaceState(null,"",`${w}?progress=${t}`):window.history.replaceState(null,"",w)},[A,_]=(0,r.useState)(!1),[B,F]=(0,r.useState)(!1),O=A&&B&&!!C,$=(0,r.useCallback)(async()=>{if(!P)return void T("Unable to load order information. Please go back and try again.");z(!0),T(null);let e=0,t=0;try{let r=`${"https://gangway-api.chelseapiers.com".replace(/\/+$/,"")}/adyen/registerExternalPayment`;for((0,y.recordPageAction)("OnlineJoin:RegisterPaymentStarted",{paymentMethod:C??"unknown",shoppingBasketKey:P??"missing"}),e=Date.now();;){let e=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":"gw_OcDDm_TFA6JMK3PA3DXDZRv5DjS7W7JytwhtlQ"},body:JSON.stringify({shoppingBasketKey:P})});if(409===e.status){if(t++,(0,y.recordPageAction)("OnlineJoin:RegisterPaymentRetry",{attempt:t,shoppingBasketKey:P??"missing"}),t>=5)throw Error("Payment is taking longer than expected. Please wait a moment and try again.");await new Promise(e=>setTimeout(e,3e3));continue}let a=await e.json().catch(()=>({}));if(!e.ok){if(400===e.status&&"string"==typeof a?.code&&"string"==typeof a?.message&&a.message.trim())throw new v(a.message,a.code);throw Error(a.message||`Request failed with status ${e.status}`)}break}(0,y.recordPageAction)("OnlineJoin:RegisterPaymentSuccess",{durationMs:Date.now()-e,attempts:t,paymentMethod:C??"unknown"});let a=(0,f.buildHeapIdentity)(N),s=(0,c.buildPlanId)(N.centerId,S?.productId?.id),n="bank"===C?"pay_by_bank":C?"credit_card":null;(0,g.trackHeapEvent)("upfront_payment_success",{outcome:"success",location_id:N.centerId??null,plan_id:s??null,payment_method:n},a),(0,b.stopPaymentStatusPolling)(),E("confirmation")}catch(n){(0,y.recordPageAction)("OnlineJoin:RegisterPaymentFailed",{durationMs:e>0?Date.now()-e:0,attempts:t,paymentMethod:C??"unknown",errorMessage:n instanceof Error?n.message.slice(0,200):"unknown",refusalCode:n instanceof v?n.code:"none"});let r=(0,f.buildHeapIdentity)(N),a=(0,c.buildPlanId)(N.centerId,S?.productId?.id),s="bank"===C?"pay_by_bank":C?"credit_card":null;if((0,g.trackHeapEvent)("upfront_payment_failed",{outcome:"failure",location_id:N.centerId??null,plan_id:a??null,payment_method:s},r),n instanceof v)T(n.message);else{(0,x.reportClientError)(n,{operation:"membership.checkout"});let e=n instanceof Error?n.message:"";T((0,h.getCheckoutErrorMessage)(e))}}finally{z(!1)}},[P,E,N,C,S]),H={bank:{label:"Bank Account",badgeText:`You're saving ${100*c.BANK_DISCOUNT_RATE}%`},card:{label:"Credit Card",badgeText:null}};return(0,t.jsx)("div",{className:(0,u.cn)("h-full w-full bg-zinc-50 flex flex-col",j),"data-sentry-component":"MembershipCheckout","data-sentry-source-file":"MembershipCheckout.tsx",children:(0,t.jsxs)("div",{className:"px-4 py-6 space-y-6 shrink-1 overflow-scroll",children:[(0,t.jsx)("div",{className:"px-4",children:(0,t.jsx)("h1",{className:"text-4xl font-bold text-zinc-900 tracking-tight",children:"Confirm and pay"})}),(0,t.jsxs)("section",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 px-4",children:"Your Membership"}),(0,t.jsxs)("div",{className:"bg-white rounded-xl overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-4 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"space-y-0 flex-1",children:[(0,t.jsx)("h3",{className:(0,u.cn)("text-base font-medium leading-tight",S?.name?"text-zinc-900":"text-red-500"),children:S?.name||"[MISSING: Plan Name]"}),(0,t.jsx)("p",{className:(0,u.cn)("text-sm leading-tight",S?.price?"text-zinc-500":"text-red-500"),children:S?.price?`${S.price} + tax`:"[MISSING: Price]"}),S?.billing&&(0,t.jsx)("p",{className:"text-sm leading-tight text-zinc-500 mt-1",children:S.billing}),S?.commitment&&(0,t.jsx)("p",{className:"text-sm leading-tight text-zinc-500 mt-1",children:S.commitment})]}),(0,t.jsx)(s.Button,{variant:"outline",size:"sm",className:"rounded-full border-zinc-300/30 text-zinc-900 hover:bg-zinc-50",onClick:()=>R("plans"),"data-sentry-element":"Button","data-sentry-source-file":"MembershipCheckout.tsx",children:"Change"})]}),(0,t.jsx)("div",{className:"h-px bg-zinc-200"}),(0,t.jsxs)("div",{className:"p-4 flex items-center justify-between",children:[(0,t.jsx)("p",{className:(0,u.cn)("text-sm font-medium",k?"text-zinc-900":"text-red-500"),children:k?`Starts ${(0,p.format)(k,"MMMM d, yyyy")}
18`:"[MISSING: Start Date]"}),(0,t.jsx)(s.Button,{variant:"outline",size:"sm",className:"rounded-full border-zinc-300/30 text-zinc-900 hover:bg-zinc-50",onClick:()=>R("startDate"),"data-sentry-element":"Button","data-sentry-source-file":"MembershipCheckout.tsx",children:"Change"})]})]})]}),(0,t.jsxs)("section",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 px-4",children:"Pricing Summary"}),(0,t.jsxs)("div",{className:"bg-white rounded-xl p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-zinc-900 leading-tight",children:e.firstMonth.label}),(0,t.jsx)("span",{className:"text-sm font-medium text-zinc-900",children:e.firstMonth.amount})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-zinc-900 leading-tight",children:e.finalMonth.label}),(0,t.jsx)("span",{className:"text-sm font-medium text-zinc-900",children:e.finalMonth.amount})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-zinc-900 leading-tight",children:e.initiationFee.label}),(0,t.jsx)("span",{className:"text-sm font-medium text-zinc-900",children:e.initiationFee.amount})]})]}),(0,t.jsx)("div",{className:"h-px bg-zinc-200"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-zinc-900 leading-tight",children:"Subtotal"}),(0,t.jsx)("span",{className:"text-sm text-zinc-900 font-medium",children:e.subtotal})]}),e.discounts.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center justify-between ",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(l,{className:"size-4 text-zinc-500 rotate-90"}),(0,t.jsx)("span",{className:"text-sm text-zinc-500",children:e.label})]}),(0,t.jsx)("span",{className:"text-sm font-medium text-green-700",children:e.amount})]},r)),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-zinc-900 leading-tight",children:"Estimated taxes"}),(0,t.jsx)("span",{className:"text-sm text-zinc-900 font-medium",children:e.estimatedTaxes})]})]}),(0,t.jsx)("div",{className:"h-px bg-zinc-200"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-lg font-semibold text-zinc-900",children:"Total due"}),(0,t.jsx)("span",{className:"text-lg font-semibold text-zinc-900",children:e.totalDue})]})]})]}),(0,t.jsxs)("section",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-zinc-900 px-4",children:"Payment Method"}),(0,t.jsx)("div",{className:"bg-white rounded-xl overflow-hidden",children:(0,t.jsxs)("div",{className:"p-4 flex items-center gap-3",children:[function(e){switch(e){case"bank":return(0,t.jsx)(d.BankIcon,{className:"size-6 text-zinc-500"});case"card":return(0,t.jsx)(i.default,{className:"size-6 text-zinc-500"});default:return null}}(C),(0,t.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,t.jsx)("p",{className:(0,u.cn)("text-base font-medium leading-tight",C?"text-zinc-900":"text-red-500"),children:C?H[C].label:"[MISSING: Payment Method]"}),C&&H[C].badgeText&&(0,t.jsx)("div",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium leading-tight bg-blue-100 text-blue-700",children:H[C].badgeText})]}),(0,t.jsx)(s.Button,{variant:"outline",size:"sm",className:"rounded-full border-zinc-300/30 text-zinc-900 hover:bg-zinc-50",onClick:()=>R("payment"),"data-sentry-element":"Button","data-sentry-source-file":"MembershipCheckout.tsx",children:"Change"})]})}),"bank"===C&&(0,t.jsx)("div",{className:"px-4 pt-2",children:(0,t.jsx)("p",{className:"text-xs text-zinc-500 leading-relaxed",children:"Your bank information is securely encrypted and never stored on our servers"})})]}),(0,t.jsx)("section",{children:(0,t.jsxs)("div",{className:"bg-white rounded-xl overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-4 space-y-3",children:[(0,t.jsx)("h3",{className:"text-base font-medium text-zinc-900 leading-tight",children:"Authorize Monthly Payments"}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(n.Checkbox,{id:"authorize-monthly",checked:A,onCheckedChange:e=>_(e),className:"mt-1.5","data-sentry-element":"Checkbox","data-sentry-source-file":"MembershipCheckout.tsx"}),(0,t.jsx)("label",{htmlFor:"authorize-monthly",className:"text-sm text-zinc-900 leading-relaxed cursor-pointer flex-1",children:"I authorize Chelsea Piers Fitness to charge my payment method monthly for the membership fee. I understand that I can cancel at any time according to the membership terms."})]})]}),(0,t.jsx)("div",{className:"h-px bg-zinc-200"}),(0,t.jsxs)("div",{className:"p-4 space-y-3",children:[(0,t.jsx)("h3",{className:"text-base font-medium text-zinc-900 leading-tight",children:"Review & Accept the Terms & Conditions"}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(n.Checkbox,{id:"accept-terms",checked:B,onCheckedChange:e=>F(e),className:"mt-1","data-sentry-element":"Checkbox","data-sentry-source-file":"MembershipCheckout.tsx"}),(0,t.jsxs)("label",{htmlFor:"accept-terms",className:"text-sm text-zinc-900 cursor-pointer leading-tight flex-1",children:["I have read and agree to the"," ",(0,t.jsx)("a",{href:"https://www.chelseapiers.com/fitness/my-account/terms-and-conditions",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"Terms & Conditions"})]})]})]})]})}),(0,t.jsxs)("div",{className:"p-4 z-40 shrink-0 space-y-2",children:[L&&(0,t.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:(0,t.jsx)("p",{className:"text-sm text-red-800",children:L})}),(0,t.jsx)(s.Button,{size:"lg",className:(0,u.cn)("w-full h-14 text-base font-medium",(!O||I)&&"opacity-50 cursor-not-allowed"),disabled:!O||I,onClick:$,"data-sentry-element":"Button","data-sentry-source-file":"MembershipCheckout.tsx",children:I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Processing..."]}):`Pay ${e.totalDue}`})]})]})})}],858290)},666898,e=>{"use strict";var t=e.i(434073),r=e.i(858290),a=e.i(495583);function s(e){return`$${e.toFixed(2)}`}e.s(["MembershipCheckoutPage",0,function(){let e,n,i,l,o,d,c,u,{state:m}=(0,a.useMembershipFlow)(),{finalizedBasket:p}=m;if(!p)return(0,t.jsxs)("div",{className:"p-6 space-y-6",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold leading-10",children:"Loading checkout..."}),(0,t.jsx)("p",{className:"text-zinc-600",children:"Please wait while we prepare your order summary."})]});let h=(e=p.items.filter(e=>e.productName.toLowerCase().includes("membership")||e.productName.toLowerCase().includes("access")),n=p.items.find(e=>e.productName.toLowerCase().includes("initiation")||e.productName.toLowerCase().includes("enrollment")),i=p.items.filter(t=>!e.includes(t)&&t!==n),l=e.reduce((e,t)=>
18e+(t.price?.price||0),0),o=e.reduce((e,t)=>e+(t.price?.normalPrice||t.price?.price||0),0),d=n?.price?.price||0,c=p.totalAmount,u=[],p.items.forEach(e=>{if(e.price?.discount&&e.price.discount>0){let t=e.price.privilege?.sourceName||`${e.productName} discount`;u.push({label:t,amount:`-${s(e.price.discount)}`})}}),i.forEach(e=>{e.price?.price&&e.price.price}),{firstMonth:{label:"First Month (Prorated)",amount:s(l)},finalMonth:{label:"Final Month",amount:s(o)},initiationFee:{label:"Initiation fee",amount:s(d)},subtotal:s(c),discounts:u,estimatedTaxes:s(p.vatAmount),totalDue:s(p.customerFullAmountToPay)});return(0,t.jsx)("div",{"data-sentry-component":"MembershipCheckoutPage","data-sentry-source-file":"MembershipCheckoutPage.tsx",children:(0,t.jsx)(r.MembershipCheckout,{pricing:h,"data-sentry-element":"MembershipCheckout","data-sentry-source-file":"MembershipCheckoutPage.tsx"})})}])},647194,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(520281),s=e.i(495583),n=e.i(544763),i=e.i(507850),l=e.i(474986),o=e.i(299204),d=e.i(747089),c=e.i(878247),u=e.i(689729),m=e.i(836812);class p{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return h(this.animations,"duration")}get iterationDuration(){return h(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function h(e,t){let r=0;for(let a=0;a<e.length;a++){let s=e[a][t];null!==s&&s>r&&(r=s)}return r}class x extends p{then(e,t){return this.finished.finally(e).then(()=>{})}}var f=e.i(439090),g=e.i(697248),y=e.i(647573),b=e.i(41132),v=e.i(855884),j=e.i(6180),w=e.i(792031),N=e.i(417472),C=e.i(659515),S=e.i(586846),k=e.i(326496);function P(e,t){var r;let a;return(0,k.isEasingArray)(e)?e[r=e.length,((t-0)%(a=r-0)+a)%a+0]:e}var M=e.i(376919);function E(e){return"object"==typeof e&&!Array.isArray(e)}function D(e,t,r,a){return null==e?[]:"string"==typeof e&&E(t)?(0,M.resolveElements)(e,r,a):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>null!=e):[e]}function I(e,t,r,a){return"number"==typeof t?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):"<"===t?r:t.startsWith("<")?Math.max(0,r+parseFloat(t.slice(1))):a.get(t)??e}var z=e.i(340407);function L(e,t){return e.at!==t.at?e.at-t.at:null===e.value?1:null===t.value?-1:0}function T(e,t){return t.has(e)||t.set(e,{}),t.get(e)}function R(e,t){return t[e]||(t[e]=[]),t[e]}let A=e=>"number"==typeof e,_=e=>e.every(A);var B=e.i(264392),F=e.i(678151),O=e.i(413852),$=e.i(753718),H=e.i(153715),U=e.i(134632),G=e.i(390881),V=e.i(478884),W=e.i(423735);class K extends W.VisualElement{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(t in e){let r=e[t];if("string"==typeof r||"number"==typeof r)return r}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return(0,V.createBox)()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}function Y(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=(0,$.isSVGElement)(e)&&!(0,H.isSVGSVGElement)(e)?new U.SVGVisualElement(t):new G.HTMLVisualElement(t);r.mount(e),F.visualElementStore.set(e,r)}function q(e){let t=new K({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),F.visualElementStore.set(e,t)}function X(e,t,r,a){let s=[];if((0,y.isMotionValue)(e)||"number"==typeof e||"string"==typeof e&&!E(t))s.push((0,B.animateSingleValue)(e,E(t)&&t.default||t,r&&r.default||r));else{if(null==e)return s;let n=D(e,t,a),i=n.length;(0,S.invariant)(!!i,"No valid elements provided.","no-valid-elements");for(let e=0;e<i;e++){let a=n[e],l=a instanceof Element?Y:q;F.visualElementStore.has(a)||l(a);let o=F.visualElementStore.get(a),d={...r};"delay"in d&&"function"==typeof d.delay&&(d.delay=d.delay(e,i)),s.push(...(0,O.animateTarget)(o,{...t,transition:d},{}))}}return s}function J(e){return function(t,r,a){let s,n=[];if(Array.isArray(t)&&t.some(Array.isArray)){let a;a=[],(function(e,{defaultTransition:t={},...r}={},a,s){let n=t.duration||.3,i=new Map,l=new Map,o={},d=new Map,c=0,u=0,m=0;for(let r=0;r<e.length;r++){let i=e[r];if("string"==typeof i){d.set(i,u);continue}if(!Array.isArray(i)){d.set(i.name,I(u,i.at,c,d));continue}let[x,g,N={}]=i;void 0!==N.at&&(u=I(u,N.at,c,d));let k=0,M=(e,r,a,i=0,l=0)=>{var o;let d=Array.isArray(o=e)?o:[o],{delay:c=0,times:p=(0,b.defaultOffset)(d),type:h=t.type||"ke
18yframes",repeat:x,repeatType:g,repeatDelay:y=0,...N}=r,{ease:M=t.ease||"easeOut",duration:E}=r,D="function"==typeof c?c(i,l):c,I=d.length,L=(0,v.isGenerator)(h)?h:s?.[h||"keyframes"];if(I<=2&&L){let e=100;2===I&&_(d)&&(e=Math.abs(d[1]-d[0]));let r={...t,...N};void 0!==E&&(r.duration=(0,C.secondsToMilliseconds)(E));let a=(0,j.createGeneratorEasing)(r,e,L);M=a.ease,E=a.duration}E??(E=n);let T=u+D;1===p.length&&0===p[0]&&(p[1]=1);let R=p.length-d.length;if(R>0&&(0,w.fillOffset)(p,R),1===d.length&&d.unshift(null),x){(0,S.invariant)(x<20,"Repeat count too high, must be less than 20","repeat-count-high"),E*=x+1;let e=[...d],t=[...p],r=[...M=Array.isArray(M)?[...M]:[M]];for(let a=0;a<x;a++){d.push(...e);for(let s=0;s<e.length;s++)p.push(t[s]+(a+1)),M.push(0===s?"linear":P(r,s-1))}for(let e=0;e<p.length;e++)p[e]=p[e]/(x+1)}let A=T+E;!function(e,t,r,a,s,n){for(let t=0;t<e.length;t++){let r=e[t];r.at>s&&r.at<n&&((0,f.removeItem)(e,r),t--)}for(let i=0;i<t.length;i++)e.push({value:t[i],at:(0,z.mixNumber)(s,n,a[i]),easing:P(r,i)})}(a,d,M,p,T,A),k=Math.max(D+E,k),m=Math.max(A,m)};if((0,y.isMotionValue)(x))M(g,N,R("default",T(x,l)));else{let e=D(x,g,a,o),t=e.length;for(let r=0;r<t;r++){let a=T(e[r],l);for(let e in g){var p,h;M(g[e],(p=N,h=e,p&&p[h]?{...p,...p[h]}:{...p}),R(e,a),r,t)}}}c=u,u+=k}return l.forEach((e,a)=>{for(let s in e){let n=e[s];n.sort(L);let l=[],o=[],d=[];for(let e=0;e<n.length;e++){let{at:t,value:r,easing:a}=n[e];l.push(r),o.push((0,N.progress)(0,m,t)),d.push(a||"easeOut")}0!==o[0]&&(o.unshift(0),l.unshift(l[0]),d.unshift("easeInOut")),1!==o[o.length-1]&&(o.push(1),l.push(null)),i.has(a)||i.set(a,{keyframes:{},transition:{}});let c=i.get(a);c.keyframes[s]=l;let{type:u,...p}=t;c.transition[s]={...p,duration:m,ease:d,times:o,...r}}}),i})(t,r,e,{spring:g.spring}).forEach(({keyframes:e,transition:t},r)=>{a.push(...X(r,e,t))}),n=a}else{let{onComplete:i,...l}=a||{};"function"==typeof i&&(s=i),n=X(t,r,l,e)}let i=new x(n);return s&&i.finished.then(s),e&&(e.animations.push(i),i.finished.then(()=>{(0,f.removeItem)(e.animations,i)})),i}}J(),e.s(["MembershipConfirmation",0,function(){var e;let p,h,{state:{userData:{firstName:x},startDate:f,selectedPlan:g}}=(0,s.useMembershipFlow)(),y=f?function(e){(0,l.default)(1,arguments);var t=(0,i.default)(e);return t.setDate(1),t.setHours(0,0,0,0),t}(function(e,t){(0,l.default)(2,arguments);var r=(0,i.default)(e),a=(0,n.default)(t);if(isNaN(a))return new Date(NaN);if(!a)return r;var s=r.getDate(),o=new Date(r.getTime());return(o.setMonth(r.getMonth()+a+1,0),s>=o.getDate())?o:(r.setFullYear(o.getFullYear(),o.getMonth(),s),r)}(f,1)):void 0,[b,v]=(p=(0,m.useConstant)(()=>({current:null,animations:[]})),h=(0,m.useConstant)(()=>J(p)),e=()=>{p.animations.forEach(e=>e.stop()),p.animations.length=0},(0,r.useEffect)(()=>()=>e(),[]),[p,h]);return(0,r.useEffect)(()=>{let e=!1;return(async()=>{await new Promise(e=>setTimeout(e,1e3)),e||(await v(".header-container",{x:["-100%","0%"]},{duration:1,ease:"easeOut"}),e||(v(".hero-image",{x:["-100%","0%"],opacity:[0,1]},{delay:.6,duration:1,ease:"easeOut"}),await v(".hero-text",{y:[100,0],opacity:[0,1]},{delay:1.5,duration:.8,ease:"easeOut"}),e||(v(".hero-text",{y:[0,30,0]},{delay:.9,duration:.4}),v(".header-container",{height:["100vh","240px"]},{delay:1.1,duration:.7,ease:"easeOut"}),await v(".body-content",{y:["100%","0%"],opacity:[0,1]},{duration:.7,ease:"easeOut"}))))})(),()=>{e=!0}},[v]),(0,t.jsxs)("div",{ref:b,className:"bg-white w-full h-full justify-center z-50 absolute inset-0","data-sentry-component":"MembershipConfirmation","data-sentry-source-file":"MembershipConfirmation.tsx",children:[(0,t.jsxs)("div",{className:"header-container bg-blue-600 w-full flex overflow-hidden relative",style:{height:"100vh",transform:"translateX(-100%)"},children:[(0,t.jsx)(a.default,{src:"https://images.unsplash.com/photo-1517838277536-f5f99be501cd?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2940",alt:"Membership Confirmation",width:870,height:580,className:"hero-image w-full h-full object-cover absolute inset-0",style:{transform:"translateX(-100%)",opacity:0}
18,"data-sentry-element":"Image","data-sentry-source-file":"MembershipConfirmation.tsx"}),(0,t.jsxs)("div",{className:"hero-text text-center text-white mx-auto translate-y-1/2 opacity-0 pb-4 z-10",children:[(0,t.jsxs)("h1",{className:"text-title-lg font-bold",children:["Welcome, ",x,"!"]}),(0,t.jsx)("p",{className:"font-medium",children:"You're now part of Chelsea Piers Fitness"})]})]}),(0,t.jsxs)("div",{className:"body-content flex-1 bg-zinc-50 w-full overflow-y-auto",style:{transform:"translateY(100%)",opacity:0},children:[(0,t.jsxs)("section",{className:"pt-8 px-4",children:[(0,t.jsx)("h2",{className:"text-[28px] font-medium text-zinc-900 leading-7 pb-4",children:"Next Steps"}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center w-8 shrink-0",children:[(0,t.jsx)("div",{className:"h-3 w-px"}),(0,t.jsx)("div",{className:"w-8 h-8 rounded-full border border-zinc-400/30 flex items-center justify-center shrink-0",children:(0,t.jsx)("span",{className:"text-base leading-6 text-zinc-900",children:"1"})}),(0,t.jsx)("div",{className:"flex-1 w-px bg-zinc-400/30 min-h-[152px]"})]}),(0,t.jsx)("div",{className:"flex-1 pb-4",children:(0,t.jsxs)("div",{className:"bg-white rounded-xl p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h3",{className:"text-base font-medium text-black leading-6",children:"Sign your contract"}),(0,t.jsx)("p",{className:"text-sm text-zinc-500 leading-5",children:"You will receive an email shortly containing a contract for you to sign. Please review the details and sign it."})]}),(0,t.jsx)("a",{href:"message://",className:"w-full h-11 bg-blue-600 hover:bg-blue-700 text-white rounded-full text-base font-medium flex items-center justify-center gap-1",children:"Open Email"})]})})]}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center w-8 shrink-0",children:[(0,t.jsx)("div",{className:"h-3 w-px bg-zinc-400/30"}),(0,t.jsx)("div",{className:"w-8 h-8 rounded-full border border-zinc-400/30 flex items-center justify-center shrink-0",children:(0,t.jsx)("span",{className:"text-base leading-6 text-zinc-900",children:"2"})}),(0,t.jsx)("div",{className:"h-3 w-px"})]}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsxs)("div",{className:"bg-white rounded-xl p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h3",{className:"text-base font-medium text-black leading-6",children:"Install the app"}),(0,t.jsx)("p",{className:"text-sm text-zinc-500 leading-5",children:"Get easy access to your club, book classes, and customize your fitness journey."})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("a",{href:"https://apps.apple.com/app/chelsea-piers/id6503904000",className:"flex-1 h-11 bg-zinc-900/10 backdrop-blur-[20px] hover:bg-zinc-900/20 rounded-full text-base font-normal text-zinc-900 flex items-center justify-center gap-1 cursor-pointer",children:"iOS"}),(0,t.jsx)("a",{href:"https://play.google.com/store/apps/details?id=com.chelseapiers.app",className:"flex-1 h-11 bg-zinc-900/10 backdrop-blur-[20px] hover:bg-zinc-900/20 rounded-full text-base font-normal text-zinc-900 flex items-center justify-center gap-1 cursor-pointer",children:"Android"})]})]})})]})]}),(0,t.jsxs)("section",{className:"py-8 px-4 space-y-4",children:[(0,t.jsx)("h2",{className:"text-[28px] font-semibold text-zinc-900 leading-7",children:"Your Membership"}),(0,t.jsxs)("div",{className:"bg-white rounded-xl p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("h3",{className:"text-base font-medium text-black leading-6",children:g?.name}),(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("p",{className:"text-sm text-zinc-900 leading-5",children:g?.price}),(0,t.jsxs)("p",{className:"text-sm text-zinc-900 leading-5",children:["Next billing date:"," ",y?(0,o.format)(y,"MMMM d, yyyy"):""]})]})]}),(0,t.jsx)("div",{className:"h-px bg-zinc-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Circle,{fill:f&&(0,d.isSameDay)(f,u.TODAY)?"green":"orange",stroke:"none",className:"size-3 shrink-0","data-sentry-element":"Circle","data-sentry-source-file":"MembershipConfirmation.tsx"}),(0,t.jsxs)("p",{className:"text-sm text-zinc-900 leading-5 flex-1",children:["Membership is active as of"," ",f?(0,o.format)(f,"MMMM d, yyyy"):""]})]})]})]})]})]})}],647194)},594911,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(647724),s=e.i(647194);e.s(["MembershipConfirmationPage",0,function({}){return(0,r.useEffect)(()=>{a.addBreadcrumb({category:"membership.step",message:"user reached: confirmation",level:"info"})},[]),(0,t.jsx)("div",{"data-sentry-component":"MembershipConfirmationPage","data-sentry-source-file":"MembershipConfirmationPage.tsx",children:(0,t.jsx)(s.MembershipConfirmation,{"data-sentry-element":"MembershipConfirmation","data-sentry-source-file":"MembershipConfirmationPage.tsx"})})}])},814730,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(502119),s=e.i(495583),n=e.i(264167),i=e.i(245715),l=e.i(707836),o=e.i(143982);function d({plan:e,isSelected:r=!1,onSelect:a}){let{pushStep:n,setSelectedPlan:i,state:l}=(0,s.useMembershipFlow)(),c=!!(l.userData.accessToken||l.userData.personId),u=e.access?.regions||[],m=e.locations&&1===e.locations.length;return(0,t.jsxs)("div",{className:["rounded-2xl border bg-white p-4 sm:p-5 cursor-pointer transition-all",r?"border-blue-500 ring-2 ring-blue-100":"border-zinc-200 hover:border-zinc-300"].join(" "),onClick:a,"data-sentry-component":"MembershipPlanCard","data-sentry-source-file":"MembershipPlan.tsx",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("h3",{className:"flex-1 min-w-0 text-2xl font-bold text-zinc-900",children:e.name||"Unnamed Plan"}),(0,t.jsx)("div",{className:"shrink-0 text-right min-w-[92px]",children:void 0!==e.price&&null!==e.price&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-sm tracking-wide text-zinc-500",children:"From"}),"Â ",(0,t.jsx)("span",{className:"text-xl font-extrabold text-zinc-900 leading-tight",children:e.price})]})})]}),e.description&&(0,t.jsx)("p",{className:"my-3 text-[15px] leading-6 text-zinc-700",children:e.description}),(0,t.jsxs)("div",{className:"border-t flex flex-col",children:[(0,t.jsxs)("p",{className:"my-3",children:[m&&(0,t.jsx)(o.Check,{className:"bg-black stroke-white rounded-full inline-block size-4 align-middle p-0.5 mr-2"}),(0,t.jsx)("span",{className:"inline-block align-middle",children:e.access?.text})]}),!m&&(0,t.jsx)("div",{className:"grid grid-cols-2 gap-4",children:u.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs font-medium text-zinc-500 uppercase",children:e.regionName}),(0,t.jsx)("ul",{children:e.clubs.map(e=>(0,t.jsxs)("li",{className:"flex gap-2 items-start",children:[(0,t.jsx)(o.Check,{className:"bg-black stroke-white rounded-full size-4 p-0.5 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{children:e.name}),e.tag&&(0,t.jsx)("span",{className:"text-xs font-medium text-sky-600",children:e.tag})]})]},e.name))})]}
18,e.regionName))})]}),r&&(0,t.jsx)("button",{className:["mt-6 w-full rounded-full px-5 py-3 text-center text-base font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",!e.productId?"cursor-not-allowed bg-zinc-300 text-zinc-500":"cursor-pointer bg-zinc-900 text-white hover:bg-zinc-800 focus:ring-zinc-900"].join(" "),disabled:!e.productId,title:e.productId?void 0:"This plan is missing product configuration. Please contact support.",onClick:t=>{t.stopPropagation();let r=e.productId;r&&(i({...e,productId:r}),n(c?"startDate":"login"))},children:"Next"})]})}function c({plans:e}){let[a,s]=(0,r.useState)(e?.[0]),n=Array.isArray(e)&&e.length>0;return(0,t.jsxs)("div",{className:"p-6","data-sentry-component":"MembershipPlanList","data-sentry-source-file":"MembershipPlan.tsx",children:[(0,t.jsx)("h2",{className:"text-3xl font-bold tracking-tight text-zinc-900 mb-4",children:"Choose a plan"}),n?(0,t.jsx)("div",{className:"grid gap-4",children:e.map((e,r)=>(0,t.jsx)(d,{plan:e,isSelected:a?._id===e._id,onSelect:()=>{s(e)}},e._id||r))}):(0,t.jsx)("div",{className:"text-center py-12",children:(0,t.jsx)("p",{className:"text-zinc-500",children:"No membership plans available at this time."})})]})}var u=e.i(969677),m=e.i(619704),p=e.i(962907),h=e.i(985902),x=e.i(610012),f=e.i(173554),g=e.i(680707),y=e.i(170696);let b=(0,y.createServerReference)("40740cd8c49edb07b0345726bd5afc1442bd3cf8f2",y.callServer,void 0,y.findSourceMapURL,"updatePersonDetailAction");var v=e.i(356617),j=e.i(152088),w=e.i(131955),N=e.i(369721),C=e.i(289456),S=e.i(319760);function k({onContinue:e}){let{state:a,setUserData:n}=(0,s.useMembershipFlow)(),{userData:i}=a,[l,o]=(0,r.useState)({firstName:i.firstName||"",lastName:i.lastName||"",email:i.email||"",gender:i.gender||"",birthday:i.birthday||"",phone:i.phone||"",address:i.address||"",addressLine2:i.addressLine2||"",city:i.city||"",state:i.state||"",zip:i.zip||""}),[d,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(null),[p,y]=(0,r.useState)({}),P=null!=i.centerId?parseInt(i.centerId,10):void 0,{phoneError:M,isValidatingPhone:E,handlePhoneChange:D,handlePhoneBlur:I,validatePhoneOnSubmit:z}=(0,C.usePhoneValidation)({centerId:null==P||Number.isNaN(P)?void 0:P}),L=(0,r.useCallback)((e,t)=>{y(r=>({...r,[e]:t}))},[]);(0,r.useEffect)(()=>{o({firstName:i.firstName||"",lastName:i.lastName||"",email:i.email||"",gender:i.gender||"",birthday:i.birthday||"",phone:i.phone||"",address:i.address||"",addressLine2:i.addressLine2||"",city:i.city||"",state:i.state||"",zip:i.zip||""})},[i]);let T=(0,r.useCallback)((e,t)=>{o(r=>({...r,[e]:t})),m(null);let r={gender:()=>(0,S.getGenderValidationError)(t),birthday:()=>(0,S.getBirthdayValidationError)(t),address:()=>(0,S.getAddressValidationError)(t),addressLine2:()=>(0,S.getAddressLine2ValidationError)(t),city:()=>(0,S.getCityValidationError)(t),state:()=>(0,S.getStateValidationError)(t),zip:()=>(0,S.getZipValidationError)(t)}[e];r&&L(e,r())},[L]),R=(0,r.useCallback)((e,t)=>{let{formatted:r,error:a}=(0,S.formatAndValidateName)(t);o(t=>({...t,[e]:r})),L(e,a),m(null)},[L]),A=(0,r.useCallback)(()=>{let e=!1;for(let{key:t,getError:r}of[{key:"firstName",getError:()=>(0,S.getNameValidationError)(l.firstName)||(l.firstName.trim()?null:"First name is required.")},{key:"lastName",getError:()=>(0,S.getNameValidationError)(l.lastName)||(l.lastName.trim()?null:"Last name is required.")},{key:"gender",getError:()=>(0,S.getGenderValidationError)(l.gender)},{key:"birthday",getError:()=>(0,S.getBirthdayValidationError)(l.birthday)},{key:"phone",getError:()=>M??(0,S.getPhoneValidationError)(l.phone)},{key:"address",getError:()=>(0,S.getAddressValidationError)(l.address)},{key:"addressLine2",getError:()=>(0,S.getAddressLine2ValidationError)(l.addressLine2)},{key:"city",getError:()=>(0,S.getCityValidationError)(l.city)||(l.city.trim()?null:"City is required.")},{key:"state",getError:()=>(0,S.getStateValidationError)(l.state)},{key:"zip",getError:()=>(0,S.getZipValidationError)(l.zip)}]){let a=r();L(t,a),a&&(e=!0)}return e},[l,M,L]),_=async t=>{if((t.preventDefault(),!(d||A()))&&await z(l.phone)){c(!0),m(null);try{let t=i.personId,r=i.centerId;if(!t||!r){m("We couldn't load your account details. Please go back and try again."),c(!1);return}let a=await b({person:{personId:{center:parseInt(r,10),id:parseInt(t,10)},firstName:l.firstName,lastName:l.lastName,gender:l.gender?.toUpperCase()||void 0,birthday:l.birthday||void 0,address:{address1:l.address||void 0,address2:l.addressLine2||void 0,zip:l.zip||void 0,zipName:l.city||void 0,country:"US",province:l.state||void 0}}});if(a.error){m((0,v.getUpdateDetailsErrorMessage)(a.error)),c(!1);return}n({...i,firstName:l.firstName,lastName:l.lastName,gender:l.gender,birthday:l.birthday,phone:l.phone,address:l.address,addressLine2:l.addressLine2,city:l.city,state:l.state,zip:l.zip}),c(!1),e()}catch(e){(0,N.reportClientError)(e,{operation:"membership.confirmDetails"}),m((0,v.getUpdateDetailsErrorMessage)(null)),c(!1)}}};return i.firstName||i.lastName?(0,t.jsxs)("div",{className:"px-4 py-6","data-sentry-component":"MembershipConfirmDetails","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-zinc-900 mb-4",children:"Confirm Your Membership Details:"}),(0,t.jsxs)("form",{onSubmit:_,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"firstName","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"First Name"}),(0,t.jsx)(x.Input,{id:"firstName",value:l.firstName,onChange:e=>R("firstName",e.target.value),required:!0,maxLength:S.NAME_MAX_LENGTH,className:"h-11","data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),p.firstName&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:p.firstName})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"lastName","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"Last Name"}),(0,t.jsx)(x.Input,{id:"lastName",value:l.lastName,onChange:e=>R("lastName",e.target.value),required:!0,maxLength:S.NAME_MAX_LENGTH,className:"h-11","data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),p.lastName&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:p.lastName})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"email","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"Email"}),(0,t.jsx)(x.Input,{id:"email",type:"email",value:l.email,disabled:!0,className:"h-11 bg-zinc-100 text-zinc-500","data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),(0,t.jsx)("p",{className:"text-xs text-zinc-500",children:"Email cannot be changed"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"phone","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"Phone"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Input,{id:"phone",name:"tel",type:"tel",placeholder:"(555) 555-5555",autoComplete:"tel",value:l.phone,onChange:e=>(e=>{let{formatted:t}=D(e);o(e=>({...e,phone:t}))})(e.target.value),onBlur:()=>I(l.phone),required:!0,className:(0,j.cn)("h-11 pr-10",(M||p.phone)&&"border-red-500 focus-visible:ring-red-500"),"data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),E&&!M&&!p.phone&&(0,t.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:(0,t.jsx)(w.Spinner,{size:"sm",className:"text-zinc-400"})})]}),(M||p.phone)&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:M||p.phone})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"gender","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"Gender"}),(0,t.jsxs)(g.Select,{value:l.gender?.toLowerCase(),onValueChange:e=>T("gender",e),"data-sentry-element":"Select","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:[(0,t.jsx)(g.SelectTrigger,{className:(0,j.cn)("h-11",p.gender&&"border-red-500 focus:ring-red-500"),"data-sentry-element":"SelectTrigger","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:(0,t.jsx)(g.SelectValue,{placeholder:"Select gender","data-sentry-element":"SelectValue","data-sentry-source-file":"MembershipConfirmDetails.tsx"})}),(0,t.jsxs)(g.SelectContent,{"data-sentry-element":"SelectContent","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:[(0,t.jsx)(g.SelectItem,{value:"male","data-sentry-element":"SelectItem","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"Male"}),(0,t.jsx)(g.SelectItem,{value:"female","data-sentry-element":"SelectItem","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"Female"})]})]}),p.gender&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:p.gender})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"birthday","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"Birthday"}),(0,t.jsx)(x.Input,{id:"birthday",type:"date",value:l.birthday,onChange:e=>T("birthday",e.target.value),className:"h-11","data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),p.birthday&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:p.birthday})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"address","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"Address"}),(0,t.jsx)(x.Input,{id:"address",value:l.address,onChange:e=>T("address",e.target.value),required:!0,className:"h-11","data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),p.address&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:p.address})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"addressLine2","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"Address Line 2 (Optional)"}),(0,t.jsx)(x.Input,{id:"addressLine2",value:l.addressLine2,onChange:e=>T("addressLine2",e.target.value),className:"h-11","data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),p.addressLine2&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:p.addressLine2})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"city","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"City"}),(0,t.jsx)(x.Input,{id:"city",value:l.city,onChange:e=>T("city",e.target.value),required:!0,className:"h-11","data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),p.city&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:p.city})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"state","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"State"}),(0,t.jsx)(x.Input,{id:"state",value:l.state,onChange:e=>T("state",e.target.value),required:!0,className:"h-11","data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),p.state&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:p.state})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Label,{htmlFor:"zip","data-sentry-element":"Label","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:"ZIP Co
18de"}),(0,t.jsx)(x.Input,{id:"zip",value:l.zip,onChange:e=>T("zip",e.target.value),required:!0,className:"h-11","data-sentry-element":"Input","data-sentry-source-file":"MembershipConfirmDetails.tsx"}),p.zip&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:p.zip})]})]}),u&&(0,t.jsx)("div",{className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,t.jsx)("p",{className:"text-sm text-red-800",children:u})}),(0,t.jsx)(h.Button,{type:"submit",className:"w-full h-11 mt-6 disabled:bg-zinc-300 disabled:text-zinc-500 disabled:opacity-100",disabled:d||E||Object.values(p).some(Boolean)||!!M,"data-sentry-element":"Button","data-sentry-source-file":"MembershipConfirmDetails.tsx",children:d?"Updating...":"Confirm"})]})]}):(0,t.jsxs)("div",{className:"px-4 py-6",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-zinc-900 mb-4",children:"Confirm Your Membership Details:"}),(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 space-y-4",children:[(0,t.jsx)("div",{className:"animate-spin h-8 w-8 border-b-2 border-zinc-600 rounded-full"}),(0,t.jsx)("p",{className:"text-zinc-600",children:"Loading your details..."})]})]})}var P=e.i(125923),M=e.i(969212),E=e.i(858290),D=e.i(647724),I=e.i(170485);function z({finalizedBasket:e,adyenSessionId:a,paymentMethod:s,setFinalizedBasket:n,onSessionExpired:i}){let l,o,d,c,u,m,p,h,x,f,g,y,[b,j]=(0,r.useState)(null);if((0,r.useEffect)(()=>{if(!e){if(!a){D.addBreadcrumb({category:"membership.checkout",message:"checkout: missing adyenSessionId on mount",level:"error"}),(0,N.reportClientError)(Error("CheckoutWithPolling mounted without adyenSessionId"),{operation:"checkout.pollPaymentStatus"}),j("Unable to load order information. Please go back and try again.");return}return(0,I.runPollingLoop)(a,{onFinalized:e=>n(e),onDeclined:e=>j((0,v.getCheckoutErrorMessage)(e)),onSessionExpired:()=>i?.(),onTimeout:()=>j(I.TIMEOUT_MSG)},"CheckoutWithPolling","bank"===s?"bank":"card")}},[e,a,s,n,i]),!e)return(0,t.jsxs)("div",{className:"p-6 space-y-6",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold leading-10",children:b?"Error":"Finalizing your order..."}),b?(0,t.jsx)("p",{className:"text-red-600",children:b}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-zinc-600",children:"Please wait while we prepare your order summary."}),(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("div",{className:"animate-spin h-8 w-8 border-b-2 border-zinc-600 rounded-full"})})]})]});let w=(l=e.items.find(e=>e.productKey.globalId?.includes("PRORATA")||e.productName.toLowerCase().includes("pro rata")),o=e.items.find(e=>e.productKey.globalId?.includes("LAST_MONTH")||e.productName.toLowerCase().includes("final month")),d=e.items.find(e=>e.productKey.globalId?.includes("CREATION")||e.productName.toLowerCase().includes("creation")),c=e=>e?e.price.normalPrice>0?e.price.normalPrice:e.price.price:0,u=(e,t)=>
18e?{label:e.productName||t,amount:`$${c(e).toFixed(2)}`}:{label:t,amount:"$0.00"},m=e.items.reduce((e,t)=>e+c(t),0),p=new Map,e.items.forEach(e=>{if(0!==e.price.discount){let t=e.price.privilege?.sourceName;if(!t){let r=e.productName.toLowerCase();t=r.includes("creation")||r.includes("initiation")?"Initiation fee waived":`${e.productName} discount`}let r=Math.abs(e.price.discount),a=p.get(t)||0;p.set(t,a+r)}if(e.price.sponsored&&0!==e.price.sponsored){let t=e.price.privilege?.sourceName||`Pay by bank discount (${100*M.BANK_DISCOUNT_RATE}%)`,r=Math.abs(e.price.sponsored),a=p.get(t)||0;p.set(t,a+r)}}),h=Array.from(p.entries()).map(([e,t])=>({label:e,amount:`-$${t.toFixed(2)}`})),x=e.customerNetAmountToPay??e.customerFullAmountToPay??0,f=e.vatAmount??0,g=e.customerFullAmountToPay??0,(y=e.totalAmount-x)>0&&0===h.length&&h.push({label:"Discount applied",amount:`-$${y.toFixed(2)}`}),{firstMonth:u(l,"First Month (Prorated)"),finalMonth:u(o,"Final Month"),initiationFee:u(d,"Initiation fee"),subtotal:`$${m.toFixed(2)}`,discounts:h,estimatedTaxes:`$${f.toFixed(2)}`,totalDue:`$${g.toFixed(2)}`});return(0,t.jsx)(E.MembershipCheckout,{pricing:w,"data-sentry-element":"MembershipCheckout","data-sentry-component":"CheckoutWithPolling","data-sentry-source-file":"CheckoutWithPolling.tsx"})}var L=e.i(647194),T=e.i(630106);let R="staging"===e.i(139061).dataset;function A({currentStep:e,state:a}){let[s,n]=(0,r.useState)(!0);return R?(0,t.jsxs)("div",{className:"bg-yellow-100 border-b border-yellow-300 text-xs font-mono","data-sentry-component":"MembershipDebugPanel","data-sentry-source-file":"MembershipDebugPanel.tsx",children:[(0,t.jsxs)("button",{onClick:()=>n(!s),className:"w-full px-4 py-2 flex items-center justify-between hover:bg-yellow-200 transition-colors",children:[(0,t.jsxs)("span",{className:"font-bold text-yellow-800",children:["ð§ Debug: User Context (Step: ",e,")"]}),(0,t.jsx)("span",{className:"text-yellow-600",children:s?"â¼":"â²"})]}),!s&&(0,t.jsxs)("div",{className:"text-yellow-700 space-y-0.5 px-4 pb-2",children:[(0,t.jsxs)("div",{children:["selectedPlan:"," ",(0,t.jsx)("span",{className:"font-semibold",children:a.selectedPlan?.name||"â"})," ",a.selectedPlan?.price&&(0,t.jsxs)("span",{className:"text-yellow-600",children:["(",a.selectedPlan.price,")"]})]}),(0,t.jsxs)("div",{children:["productId:"," ",(0,t.jsx)("span",{className:"font-semibold",children:a.selectedPlan?.productId?`center: ${a.selectedPlan.productId.center}, id: ${a.selectedPlan.productId.id}`:"â"})]}),(0,t.jsxs)("div",{children:["personId:"," ",(0,t.jsx)("span",{className:"font-semibold",children:a.userData.personId||"â"})]}),(0,t.jsxs)("div",{children:["centerId:"," ",(0,t.jsx)("span",{className:"font-semibold",children:a.userData.centerId||"â"})]}),(0,t.jsxs)("div",{children:["email:"," ",(0,t.jsx)("span",{className:"font-semibold",children:a.userData.email||"â"})]}),(0,t.jsxs)("div",{children:["exerpPersonId:"," ",(0,t.jsx)("span",{className:"font-semibold",children:a.userData.exerpPersonId||"â"})]}),(0,t.jsxs)("div",{children:["accessToken:"," ",(0,t.jsx)("span",{className:"font-semibold",children:a.userData.accessToken?"â Set":"â"})]}),(0,t.jsxs)("div",{children:["shoppingBasketKey:"," ",(0,t.jsx)("span",{className:"font-semibold",children:a.shoppingBasketKey||"â"})]}),(0,t.jsxs)("div",{children:["finalizedBasket:"," ",(0,t.jsx)("span",{className:"font-semibold",children:a.finalizedBasket?`${a.finalizedBasket.shoppingBasketStatus} - $${a.finalizedBasket.customerFullAmountToPay}`:"â"})]})]})]}):null}var _=e.i(875348),B=e.i(68031),F=e.i(878016),O=e.i(217906),$=e.i(674356),H=e.i(508930),U=e.i(784449);function G(e,t){if(null!=e){let t=parseInt(e,10);if(!Number.isNaN(t))return t}return t?.[0]?.centerid??void 0}function V({isOpen:e,onClose:o,location:d,plans:h,centerLocationMap:x}){let f=(0,a.usePathname)(),{state:g,currentStep:y,canGoBack:b,pushStep:j,popStep:w,jumpToStep:C,redirectToPlans:S,setUserData:E,setFinalizedBasket:D}=(0,s.useMembershipFlow)(),I=(0,r.useMemo)(()=>(0,U.withFreshPlans)(h,g.freshPlans),[h,g.freshPlans]),[R,W]=(0,r.useState)(!1),[K,Y]=(0,r.useState)(null),[q,X]=(0,r.useState)(!1),[J,Z]=(0,r.useState)(null),[Q,ee]=(0,r.useState)(""),et=(0,r.useRef)(null),er=(0,r.useRef)(null),ea=(0,r.useRef)(C),es=(0,r.useRef)(!1),en=(0,r.useRef)(g.userData);(0,r.useEffect)(()=>{en.current=g.userData},[g.userData]);let ei=(0,r.useCallback)(async(e,t)=>{es.current=!0,W(!0),Y(null),Z(null);let r=G(g.userData.centerId,I);if(null==r||Number.isNaN(r)){Y("We couldn't determine your club location. Please close this and start again from the join page."),W(!1),es.current=!1;return}let a=(0,M.buildPlanId)(r,g.selectedPlan?.productId?.id),s={centerId:r,password:e.password,firstName:e.firstName,lastName:e.lastName,email:e.email,...e.birthday&&{birthday:e.birthday},...e.gender&&"prefer-not-to-say"!==e.gender&&{gender:e.gender.toUpperCase()},...e.phone&&{mobilePhoneNumber:e.phone},...e.address&&{address:{address1:e.address,...e.addressLine2&&{address2:e.addressLine2},zip:e.zip,zipName:e.city,country:"US",province:e.state}}};
18try{let[n,i]=await (0,B.createAccount)(s);if(i){(0,$.trackHeapEvent)("account_created",{outcome:"failure",account_type:"new",location_id:String(r),plan_id:a??null},null),Y((0,v.getSignupErrorMessage)(i)),W(!1),es.current=!1;return}if(n){let s=(0,O.buildHeapIdentity)({centerId:n.person?.personId?.center,personId:n.person?.personId?.id});(0,$.identifyHeap)(s),(0,$.trackHeapEvent)("account_created",{outcome:"success",account_type:"new",location_id:String(r),plan_id:a??null},s);let i=t?.mergeWithExisting?{...en.current,...e}:e;E({...i,personId:n.person.personId.id.toString(),centerId:n.person.personId.center.toString(),exerpPersonId:n.person.personId.externalId}),W(!1),es.current=!1,j("startDate")}else(0,$.trackHeapEvent)("account_created",{outcome:"failure",account_type:"new",location_id:String(r),plan_id:a??null},null),Y((0,v.getSignupErrorMessage)(null)),W(!1),es.current=!1}catch(e){(0,$.trackHeapEvent)("account_created",{outcome:"failure",account_type:"new",location_id:String(r),plan_id:a??null},null),(0,N.reportClientError)(e,{operation:"membership.createAccount",component:"MembershipDrawer"}),Y((0,v.getSignupErrorMessage)(e instanceof Error?e.message:null)),W(!1),es.current=!1}},[g.userData.centerId,g.selectedPlan,I,E,j]),el=(0,r.useCallback)(async(e,t)=>H.startSpan({op:"ui.action",name:"membership.login.submit",attributes:{flow:"online-join"}},async()=>{es.current=!0,X(!0),Z(null);let r=G(g.userData.centerId,I),a=(0,M.buildPlanId)(r,g.selectedPlan?.productId?.id);try{let s=await (0,F.resolveExerpIdentity)({credentials:{email:e,password:t},flow:"online-join"});if("error"===s.status)return(0,$.trackHeapEvent)("account_login",{outcome:"failure",account_type:"existing",location_id:null!=r?String(r):null,plan_id:a??null},null),Z((0,v.getLoginErrorMessage)(s.error)),X(!1),es.current=!1,!1;let n=en.current;if("resolved"===s.status){let{person:t,communication:i}=s,l=(0,O.buildHeapIdentity)({centerId:s.identity.center,personId:s.identity.personId});return(0,$.identifyHeap)(l),(0,$.trackHeapEvent)("account_login",{outcome:"success",account_type:"existing",location_id:null!=r?String(r):null,plan_id:a??null},l),E({...n,personId:t.personId.id.toString(),centerId:t.personId.center.toString(),email:i?.email||e,exerpPersonId:t.personId.externalId||s.exerpUsername,accessToken:s.accessToken,firstName:t.firstName||n.firstName,lastName:t.lastName||n.lastName,phone:i?.mobilePhoneNumber||n.phone,address:t.address?.address1||n.address,addressLine2:t.address?.address2||n.addressLine2,city:t.address?.zipName||n.city,state:t.address?.province||n.state,zip:t.address?.zip||n.zip,gender:t.gender?.toLowerCase()||n.gender,birthday:t.birthday||n.birthday}),X(!1),es.current=!1,j("confirmDetails"),!0}let i={...n,email:e,exerpPersonId:s.exerpUsername,accessToken:s.accessToken};
18return I?.[0]?.centerid!=null&&(i.centerId=String(I[0].centerid)),(0,$.identifyHeap)(null),(0,$.trackHeapEvent)("account_login",{outcome:"success",account_type:"existing",location_id:null!=r?String(r):null,plan_id:a??null},null),E(i),X(!1),es.current=!1,j("confirmDetails"),!0}catch(e){return(0,$.trackHeapEvent)("account_login",{outcome:"failure",account_type:"existing",location_id:null!=r?String(r):null,plan_id:a??null},null),(0,N.reportClientError)(e,{operation:"membership.login",component:"MembershipDrawer"}),Z((0,v.getLoginErrorMessage)(e instanceof Error?e.message:null)),X(!1),es.current=!1,!1}}),[g.userData.centerId,g.selectedPlan,I,E,j]),eo=(0,r.useCallback)(()=>w(),[w]);(0,r.useEffect)(()=>{if(!e||es.current||!y||"plans"===y)return;let t=new URLSearchParams(window.location.search);if("true"!==t.get("fromPaymentReturn")&&!(0,U.hasStepPrerequisites)(y,g)){S();let e=new URLSearchParams;e.set("progress","plans");let r=t.get("ach");r&&e.set("ach",r),et.current="plans",er.current=`?${e.toString()}`,window.history.replaceState(null,"",`${f}?${e.toString()}`)}},[e,y,g,S,f]);let ed=I?.[0]?.centerid;(0,r.useEffect)(()=>{e&&null!=ed&&!g.userData.centerId&&E({...g.userData,centerId:String(ed)})},[e,ed]),(0,r.useEffect)(()=>{if(es.current||!e)return;
18let t=window.location.search,r=new URLSearchParams(t),a=r.get("progress");if(er.current!==t&&a){let e=M.QUERY_PARAM_TO_STEP[a];if(e&&g.stepStack.includes(e)){let r=g.stepStack.findIndex(t=>t===e);if(-1!==r&&r!==g.currentIndex){et.current=e,er.current=t,ea.current(e);return}if(r===g.currentIndex){et.current=y,er.current=t;return}}}if(!y||"plans"===y||et.current===y)return;let s=M.STEP_TO_QUERY_PARAM[y];if(s)if(a!==s){let e=new URLSearchParams;e.set("progress",s);let t=r.get("ach");t&&e.set("ach",t),et.current=y,er.current=`?${e.toString()}`,window.history.replaceState(null,"",`${f}?${e.toString()}`)}else et.current=y,er.current=t},[e,y,f,g.currentIndex,g.stepStack]);let ec=(0,_.useIsMobile)();return(0,t.jsx)(i.Sheet,{open:e,onOpenChange:e=>{e||o()},"data-sentry-element":"Sheet","data-sentry-component":"MembershipDrawer","data-sentry-source-file":"MembershipDrawer.tsx",children:(0,t.jsxs)(i.SheetContent,{side:ec?"bottom":"right",className:"bg-zinc-50 flex flex-col gap-0 w-full md:max-w-[480px] h-dvh overflow-y-auto border-none",onInteractOutside:e=>e.preventDefault(),onFocusOutside:e=>e.preventDefault(),"data-sentry-element":"SheetContent","data-sentry-source-file":"MembershipDrawer.tsx",children:[(0,t.jsxs)(i.SheetHeader,{className:"bg-white border-b shrink-0 pb-4 relative flex flex-row","data-sentry-element":"SheetHeader","data-sentry-source-file":"MembershipDrawer.tsx",children:[b&&(0,t.jsx)("button",{className:"inline-block cursor-pointer",onClick:()=>w(),"aria-label":"Go back",children:(0,t.jsx)(n.ChevronLeft,{})}),(0,t.jsxs)(i.SheetTitle,{className:"text-center grow","data-sentry-element":"SheetTitle","data-sentry-source-file":"MembershipDrawer.tsx",children:[(0,t.jsx)("span",{className:"block text-xs font-normal",children:"Join Chelsea Piers Fitness"}),(0,t.jsx)("span",{className:"block text-sm font-[450] text-zinc-900",children:d||"Our Location"})]}),(0,t.jsx)(i.SheetClose,{"aria-label":"Close","data-sentry-element":"SheetClose","data-sentry-source-file":"MembershipDrawer.tsx",children:(0,t.jsx)(l.XMarkIcon,{className:"size-5","data-sentry-element":"XMarkIcon","data-sentry-source-file":"MembershipDrawer.tsx"})})]}),(0,t.jsx)(A,{currentStep:y,state:g,"data-sentry-element":"MembershipDebugPanel","data-sentry-source-file":"MembershipDrawer.tsx"}),(()=>{let e=G(g.userData.centerId,I);if(["confirmDetails","startDate","payment","checkout","confirmation"].includes(y)){let e=g.userData.centerId?parseInt(g.userData.centerId,10):null,r=g.selectedPlan?.productId?.center;if(null!=e&&null!=r&&e!==r){let r=null!=e?x?.[e]:void 0;return(0,t.jsxs)("div",{className:"p-6 space-y-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-zinc-900",children:"Looks like you're registered at a different club location"}),r?(0,t.jsxs)("p",{className:"text-zinc-600",children:["To join, head over to the"," ",(0,t.jsxs)("a",{href:r.joinUrl,className:"font-medium text-[#0061E9] underline underline-offset-2",children:[r.location," join page"]}),"."]}):(0,t.jsx)("p",{className:"text-zinc-600",children:"Please visit the join page for your home club to purchase a membership."})]})}}switch(y){case"plans":return(0,t.jsx)(c,{plans:I});case"login":return(0,t.jsx)(u.MembershipLoginForm,{centerId:null==e||Number.isNaN(e)?void 0:e,initialEmail:g.userData.email,isLoading:q,errorMessage:J,isSignupLoading:R,signupErrorMessage:K,onClearError:()=>{Z(null),Y(null)},onContinue:el,onSignup:ei,onForgotPassword:e=>{ee(e),j("forgotPassword")}});case"forgotPassword":return(0,t.jsx)(T.MembershipForgotPasswordForm,{initialEmail:Q,onBack:()=>w(),errorOperation:"membership.forgotPassword",onSubmit:async e=>H.startSpan({op:"ui.action",name:"membership.recoverPassword.submit",attributes:{flow:"online-join"}},async()=>{let[,t]=await (0,B.recoverPassword)(e);if(t)throw Error(t.message)})});case"signup":return(0,t.jsx)(m.MembershipSignupForm,{centerId:null==e||Number.isNaN(e)?void 0:e,onClearError:()=>Y(null),onContinue:ei,onBack:()=>{w(),Y(null)},initialEmail:g.userData.email,isLoading:R,errorMessage:K});case"confirmDetails":return(0,t.jsx)(k,{onContinue:()=>j("startDate"),onBack:()=>w()});case"startDate":{let e=g.selectedPlan?.centerid??ed;if(null==e)return null;return(0,t.jsx)(p.MembershipStartDate,{centerId:e})}case"payment":return(0,t.jsx)(P.MembershipPaymentMethod,{location:d});case"checkout":return(0,t.jsx)(z,{finalizedBasket:g.finalizedBasket,adyenSessionId:g.adyenSessionId,paymentMethod:g.paymentMethod,setFinalizedBasket:D,onSessionExpired:eo});case"confirmation":return(0,t.jsx)(L.MembershipConfirmation,{});default:return null}})()]})})}e.s(["MembershipDrawerClient",0,function({location:e,plans:n,showDrawer:i,initialStep:l,progressParam:o,pathname:d,centerLocationMap:c,navigationId:u}){let m=(0,a.useRouter)(),p=(0,a.useSearchParams)(),{pushStep:h,redirectToPlans:x,state:f}=(0,s.useMembershipFlow)(),g="true"===p.get("fromPaymentReturn"),[y,b]=(0,r.useState)(i),v=(0,r.useRef)(h),j=(0,r.useRef)(!1),w=(0,r.useRef)(!1);(0,r.useEffect)(()=>{v.current=h},[h]);let N=o?M.QUERY_PARAM_TO_STEP[o]:void 0,C=M.QUERY_PARAM_TO_STEP[l],S=N??C??"plans";(0,r.useEffect)(()=>{i||N||(j.current=!1,w.current=!0)},[i,N]);let k=(0,r.useRef)(u);return(0,r.useEffect)(()=>{u!==k.current&&(k.current=u,y||(j.current=!1))},[u,y]),(0,r.useEffect)(()=>
18{if((i||N)&&!j.current){if(g||"plans"===S||(0,U.hasStepPrerequisites)(S,f))v.current(S);else{x();let e=d||"";m.replace(`${e}?progress=plans`,{scroll:!1})}b(!0),j.current=!0}},[N,i,S,f,x,d,m,g,u]),(0,t.jsx)(V,{isOpen:y&&(i||!!N),onClose:()=>{b(!1),function(){if(!("navigation"in window))return;let e=window.navigation.currentEntry;if(!e)return;let t=window.navigation.entries()[e.index-1];if(!t?.url)return!1;let r=new URL(t.url);return r.origin===window.location.origin&&r.pathname===window.location.pathname&&!r.searchParams.has("progress")}()??w.current?m.back():m.replace(d,{scroll:!1})},location:e,plans:n,centerLocationMap:c,"data-sentry-element":"MembershipDrawer","data-sentry-component":"MembershipDrawerClient","data-sentry-source-file":"MembershipDrawerClient.tsx"})}],814730)},969677,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(985902),s=e.i(610012),n=e.i(173554),i=e.i(619704),l=e.i(369721);let o="login-form-error";e.s(["MembershipLoginForm",0,function({selectedPlan:e,initialEmail:d="",centerId:c,onContinue:u,onSignup:m,isLoading:p=!1,errorMessage:h=null,isSignupLoading:x=!1,signupErrorMessage:f=null,onClearError:g,onForgotPassword:y}){let[b,v]=(0,r.useState)(d),[j,w]=(0,r.useState)(""),[N,C]=(0,r.useState)(!1),[S,k]=(0,r.useState)(!1),[P,M]=(0,r.useState)(null),E=()=>{M(null),g?.()},D=async e=>{if(e&&(e.preventDefault(),e.stopPropagation()),!S&&!p){k(!0),M(null);try{let e=u(b,j);if(e instanceof Promise){let t=await e;if(!1===t)return void k(!1)}else if(!1===e)return void k(!1)}catch(e){(0,l.reportClientError)(e,{operation:"membership.loginForm"}),M(e instanceof Error?e.message:"An error occurred"),k(!1);return}finally{k(!1)}}},I=P||h;return N?(0,t.jsx)(i.MembershipSignupForm,{selectedPlan:e,initialEmail:b,centerId:c,onContinue:m,onBack:()=>C(!1),isLoading:x,errorMessage:f,onClearError:g}):(0,t.jsxs)("div",{className:"px-4 py-6 space-y-6","data-sentry-component":"MembershipLoginForm","data-sentry-source-file":"MembershipLoginForm.tsx",children:[(0,t.jsx)("h1",{className:"text-3xl font-medium text-zinc-900 leading-[40px]",children:"Log in to continue"}),(0,t.jsxs)("div",{className:"space-y-4 bg-white p-4 rounded-xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Label,{className:"font-normal",htmlFor:"email","data-sentry-element":"Label","data-sentry-source-file":"MembershipLoginForm.tsx",children:"Email"}),(0,t.jsx)(s.Input,{id:"email",type:"email",placeholder:"Enter your email",value:b,onChange:e=>{v(e.target.value),E()},onKeyDown:e=>{"Enter"!==e.key||p||S||(e.preventDefault(),D())},required:!0,className:"h-12 shadow-none mt-2","aria-invalid":!!I,"aria-describedby":I?o:void 0,"data-sentry-element":"Input","data-sentry-source-file":"MembershipLoginForm.tsx"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Label,{className:"font-normal",htmlFor:"password","data-sentry-element":"Label","data-sentry-source-file":"MembershipLoginForm.tsx",children:"Password"}),(0,t.jsx)(s.Input,{id:"password",type:"password",placeholder:"Enter your password",value:j,onChange:e=>{w(e.target.value),E()},onKeyDown:e=>{"Enter"!==e.key||p||S||(e.preventDefault(),D())},required:!0,className:"h-12 mt-2 shadow-none",minLength:6,"aria-invalid":!!I,"aria-describedby":I?o:void 0,"data-sentry-element":"Input","data-sentry-source-file":"MembershipLoginForm.tsx"}),y&&(0,t.jsx)("button",{onClick:()=>y?.(b),className:"mt-2 text-sm text-blue-600 cursor-pointer",children:"Forgot password?"})]})]}),(0,t.jsxs)("p",{children:["Don't have an account?"," ",(0,t.jsx)("button",{onClick:()=>C(!0),className:"underline cursor-pointer",children:"Sign up"})]}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)(a.Button,{className:"w-full h-14 text-base font-medium bg-[#040711] hover:bg-zinc-900 text-white rounded-full",disabled:p||S||!b||!j,onClick:()=>D(),"data-sentry-element":"Button","data-sentry-source-file":"MembershipLoginForm.tsx",children:p||S?"Logging in...":"Log in"})}),I&&(0,t.jsx)("div",{id:o,role:"alert",className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:(0,t.jsx)("p",{className:"text-sm text-red-700",children:I})})]})}])},541052,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(647724),s=e.i(969677),n=e.i(502119),i=e.i(545720),l=e.i(356617);e.s(["MembershipLoginPage",0,function({}){(0,r.useEffect)(()=>{a.addBreadcrumb({category:"membership.step",message:"user reached: login",level:"info"})},[]);
18let e=(0,n.useRouter)(),o=(0,n.usePathname)(),d=(0,n.useSearchParams)().get("email")||"",[c,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(null),h=async(e,t)=>{u(!0),p(null);let[r,a]=await (0,i.login)({email:e,password:t},{flow:"online-join"});return(u(!1),a)?(p((0,l.getLoginErrorMessage)(a)),!1):!!r||(p((0,l.getLoginErrorMessage)(null)),!1)};return(0,t.jsx)("div",{"data-sentry-component":"MembershipLoginPage","data-sentry-source-file":"MembershipLoginPage.tsx",children:(0,t.jsx)(s.MembershipLoginForm,{selectedPlan:void 0,initialEmail:d,isLoading:c,errorMessage:m,onClearError:()=>p(null),onContinue:h,onSignup:()=>{let t=o.split("/").slice(0,-1).join("/");e.push(`${t}/signup`)},"data-sentry-element":"MembershipLoginForm","data-sentry-source-file":"MembershipLoginPage.tsx"})})}])},125923,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(3656),s=e.i(985902),n=e.i(614825);function i(){return(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-white/80","data-sentry-component":"AdyenLoadingStatus","data-sentry-source-file":"AdyenDropinStatus.tsx",children:(0,t.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-b-2 border-blue-600"})})}function l({slow:e=!1}){return(0,t.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center rounded-lg bg-white/95","data-sentry-component":"AdyenProcessingStatus","data-sentry-source-file":"AdyenDropinStatus.tsx",children:[(0,t.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-b-2 border-green-600"}),(0,t.jsx)("p",{className:"mt-4 text-lg font-medium text-zinc-900",children:"Payment submitted"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-zinc-600",children:"Confirming your payment..."}),(0,t.jsx)("p",{className:"mt-1 text-xs text-zinc-400",children:"Please wait while we finalize your membership"}),e&&(0,t.jsx)("p",{className:"mt-3 max-w-xs text-center text-xs text-zinc-500",children:"This is taking a little longer than usual. Please keep this window open and don't pay again while we confirm your payment."})]})}function o({message:e}){return(0,t.jsxs)("div",{className:"mt-4 flex gap-2 rounded border border-red-200 bg-red-50 p-4","data-sentry-component":"AdyenErrorStatus","data-sentry-source-file":"AdyenDropinStatus.tsx",children:[(0,t.jsx)(n.AlertCircle,{className:"h-5 w-5 text-red-500","data-sentry-element":"AlertCircle","data-sentry-source-file":"AdyenDropinStatus.tsx"}),(0,t.jsx)("p",{className:"text-sm text-red-700",children:e})]})}function d(e){let{containerRef:r,modalState:n,onClose:d}=e;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center","data-sentry-component":"AdyenDropinModalView","data-sentry-source-file":"AdyenDropinModalView.tsx",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:d}),(0,t.jsxs)("div",{className:"relative mx-4 flex max-h-[90vh] w-full max-w-md flex-col rounded-lg bg-white shadow-xl",children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b p-6",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Payment"}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)("button",{onClick:d,className:"rounded-full p-2 hover:bg-zinc-100",children:(0,t.jsx)(a.X,{className:"h-5 w-5 text-zinc-500","data-sentry-element":"X","data-sentry-source-file":"AdyenDropinModalView.tsx"})})})]}),(0,t.jsxs)("div",{className:"relative min-h-0 flex-1 overflow-y-auto p-6",children:[(0,t.jsx)("div",{ref:r,className:"min-h-[320px]"}),"loading"===n.status&&(0,t.jsx)(i,{}),"processing"===n.status&&(0,t.jsx)(l,{slow:!0===n.slow}),"error"===n.status&&(0,t.jsx)(o,{message:n.message})]}),"error"===n.status&&(0,t.jsx)("div",{className:"px-6 pb-6",children:(0,t.jsx)(s.Button,{variant:"outline",className:"w-full",onClick:d,children:"Cancel"})})]})]})}var c=e.i(647724);async function u({paymentType:t,onPaymentCompleted:r,onPaymentFailed:a,onError:s}){let{Card:n,PayByBankUS:i}=await e.A(379844),l={showPayButton:!0,openFirstPaymentMethod:!0,beforeSubmit:(e,t,r)=>{r.resolve()},onSubmit:()=>{},onActionHandled:()=>{},onPaymentCompleted:e=>{r?.(e)},onPaymentFailed:e=>{a?.(e)},onError:e=>{s?.(e)}};return"card"===t?{...l,paymentMethodsConfiguration:{card:{hasHolderName:!0,holderNameRequired:!0,billingAddressRequired:!0}},paymentMethodComponents:[n]}:{...l,paymentMethodComponents:[i]}}var m=e.i(327910),p=e.i(323700);async function h(t){var r,a;let s=t.session.session.id;c.addBreadcrumb({category:"membership.payment",message:`adyen: dropin initialized (${t.paymentType})`,level:"info"});let n={onBasketFinalized:t.onBasketFinalized,onPaymentDeclined:t.onPaymentDeclined,onSessionExpired:t.onSessionExpired,onSlow:t.onSlow},i=!1,l=e=>{i||(i=!0,(0,p.recordPageAction)("OnlineJoin:PaymentSubmitted",{paymentType:t.paymentType,sessionId:s}),(0,m.startPaymentStatusPolling)(s,n,t.paymentType),t.onPaymentCompleted?.(e))},o=e=>{(0,m.stopPaymentStatusPolling)(),t.onPaymentFailed?.(e)},d=e=>{t.onError?.(e)},{AdyenCheckout:h,Dropin:x}=await e.A(379844);return new x(await h({environment:t.session.environment,clientKey:t.session.clientKey,session:t.session.session,countryCode:t.countryCode??"US",locale:t.locale??"en-US",translations:(r=t.paymentType,a=t.tokenizationOnly,"bank"===r?{"en-US":{payButton:"Review Membership","payButton.with":"Review Membership","payButton.redirecting":"Opening Plaid flow...",confirmPreauthorization:"Review Membership",continue:"Review Membership","continue.with":"Review Membership"}}:"card"===r&&a?{"en-US":{payButton:"Save Card","payButton.with":"Save Card"}}:void 0),analytics:{enabled:!0},risk:{enabled:!0},onPaymentCompleted:l,onPaymentFailed:o,onError:d}),await u({paymentType:t.paymentType,onPaymentCompleted:l,onPaymentFailed:o,onError:d}))}var x=e.i(356617),f=e.i(369721),g=e.i(491010);async function y(e){let{amount:t,countryCode:r,locationId:a,personId:s,exerpExternalId:n,shoppingBasketKey:i,productId:l,startDate:o,paymentType:d,tokenizationOnly:c}=e,u="string"==typeof a?parseInt(a,10):a,m=0;try{let{apiBase:e,clientKey:a,gangwayApiKey:h}=function(){let e="https://gangway-api.chelseapiers.com".replace(/\/+$/,"");if(!e)throw Error("NEXT_PUBLIC_GANGWAY_API_BASE_URL not set");return{apiBase:e,clientKey:"live_JBGBZRMK4ZA2BH4NTJJF577HOYX3F2W7",gangwayApiKey:"gw_OcDDm_TFA6JMK3PA3DXDZRv5DjS
187W7JytwhtlQ"}}(),x=function({centerId:e,personId:t,shoppingBasketKey:r,productId:a,startDate:s}){let n=[`u${e}p${t}`];if(r&&n.push(`b${r}`),a&&n.push(`p${a.center}_${a.id}`),s){let e=s.getFullYear(),t=String(s.getMonth()+1).padStart(2,"0"),r=String(s.getDate()).padStart(2,"0");n.push(`s${e}${t}${r}`)}return n.join("-")}({centerId:u,personId:s,shoppingBasketKey:i,productId:l,startDate:o}),f="card"===d?"/adyen/sessions/card":"/adyen/sessions/bank";(0,p.recordPageAction)("OnlineJoin:SessionCreationStarted",{paymentType:d,centerId:u}),m=Date.now();let y=await fetch(`${e}${f}`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":h},body:JSON.stringify({..."card"===d&&c?{tokenizationOnly:!0}:{amount:t},countryCode:r,centerId:u,returnUrl:`${window.location.origin}/payment/return`,reference:x,shopperReference:n.trim(),...i?{idempotencyKey:`session-${d}-${i}`}:{}})}),b=await y.json();if(!y.ok)throw Error(b?.error||`Failed to create Adyen session (${y.status})`);if(!b?.session?.id||!b?.session?.sessionData)throw Error("Invalid Adyen session response");if("bank"===d){let e=new URLSearchParams(window.location.search);e.set("fromPaymentReturn","true"),(0,g.savePaymentRedirectContext)({sessionId:b.session.id,sessionData:b.session.sessionData,environment:b.environment??"test",returnTo:`${window.location.pathname}?${e.toString()}${window.location.hash}`})}return(0,p.recordPageAction)("OnlineJoin:SessionCreated",{paymentType:d,centerId:u,sessionId:b.session.id,shoppingBasketKey:i??"",durationMs:Date.now()-m}),{sessionId:b.session.id,sessionData:{session:b.session,clientKey:a,environment:b.environment??"test"}}}catch(e){throw(0,f.reportClientError)(e,{operation:"adyen.initSession"}),(0,p.recordPageAction)("OnlineJoin:SessionCreationFailed",{paymentType:d,centerId:u,durationMs:m>0?Date.now()-m:0,errorMessage:e instanceof Error?e.message.slice(0,200):"unknown"}),e}}function b(e){let{isOpen:a,onClose:s,paymentType:n,countryCode:i="US"}=e,l=(0,r.useRef)(null),[o,u]=(0,r.useState)({status:"idle"}),p=function(e){let{isOpen:t,amount:a={currency:"USD",value:1e3},countryCode:s="US",locationId:n,personId:i,exerpExternalId:l,paymentType:o,setModalState:d}=e,[c,u]=(0,r.useState)(null),p=(0,r.useRef)(!1),h=(0,r.useRef)(""),f=(0,r.useRef)(null),g=(0,r.useRef)(e.onPaymentError),b=(0,r.useRef)(e.onSessionCreated),v=(0,r.useRef)(e.onClose);return(0,r.useEffect)(()=>{g.current=e.onPaymentError,b.current=e.onSessionCreated,v.current=e.onClose},[e.onPaymentError,e.onSessionCreated,e.onClose]),(0,r.useEffect)(()=>{let r=()=>{u(null),p.current=!1,h.current=""};if(!t){(0,m.stopPaymentStatusPolling)(),r(),d({status:"idle"}),f.current=null;return}f.current&&f.current!==o&&(r(),d({status:"idle"})),f.current=o;let j=function({personId:e,exerpExternalId:t,locationId:r}){return e&&t.trim()?r?{valid:!0,locationId:r}:{valid:!1,reason:"missing-location",message:(0,x.getPaymentErrorMessage)("session")}:{valid:!1,reason:"missing-person",message:(0,x.getPaymentErrorMessage)("session")}}({personId:i,exerpExternalId:l,locationId:n});if(!j.valid){d({status:"error",message:j.message}),g.current?.(j.message),"missing-location"===j.reason&&(window.history.replaceState(null,"",window.location.pathname),v.current());return}let w=function({personId:e,exerpExternalId:t,locationId:r}){return`${e}:${t.trim()}:${r}`}({personId:i,exerpExternalId:l,locationId:j.locationId});if(p.current&&c){if(h.current===w)return;r(),d({status:"idle"})}let N=!1;return(async()=>{try{d({status:"loading"});let t=await y({...e,amount:a,countryCode:s,locationId:j.locationId,personId:i,exerpExternalId:l});if(N)return;u(t.sessionData),p.current=!0,h.current=w,b.current?.(t.sessionId),d({status:"idle"})}catch(t){if(N)return;let e=(0,x.getPaymentErrorMessage)(t instanceof Error?t.message:"Failed to create session");d({status:"error",message:e}),g.current?.(e)}})(),()=>{N=!0}},[t,o,i,l,n]),c}({...e,amount:e.amount??{currency:"USD",value:1e3},countryCode:i,setModalState:u});return(!function(e){let{isOpen:t,sessionData:a,containerRef:s,countryCode:n="US",paymentType:i,tokenizationOnly:l,shoppingBasketKey:o,setModalState:d}=e,u=(0,r.useRef)(null);(0,r.useEffect)(()=>
18{if(!a||!s.current||!t||u.current)return;let r=!1;return(async()=>{try{let t=await h({session:a,countryCode:n,paymentType:i,tokenizationOnly:l,shoppingBasketKey:o,...function({setModalState:e,onPaymentSuccess:t,onPaymentError:r,onBasketFinalized:a,onPaymentDeclined:s,onSessionExpired:n}){let i=t=>{let a=(0,x.getPaymentErrorMessage)(t);e({status:"error",message:a}),r?.(a)};return{onBasketFinalized:a,onPaymentDeclined:s,onSessionExpired:n,onSlow:()=>e({status:"processing",slow:!0}),onPaymentCompleted:r=>{c.addBreadcrumb({category:"membership.payment",message:"adyen dropin: payment completed",level:"info"}),e({status:"processing"}),t?.(r)},onPaymentFailed:()=>{c.addBreadcrumb({category:"membership.payment",message:"adyen dropin: payment failed",level:"warning"}),i("payment failed")},onError:e=>{c.addBreadcrumb({category:"membership.payment",message:`adyen dropin: error â ${e.message}`,level:"error"}),i(e.message)}}}({...e,setModalState:d})});if(r)return void t.unmount();t.mount(s.current),u.current=t}catch(r){(0,f.reportClientError)(r,{operation:"adyen.mountDropin"});let t=(0,x.getPaymentErrorMessage)(r instanceof Error?r.message:"Failed to mount dropin");d({status:"error",message:t}),e.onPaymentError?.(t)}})(),()=>{r=!0,u.current?.unmount(),u.current=null}},[a,t])}({...e,countryCode:i,sessionData:p,containerRef:l,setModalState:u}),a)?(0,t.jsx)(d,{containerRef:l,modalState:o,paymentType:n,onClose:s,"data-sentry-element":"AdyenDropinModalView","data-sentry-component":"AdyenDropinModal","data-sentry-source-file":"AdyenDropinModal.tsx"}):null}function v(e){let{activePaymentMethod:r,monthlyPrice:a,locationId:s,personId:n,exerpExternalId:i}=e;return r?n&&i?(0,t.jsx)(b,{isOpen:!0,onClose:e.onClose,onPaymentSuccess:e.onPaymentSuccess,onPaymentError:e.onPaymentError,onBasketFinalized:e.onBasketFinalized,onPaymentDeclined:e.onPaymentDeclined,onSessionExpired:e.onSessionExpired,onSessionCreated:e.onSessionCreated,paymentType:r,tokenizationOnly:"card"===r,amount:{currency:"USD",value:Math.round(100*a)},countryCode:"US",locationId:s,personId:n,exerpExternalId:i,shoppingBasketKey:e.shoppingBasketKey,productId:e.productId,startDate:e.startDate,"data-sentry-element":"AdyenDropinModal","data-sentry-component":"AdyenPaymentModal","data-sentry-source-file":"AdyenPaymentModal.tsx"}):(0,t.jsx)("div",{className:"rounded-lg border border-yellow-200 bg-yellow-50 p-4",children:(0,t.jsx)("p",{className:"text-sm text-yellow-800",children:n?"We could not load your account id for payments. Please go back and sign in again.":"Please complete login or signup before adding a payment method."})}):null}var j=e.i(951034);let w=(0,j.default)("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);var N=e.i(571155),N=N,C=e.i(152088);let S=(0,j.default)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);function k({type:e,onChange:r}){return(0,t.jsxs)("div",{className:"mt-4 space-y-4 border-t border-zinc-200 pt-4 text-center","data-sentry-component":"PaymentMethodConfirmation","data-sentry-source-file":"PaymentMethodConfirmation.tsx",children:[(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:(0,t.jsx)(S,{className:"h-6 w-6 text-green-600","data-sentry-element":"Shield","data-sentry-source-file":"PaymentMethodConfirmation.tsx"})})}),(0,t.jsx)("p",{className:"font-medium text-green-600",children:"bank"===e?"Bank account added":"Credit card added"}),(0,t.jsx)(s.Button,{variant:"outline",onClick:r,className:"h-10 w-full","data-sentry-element":"Button","data-sentry-source-file":"PaymentMethodConfirmation.tsx",children:"Change"})]})}function P({type:e,title:r,price:a,discountLabel:s,isAdded:n,canSelect:i,onSelect:l,onCh
18ange:o}){let d="bank"===e?w:N.default;return(0,t.jsxs)("div",{className:(0,C.cn)("relative rounded-lg border bg-white p-4 transition-all",n?"border-zinc-200":"cursor-pointer hover:border-zinc-300"),onClick:()=>i&&l(),"data-sentry-component":"PaymentMethodCard","data-sentry-source-file":"PaymentMethodCard.tsx",children:[s&&(0,t.jsx)("div",{className:"absolute -top-2.5 right-4",children:(0,t.jsx)("div",{className:"rounded bg-[#0061E9] px-1.5 py-0.5 text-sm font-medium text-white",children:s})}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-zinc-100",children:(0,t.jsx)(d,{className:"h-5 w-5 text-zinc-600","data-sentry-element":"Icon","data-sentry-source-file":"PaymentMethodCard.tsx"})}),(0,t.jsx)("h3",{className:"font-medium text-zinc-900",children:r})]}),(0,t.jsxs)("div",{className:"text-lg font-semibold text-zinc-900",children:["$",a,"/mo"]})]}),n&&(0,t.jsx)(k,{type:e,onChange:o})]})}var M=e.i(969212),E=e.i(298520);function D(){return(0,t.jsxs)("div",{className:"grid gap-2 bg-zinc-100 p-4 rounded-lg","data-sentry-component":"PaymentInstructions","data-sentry-source-file":"PaymentInstructions.tsx",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm text-zinc-500",children:[(0,t.jsx)(E.Clock,{className:"h-4 w-4 mt-0.5 shrink-0","data-sentry-element":"Clock","data-sentry-source-file":"PaymentInstructions.tsx"}),(0,t.jsx)("p",{children:"Once you select a payment method, you'll have 10 minutes to complete your purchase."})]}),(0,t.jsx)("hr",{className:"border-zinc-200"})]})}let I=`Save ${100*M.BANK_DISCOUNT_RATE}%`;function z({location:e,selectedPlanName:r,monthlyPrice:a,bankPrice:n,isInitializing:i,initError:l,paymentError:o,paymentAdded:d,onSelectPaymentMethod:c,onChangePayment:u,onNext:m,onDismissError:p,children:h}){return(0,t.jsxs)("div",{className:"space-y-6 p-6","data-sentry-component":"MembershipPaymentMethodView","data-sentry-source-file":"MembershipPaymentMethodView.tsx",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-3xl font-bold leading-10",children:l?"Error":"Add payment method"}),!l&&(0,t.jsxs)("p",{className:"text-sm text-zinc-600",children:[r&&(0,t.jsx)("span",{className:"font-medium text-zinc-700",children:r}),e&&(0,t.jsxs)(t.Fragment,{children:[r&&" ⢠",(0,t.jsx)("span",{className:"font-medium text-zinc-700",children:e})]})]})]}),l&&(0,t.jsx)("p",{className:"text-red-600",children:l}),i&&(0,t.jsx)("div",{className:"flex justify-center pt-4",children:(0,t.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-b-2 border-zinc-600"})}),!i&&!l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(P,{type:"bank",title:"US Bank Account",price:n,discountLabel:I,isAdded:"bank"===d,canSelect:!d,onSelect:()=>c("bank"),onChange:u}),(0,t.jsx)(P,{type:"card",title:"Credit Card",price:a,isAdded:"card"===d,canSelect:!d,onSelect:()=>c("card"),onChange:u})]}),d&&(0,t.jsx)(s.Button,{onClick:m,className:"h-14 w-full rounded-full bg-[#040711] text-base font-medium text-white hover:bg-zinc-900",children:"Next"})]}),(0,t.jsx)(D,{"data-sentry-element":"PaymentInstructions","data-sentry-source-file":"MembershipPaymentMethodView.tsx"}),o&&(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700",children:[(0,t.jsx)("span",{children:o}),(0,t.jsx)("button",{onClick:p,className:"ml-auto shrink-0 text-red-400 hover:text-red-600",children:"â"})]}),h]})}var L=e.i(495583),T=e.i(502119),R=e.i(481812),A=e.i(170696);let _=(0,A.createServerReference)("402e3f5432632fd2fc1f34a867e2460807eb17bc08",A.callServer,void 0,A.findSourceMapURL,"createShoppingBasketAction");async function B(e,t,r){let a=await _({centerId:parseInt(e,10),planId:t,displayedProductId:r});if(a.planMismatch){let{message:e,freshPlan:t}=a.planMismatch;return{planMismatch:{message:e,...t&&{freshPlan:t}}}}return!a.error&&a.data?.shoppingBasketKey&&a.productId?{shoppingBasketKey:a.data.shoppingBasketKey,productId:a.productId}:null}let F="Unable to prepare your order. Please go back and try again.";var O=e.i(217906),$=e.i(674356);let H="Your payment session has expired. Please try again.";e.s(["MembershipPaymentMethod",0,function({location:e}){let{setPaymentMethod:a,setFinalizedBasket:s,setAdyenSessionId:n,setShoppingBasketKey:i,state:{selectedPlan:l,userData:o,shoppingBasketKey:d,basketProductId:u,startDate:m},pushStep:h,popStep:y,redirectToPlans:b,setFreshPlan:j}=(0,L.useMembershipFlow)(),[w,N]=(0,r.useState)(null),[S,k]=(0,r.useState)(null),[P,E]=(0,r.useState)(null),[D,I]=(0,r.useState)(!1),{isInitializing:A,initError:_}=function({centerId:e,planId:t,displayedProductId:a,shoppingBasketKey:s,setShoppingBasketKey:n,redirectToPlans:i,setFreshPlan:l}){let o=(0,T.useRouter)(),[d,u]=(0,r.useState)(!0),[m,p]=(0,r.useState)(null),h=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{h.current||(h.current=!0,(async()=>
18{if(s)return u(!1);if(!e||!t){c.addBreadcrumb({category:"membership.payment",message:`basket init blocked: missing ${e?"planId":"centerId"}`,level:"error"}),(0,f.reportClientError)(Error(`Missing ${e?"planId":"centerId"} at payment step`),{operation:"membership.initBasket"}),p("Missing required information. Please go back and try again."),u(!1);return}try{let r=await B(e,t,a);if(!r)return void p(F);if("planMismatch"in r){l(t,r.planMismatch.freshPlan),R.toast.error(r.planMismatch.message),i(),o.refresh();return}n(r.shoppingBasketKey,r.productId)}catch(e){(0,f.reportClientError)(e,{operation:"membership.paymentMethod"}),p(F)}finally{u(!1)}})())},[]),{isInitializing:d,initError:m}}({centerId:o.centerId,planId:l?._id,displayedProductId:l?.productId,shoppingBasketKey:d,setShoppingBasketKey:i,redirectToPlans:b,setFreshPlan:j}),U=(0,C.extractPriceValue)(l?.price)||1e3,G=(U*(1-M.BANK_DISCOUNT_RATE)).toFixed(2),V=e=>{null===e&&D||(e&&(0,p.recordPageAction)("OnlineJoin:PaymentMethodSelected",{paymentMethod:e,...d?{shoppingBasketKey:d}:{}}),k(e))},W=(0,r.useCallback)((e,t)=>{let r=t??("bank"===S?"bank":"card");!function({userData:e,centerId:t,productId:r,paymentType:a}){let s=(0,O.buildHeapIdentity)(e),n=(0,M.buildPlanId)(t,r);(0,$.trackHeapEvent)("payment_method_verified",{outcome:"success",location_id:t??null,plan_id:n??null,payment_method:"bank"===a?"pay_by_bank":"credit_card"},s)}({userData:o,centerId:o.centerId,productId:l?.productId?.id,paymentType:r}),s(e),a(r),I(!1),k(null),h("checkout")},[S,o,l,s,a,h]);return(0,r.useEffect)(()=>{let e=(0,g.consumePaymentRedirectResult)();if(e){{let e=new URLSearchParams(window.location.search);if("true"===e.get("fromPaymentReturn")){e.delete("fromPaymentReturn");let t=e.toString(),r=t?`${window.location.pathname}?${t}`:window.location.pathname;window.history.replaceState(null,"",r)}}if("finalized"===e.status)return void W(e.basket,"bank");if("declined"===e.status){I(!1),E(null),k(null),N((0,x.getCheckoutErrorMessage)(e.message));return}"expired"===e.status&&(I(!1),k(null),N(H))}},[W]),(0,t.jsx)(z,{location:e,selectedPlanName:l?.name,monthlyPrice:U,bankPrice:G,isInitializing:A,initError:_,paymentError:w,paymentAdded:P,onSelectPaymentMethod:V,onChangePayment:()=>{E(null),V(null)},onNext:()=>{P&&(a(P),h("checkout"))},onDismissError:()=>N(null),"data-sentry-element":"MembershipPaymentMethodView","data-sentry-component":"MembershipPaymentMethod","data-sentry-source-file":"MembershipPaymentMethod.tsx",children:(0,t.jsx)(v,{activePaymentMethod:S,monthlyPrice:U,locationId:o.centerId,personId:o.personId,exerpExternalId:o.exerpPersonId,shoppingBasketKey:d,productId:u??l?.productId,startDate:m,onClose:()=>V(null),onPaymentSuccess:e=>{let t;I(!0),E((t=e?.paymentMethod?.type?.toLowerCase()||"").includes("bank")||t.includes("ach")||t.includes("plaid")||"bank"===S?"bank":"card")},onPaymentError:()=>I(!1),onBasketFinalized:W,onPaymentDeclined:e=>{I(!1),E(null),k(null),N((0,x.getCheckoutErrorMessage)(e))},onSessionExpired:()=>{I(!1),k(null),N(H),y()},onSessionCreated:n,"data-sentry-element":"AdyenPaymentModal","data-sentry-source-file":"MembershipPaymentMethod.tsx"})})}],125923)},189394,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(647724),s=e.i(125923);e.s(["MembershipPaymentPage",0,function({location:e}){return(0,r.useEffect)(()=>{a.addBreadcrumb({category:"membership.step",message:"user reached: payment",level:"info"})},[]),(0,t.jsx)("div",{"data-sentry-component":"MembershipPaymentPage","data-sentry-source-file":"MembershipPaymentPage.tsx",children:(0,t.jsx)(s.MembershipPaymentMethod,{location:e,"data-sentry-element":"MembershipPaymentMethod","data-sentry-source-file":"MembershipPaymentPage.tsx"})})}])},619704,680707,289456,e=>{"use strict";var t,r=e.i(434073),a=e.i(647724),s=e.i(985902),n=e.i(139061),i=e.i(610012),l=e.i(173554),o=e.i(319760);function d({formData:e,fieldErrors:t,onChange:a,onEmailBlur:s}){return(0,r.jsxs)("div",{className:"space-y-2","data-sentry-component":"AccountSection","data-sentry-source-file":"account-section.tsx",children:[(0,r.jsx)("p",{className:"font-united uppercase text-xs tracking-[1.5px] font-semibold text-zinc-500",children:"Account"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 bg-white rounded-xl p-4 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2 col-span-2",children:[(0,r.jsx)(l.Label,{htmlFor:"email","data-sentry-element":"Label","data-sentry-source-file":"account-section.tsx",children:"Email"}),(0,r.jsx)(i.Input,{id:"email",name:"email",type:"email",placeholder:"Enter your email",autoComplete:"email",value:e.email,onChange:e=>a("email",e.target.value),onBlur:s,required:!0,maxLength:o.EMAIL_MAX_LENGTH,className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"account-section.tsx"}),t.email&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.email})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.Label,{htmlFor:"password","data-sentry-element":"Label","data-sentry-source-file":"account-section.tsx",children:"Password"}),(0,r.jsx)(i.Input,{id:"password",name:"password",type:"password",placeholder:"Create password",autoComplete:"new-password",value:e.password,onChange:e=>a("password",e.target.value),required:!0,minLength:o.PASSWORD_MIN_LENGTH,className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"account-section.tsx"}),t.password&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.password})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.Label,{htmlFor:"confirmPassword","data-sentry-element":"Label","data-sentry-source-file":"account-section.tsx",children:"Confirm Password"}),(0,r.jsx)(i.Input,{id:"confirmPassword",name:"confirmPassword",type:"password",placeholder:"Confirm password",autoComplete:"new-password",value:e.confirmPassword,onChange:e=>a("confirmPassword",e.target.value),required:!0,className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"account-section.tsx"}),t.confirmPassword&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.confirmPassword})]})]})]})}var c=e.i(837800),u=e.i(574923),m=e.i(527069);function p(e,t,{checkForDefaultPrevented:r=!0}={}
18){return function(a){if(e?.(a),!1===r||!a.defaultPrevented)return t?.(a)}}"u">typeof window&&window.document&&window.document.createElement;var h=e.i(911234),x=e.i(640459),f=e.i(764160),g=e.i(730206),y=e.i(312713),b=e.i(609858),v=e.i(613470),j="dismissableLayer.update",w=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),N=c.forwardRef((e,a)=>{let{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:o,onDismiss:d,...u}=e,m=c.useContext(w),[h,f]=c.useState(null),g=h?.ownerDocument??globalThis?.document,[,N]=c.useState({}),k=(0,x.useComposedRefs)(a,e=>f(e)),P=Array.from(m.layers),[M]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=P.indexOf(M),D=h?P.indexOf(h):-1,I=m.layersWithOutsidePointerEventsDisabled.size>0,z=D>=E,L=function(e,t=globalThis?.document){let r=(0,b.useCallbackRef)(e),a=c.useRef(!1),s=c.useRef(()=>{});return c.useEffect(()=>{let e=e=>{if(e.target&&!a.current){let a=function(){S("dismissableLayer.pointerDownOutside",r,n,{discrete:!0})},n={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",s.current),s.current=a,t.addEventListener("click",s.current,{once:!0})):a()}else t.removeEventListener("click",s.current);a.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>a.current=!0}}(e=>{let t=e.target,r=[...m.branches].some(e=>e.contains(t));z&&!r&&(i?.(e),o?.(e),e.defaultPrevented||d?.())},g),T=function(e,t=globalThis?.document){let r=(0,b.useCallbackRef)(e),a=c.useRef(!1);return c.useEffect(()=>{let e=e=>{e.target&&!a.current&&S("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}(e=>{let t=e.target;![...m.branches].some(e=>e.contains(t))&&(l?.(e),o?.(e),e.defaultPrevented||d?.())},g);return(0,v.useEscapeKeydown)(e=>{D===m.layers.size-1&&(n?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},g),c.useEffect(()=>{if(h)return s&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(t=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),C(),()=>{s&&1===m.layersWithOutsidePointerEventsDisabled.size&&(g.body.style.pointerEvents=t)}},[h,g,s,m]),c.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),C())},[h,m]),c.useEffect(()=>{let e=()=>N({});return document.addEventListener(j,e),()=>document.removeEventListener(j,e)},[]),(0,r.jsx)(y.Primitive.div,{...u,ref:k,style:{pointerEvents:I?z?"auto":"none":void 0,...e.style},onFocusCapture:p(e.onFocusCapture,T.onFocusCapture),onBlurCapture:p(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:p(e.onPointerDownCapture,L.onPointerDownCapture)})});function C(){let e=new CustomEvent(j);document.dispatchEvent(e)}function S(e,t,r,{discrete:a}){let s=r.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),a?(0,y.dispatchDiscreteCustomEvent)(s,n):s.dispatchEvent(n)}N.displayName="DismissableLayer",c.forwardRef((e,t)=>{let a=c.useContext(w),s=c.useRef(null),n=(0,x.useComposedRefs)(t,s);return c.useEffect(()=>{let e=s.current;if(e)return a.branches.add(e),()=>{a.branches.delete(e)}},[a.branches]),(0,r.jsx)(y.Primitive.div,{...e,ref:n})}).displayName="DismissableLayerBranch";var k=0;function P(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var M=e.i(754970),E=e.i(264181),D=e.i(934905),I=e.i(422957),z=e.i(885263),L=e.i(976715),T=e.i(897116),R="Popper",[A,_]=(0,f.createContextScope)(R),[B,F]=A(R),O=e=>{let{__scopePopper:t,children:a}=e,[s,n]=c.useState(null);return(0,r.jsx)(B,{scope:t,anchor:s,onAnchorChange:n,children:a})};O.displayName=R;var $="PopperAnchor",H=c.forwardRef((e,t)=>
18{let{__scopePopper:a,virtualRef:s,...n}=e,i=F($,a),l=c.useRef(null),o=(0,x.useComposedRefs)(t,l),d=c.useRef(null);return c.useEffect(()=>{let e=d.current;d.current=s?.current||l.current,e!==d.current&&i.onAnchorChange(d.current)}),s?null:(0,r.jsx)(y.Primitive.div,{...n,ref:o})});H.displayName=$;var U="PopperContent",[G,V]=A(U),W=c.forwardRef((e,t)=>{let{__scopePopper:a,side:s="bottom",sideOffset:n=0,align:i="center",alignOffset:l=0,arrowPadding:o=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:f="optimized",onPlaced:g,...v}=e,j=F(U,a),[w,N]=c.useState(null),C=(0,x.useComposedRefs)(t,e=>N(e)),[S,k]=c.useState(null),P=(0,T.useSize)(S),M=P?.width??0,E=P?.height??0,z="number"==typeof m?m:{top:0,right:0,bottom:0,left:0,...m},R=Array.isArray(u)?u:[u],A=R.length>0,_={padding:z,boundary:R.filter(X),altBoundary:A},{refs:B,floatingStyles:O,placement:$,isPositioned:H,middlewareData:V}=(0,D.useFloating)({strategy:"fixed",placement:s+("center"!==i?"-"+i:""),whileElementsMounted:(...e)=>(0,I.autoUpdate)(...e,{animationFrame:"always"===f}),elements:{reference:j.anchor},middleware:[(0,D.offset)({mainAxis:n+E,alignmentAxis:l}),d&&(0,D.shift)({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?(0,D.limitShift)():void 0,..._}),d&&(0,D.flip)({..._}),(0,D.size)({..._,apply:({elements:e,rects:t,availableWidth:r,availableHeight:a})=>{let{width:s,height:n}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${r}px`),i.setProperty("--radix-popper-available-height",`${a}px`),i.setProperty("--radix-popper-anchor-width",`${s}px`),i.setProperty("--radix-popper-anchor-height",`${n}px`)}}),S&&(0,D.arrow)({element:S,padding:o}),J({arrowWidth:M,arrowHeight:E}),h&&(0,D.hide)({strategy:"referenceHidden",..._})]}),[W,K]=Z($),Y=(0,b.useCallbackRef)(g);(0,L.useLayoutEffect)(()=>{H&&Y?.()},[H,Y]);let q=V.arrow?.x,Q=V.arrow?.y,ee=V.arrow?.centerOffset!==0,[et,er]=c.useState();return(0,L.useLayoutEffect)(()=>{w&&er(window.getComputedStyle(w).zIndex)},[w]),(0,r.jsx)("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:H?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:et,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,r.jsx)(G,{scope:a,placedSide:W,onArrowChange:k,arrowX:q,arrowY:Q,shouldHideArrow:ee,children:(0,r.jsx)(y.Primitive.div,{"data-side":W,"data-align":K,...v,ref:C,style:{...v.style,animation:H?void 0:"none"}})})})});W.displayName=U;var K="PopperArrow",Y={top:"bottom",right:"left",bottom:"top",left:"right"},q=c.forwardRef(function(e,t){let{__scopePopper:a,...s}=e,n=V(K,a),i=Y[n.placedSide];return(0,r.jsx)("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:(0,r.jsx)(z.Root,{...s,ref:t,style:{...s.style,display:"block"}})})});function X(e){return null!==e}q.displayName=K;var J=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:a,middlewareData:s}=t,n=s.arrow?.centerOffset!==0,i=n?0:e.arrowWidth,l=n?0:e.arrowHeight,[o,d]=Z(r),c={start:"0%",center:"50%",end:"100%"}[d],u=(s.arrow?.x??0)+i/2,m=(s.arrow?.y??0)+l/2,p="",h="";return"bottom"===o?(p=n?c:`${u}px`,h=`${-l}px`):"top"===o?(p=n?c:`${u}px`,h=`${a.floating.height+l}px`):"right"===o?(p=`${-l}px`,h=n?c:`${m}px`):"left"===o&&(p=`${a.floating.width+l}px`,h=n?c:`${m}px`),{data:{x:p,y:h}}}});function Z(e){let[t,r="center"]=e.split("-");return[t,r]}var Q=e.i(6511),ee=e.i(240811),et=e.i(193315),er=e.i(735513),ea=e.i(193063),es=e.i(73772),en=e.i(709791),ei=[" ","Enter","ArrowUp","ArrowDown"],el=[" ","Enter"],eo="Select",[ed,ec,eu]=(0,h.createCollection)(eo),[em,ep]=(0,f.createContextScope)(eo,[eu,_]),eh=_(),[ex,ef]=em(eo),[eg,ey]=em(eo),eb=e=>{let{__scopeSelect:t,children:a,open:s,defaultOpen:n,onOpenChange:i,value:l,defaultValue:o,onValueChange:d,dir:u,name:m,autoComplete:p,disabled:h,required:x,form:f}=e,y=eh(t),[b,v]=c.useState(null),[j,w]=c.useState(null),[N,C]=c.useState(!1),S=(0,g.useDirection)(u),[k,P]=(0,et.useControllableState)({prop:s,defaultProp:n??!1,onChange:i,caller:eo}
18),[M,D]=(0,et.useControllableState)({prop:l,defaultProp:o,onChange:d,caller:eo}),I=c.useRef(null),z=!b||f||!!b.closest("form"),[L,T]=c.useState(new Set),R=Array.from(L).map(e=>e.props.value).join(";");return(0,r.jsx)(O,{...y,children:(0,r.jsxs)(ex,{required:x,scope:t,trigger:b,onTriggerChange:v,valueNode:j,onValueNodeChange:w,valueNodeHasChildren:N,onValueNodeHasChildrenChange:C,contentId:(0,E.useId)(),value:M,onValueChange:D,open:k,onOpenChange:P,dir:S,triggerPointerDownPosRef:I,disabled:h,children:[(0,r.jsx)(ed.Provider,{scope:t,children:(0,r.jsx)(eg,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(e=>{T(t=>new Set(t).add(e))},[]),onNativeOptionRemove:c.useCallback(e=>{T(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:a})}),z?(0,r.jsxs)(e5,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:p,value:M,onChange:e=>D(e.target.value),disabled:h,form:f,children:[void 0===M?(0,r.jsx)("option",{value:""}):null,Array.from(L)]},R):null]})})};eb.displayName=eo;var ev="SelectTrigger",ej=c.forwardRef((e,t)=>{let{__scopeSelect:a,disabled:s=!1,...n}=e,i=eh(a),l=ef(ev,a),o=l.disabled||s,d=(0,x.useComposedRefs)(t,l.onTriggerChange),u=ec(a),m=c.useRef("touch"),[h,f,g]=e6(e=>{let t=u().filter(e=>!e.disabled),r=t.find(e=>e.value===l.value),a=e9(t,e,r);void 0!==a&&l.onValueChange(a.value)}),b=e=>{o||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,r.jsx)(H,{asChild:!0,...i,children:(0,r.jsx)(y.Primitive.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":e3(l.value)?"":void 0,...n,ref:d,onClick:p(n.onClick,e=>{e.currentTarget.focus(),"mouse"!==m.current&&b(e)}),onPointerDown:p(n.onPointerDown,e=>{m.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(b(e),e.preventDefault())}),onKeyDown:p(n.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),(!t||" "!==e.key)&&ei.includes(e.key)&&(b(),e.preventDefault())})})})});ej.displayName=ev;var ew="SelectValue",eN=c.forwardRef((e,t)=>{let{__scopeSelect:a,className:s,style:n,children:i,placeholder:l="",...o}=e,d=ef(ew,a),{onValueNodeHasChildrenChange:c}=d,u=void 0!==i,m=(0,x.useComposedRefs)(t,d.onValueNodeChange);return(0,L.useLayoutEffect)(()=>{c(u)},[c,u]),(0,r.jsx)(y.Primitive.span,{...o,ref:m,style:{pointerEvents:"none"},children:e3(d.value)?(0,r.jsx)(r.Fragment,{children:l}):i})});eN.displayName=ew;var eC=c.forwardRef((e,t)=>{let{__scopeSelect:a,children:s,...n}=e;return(0,r.jsx)(y.Primitive.span,{"aria-hidden":!0,...n,ref:t,children:s||"â¼"})});eC.displayName="SelectIcon";var eS=e=>(0,r.jsx)(Q.Portal,{asChild:!0,...e});eS.displayName="SelectPortal";var ek="SelectContent",eP=c.forwardRef((e,t)=>{let a=ef(ek,e.__scopeSelect),[s,n]=c.useState();return((0,L.useLayoutEffect)(()=>{n(new DocumentFragment)},[]),a.open)?(0,r.jsx)(eI,{...e,ref:t}):s?u.createPortal((0,r.jsx)(eM,{scope:e.__scopeSelect,children:(0,r.jsx)(ed.Slot,{scope:e.__scopeSelect,children:(0,r.jsx)("div",{children:e.children})})}),s):null});eP.displayName=ek;var[eM,eE]=em(ek),eD=(0,ee.createSlot)("SelectContent.RemoveScroll"),eI=c.forwardRef((e,t)=>{let{__scopeSelect:a,position:s="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:i,onPointerDownOutside:l,side:o,sideOffset:d,align:u,alignOffset:m,arrowPadding:h,collisionBoundary:f,collisionPadding:g,sticky:y,hideWhenDetached:b,avoidCollisions:v,...j}=e,w=ef(ek,a),[C,S]=c.useState(null),[E,D]=c.useState(null),I=(0,x.useComposedRefs)(t,e=>S(e)),[z,L]=c.useState(null),[T,R]=c.useState(null),A=ec(a),[_,B]=c.useState(!1),F=c.useRef(!1);c.useEffect(()=>{if(C)return(0,es.hideOthers)(C)},[C]),c.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??P()),document.body.insertAdjacentElement("beforeend",e[1]??P()),k++,()=>{1===k&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e
18=>e.remove()),k--}},[]);let O=c.useCallback(e=>{let[t,...r]=A().map(e=>e.ref.current),[a]=r.slice(-1),s=document.activeElement;for(let r of e)if(r===s||(r?.scrollIntoView({block:"nearest"}),r===t&&E&&(E.scrollTop=0),r===a&&E&&(E.scrollTop=E.scrollHeight),r?.focus(),document.activeElement!==s))return},[A,E]),$=c.useCallback(()=>O([z,C]),[O,z,C]);c.useEffect(()=>{_&&$()},[_,$]);let{onOpenChange:H,triggerPointerDownPosRef:U}=w;c.useEffect(()=>{if(C){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():C.contains(r.target)||H(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[C,H,U]),c.useEffect(()=>{let e=()=>H(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[H]);let[G,V]=e6(e=>{let t=A().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),a=e9(t,e,r);a&&setTimeout(()=>a.ref.current.focus())}),W=c.useCallback((e,t,r)=>{let a=!F.current&&!r;(void 0!==w.value&&w.value===t||a)&&(L(e),a&&(F.current=!0))},[w.value]),K=c.useCallback(()=>C?.focus(),[C]),Y=c.useCallback((e,t,r)=>{let a=!F.current&&!r;(void 0!==w.value&&w.value===t||a)&&R(e)},[w.value]),q="popper"===s?eL:ez,X=q===eL?{side:o,sideOffset:d,align:u,alignOffset:m,arrowPadding:h,collisionBoundary:f,collisionPadding:g,sticky:y,hideWhenDetached:b,avoidCollisions:v}:{};return(0,r.jsx)(eM,{scope:a,content:C,viewport:E,onViewportChange:D,itemRefCallback:W,selectedItem:z,onItemLeave:K,itemTextRefCallback:Y,focusSelectedItem:$,selectedItemText:T,position:s,isPositioned:_,searchRef:G,children:(0,r.jsx)(en.RemoveScroll,{as:eD,allowPinchZoom:!0,children:(0,r.jsx)(M.FocusScope,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:p(n,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,r.jsx)(N,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:(0,r.jsx)(q,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...j,...X,onPlaced:()=>B(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:p(j.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||V(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,a=t.indexOf(r);t=t.slice(a+1)}setTimeout(()=>O(t)),e.preventDefault()}})})})})})})});eI.displayName="SelectContentImpl";var ez=c.forwardRef((e,t)=>{let{__scopeSelect:a,onPlaced:s,...n}=e,i=ef(ek,a),l=eE(ek,a),[o,d]=c.useState(null),[u,p]=c.useState(null),h=(0,x.useComposedRefs)(t,e=>p(e)),f=ec(a),g=c.useRef(!1),b=c.useRef(!0),{viewport:v,selectedItem:j,selectedItemText:w,focusSelectedItem:N}=l,C=c.useCallback(()=>{if(i.trigger&&i.valueNode&&o&&u&&v&&j&&w){let e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=i.valueNode.getBoundingClientRect(),a=w.getBoundingClientRect();if("rtl"!==i.dir){let s=a.left-t.left,n=r.left-s,i=e.left-n,l=e.width+i,d=Math.max(l,t.width),c=window.innerWidth-10,u=(0,m.clamp)(n,[10,Math.max(10,c-d)]);o.style.minWidth=l+"px",o.style.left=u+"px"}else{let s=t.right-a.right,n=window.innerWidth-r.right-s,i=window.innerWidth-e.right-n,l=e.width+i,d=Math.max(l,t.width),c=window.innerWidth-10,u=(0,m.clamp)(n,[10,Math.max(10,c-d)]);o.style.minWidth=l+"px",o.style.right=u+"px"}let n=f(),l=window.innerHeight-20,d=v.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),h=
18parseInt(c.paddingTop,10),x=parseInt(c.borderBottomWidth,10),y=p+h+d+parseInt(c.paddingBottom,10)+x,b=Math.min(5*j.offsetHeight,y),N=window.getComputedStyle(v),C=parseInt(N.paddingTop,10),S=parseInt(N.paddingBottom,10),k=e.top+e.height/2-10,P=j.offsetHeight/2,M=p+h+(j.offsetTop+P);if(M<=k){let e=n.length>0&&j===n[n.length-1].ref.current;o.style.bottom="0px";let t=Math.max(l-k,P+(e?S:0)+(u.clientHeight-v.offsetTop-v.offsetHeight)+x);o.style.height=M+t+"px"}else{let e=n.length>0&&j===n[0].ref.current;o.style.top="0px";let t=Math.max(k,p+v.offsetTop+(e?C:0)+P);o.style.height=t+(y-M)+"px",v.scrollTop=M-k+v.offsetTop}o.style.margin="10px 0",o.style.minHeight=b+"px",o.style.maxHeight=l+"px",s?.(),requestAnimationFrame(()=>g.current=!0)}},[f,i.trigger,i.valueNode,o,u,v,j,w,i.dir,s]);(0,L.useLayoutEffect)(()=>C(),[C]);let[S,k]=c.useState();(0,L.useLayoutEffect)(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);let P=c.useCallback(e=>{e&&!0===b.current&&(C(),N?.(),b.current=!1)},[C,N]);return(0,r.jsx)(eT,{scope:a,contentWrapper:o,shouldExpandOnScrollRef:g,onScrollButtonChange:P,children:(0,r.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,r.jsx)(y.Primitive.div,{...n,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ez.displayName="SelectItemAlignedPosition";var eL=c.forwardRef((e,t)=>{let{__scopeSelect:a,align:s="start",collisionPadding:n=10,...i}=e,l=eh(a);return(0,r.jsx)(W,{...l,...i,ref:t,align:s,collisionPadding:n,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});eL.displayName="SelectPopperPosition";var[eT,eR]=em(ek,{}),eA="SelectViewport",e_=c.forwardRef((e,t)=>{let{__scopeSelect:a,nonce:s,...n}=e,i=eE(eA,a),l=eR(eA,a),o=(0,x.useComposedRefs)(t,i.onViewportChange),d=c.useRef(0);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),(0,r.jsx)(ed.Slot,{scope:a,children:(0,r.jsx)(y.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:p(n.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:a}=l;if(a?.current&&r){let e=Math.abs(d.current-t.scrollTop);if(e>0){let a=window.innerHeight-20,s=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(s<a){let n=s+e,i=Math.min(a,n),l=n-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=l>0?l:0,r.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})});e_.displayName=eA;var eB="SelectGroup",[eF,eO]=em(eB);c.forwardRef((e,t)=>{let{__scopeSelect:a,...s}=e,n=(0,E.useId)();return(0,r.jsx)(eF,{scope:a,id:n,children:(0,r.jsx)(y.Primitive.div,{role:"group","aria-labelledby":n,...s,ref:t})})}).displayName=eB;var e$="SelectLabel",eH=c.forwardRef((e,t)=>{let{__scopeSelect:a,...s}=e,n=eO(e$,a);return(0,r.jsx)(y.Primitive.div,{id:n.id,...s,ref:t})});eH.displayName=e$;var eU="SelectItem",[eG,eV]=em(eU),eW=c.forwardRef((e,t)=>{let{__scopeSelect:a,value:s,disabled:n=!1,textValue:i,...l}=e,o=ef(eU,a),d=eE(eU,a),u=o.value===s,[m,h]=c.useState(i??""),[f,g]=c.useState(!1),b=(0,x.useComposedRefs)(t,e=>d.itemRefCallback?.(e,s,n)),v=(0,E.useId)(),j=c.useRef("touch"),w=()=>{n||(o.onValueChange(s),o.onOpenChange(!1))};if(""===s)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,r.jsx)(eG,{scope:a,value:s,disabled:n,textId:v,isSelected:u,onItemTextChange:c.useCallback(e=>{h(t=>t||(e?.textContent??"").trim())},[]),children:(0,r.jsx)(ed.ItemSlot,{scope:a,value:s,disabled:n,textValue:m,children:(0,r.jsx)(y.Primitive.div,{role:"option","aria-labelledby":v,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...l,ref:b,onFocus:p(l.onFocus,()=>g(!0)),onBlur:p(l.onBlur,()=>g(!1)),onClick:p(l.onClick,()=>{"mouse"!==j.current&&w()}),onPointerUp:p(l.onPointerUp,()=>{"mouse"===j.current&&w()}),onPointerDown:p(l.onPointerDown,e=>{j.current=e.pointerType}),onPointerMove:p(l.onPointerMove,e=>{j.current=e.pointerType,n?d.onItemLeave?.():"mouse"===j.current&&e.currentTarget.focu
18s({preventScroll:!0})}),onPointerLeave:p(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:p(l.onKeyDown,e=>{(d.searchRef?.current===""||" "!==e.key)&&(el.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eW.displayName=eU;var eK="SelectItemText",eY=c.forwardRef((e,t)=>{let{__scopeSelect:a,className:s,style:n,...i}=e,l=ef(eK,a),o=eE(eK,a),d=eV(eK,a),m=ey(eK,a),[p,h]=c.useState(null),f=(0,x.useComposedRefs)(t,e=>h(e),d.onItemTextChange,e=>o.itemTextRefCallback?.(e,d.value,d.disabled)),g=p?.textContent,b=c.useMemo(()=>(0,r.jsx)("option",{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:j}=m;return(0,L.useLayoutEffect)(()=>(v(b),()=>j(b)),[v,j,b]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y.Primitive.span,{id:d.textId,...i,ref:f}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?u.createPortal(i.children,l.valueNode):null]})});eY.displayName=eK;var eq="SelectItemIndicator",eX=c.forwardRef((e,t)=>{let{__scopeSelect:a,...s}=e;return eV(eq,a).isSelected?(0,r.jsx)(y.Primitive.span,{"aria-hidden":!0,...s,ref:t}):null});eX.displayName=eq;var eJ="SelectScrollUpButton",eZ=c.forwardRef((e,t)=>{let a=eE(eJ,e.__scopeSelect),s=eR(eJ,e.__scopeSelect),[n,i]=c.useState(!1),l=(0,x.useComposedRefs)(t,s.onScrollButtonChange);return(0,L.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){i(t.scrollTop>0)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),n?(0,r.jsx)(e1,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eZ.displayName=eJ;var eQ="SelectScrollDownButton",e0=c.forwardRef((e,t)=>{let a=eE(eQ,e.__scopeSelect),s=eR(eQ,e.__scopeSelect),[n,i]=c.useState(!1),l=(0,x.useComposedRefs)(t,s.onScrollButtonChange);return(0,L.useLayoutEffect)(()=>{if(a.viewport&&a.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)<e)},t=a.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[a.viewport,a.isPositioned]),n?(0,r.jsx)(e1,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=a;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});e0.displayName=eQ;var e1=c.forwardRef((e,t)=>{let{__scopeSelect:a,onAutoScroll:s,...n}=e,i=eE("SelectScrollButton",a),l=c.useRef(null),o=ec(a),d=c.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return c.useEffect(()=>()=>d(),[d]),(0,L.useLayoutEffect)(()=>{let e=o().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[o]),(0,r.jsx)(y.Primitive.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:p(n.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(s,50))}),onPointerMove:p(n.onPointerMove,()=>{i.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(s,50))}),onPointerLeave:p(n.onPointerLeave,()=>{d()})})}),e2=c.forwardRef((e,t)=>{let{__scopeSelect:a,...s}=e;return(0,r.jsx)(y.Primitive.div,{"aria-hidden":!0,...s,ref:t})});e2.displayName="SelectSeparator";var e4="SelectArrow";c.forwardRef((e,t)=>{let{__scopeSelect:a,...s}=e,n=eh(a),i=ef(e4,a),l=eE(e4,a);return i.open&&"popper"===l.position?(0,r.jsx)(q,{...n,...s,ref:t}):null}).displayName=e4;var e5=c.forwardRef(({__scopeSelect:e,value:t,...a},s)=>{let n=c.useRef(null),i=(0,x.useComposedRefs)(s,n),l=(0,er.usePrevious)(t);return c.useEffect(()=>{let e=n.current;if(!e)return;let r=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(l!==t&&r){let a=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(a)}},[l,t]),(0,r.jsx)(y.Primitive.select,{...a,style:{...ea.VISUALLY_HIDDEN_STYLES,...a.style},ref:i,defaultValue:t})});function e3(e){return""===e||void 0===e}function e6(e){let t=(0,b.useCallbackRef)(e),r=c.useRef(""),a=c.useRef(0),s=c.useCallback(e=>{let s=r.current+e;t(s),function e(t){r.current=t,window.clearTimeout(a.current),""!==t&&(
18a.current=window.setTimeout(()=>e(""),1e3))}(s)},[t]),n=c.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,s,n]}function e9(e,t,r){var a,s;let n=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=r?e.indexOf(r):-1,l=(a=e,s=Math.max(i,0),a.map((e,t)=>a[(s+t)%a.length]));1===n.length&&(l=l.filter(e=>e!==r));let o=l.find(e=>e.textValue.toLowerCase().startsWith(n.toLowerCase()));return o!==r?o:void 0}e5.displayName="SelectBubbleInput";var e8=e.i(143982),e7=e.i(918059),te=e.i(307141),tt=e.i(152088);let tr=c.forwardRef(({className:e,children:t,...a},s)=>(0,r.jsxs)(ej,{ref:s,className:(0,tt.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-slate-200 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-white placeholder:text-slate-500 focus:outline-none focus:ring-1 focus:ring-slate-950 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 dark:border-slate-800 dark:ring-offset-slate-950 dark:placeholder:text-slate-400 dark:focus:ring-slate-300",e),...a,children:[t,(0,r.jsx)(eC,{asChild:!0,children:(0,r.jsx)(e7.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));tr.displayName=ej.displayName;let ta=c.forwardRef(({className:e,...t},a)=>(0,r.jsx)(eZ,{ref:a,className:(0,tt.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,r.jsx)(te.ChevronUp,{className:"h-4 w-4"})}));ta.displayName=eZ.displayName;let ts=c.forwardRef(({className:e,...t},a)=>(0,r.jsx)(e0,{ref:a,className:(0,tt.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,r.jsx)(e7.ChevronDown,{className:"h-4 w-4"})}));ts.displayName=e0.displayName;let tn=c.forwardRef(({className:e,children:t,position:a="popper",...s},n)=>(0,r.jsx)(eS,{children:(0,r.jsxs)(eP,{ref:n,className:(0,tt.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-slate-200 bg-white text-slate-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...s,children:[(0,r.jsx)(ta,{}),(0,r.jsx)(e_,{className:(0,tt.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,r.jsx)(ts,{})]})}));tn.displayName=eP.displayName,c.forwardRef(({className:e,...t},a)=>(0,r.jsx)(eH,{ref:a,className:(0,tt.cn)("px-2 py-1.5 text-sm font-semibold",e),...t})).displayName=eH.displayName;let ti=c.forwardRef(({className:e,children:t,...a},s)=>(0,r.jsxs)(eW,{ref:s,className:(0,tt.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50",e),...a,children:[(0,r.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(eX,{children:(0,r.jsx)(e8.Check,{className:"h-4 w-4"})})}),(0,r.jsx)(eY,{children:t})]}));ti.displayName=eW.displayName,c.forwardRef(({className:e,...t},a)=>(0,r.jsx)(e2,{ref:a,className:(0,tt.cn)("-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-800",e),...t})).displayName=e2.displayName,e.s(["Select",0,eb,"SelectContent",0,tn,"SelectItem",0,ti,"SelectTrigger",0,tr,"SelectValue",0,eN],680707);var tl=e.i(131955);function to({formData:e,fieldErrors:t,phoneError:a,isValidatingPhone:s,onChange:n,onNameChange:d,onPhoneChange:c,onPhoneBlur:u}){let m=!!(a||t.phone);return(0,r.jsxs)("div",{className:"space-y-2","data-sentry-component":"PersonalSection","data-sentry-source-file":"personal-section.tsx",children:[(0,r.jsx)("p",{className:"font-united uppercase text-xs tracking-[1.5px] font-semibold text-zinc-500",children:"Personal"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 bg-white rounded-xl p-4 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.Label,{htmlFor:"firstName","data-sentry-element":"Label","data-sentry-source-file":"personal-section.tsx",children:"First Name"}),(0,r.jsx)(i.Input,{id:"firstName",name:"given-name",type:"text",placeholder:"John",autoComplete:"given-name",value:e.firstName,onChange:e=>d("firstName",e.target.value),required:!0,maxLength:o.NAME_MAX_LENGTH,className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"personal-section.tsx"}),t.firstName&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.firstName})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.Label,{htmlFor:"lastName","data-sentry-element":"Label","data-sentry-source-file":"personal-section.tsx",children:"Last Name"}),(0,r.jsx)(i.Input,{id:"lastName",name:"family-name",type:"text",placeholder:"Appleseed",autoComplete:"family-name",value:e.lastName,onChange:e=>d("lastName",e.target.value),required:!0,maxLength:o.NAME_MAX_LENGTH,className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"personal-section.tsx"}),t.lastName&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.lastName})]}),(0,r.jsxs)("div",{className:"space-y-2 col-span-2",children:[(0,r.jsx)(l.Label,{htmlFor:"gender","data-sentry-element":"Label","data-sentry-source-file":"personal-section.tsx",children:"Gender"}),(0,r.jsxs)(eb,{value:e.gender,onValueChange:e=>n("gender",e),"data-sentry-element":"Select","data-sentry-source-file":"personal-section.tsx",children:[(0,r.jsx)(tr,{className:"h-11 shadow-none","data-sentry-element":"SelectTrigger","data-sentry-source-file":"personal-section.tsx",children:(0,r.jsx)(eN,{placeholder:"Select an option","data-sentry-element":"SelectValue","data-sentry-source-file":"personal-section.tsx"})}),(0,r.jsxs)(tn,{"data-sentry-element":"SelectContent","data-sentry-source-file":"personal-section.tsx",children:[(0,r.jsx)(ti,{value:"male","data-sentry-element":"SelectItem","data-sentry-source-file":"personal-section.tsx",children:"Male"}),(0,r.jsx)(ti,{value:"female","data-sentry-element":"SelectItem","data-sentry-source-file":"personal-section.tsx",children:"Female"})]})]}),t.gender&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.gender})]}),(0,r.jsxs)("div",{className:"space-y-2 col-span-2",children:[(0,r.jsx)(l.Label,{htmlFor:"birthday","data-sentry-element":"Label","data-sentry-source-file":"personal-section.tsx",children:"Birthday"}),(0,r.jsx)(i.Input,{id:"birthday",name:"bday",type:"date",autoComplete:"bday",value:e.birthday,onChange:e=>n("birthday",e.target.value),onBlur:e=>n("birthday",e.target.value),className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"personal-section.tsx"}),t.birthday&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.birthday})]}),(0,r.jsxs)("div",{className:"space-y-2 col-span-2",children:[(0,r.jsx)(l.Label,{htmlFor:"phone","data-sentry-element":"Label","data-sentry-source-file":"personal-section.tsx",children:"Phone Number"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(i.Input,{id:"phone",name:"tel",type:"tel",placeholder:"(555) 555-5555",autoComplete:"tel",value:e.phone,onChange:e=>c(e.target.value),onBlur:u,required:!0,className:(0,tt.cn)("h-11 shadow-none pr-10",m&&"border-red-500 focus-visible:ring-red-500"),"data-sentry-element":"Input","data-sentry-source-file":"personal-section.tsx"}),s&&!m&&(0,r.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:(0,r.jsx)(tl.Spinner,{size:"sm",className:"text-zinc-400"})})]}),m&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:a||t.phone})]})]})]})}function td({formData:e,fieldErrors:t,onChange:a}){return(0,r.jsxs)("div",{className:"space-y-2","data-sentry-component":"LocationSection","data-sentry-source-file":"location-section.tsx",children:[(0,r.jsx)("p",{className:"font-united uppercase text-xs tracking-[1.5px] font-semibold text-zinc-500",children:"Location"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 bg-white rounded-xl p-4 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2 col-span-2",children:[(0,r.jsx)(l.Label,{htmlFor:"address","data-sentry-element":"Label","data-sentry-source-file":"location-section.tsx",children:"Address"}),(0,r.jsx)(i.Input,{id:"address",name:"address-line1",type:"text",placeholder:"Street address",autoComplete:"address-line1",value:e.address,onChange:e=>a("address",e.target.value),required:!0,maxLength:o.NAME_MAX_LENGTH,className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"location-section.tsx"}),t.address&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.address}),(0,r.jsx)(i.Input,{id:"addressLine2",name:"address-line2",type:"text",placeholder:"Line 2",autoComplete:"address-line2",value:e.addressLine2,onChange:e=>a("addressLine2",e.target.value),maxLength:o.NAME_MAX_LENGTH,className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"location-section.tsx"}),t.addressLine2&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.addressLine2})]}),(0,r.jsxs)("div",{className:"space-y-2 col-span-2",children:[(0,r.jsx)(l.Label,{htmlFor:"city","data-sentry-element":"Label","data-sentry-source-file":"location-section.tsx",children:"City"}),(0,r.jsx)(i.Input,{id:"city",name:"city",type:"text",placeholder:"Townville",autoComplete:"address-level2",value:e.city,onChange:e=>a("city",e.target.value),required:!0,maxLength:o.CITY_MAX_LENGTH,className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"location-section.tsx"}),t.city&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.city})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.Label,{htmlFor:"state","data-sentry-element":"Label","data-sentry-source-file":"location-section.tsx",children:"State"}),(0,r.jsxs)(eb,{value:e.state,onValueChange:e=>a("state",e),"data-sentry-element":"Select","data-sentry-source-file":"location-section.tsx",children:[(0,r.jsx)(tr,{className:"h-11 shadow-none","data-sentry-element":"SelectTrigger","data-sentry-source-file":"location-section.tsx",children:(0,r.jsx)(eN,{placeholder:"Select state","data-sentry-element":"SelectValue","data-sentry-source-file":"location-section.tsx"})}),(0,r.jsx)(tn,{"data-sentry-element":"SelectContent","data-sentry-source-file":"location-section.tsx",children:o.US_STATES.map(e=>(0,r.jsx)(ti,{value:e.code,children:e.name},e.code))})]}),t.state&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.state})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.Label,{htmlFor:"zip","data-sentry-element":"Label","data-sentry-source-file":"location-section.tsx",children:"Zip Code"}),(0,r.jsx)(i.Input,{id:"zip",name:"postal-code",type:"text",placeholder:"11111",autoComplete:"postal-code",value:e.zip,onChange:e=>a("zip",e.target.value),required:!0,maxLength:o.ZIP_CODE_LENGTH,className:"h-11 shadow-none","data-sentry-element":"Input","data-sentry-source-file":"location-section.tsx"}),t.zip&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:t.zip})]})]})]})}var tc=e.i(170696);let tu=(0,tc.createServerReference)("4078d59a4a2af644c7e733450c2c929a9e04e53f4c",tc.callServer,void 0,tc.findSourceMapURL,"validatePhoneNumberAction");function tm(e){let[t,r]=(0,c.useState)(null),[a,s]=(0,c.useState)(!1),n=(0,c.useCallback)(e=>10===e.length?`+1${e}`:`+${e}`,[]),i=(0,c.useCallback)(e=>{let t=(0,o.formatAndValidatePhone)(e);return r(t.error),t},[]),l=(0,c.useCallback)(async t=>{let a=(0,o.getPhoneValidationError)(t);
18if(a)return void r(a);let i=(0,o.getPhoneDigits)(t);if(i){s(!0),r(null);try{let t=await tu({countryId:"US",phoneNumber:n(i),center:e?.centerId});!t.valid&&t.error&&r(t.error)}finally{s(!1)}}},[e?.centerId,n]);return{phoneError:t,isValidatingPhone:a,handlePhoneChange:i,handlePhoneBlur:l,validatePhoneOnSubmit:(0,c.useCallback)(async t=>{let a=(0,o.getPhoneValidationError)(t);if(a)return r(a),!1;let i=(0,o.getPhoneDigits)(t);s(!0);try{let t=await tu({countryId:"US",phoneNumber:n(i),center:e?.centerId});if(!t.valid&&t.error)return r(t.error),!1;return!0}finally{s(!1)}},[e?.centerId,n]),clearPhoneError:(0,c.useCallback)(()=>r(null),[])}}e.s(["usePhoneValidation",0,tm],289456);let tp=["Alex","Jordan","Taylor","Casey","Morgan","Riley","Avery","Quinn","Sage","Rowan","Blake","Cameron","Drew","Emerson","Finley"],th=["Smith","Johnson","Williams","Brown","Jones","Garcia","Miller","Davis","Rodriguez","Martinez","Hernandez","Lopez","Gonzalez","Wilson","Anderson"],tx=["New York","Los Angeles","Chicago","Houston","Phoenix","Philadelphia","San Antonio","San Diego","Dallas","San Jose"],tf=["male","female"];function tg(e){return e[Math.floor(Math.random()*e.length)]}let ty="staging"===n.dataset;e.s(["MembershipSignupForm",0,function({initialEmail:e="",centerId:t,onContinue:n,isLoading:i=!1,errorMessage:l=null,onClearError:u}){let{formData:m,setFormData:p,fieldErrors:h,phoneError:x,isValidatingPhone:f,handleChange:g,handlePhoneChange:y,handlePhoneBlur:b,handleEmailBlur:v,handleNameChange:j,runSubmitValidations:w,validatePhoneOnSubmit:N,getSubmitData:C}=function({initialEmail:e="",centerId:t,onClearError:r}){let[a,s]=(0,c.useState)({email:e,password:"",confirmPassword:"",firstName:"",lastName:"",gender:"",birthday:"",phone:"",address:"",addressLine2:"",city:"",state:"",zip:""}),[n,i]=(0,c.useState)({}),{phoneError:l,isValidatingPhone:d,handlePhoneChange:u,handlePhoneBlur:m,validatePhoneOnSubmit:p}=tm({centerId:t}),h=(0,c.useCallback)((e,t)=>{i(r=>({...r,[e]:t}))},[]),x=(0,c.useCallback)((e,t)=>{s(r=>({...r,[e]:t})),r?.();let n={email:()=>(0,o.getEmailFormatValidationError)(t),password:()=>(h("confirmPassword",(0,o.getConfirmPasswordValidationError)(t,a.confirmPassword)),(0,o.getPasswordValidationError)(t)),confirmPassword:()=>(0,o.getConfirmPasswordValidationError)(a.password,t),gender:()=>(0,o.getGenderValidationError)(t),birthday:()=>(0,o.getBirthdayValidationError)(t),address:()=>(0,o.getAddressValidationError)(t),addressLine2:()=>(0,o.getAddressLine2ValidationError)(t),city:()=>(0,o.getCityValidationError)(t),state:()=>(0,o.getStateValidationError)(t),zip:()=>(0,o.getZipValidationError)(t)}[e];n&&h(e,n())},[a.confirmPassword,a.password,r,h]),f=(0,c.useCallback)(e=>{let{formatted:t}=u(e);s(e=>({...e,phone:t}))},[u]),g=(0,c.useCallback)(()=>m(a.phone),[m,a.phone]),y=(0,c.useCallback)(()=>{h("email",(0,o.getEmailFormatValidationError)(a.email.trim()))},[a.email,h]),b=(0,c.useCallback)((e,t)=>{let{formatted:r,error:a}=(0,o.formatAndValidateName)(t);s(t=>({...t,[e]:r})),h(e,a)},[h]),v=(0,c.useCallback)(()=>{let e=[];for(let{key:t,getError:r}of[{key:"firstName",getError:()=>(0,o.getNameValidationError)(a.firstName)},{key:"lastName",getError:()=>(0,o.getNameValidationError)(a.lastName)},{key:"email",getError:()=>(0,o.getEmailFormatValidationError)(a.email)},{key:"password",getError:()=>(0,o.getPasswordValidationError)(a.password)},{key:"confirmPassword",getError:()=>(0,o.getConfirmPasswordValidationError)(a.password,a.confirmPassword)},{key:"gender",getError:()=>(0,o.getGenderValidationError)(a.gender)},{key:"birthday",getError:()=>(0,o.getBirthdayValidationError)(a.birthday)},{key:"address",getError:()=>(0,o.getAddressValidationError)(a.address)},{key:"addressLine2",getError:()=>(0,o.getAddressLine2ValidationError)(a.addressLine2)},{key:"city",getError:()=>(0,o.getCityValidationError)(a.city)},{key:"state",getError:()=>(0,o.getStateValidationError)(a.state)},{key:"zip",getError:()=>(0,o.getZipValidationError)(a.zip)},{key:"phone",getError:()=>l??(0,o.getPhoneValidationError)(a.phone)}]){let a=r();h(t,a),a&&e.push(t)}return e},[a,l,h]),j=(0,c.useCallback)(()=>{let{confirmPassword:e,...t}=a;return{...t,phone:(0,o.getPhoneDigits)(a.phone)}},[a]);return{formData:a,setFormData:s,fieldErrors:n,phoneError:l,isValidatingPhone:d,handleChange:x,handlePhoneChange:f,handlePhoneBlur:g,handleEmailBlur:y,handleNameChange:b,runSubmitValidations:v,validatePhoneOnSubmit:p,getSubmitData:j}}({initialEmail:e,centerId:t,onClearError:u}),S=async e=>{e.preventDefault();let t=w();t.length>0?a.addBreadcrumb({category:"membership.signup",message:"submit blocked: field validation",level:"info",data:{failedFields:t}}):await N(m.phone)?i||(a.addBreadcrumb({category:"membership.signup",message:"client gates passed; submitting create account",level:"info"}),await n(C())):a.addBreadcrumb({category:"membership.signup",message:"submit blocked: phone validation",level:"info"})};return(0,r.jsxs)("div",{className:"p-6 space-y-6 relative","data-sentry-component":"MembershipSignupForm","data-sentry-source-file":"MembershipSignupForm.tsx",children:[ty&&(0,r.jsx)("button",{type:"button",onClick:()=>{let e,t,r,a,s,n,i,l,d;return p((e=tg(tp),t=tg(th),r=Date.now(),a=Math.floor(48*Math.random())+18,s=new Date(new Date().getFullYear()-a,Math.floor(12*Math.random()),Math.floor(28*Math.random())+1),{email:`${e.toLowerCase()}.${t.toLowerCase()}.${r}@test.com`,password:"TestPassword123!",confirmPassword:"TestPassword123!",firstName:e,lastName:t,gender:tg(tf),birthday:s.toISOString().split("T")[0],phone:(0,o.formatPhoneNumber)((n=Math.floor(8*Math.random())+2,i=Math.floor(10*Math.random()),l=Math.floor(10*Math.random()),d=Math.floor(1e4*Math.random()).toString().padStart(4,"0"),`212${n}${i}${l}${d}`)),address:`${Math.floor(9999*Math.random())+1} ${e} St`,addressLine2:Math.random()>.5?`Apt ${Math.floor(999*Math.random())+1}`:"",city:tg(tx),state:tg(o.US_STATES).code,zip:`${Math.floor(9e4*Math.random())+1e4}`}))},className:"absolute top-2 right-2 bg-yellow-500 hover:bg-yellow-600 text-white text-xs px-2 py-1 rounded font-medium z-10",title:"Fill form with test data",children:"TEST autofill"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-3xl font-medium text-zinc-900 leading-[40px]",children:"Welcome!"}),(0,r.jsx)("p",{children:"Please complete your profile to continue."})]}),(0,r.jsxs)("form",{onSubmit:S,className:"space-y-6",children:[(0,r.jsx)(d,{formData:m,fieldErrors:h,onChange:g,onEmailBlur:v,"data-sentry-element":"AccountSection","data-sentry-source-file":"MembershipSignupForm.tsx"}),(0,r.jsx)(to,{formData:m,fieldErrors:h,phoneError:x,isValidatingPhone:f,onChange:g,onNameChange:j,onPhoneChange:y,onPhoneBlur:b,"data-sentry-element":"PersonalSection","data-sentry-source-file":"MembershipSignupForm.tsx"}),(0,r.jsx)(td,{formData:m,fieldErrors:h,onChange:g,"data-sentry-element":"LocationSection","data-sentry-source-file":"MembershipSignupForm.tsx"}),l&&(0,r.jsx)("div",{className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,r.jsx)("p",{className:"text-sm text-red-800",children:l})}),(0,r.jsx)(s.Button,{type:"submit",className:"w-full h-14 text-base font-medium bg-[#040711] hover:bg-zinc-900 text-white rounded-full cursor-pointer disabled:bg-zinc-300 disabled:text-zinc-500 disabled:opacity-100",disabled:i||f||Object.values(h).some(Boolean)||!!x,"data-sentry-element":"Button","data-sentry-source-file":"MembershipSignupForm.tsx",children:i?"Creating Account...":"Create Account"})]})]})}],619704)},996446,e=>{"use strict";var t=e.i(434073),r=e.i(619704),a=e.i(68031),s=e.i(356617),n=e.i(502119),i=e.i(837800),l=e.i(369721);e.s(["MembershipSignupPage",0,function({plans:e}
18){let o=(0,n.useRouter)(),d=(0,n.usePathname)(),c=(0,n.useSearchParams)().get("email")||"",[u,m]=(0,i.useState)(!1),[p,h]=(0,i.useState)(null),x=async t=>{m(!0),h(null);let r=e?.[0]?.centerid;if(null==r){h("We couldn't determine your club location. Please start again from the join page."),m(!1);return}try{let e={centerId:r,password:t.password,firstName:t.firstName,lastName:t.lastName,email:t.email,...t.birthday&&{birthday:t.birthday},...t.gender&&"prefer-not-to-say"!==t.gender&&{gender:t.gender.toUpperCase()},...t.phone&&{mobilePhoneNumber:t.phone},...t.address&&{address:{address1:t.address,...t.addressLine2&&{address2:t.addressLine2},zip:t.zip,zipName:t.city,country:"US",province:t.state}}},[n,i]=await a.membershipFlowService.createAccount(e);if(i){h((0,s.getSignupErrorMessage)(i)),m(!1);return}if(n){let e=d.split("/").slice(0,-1).join("/");o.push(`${e}/start-date`)}}catch(e){(0,l.reportClientError)(e,{operation:"membership.signup"}),h((0,s.getSignupErrorMessage)(null)),m(!1)}};return(0,t.jsx)("div",{"data-sentry-component":"MembershipSignupPage","data-sentry-source-file":"MembershipSignupPage.tsx",children:(0,t.jsx)(r.MembershipSignupForm,{centerId:e?.[0]?.centerid,onContinue:x,isLoading:u,errorMessage:p,onClearError:()=>h(null),initialEmail:c,"data-sentry-element":"MembershipSignupForm","data-sentry-source-file":"MembershipSignupPage.tsx"})})}])},962907,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(160430),s=e.i(985902),n=e.i(610012),i=e.i(173554);let l=(0,e.i(951034).default)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);var o=e.i(495583),d=e.i(152088),c=e.i(969212);e.s(["MembershipStartDate",0,function({centerId:e}){let{setStartDate:u,pushStep:m}=(0,o.useMembershipFlow)(),p=(0,r.useMemo)(()=>(0,c.getMembershipMinStartDate)(e),[e]),[h,x]=(0,r.useState)(void 0),[f,g]=(0,r.useState)(!1);return(0,r.useLayoutEffect)(()=>{x(e=>!e||e<p?p:e)},[p]),(0,t.jsxs)("div",{className:"p-6 space-y-6","data-sentry-component":"MembershipStartDate","data-sentry-source-file":"MembershipStartDate.tsx",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold leading-10",children:"When do you want to start?"}),(0,t.jsxs)("div",{className:"space-y-6 bg-white rounded-xl p-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"startDate","data-sentry-element":"Label","data-sentry-source-file":"MembershipStartDate.tsx",children:"Start Date"}),(0,t.jsxs)("div",{className:"flex items-center border border-zinc-200 rounded-lg pr-3 focus-within:ring-1 focus-within:ring-zinc-200",tabIndex:0,children:[(0,t.jsx)(n.Input,{id:"startDate",type:"text",placeholder:"Select start date",value:(0,d.formatDisplayDate)(h),readOnly:!0,onClick:()=>g(!f),className:"h-11 pr-10 shadow-none cursor-pointer grow border-none focus-visible:ring-0",tabIndex:-1,"data-sentry-element":"Input","data-sentry-source-file":"MembershipStartDate.tsx"}),(0,t.jsx)(l,{className:"size-4 text-zinc-400","data-sentry-element":"CalendarIcon","data-sentry-source-file":"MembershipStartDate.tsx"})]})]}),f&&(0,t.jsx)("div",{className:"bg-white border border-zinc-200 rounded-lg p-4 shadow-sm",children:(0,t.jsx)(a.Calendar,{mode:"single",selected:h,onSelect:e=>{x(e),g(!1)},defaultMonth:h??p,disabled:e=>e<p,className:"w-full"})})]}),(0,t.jsx)(s.Button,{onClick:()=>{h&&!(h<p)&&(u(h),m("payment"))},disabled:!h||h<p,className:"w-full h-14 text-base font-medium bg-[#040711] hover:bg-zinc-900 text-white rounded-full cursor-pointer","data-sentry-element":"Button","data-sentry-source-file":"MembershipStartDate.tsx",children:"Next"})]})}],962907)},861555,e=>{"use strict";var t=e.i(434073),r=e.i(837800),a=e.i(647724),s=e.i(962907),n=e.i(495583);e.s(["MembershipStartDatePage",0,function({plans:e}){(0,r.useEffect)(()=>{a.addBreadcrumb({category:"membership.step",message:"user reached: start-date",level:"info"})},[]);let{state:i}=(0,n.useMembershipFlow)(),l=i.selectedPlan?.centerid??e?.[0]?.centerid;return null==l?null:(0,t.jsx)("div",{"data-sentry-component":"MembershipStartDatePage","data-sentry-source-file":"MembershipStartDatePage.tsx",children:(0,t.jsx)(s.MembershipStartDate,{centerId:l,"data-sentry-element":"MembershipStartDate","data-sentry-source-file":"MembershipStartDatePage.tsx"})})}])},495583,784449,e=>{"use strict";var t=e.i(434073),r=e.i(837800);let a={email:"",firstName:"",lastName:"",phone:"",gender:"",birthday:"",address:"",addressLine2:"",city:"",state:"",zip:""},s={stepStack:["plans"],currentIndex:0,userData:{...a},selectedPlan:void 0,startDate:void 0,paymentMethod:void 0,membershipId:void 0,token:void 0,shoppingBasketKey:void 0,basketProductId:void 0,finalizedBasket:void 0,adyenSessionId:void 0,freshPlans:void 0};function n(e){switch(e){case"plans":return{userData:{...a},selectedPlan:void 0};case"login":case"signup":case"forgotPassword":return{userData:{...a}};case"confirmDetails":case"checkout":case"confirmation":default:return{};case"startDate":return{startDate:void 0,shoppingBasketKey:void 0,basketProductId:void 0};case"payment":return{shoppingBasketKey:void 0,basketProductId:void 0,paymentMethod:void 0,finalizedBasket:void 0,adyenSessionId:void 0}}}function i(e,t){switch(t.type){case"HYDRATE":return t.state;case"PUSH_STEP":{let r=e.stepStack.slice(0,e.currentIndex+1);if(r.includes(t.step))return{...e,currentIndex:r.indexOf(t.step)};return{...e,stepStack:[...r,t.step],currentIndex:e.currentIndex+1}}case"POP_STEP":{if(e.currentIndex<=0)return e;let t=e.currentIndex-1,r=n(e.stepStack[t]);return{...e,...r,stepStack:e.stepStack.slice(0,e.currentIndex+1),currentIndex:t}}case"JUMP_TO_STEP":{let r=e.stepStack.findIndex(e=>e===t.stepType);if(-1===r)return e;return{...e,currentIndex:r}}case"REWIND_TO_STEP":{let r=e.stepStack.findIndex(e=>e===t.stepType);if(-1===r)return e;let a=e.stepStack.slice(r).reduce((e,t)=>
18({...e,...n(t)}),{});return{...e,...a,stepStack:e.stepStack.slice(0,r+1),currentIndex:r}}case"RESET":return{...s,freshPlans:e.freshPlans};case"SET_USER_DATA":return{...e,userData:t.userData};case"SET_SELECTED_PLAN":return{...e,selectedPlan:t.plan};case"SET_START_DATE":return{...e,startDate:t.startDate};case"SET_PAYMENT_METHOD":return{...e,paymentMethod:t.paymentMethod};case"SET_MEMBERSHIP_ID":return{...e,membershipId:t.membershipId};case"SET_TOKEN":return{...e,token:t.token};case"SET_SHOPPING_BASKET_KEY":return{...e,shoppingBasketKey:t.shoppingBasketKey,basketProductId:t.basketProductId};case"SET_FINALIZED_BASKET":return{...e,finalizedBasket:t.finalizedBasket};case"SET_ADYEN_SESSION_ID":return{...e,adyenSessionId:t.adyenSessionId};case"CLEAR_BASKET":return{...e,shoppingBasketKey:void 0,basketProductId:void 0,finalizedBasket:void 0};case"REDIRECT_TO_PLANS":return{...s,stepStack:["plans"],currentIndex:0,freshPlans:e.freshPlans};case"SET_FRESH_PLAN":{let{[t.planId]:r,...a}=e.freshPlans??{};return{...e,freshPlans:t.plan?{...a,[t.planId]:t.plan}:a}}default:return e}}e.s(["EMPTY_USER_DATA",0,a,"hasStepPrerequisites",0,function(e,t){let r=!!t.selectedPlan,a=!!(t.userData.personId&&t.userData.centerId),s=!!t.finalizedBasket,n=!!t.adyenSessionId;switch(e){case"plans":return!0;case"login":case"signup":case"forgotPassword":return r;case"confirmDetails":return a;case"startDate":return a&&r;case"payment":return a&&r&&!!t.startDate;case"checkout":case"confirmation":return a&&(s||n);default:return!1}},"initialMembershipFlowState",0,s,"withFreshPlans",0,function(e,t){return e&&t?e.map(e=>t[e._id]??e):e}],784449);let l="onlineJoin:membershipFlow";var o=e.i(511833);let d=(0,r.createContext)(void 0);e.s(["MembershipFlowProvider",0,function({children:e}){let[a,n]=(0,r.useReducer)(i,s),[c,u]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=function(){let e=sessionStorage.getItem(l);if(!e)return null;try{let t=JSON.parse(e);return{...t,startDate:t.startDate?new Date(t.startDate):void 0}}catch{return sessionStorage.removeItem(l),null}}();if(e){n({type:"HYDRATE",state:e});let{personId:t,centerId:r}=e.userData;t&&r&&(0,o.getPersonDetailAction)({center:parseInt(r,10),id:parseInt(t,10)}).then(t=>{if(!t.data)return;let{person:r,personCommunication:a}=t.data;n({type:"SET_USER_DATA",userData:{...e.userData,firstName:r.firstName,lastName:r.lastName,email:a?.email||"",phone:a?.mobilePhoneNumber||"",birthday:r.birthday||"",gender:r.gender?.toLowerCase()||"",address:r.address?.address1||"",addressLine2:r.address?.address2||"",city:r.address?.zipName||"",state:r.address?.province||"",zip:r.address?.zip||""}})})}u(!0)},[]),(0,r.useEffect)(()=>{var e;if(!c)return;let{token:t,userData:r,finalizedBasket:s,...n}=a,{accessToken:i,...o}=r;e={...n,userData:o},sessionStorage.setItem(l,JSON.stringify(e))},[a,c]);let m=a.stepStack[a.currentIndex],p=a.currentIndex>0;return(0,t.jsx)(d.Provider,{value:{state:a,currentStep:m,canGoBack:p,pushStep:e=>n({type:"PUSH_STEP",step:e}),popStep:()=>n({type:"POP_STEP"}),jumpToStep:e=>n({type:"JUMP_TO_STEP",stepType:e}),rewindToStep:e=>n({type:"REWIND_TO_STEP",stepType:e}),redirectToPlans:()=>n({type:"REDIRECT_TO_PLANS"}),reset:()=>n({type:"RESET"}),setUserData:e=>n({type:"SET_USER_DATA",userData:e}),setSelectedPlan:e=>n({type:"SET_SELECTED_PLAN",plan:e}),setStartDate:e=>n({type:"SET_START_DATE",startDate:e}),setPaymentMethod:e=>n({type:"SET_PAYMENT_METHOD",paymentMethod:e}),setMembershipId:e=>n({type:"SET_MEMBERSHIP_ID",membershipId:e}),setToken:e=>n({type:"SET_TOKEN",token:e}),setShoppingBasketKey:(e,t)=>n({type:"SET_SHOPPING_BASKET_KEY",shoppingBasketKey:e,basketProductId:t}),setFinalizedBasket:e=>n({type:"SET_FINALIZED_BASKET",finalizedBasket:e}),setAdyenSessionId:e=>n({type:"SET_ADYEN_SESSION_ID",adyenSessionId:e}),clearBasket:()=>n({type:"CLEAR_BASKET"}),setFreshPlan:(e,t)=>n({type:"SET_FRESH_PLAN",planId:e,plan:t})},"data-sentry-element":"MembershipFlowContext.Provider","data-sentry-component":"MembershipFlowProvider","data-sentry-source-file":"use-membership-flow.tsx",children:e})},"useMembershipFlow",0,function(){let e=(0,r.useContext)(d);if(!e)throw Error("useMembershipFlow must be used within MembershipFlowProvider");return e}],495583)},969212,e=>{"use strict";let t=new Date(2026,10,15);function r(e){let t=new Date(e);return t.setHours(0,0,0,0),t}let a={plans:"plans",login:"login",signup:"signup",forgotPassword:null,confirmDetails:"confirm-details",startDate:"start-date",payment:"payment",checkout:"checkout",confirmation:"confirmation"},s=Object.fromEntries(Object.entries(a).filter(([,e])=>null!=e).map(([e,t])=>[t,e]));
18e.s(["BANK_DISCOUNT_RATE",0,.02,"QUERY_PARAM_TO_STEP",0,s,"STEP_TO_QUERY_PARAM",0,a,"buildPlanId",0,function(e,t){if(null!=e&&null!=t)return`${e}prod${t}`},"getMembershipMinStartDate",0,function(e){let a=r(new Date);if(17===e){let e=r(t);return a.getTime()>e.getTime()?a:e}return a}])},68031,e=>{"use strict";var t=e.i(508930),r=e.i(170696);let a=(0,r.createServerReference)("40b012343ab0341810f9f4dd6a2f1fed003e7c6d41",r.callServer,void 0,r.findSourceMapURL,"createAccountAction"),s=(0,r.createServerReference)("401dd204c33ca6954923a6b7d3582361aecf8842af",r.callServer,void 0,r.findSourceMapURL,"recoverPasswordAction");var n=e.i(369721),i=e.i(222431);async function l(e){return t.startSpan({op:"service.function",name:"membershipFlowService.recoverPassword",attributes:{flow:"online-join"}},async()=>{if(!e||!(0,i.isValidEmail)(e))return[void 0,(0,i.createValidationError)("Invalid email format")];try{let t=await s(e);if(t.error)return[void 0,(0,i.createNetworkError)(t.error,"recoverPassword")];return[void 0,void 0]}catch(e){return(0,n.reportClientError)(e,{operation:"membership.recoverPassword"}),[void 0,(0,i.createNetworkError)("Unable to connect. Please check your connection and try again.","recoverPassword")]}})}async function o(e){return t.startSpan({op:"service.function",name:"membershipFlowService.createAccount",attributes:{flow:"online-join"}},async()=>{var t;if(!e||"object"!=typeof e)return[void 0,(0,i.createValidationError)("Invalid input parameters")];if(!e.centerId||"number"!=typeof e.centerId)return[void 0,(0,i.createValidationError)("centerId is required and must be a number")];if(!e.password||e.password.length<8)return[void 0,(0,i.createValidationError)("Password must be at least 8 characters")];if(!e.email||!(0,i.isValidEmail)(e.email))return[void 0,(0,i.createValidationError)("Invalid email format")];if(!e.firstName||0===e.firstName.trim().length)return[void 0,(0,i.createValidationError)("First name is required")];if(!e.lastName||0===e.lastName.trim().length)return[void 0,(0,i.createValidationError)("Last name is required")];if(e.birthday&&(t=e.birthday,!/^\d{4}-\d{2}-\d{2}$/.test(t)||isNaN(Date.parse(t))))return[void 0,(0,i.createValidationError)("Birthday must be a valid ISO date (YYYY-MM-DD)")];let r=await a(e);if(r.error)return[void 0,(0,i.createNetworkError)(r.error,"createAccount")];if(!r.data)return[void 0,(0,i.createResponseError)("Invalid response: missing account data","createAccount")];let s=r.data;return s&&s.person&&s.personCommunication?s.person.personId&&s.person.personId.id?[s,void 0]:[void 0,(0,i.createResponseError)("Invalid response: missing personId","createAccount")]:[void 0,(0,i.createResponseError)("Invalid response: missing person or personCommunication data","createAccount")]})}e.s(["createAccount",0,o,"membershipFlowService",0,{createAccount:o},"recoverPassword",0,l],68031)},545720,e=>{"use strict";var t=e.i(508930),r=e.i(323700);let a=/token|secret|password|authorization|cookie/i,s=["x-request-id","x-amzn-requestid"],n=["x-amz-cf-id"],i=["content-type"];async function l(e){try{let t=globalThis.crypto?.subtle;if(!t)return;let r=await t.digest("SHA-256",new TextEncoder().encode(e.trim().toLowerCase()));return Array.from(new Uint8Array(r)).map(e=>e.toString(16).padStart(2,"0")).join("")}catch{return}}function o(e,t){for(let r of t){let t=e?.get?.(r);if(t)return t}}async function d(e){try{var t;let d=e.body,c=null!==d&&"object"==typeof d,u=JSON.stringify(function e(t,r=0){return"string"==typeof t?t.length>200?`${t.slice(0,200)}â¦`:t:null===t||"object"!=typeof t?t:r>=3?"[MaxDepth]":Array.isArray(t)?t.slice(0,5).map(t=>e(t,r+1)):Object.fromEntries(Object.entries(t).slice(0,30).map(([t,s])=>[t,a.test(t)?"[REDACTED]":e(s,r+1)]))}(e.body))??"",m={flow:e.flow,httpStatus:e.status,usernameType:(t=c?d.username:void 0,void 0===t?"undefined":null===t?"null":""===t?"empty":"non-string"),hasAccessToken:!!e.accessToken,accessTokenLength:e.accessToken?.length,responseKeys:c?Object.keys(d).join(","):typeof d,responseSample:u.slice(0,1e3),emailHash:await l(e.email),onboardingSessionId:e.onboardingSessionId,pagePath:window.location.pathname,durationMs:e.durationMs,requestId:o(e.headers,s),cloudFrontId:o(e.headers,n),contentType:o(e.headers,i)};(0,r.recordPageAction)("ExerpLogin:MissingUsername",Object.fromEntries(Object.entries(m).filter(([,e])=>void 0!==e)))}catch{}}var c=e.i(369721),u=e.i(222431);async function m(e,r){return t.startSpan({op:"service.function",name:"exerpLogin.login",attributes:{flow:r?.flow}},async()=>
18{if(!e||"object"!=typeof e)return[void 0,(0,u.createValidationError)("Invalid input parameters")];if(!e.email||!(0,u.isValidEmail)(e.email))return[void 0,(0,u.createValidationError)("Invalid email format")];if(!e.password||e.password.length<6)return[void 0,(0,u.createValidationError)("Password must be at least 6 characters")];try{let t=Date.now(),a=await fetch("https://gangway-api.chelseapiers.com/exerp-mobile/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e.email,password:e.password})});if(!a.ok){if(await a.text(),401===a.status||404===a.status)return[void 0,(0,u.createValidationError)("Invalid email or password")];return[void 0,{status:a.status,message:`Login service returned ${a.status}`,details:{operation:"login",type:"upstream_error"}}]}let s=await a.json(),n={exerpUsername:s.username,accessToken:s.access_token||s.accessToken};if(!n.accessToken)return[void 0,(0,u.createResponseError)("Invalid response: missing access_token","login")];if(!n.exerpUsername)return await d({flow:r?.flow,email:e.email,onboardingSessionId:e.onboardingSessionId,status:a.status,headers:a.headers,body:s,accessToken:n.accessToken,durationMs:Date.now()-t}),[void 0,(0,u.createResponseError)("Invalid response: missing username","login","missing_username")];return[n,void 0]}catch(e){return(0,c.reportClientError)(e,{operation:"membership.login"}),[void 0,(0,u.createNetworkError)("Unable to connect. Please check your connection and try again.","login")]}})}e.s(["login",0,m],545720)},356617,e=>{"use strict";function t(e){return"string"==typeof e?{message:e,details:void 0,status:void 0}:{message:e.message,details:e.details,status:e.status}}function r(e,t,r,a){if(t&&"object"==typeof t&&"type"in t){let e=t.type;if("network_error"===e)return a.connection;if("upstream_error"===e){if(502===r||503===r||504===r)return a.unavailable;if(r&&r>=500)return a.connection}}let s=e.toLowerCase();return s.includes("temporarily unavailable")||s.includes("not configured")?a.unavailable:r&&r>=500?a.connection:!function(e){if(!e)return!1;let t=e.toLowerCase();return t.includes("fetch failed")||t.includes("econnrefused")||t.includes("enotfound")||t.includes("not configured")||t.includes("credentials not configured")||t.includes("http")&&/\b(500|502|503|504|522|524)\b/.test(t)}(e)?null:a.unavailable}let a={invalidCredentials:"Invalid email or password. Please check your details and try again.",connection:"We're having trouble connecting. Please check your connection and try again.",unavailable:"Service is temporarily unavailable. Please try again later.",unexpected:"Something went wrong. Please try again.",unexpectedRetryLater:"Something went wrong. Please try again in a few minutes."},s={alreadyExists:"An account with this email already exists. Please log in instead.",duplicateRecord:"We found an existing record with this name in our system. Please contact your club directly to set up your account.",connection:"We're having trouble connecting. Please check your connection and try again.",unavailable:"Service is temporarily unavailable. Please try again later.",unexpected:"We couldn't create your account. Please try again."},n="We couldn't save your details. Please try again.",i="Something went wrong. Please try again.",l="We couldn't complete your order. Please try again.";e.s(["getCheckoutErrorMessage",0,function(e){if(!e)return l;let t=e.toLowerCase();return t.includes("not configured")||t.includes("unavailable")?"Service is temporarily unavailable. Please try again later.":t.includes("http")&&(t.includes("500")||t.includes("502")||t.includes("503"))||t.includes("fetch")||t.includes("network")||t.includes("request failed")?"We're having trouble completing your order. Please try again.":l},"getLoginErrorMessage",0,function(e){if(!e)return a.unexpected;let{message:s,details:n,status:i}=t(e),l=s.toLowerCase();return n&&"object"==typeof n&&"missing_username"===n.reason?a.unexpectedRetryLater:401===i||404===i||l.includes("invalid email or password")||l.includes("account not found")?a.invalidCredentials:400===i?l.includes("email")?"Please enter a valid email address.":l.includes("password")?"Password must be at least 6 characters.":s||a.invalidCredentials:r(s,n,i,a)??(l.includes("login failed")||l.includes("connection")?a.connection:a.unex
18pected)},"getPaymentErrorMessage",0,function(e){if(!e)return i;let t=e.toLowerCase();return t.includes("session")||t.includes("mount")||t.includes("config")?"We're having trouble loading the payment form. Please try again.":t.includes("payment failed")||t.includes("declined")?"Payment could not be completed. Please try again or use a different method.":i},"getSignupErrorMessage",0,function(e){if(!e)return s.unexpected;let{message:a,details:n,status:i}=t(e);return 409===i||"object"==typeof e&&null!==e&&"PERSON_ALREADY_EXISTS"===e.code?s.alreadyExists:"DUPLICATE_PERSON_RECORD"===a?s.duplicateRecord:"PERSON_ALREADY_EXISTS"===a||a.toLowerCase().includes("already exists")?s.alreadyExists:r(a,n,i,s)??(a.toLowerCase().includes("connection")||a.toLowerCase().includes("failed")?s.connection:s.unexpected)},"getUpdateDetailsErrorMessage",0,function(e){if(!e)return n;let t=e.toLowerCase();return t.includes("not configured")||t.includes("unavailable")?"Service is temporarily unavailable. Please try again later.":t.includes("http")&&(t.includes("500")||t.includes("502")||t.includes("503"))||t.includes("fetch")||t.includes("network")?"We're having trouble saving your details. Please try again.":n}])},222431,e=>{"use strict";e.s(["createNetworkError",0,function(e,t){return{status:500,message:e,details:{operation:t,type:"network_error"}}},"createResponseError",0,function(e,t,r){return{status:500,message:e,details:{operation:t,type:"response_error",...r&&{reason:r}}}},"createValidationError",0,function(e){return{status:400,message:e}},"isValidEmail",0,function(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}])},325788,e=>{"use strict";var t=e.i(170696);let r=(0,t.createServerReference)("402306e29d48c0727b3766d6e169f47d71a75863cb",t.callServer,void 0,t.findSourceMapURL,"challengesRequest");var a=e.i(369721);let s="08621e02-5f05-4308-9300-ab2c8d5c96b4";function n(e){return e.replace(/\[.*\]$/,"")}function i(e){return e.replace(/\[.*\]$/,"").replace("_","p")}async function l(e,t,a,s,n){let i=await r({exerpUsername:e,accessToken:t,method:a,path:s,body:n});return new Response(i.body||null,{status:i.status,headers:{"Content-Type":"application/json"}})}function o(e){return{status:400,message:e}}function d(e,t){return{status:500,message:e,details:{operation:t,type:"network_error"}}}async function c(e,t,r=s){if(!e||!t)return[void 0,o("Missing exerpUsername or accessToken")];if(!r)return[void 0,o("Missing challengeId")];let u=n(e);try{let a=await l(e,t,"GET",`${r}/participants?limit=100`);if(!a.ok){if(await a.text(),404===a.status)return[{isEnrolled:!1},void 0];return[void 0,d(`Failed to check enrollment: ${a.status}`,"checkEnrollmentStatus")]}let s=await a.json(),n=i(u),o=s.items.find(e=>i(e.participantExerpId)===n);if(o)return[{isEnrolled:!0,participantId:o.id,participantName:o.participantName},void 0];return[{isEnrolled:!1},void 0]}catch(e){return(0,a.reportClientError)(e,{operation:"challenge.checkEnrollment"}),[void 0,d(e instanceof Error?e.message:"Network error","checkEnrollmentStatus")]}}async function u(e,t,r=s){if(!e||!t)return[void 0,o("Missing exerpUsername or accessToken")];if(!r)return[void 0,o("Missing challengeId")];let i=n(e);try{let a=await l(e,t,"POST",`${r}/participants`,{participantExerpId:i});if(409===a.status)return[{success:!0,alreadyEnrolled:!0},void 0];if(!a.ok){let e=await a.json().catch(()=>({}));if(400===a.status)return[void 0,o(e.message||"Invalid request")];if(404===a.status)return[void 0,o(e.message||"Challenge or participant not found")];return[void 0,d(`Registration failed: ${a.status}`,"registerForChallenge")]}let s=await a.json();return[{success:!0,participantId:s.id,participantName:s.participantName,alreadyEnrolled:!1},void 0]}catch(e){return(0,a.reportClientError)(e,{operation:"challenge.register"}),[void 0,d(e instanceof Error?e.message:"Network error","registerForChallenge")]}}async function m(e,t,r=s){if(!e||!t)return[void 0,o("Missing exerpUsername or accessToken")];try{let a=await l(e,t,"GET",`${r}/my-participation`);if(404===a.status)return[{isEnrolled:!1},void 0];if(401===a.status){let e=await a.json().catch(()=>({}));return[void 0,{status:401,message:e.message||"User identity not available",details:{operation:"getMyParticipation",type:"unauthorized"}}]}if(!a.ok)return await a.json().catch(()=>({})),[void 0,d(`Failed to fetch participation: ${a.status}`,"getMyParticipation")];let s=await a.json(),n=s.summary?.hasNoShowPenalty===!0;return[{participant:{id:s.participant?.id||"",name:s.participant?.name||"",homeClub:s.participant?.homeClub||""},summary:{totalParticipations:s.summary?.totalParticipations||0,categoriesCompleted:s.summary?.categoriesCompleted||0,totalCategories:s.summary?.totalCategories||9,totalNoShows:s.summary?.totalNoShows||0,hasNoShowPenalty:n},categories:(s.categories||[]).map(e=>
18({categoryKey:e.categoryKey||"",displayName:e.displayName||"",displayOrder:e.displayOrder||0,description:e.description||"",requiredCount:e.requiredCount||1,isCompleted:e.isCompleted||!1,participationCount:e.participationCount||0,participations:(e.participations||[]).map(e=>({activityName:e.activityName||"",activityId:e.activityId||0,date:e.date||"",startTime:e.startTime||"",endTime:e.endTime||"",instructorNames:e.instructorNames||[],roomNames:e.roomNames||[]})),noShowCount:e.noShowCount||0,noShowPenalty:!0===e.noShowPenalty})),noShowPenalty:n},void 0]}catch(e){return(0,a.reportClientError)(e,{operation:"challenge.getMyParticipation"}),[void 0,d(e instanceof Error?e.message:"Network error","getMyParticipation")]}}async function p(e,t,r=s){if(!e||!t)return[void 0,o("Missing exerpUsername or accessToken")];try{let a=await l(e,t,"GET",`${r}/rankings`);if(!a.ok){if(await a.json().catch(()=>({})),404===a.status){let e=r===s;return[{challenge:{id:r,displayName:e?"Class Madness":"",challengeType:e?"class-madness-2026":""},totalParticipants:0,rankings:[],computedAt:new Date().toISOString()},void 0]}return[void 0,d(`Failed to fetch club rankings: ${a.status}`,"getClubRankings")]}return[await a.json(),void 0]}catch(e){return(0,a.reportClientError)(e,{operation:"challenge.getClubRankings"}),[void 0,d(e instanceof Error?e.message:"Network error","getClubRankings")]}}e.s(["checkEnrollmentStatus",0,c,"getClubRankings",0,p,"getMyParticipation",0,m,"registerForChallenge",0,u],325788)},95858,e=>{"use strict";var t=e.i(237179);e.s(["CircleCheck",()=>t.default])},878247,e=>{"use strict";let t=(0,e.i(951034).default)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",0,t],878247)},298520,e=>{"use strict";let t=(0,e.i(951034).default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);e.s(["Clock",0,t],298520)},571155,217906,327910,e=>{"use strict";let t=(0,e.i(951034).default)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);e.s(["default",0,t],571155),e.s(["buildHeapIdentity",0,function({centerId:e,personId:t}){if(null==e||null==t)return null;let r=String(e).trim(),a=String(t).trim();return r&&a?`${r}_${a}`:null}],217906);var r=e.i(170485);let a=null;e.s(["startPaymentStatusPolling",0,function(e,t,s){a||(a=(0,r.runPollingLoop)(e,{onFinalized:e=>{a=null,t.onBasketFinalized?.(e)},onDeclined:e=>{a=null,t.onPaymentDeclined?.(e)},onSessionExpired:()=>{a=null,t.onSessionExpired?.()},onSlow:()=>t.onSlow?.()},"adyenService",s))},"stopPaymentStatusPolling",0,function(){a?.(),a=null}],327910)},629184,(e,t,r)=>{"use strict";function a(){return null}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}}),("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]); 19 20//# debugId=411e5807-40d6-0959-db59-f268d7aa228e
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.