PageSourceSearch

https://myaccount.sbs.com.au/assets/d197cac/home-iWXq71ff.js

js sbs.com.au collected 2026-09-24 08:25:51 UTC 39,445 bytes, 1 lines download raw bytes

1import{a as i,z as pe,w as Le}from"./chunk-EPOLDU6W-Cy0pbNoL.js";import{j as e}from"./jsx-runtime-u17CrQMm.js";import{y as Ve,z as Ne,A as Ue,D as Oe,E as ze,p as Y,J as ge,K as Re,B as h,M as oe,k as y,j as m,h as b,f as l,g as P,i as v,N as A,P as Te,L as z,e as U,t as H,l as R,G as W,q as k,S as $,O as xe,Q as fe,H as _e,F as qe,R as ce}from"./index-e26oBipY.js";import{u as D,a as Be}from"./user-profile-DknISN-A.js";import{a as j}from"./status-announcer-provider-twgJHQuP.js";import{c as je,s as G,u as X,C as M}from"./index.esm-B0oGELu-.js";import{L as K}from"./loading-spinner-DZzY5wqw.js";import{m as Q}from"./success-modal.css-DkILmnjg.js";import{A as w}from"./data-layer-1kvIXlWL.js";import{u as F}from"./user-provider-BVDzkoqu.js";import{b as S,h as N}from"./root.css-l3_4NLdg.js";import{g as le}from"./sbs-login-instance-QtxHg8-X.js";import{u as Z}from"./profile-provider-CgzxymFg.js";import{c as Ye}from"./Info.es-qYAWktLB.js";import{a as We,P as T,E as q}from"./password-control-VZ_UVzCj.js";import{T as B}from"./Trans-DmyXkCdt.js";import{A as we,u as $e}from"./middleware-OTSEx0cA.js";import{n as Ge,a as be,b as Xe,c as Ke,d as Qe,e as Je,g as ve}from"./styles.css-D0eTqtbd.js";import{u as et}from"./use-status-announcer-MDvt8qpK.js";import{G as tt,B as nt}from"./gender-control-mG0z26uC.js";import"./index-hDuMSH-s.js";
1import"./i18nInstance-CHFDjdcJ.js";import"./QueryClientProvider-CC4TKqza.js";import"./constant-DgzOUPqJ.js";import"./mutation-BhTIUPuz.js";function st(n,t,s,r){for(var a=-1,o=n==null?0:n.length;++a<o;){var c=n[a];t(r,c,s(c),n)}return r}function rt(n,t){return function(s,r){if(s==null)return s;if(!Ve(s))return n(s,r);for(var a=s.length,o=-1,c=Object(s);++o<a&&r(c[o],o,c)!==!1;);return s}}var it=rt(Ne);function at(n,t,s,r){return it(n,function(a,o,c){t(r,a,s(a),c)}),r}function ot(n,t){return function(s,r){var a=Oe(s)?st:at,o={};return a(s,n,Ue(r),o)}}var ct=Object.prototype,lt=ct.hasOwnProperty,dt=ot(function(n,t,s){lt.call(n,s)?n[s].push(t):ze(n,s,[t])});const mt=new Map([["bold",i.createElement(i.Fragment,null,i.createElement("path",{d:"M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"}))],["duotone",i.createElement(i.Fragment,null,i.createElement("path",{d:"M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),i.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["fill",i.createElement(i.Fragment,null,i.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"}))],["light",i.createElement(i.Fragment,null,i.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"}))],["regular",i.createElement(i.Fragment,null,i.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["thin",i.createElement(i.Fragment,null,i.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"}))]]),ut=new Map([["bold",i.createElement(i.Fragment,null,i.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",i.createElement(i.Fragment,null,i.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),i.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",i.createElement(i.Fragment,null,i.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",i.createElement(i.Fragment,null,i.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",i.createElement(i.Fragment,null,i.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",i.createElement(i.Fragment,null,i.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),ht=new Map([["bold",i.createElement(i.Fragment,null,i.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",i.createElement(i.Fragment,null,i.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),i.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,
1151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",i.createElement(i.Fragment,null,i.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",i.createElement(i.Fragment,null,i.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",i.createElement(i.Fragment,null,i.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",i.createElement(i.Fragment,null,i.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),Ce=i.forwardRef((n,t)=>i.createElement(Y,{ref:t,...n,weights:mt}));Ce.displayName="ImageIcon";const pt=Ce,J=i.forwardRef((n,t)=>i.createElement(Y,{ref:t,...n,weights:ut}));J.displayName="PencilSimpleIcon";const gt=J,Ee=i.forwardRef((n,t)=>i.createElement(Y,{ref:t,...n,weights:ht}));Ee.displayName="WarningIcon";function xt(){const{t:n}=j(),{toast:t}=ge(),s=Re(),[r,a]=i.useState(),o=i.useMemo(()=>({none:n("adOptOut.options.none"),gam:n("adOptOut.options.gam"),qsr:n("adOptOut.options.qsr"),alc:n("adOptOut.options.alc")}),[n]),{data:c}=D.useQuery("get","/preferences"),{mutate:p}=D.useMutation("patch","/preferences",{onMutate:x=>{a(x.body.ad_opt_out)},onError:()=>{t({description:n("adOptOut.notification.failed")})},onSuccess:(x,u,C)=>{t({description:u.body.ad_opt_out==="none"?n("adOptOut.notification.reset"):n("adOptOut.notification.success",{name:o[u.body.ad_opt_out??""]})})}}),g=r??c?.ad_opt_out??"none";return e.jsx(h,{padding:"spacing.200",paddingRight:{xs:"spacing.0",md:"spacing.800"},children:e.jsx(oe.Root,{children:e.jsx(y,{gap:"spacing.100",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",dir:s?"rtl":"ltr",children:Object.keys(o).map(x=>e.jsx(oe.Item,{checked:g===x,value:x,label:o[x],onClick:()=>{p({body:{ad_opt_out:x}})}},x))})})})}function ft({onSuccess:n}){const{t}=j(),{user:s}=F(),{mutate:r,isPending:a}=D.useMutation("delete","/account",{onSuccess:n});return a?e.jsx(h,{marginX:"auto",paddingY:{xs:"spacing.500",md:"spacing.1000"},children:e.jsx(K,{})}):e.jsxs(l,{alignItems:"center",space:"spacing.400",children:[e.jsx(Ee,{color:"#f44337",size:70,weight:"fill"}),e.jsx(m.Title,{textAlign:"center",children:t("deleteAccountConfirm.heading")}),e.jsx(m.Description,{textAlign:"center",children:t("deleteAccountConfirm.p1")}),e.jsxs(y,{flexDirection:{xs:"column",md:"row"},gap:"spacing.200",justifyContent:"center",width:"100%",children:[e.jsx(b,{className:S,onClick:()=>{r({})},children:t("button.deleteAccount")}),e.jsx(m.Close,{asChild:!0,children:e.jsx(b,{className:S,onClick:()=>
1{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:deleteAccount:click:cancel"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}})},variant:"secondary",children:t("button.cancel")})})]})]})}function jt(){const{t:n}=j(),{setUser:t}=F(),s=pe();return e.jsxs(l,{alignItems:"center",space:"spacing.400",children:[e.jsx(je,{color:"#188802",size:70,weight:"fill"}),e.jsx(m.Title,{children:n("deleteAccountSuccess.heading")}),e.jsx(m.Description,{children:n("deleteAccountSuccess.p1")}),e.jsx(m.Close,{asChild:!0,children:e.jsx(b,{className:S,onClick:()=>{t({id:void 0,name:void 0,loggedIn:!1,emailHash:void 0}),s("/")},variant:"secondary",children:"Close"})})]})}function wt(){const[n,t]=i.useState(!1),{user:s}=F(),{t:r}=j(),a=pe();return e.jsxs(m.Root,{onOpenChange:()=>{le()?.isLoggedIn().then(o=>{o||a("/sign-in")})},children:[e.jsx(m.Trigger,{asChild:!0,onClick:()=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:deleteAccount:click:deleteAccountFlow"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}})},children:e.jsx(b,{variant:"secondary",children:r("button.deleteAccount")})}),e.jsx(h,{asChild:!0,padding:{xs:"spacing.400",md:"spacing.800"},children:e.jsx(m.Content,{className:Q,closeIcon:void 0,children:n?e.jsx(jt,{}):e.jsx(ft,{onSuccess:()=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:deleteAccount:click:confirm"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}}),t(!0),le()?.logout()}})})})]})}function bt({handleToggle:n}){const{user:t}=F(),{t:s}=j(),{profileData:r}=Z();return e.jsx(h,{padding:{xs:"spacing.200",md:"spacing.500"},children:e.jsxs(h,{position:"relative",children:[e.jsx(P,{className:N,children:"Email"}),e.jsxs(y,{gap:"spacing.100",children:[e.jsx(v,{fontSize:"lg",children:r?.email}),e.jsx(A.Provider,{children:e.jsxs(A.Root,{children:[e.jsx(A.Trigger,{variant:"text",children:e.jsx(G,{color:"#188802",size:24,weight:"fill"})}),e.jsx(A.Content,{children:s("tooltip.verified")})]})})]}),e.jsx(y,{flexDirection:"row",gap:"spacing.200",right:"0",style:{position:"absolute",top:0},children:e.jsxs(b,{"aria-label":s("button.editEmail"),onClick:()=>{n&&n(),w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:editEmail:click:emailEditFlow"},identification:{janrainUUID:t.id??"",hashedEmail:t.emailHash??""}})},style:{fontWeight:"normal",color:"#0063ed"},variant:"text",children:[e.jsx(gt,{size:24,weight:"regular"}),s("button.edit")]})})]})})}const ye=()=>{const{t:n}=j();return i.useCallback(t=>t&&t.type==="required"?n("formError.required"):t?.message,[n])};function vt({modifyEmailError:n,verifyCodeError:t}){const{t:s}=j();let r="";return n?.code==="429"?r=s("formError.tooManyAttempts"):n?.code==="400"&&n.message==="email cannot be used"||t?.code==="400"||(t?.code||n?.code)&&(r=e.jsxs(B,{i18nKey:"formError.somethingWentWrong",children:["Sorry, something went wrong on our end. Please",e.jsx(z,{color:"error",href:"https://help.sbs.com.au/hc/en-au/requests/new",rel:"noreferrer noopener",target:"_blank",textDecoration:"underline",children:"contact us"})]})),e.jsx(Te,{"aria-atomic":"true",color:"error",role:"alert",children:r})}function Ct({onClick:n}){const{t}=j(),[s,r]=i.useState(18e4);return i.useEffect(()=>{let a;return s&&s>0&&(a=setTimeout(()=>{r(s-1e3)},1e3)),()=>{clearTimeout(a)}},[s]),s>0?e.jsxs(v,{children:[t("changeEmailForm.resendCode")," ",t("changeEmailForm.durationSeconds",{duration:s/1e3})]}):e.jsx(h,{children:e.jsx(b,{onClick:()=>{r(18e4),n&&n()},style:{fontWeight:"normal",color:U("color.text-subtle"),textDecoration:"underline"},type:"submit",variant:"text",children:t("changeEmailForm.resendCode")})})}function de({title:n,description:t,open:s,onOpenChange:r}){const{t:a}=j();return e.jsx(m.Root,{onOpenChange:r,open:s,children:e.jsx(h,{asChild:!0,padding:{xs:"spacing.400",md:"spacing.800"},children:e.jsxs(m.Content,{className:Q,closeIcon:void 0,children:[e.jsx(m.Title,{children:e.jsxs(l,{alignItems:"center",space:"spacing.200",children:[e.jsx(G,{color:"#188802",size:70,weight:"fill"}),e.jsx(P,{children:n||a("dialog.success")})]})}),e.jsx(m.Description,{children:e.jsxs(l,{alignItems:"center",justifyContent:"center",paddingTop:"spacing.200",space
1:"spacing.400",children:[e.jsx(v,{fontSize:{xs:"sm",md:"xl"},textAlign:"center",children:t}),e.jsx(m.Close,{asChild:!0,children:e.jsx(b,{className:S,children:a("button.close")})})]})})]})})})}function Et({handleToggle:n}){const{t}=j(),{user:s}=F(),{profileData:r,refetch:a}=Z(),{control:o,handleSubmit:c,clearErrors:p,setValue:g,setError:x,formState:{errors:u}}=X({defaultValues:{email:""}}),[C,d]=i.useState(!1),[f,I]=i.useState(!1),[L,te]=i.useState(!1),[Pe,ne]=i.useState(!0),Fe=ye(),{mutate:se,isPending:re,error:Me}=D.useMutation("post","/modify-email"),{mutate:ie,isPending:ae,error:De}=D.useMutation("post","/modify-email/verify"),He=i.useCallback(E=>{if(E?.token){const{token:O}=E;if(!/^\d{6}$/.exec(O)){x("token",{type:"custom",message:t("formError.invalidVerificationCode")},{shouldFocus:!0});return}if(ae)return;ie({body:{token:O}},{onSuccess:()=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:editEmail:click:confirmation"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}}),te(!0)},onError:V=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:editEmail:click:verificationCodeIncorrect"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}}),V.code==="400"&&x("token",{type:"custom",message:t("formError.incorrectVerificationCode")},{shouldFocus:!0})}})}else if(E?.email){w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:editEmail:click:sendVerificationCode"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}});const{email:O}=E;if(re)return;se({body:{email:O}},{onSuccess:V=>{V["new-email"]===E.email&&(ne(!0),d(!0),I(!0))},onError:V=>{V.message==="email cannot be used"&&x("email",{type:"custom",message:t("formError.emailUnavailable")},{shouldFocus:!0})}})}},[se,re,x,t,ie,ae,s.id,s.emailHash]),ke=e.jsxs(h,{children:[e.jsxs(l,{space:"spacing.100",children:[e.jsx(v,{children:t("changeEmailForm.description")}),e.jsx(M,{control:o,name:"email",render:({field:E})=>e.jsx(We,{field:E,error:u.email,label:t("formFields.newEmail"),autoComplete:"email",children:e.jsx(H.Slot,{side:"right",children:e.jsx(A.Provider,{children:e.jsxs(A.Root,{children:[e.jsx(A.Trigger,{style:{marginRight:13},variant:"text",children:e.jsx(Ye,{color:"rgb(46, 77, 189)",size:29,weight:"fill"})}),e.jsx(A.Content,{children:t("tooltip.notVerified")})]})})})}),rules:{required:!0,pattern:{value:/^[\w.%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:t("formError.invalidEmail")},validate:{validator:E=>r?.email===E?t("formError.matchingEmail"):!0}}})]}),e.jsx(b,{onClick:()=>{p(),d(!0)},size:"sm",style:{fontWeight:"normal",textDecoration:"underline",paddingLeft:U("spacing.200"),paddingTop:U("spacing.200")},variant:"text",children:t("button.alreadyHaveCode")})]}),Ze=e.jsxs(l,{space:"spacing.100",children:[e.jsx(v,{children:t("changeEmailForm.enterCodeDescription")}),e.jsx(M,{control:o,name:"token",render:({field:E})=>e.jsx(R,{error:!!u.token,helperText:Fe(u.token),label:t("formFields.verificationCode"),children:e.jsx(H.Root,{...E,autoComplete:"one-time-code"})}),rules:{required:Pe}}),e.jsx(Ct,{onClick:()=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:editEmail:click:resendVerificationCode"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}}),g("token",""),ne(!1)}})]});return e.jsxs(h,{width:"100%",children:[e.jsx("form",{onSubmit:E=>{c(He)(E)},children:e.jsxs(W,{cols:{sm:1,md:3},gap:"spacing.200",children:[e.jsx(k,{col:{sm:1,md:1},children:e.jsxs(l,{padding:{xs:"spacing.200",md:"spacing.500"},space:"spacing.100",children:[e.jsx(P,{fontSize:{xs:"2xl",md:"5xl"},children:t("changeEmailForm.editEmail")}),e.jsx(v,{children:t("changeEmailForm.editEmailDescription")})]})}),e.jsx(k,{col:{sm:1,md:2},children:e.jsx($,{name:"raised",children:e.jsxs(l,{padding:{xs:"spacing.200",md:"spacing.600"},space:"spacing.400",width:"100%",children:[e.jsx(R,{label:t("formFields.currentEmail"),children:e.jsx(H.Root,{disabled:!0,readOnly:!0,type:"email",value:r?.email,children:e.jsx(H.Slot,{side:"right",children:e.jsx(A.Provider,{children:e.jsxs(A.Root,{children:[e.jsx(A.Trigger,{style:{marginRight:13},variant:"text",children:e.jsx(G,{color:"#188802",size:29,weight:"fill"})}),e.jsx(A.Content,{children:t("tooltip.verified")})]})})})})}),C?Ze:ke,e.jsxs(y,{flexDirection:{xs:"column",sm:"row"},gap:"spacing.200",children:[e.jsx(b,{className:S,type:"submit",variant:"primary",children:t(C?"button.verify":"button.sendVerificationCode")}),e.jsx(b,{className:S,onClick:()=>
1{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:editEmail:click:cancelVerification"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}}),n&&n()},variant:"secondary",children:t("button.cancel")})]}),e.jsx(vt,{modifyEmailError:Me,verifyCodeError:De})]})})})]})}),e.jsx(de,{description:t("changeEmailForm.codeSentToEmail"),onOpenChange:I,open:f}),e.jsx(de,{description:t("changeEmailForm.emailUpdated"),onOpenChange:E=>{E||(a(),n&&n()),te(E)},open:L})]})}function yt({in:n,timeout:t=300,children:s}){return e.jsx(h,{style:{opacity:n?1:0,transition:`opacity ${t}ms ease-in-out`},children:s})}const me=500;function ue({InitialComponent:n,TargetComponent:t}){const[s,r]=i.useState(!1),[a,o]=i.useState(!1),c=i.useRef(null),p=()=>{c.current&&clearTimeout(c.current),o(!0),c.current=setTimeout(()=>{r(g=>!g),o(!1)},me)};return e.jsx(yt,{in:!a,timeout:me,children:s?e.jsx(t,{handleToggle:p}):e.jsx(n,{handleToggle:p})})}const At=()=>e.jsx(h,{marginX:"auto",paddingY:{xs:"spacing.500",md:"spacing.1000"},children:e.jsx(K,{})}),St=({heading:n,description:t})=>{const{t:s}=j();return e.jsxs(l,{alignItems:"center",space:"spacing.400",children:[e.jsx(y,{flexDirection:"row",justifyContent:"space-around",children:e.jsx(je,{color:"#188802",size:70,weight:"fill"})}),e.jsx(m.Title,{textAlign:"center",children:n}),e.jsx(m.Description,{textAlign:"center",children:t}),e.jsx(m.Close,{asChild:!0,children:e.jsx(b,{className:S,variant:"secondary",children:s("button.close")})})]})};function It({hasPassword:n,onSuccess:t}){const{t:s}=j(),{user:r}=F(),a=n?{oldPassword:"",newPassword:"",newPasswordConfirm:""}:{newPassword:"",newPasswordConfirm:""},{control:o,handleSubmit:c,formState:p,setError:g}=X({mode:"onBlur",defaultValues:a}),x=i.useCallback(f=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:changePassword:click:saveChanges:invalid"},identification:{janrainUUID:r.id??"",hashedEmail:r.emailHash??""}}),f instanceof we&&f.status===400&&n?g("oldPassword",{type:"incorrectPassword"}):g("root",{type:"generic"})},[r.id,r.emailHash,n,g]),{mutate:u,isPending:C}=D.useMutation("put","/password",{onSuccess:()=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:changePassword:click:saveChanges"},identification:{janrainUUID:r.id??"",hashedEmail:r.emailHash??""}}),t()},onError:x}),d=({oldPassword:f,newPasswordConfirm:I,newPassword:L})=>{L!==I?(w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:changePassword:click:saveChanges:invalid"},identification:{janrainUUID:r.id??"",hashedEmail:r.emailHash??""}}),g("newPasswordConfirm",{type:"confirmPassword"})):f===L?(w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:changePassword:click:saveChanges:invalid"},identification:{janrainUUID:r.id??"",hashedEmail:r.emailHash??""}}),g("newPassword",{type:"existingPassword"})):u({body:{oldPassword:n&&f||"",newPassword:L}})};return C?e.jsx(At,{}):e.jsx("form",{onSubmit:f=>{c(d)(f)},children:e.jsxs(l,{alignItems:"flex-start",space:"spacing.300",children:[e.jsxs(l,{space:"spacing.200",children:[e.jsx(m.Title,{children:s(n?"changePasswordForm.heading":"addPasswordForm.heading")}),e.jsx(m.Description,{children:s(n?"changePasswordForm.description":"addPasswordForm.description")})]}),e.jsxs(l,{space:"spacing.200",width:"100%",children:[n&&e.jsx(M,{control:o,name:"oldPassword",rules:{required:!0},render:({field:f})=>e.jsx(T,{field:f,error:p.errors.oldPassword,label:s("formFields.currentPassword"),autoComplete:"current-password"})}),e.jsx(M,{control:o,name:"newPassword",rules:{required:!0,pattern:{value:/^(?=(.*\d.*))[\s\S]{5,}$/,message:s("formError.passwordStrength")}},render:({field:f})=>e.jsx(T,{field:f,error:p.errors.newPassword,label:s("formFields.newPassword"),autoComplete:"new-password"})}),e.jsx(M,{control:o,name:"newPasswordConfirm",rules:{required:!0,pattern:{value:/^(?=(.*\d.*))[\s\S]{5,}$/,message:s("formError.passwordStrength")}},render:({field:f})=>e.jsx(T,{field:f,error:p.errors.newPasswordConfirm,label:s("formFields.confirmPassword"),autoComplete:"new-password"})})]}),e.jsxs(y,{flexDirection:{xs:"column",md:"row"},gap:"spacing.200",width:"100%",children:[e.jsx(b,{className:S,type:"submit",children:s("button.saveChanges")}
1),e.jsx(m.Close,{asChild:!0,children:e.jsx(b,{className:S,onClick:()=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:changePassword:click:cancel"},identification:{janrainUUID:r.id??"",hashedEmail:r.emailHash??""}})},variant:"secondary",children:s("button.cancel")})})]}),p.errors.root?.type==="generic"&&e.jsx(q,{children:s("formError.generic")})]})})}function Pt(){const{t:n}=j(),{user:t}=F(),[s,r]=i.useState(!1),{profileData:a,refetch:o}=Z(),c=i.useMemo(()=>a?.hasPassword||!1,[a?.hasPassword]);return e.jsxs(m.Root,{onOpenChange:()=>{r(!1)},children:[e.jsx(m.Trigger,{asChild:!0,onClick:()=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:changePassword:click:changePasswordFlow"},identification:{janrainUUID:t.id??"",hashedEmail:t.emailHash??""}})},children:e.jsx(b,{children:n(c?"button.changePassword":"button.addPassword")})}),e.jsx(h,{asChild:!0,padding:{xs:"spacing.400",md:"spacing.800"},children:e.jsx(m.Content,{className:Q,closeIcon:void 0,children:s?e.jsx(St,{heading:n("changePasswordSuccess.heading"),description:n("changePasswordSuccess.description")}):e.jsx(It,{hasPassword:c,onSuccess:()=>{r(!0),w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:changePassword:click:saveChanges:success"},identification:{janrainUUID:t.id??"",hashedEmail:t.emailHash??""}}),o()}})})})]})}const Ae=i.createContext(void 0);function Ft({children:n}){const[t,s]=i.useState(void 0),r=i.useMemo(()=>({newsletterPreview:t,setNewsletterPreview:s}),[t,s]);return e.jsx(Ae.Provider,{value:r,children:n})}const ee=()=>{const n=i.useContext(Ae);if(!n)throw new Error("useNewsletterContext must be used within a NewsletterProvider");return n},Mt=n=>{const t=[];Object.entries(n).forEach(([r,a])=>{a&&t.push({...a,key:r})});const s=t.sort((r,a)=>(r?.displayOrder??0)-(a?.displayOrder??0));return dt(s,r=>r.groupName??r.name)},Se=()=>{const[n,t]=i.useState(),{toast:s}=ge(),{user:r}=F(),{t:a}=j(),{data:o,refetch:c}=$e({enabled:r.loggedIn,queryKey:["newsletters",r.id],queryFn:()=>Be.GET("/newsletters"),select:u=>({newsletterGroups:Mt(u.data??{}),defaultImageUrl:u.data?.watchlist?.imageUrl})}),{mutate:p}=D.useMutation("patch","/newsletters",{onError:async()=>{await c(),t(void 0)}}),g=(u,C)=>{p({body:{source:"sbs_upd_mysbs_nltr",subscriptions:{[u.key]:u.subscribed}}});const d=n??o?.newsletterGroups??{},f=[...d[C].filter(I=>I.name!==u.name),u];t({...d,[C]:f}),s({description:u.subscribed?a("newsletter.toastSubscribed",{name:u.name}):a("newsletter.toastUnsubscribed",{name:u.name})})},x=(u,C)=>{const d=n??o?.newsletterGroups??{},f={};d[C].forEach(I=>{f[I.key]=!!u}),p({body:{source:"sbs_upd_mysbs_nltr",subscriptions:f}}),t({...d,[C]:d[C].map(I=>({...I,subscribed:!!u}))}),s({description:u?a("newsletter.toastSubscribed",{name:C}):a("newsletter.toastUnsubscribed",{name:C})})};return{newsletters:n??o?.newsletterGroups,defaultImageUrl:o?.defaultImageUrl,setNewsletterChanges:t,handleChangeNewsletter:g,handleChangeNewsletterGroup:x}};function Dt(){const{newsletterPreview:n}=ee(),{defaultImageUrl:t}=Se(),{t:s}=j();return n?.imageUrl??t?e.jsx(h,{className:Ge,overflow:"scroll",overflowX:"hidden",overflowY:"scroll",position:"sticky",children:e.jsx("img",{alt:s("newsletter.previewAlt"),className:be,src:n?.imageUrl??t,width:"100%"})}):e.jsxs(y,{alignItems:"center",borderRadius:"sm",className:Xe,flexDirection:"column",gap:"spacing.200",justifyContent:"center",padding:"spacing.0",position:"sticky",textAlign:"center",children:[e.jsx(pt,{color:"#9BA4AC",size:44,weight:"fill"}),e.jsx(v,{children:s("newsletter.previewDescription")})]})}function Ht(){const{newsletterPreview:n,setNewsletterPreview:t}=ee(),{t:s}=j();return e.jsx(m.Root,{onOpenChange:()=>{t(void 0)},open:!!n?.imageUrl,children:e.jsxs(m.Content,{className:Ke,children:[e.jsxs(m.Title,{className:Qe,children:["Preview of ",n?.name," Newsletter"]}),e.jsx("img",{alt:s("newsletter.previewAlt"),className:be,src:n?.imageUrl,width:"100%"})]})})}function he({newsletter:n,onCheckedChange:t,labelFontWeight:s="normal"}){const{newsletterPreview:r,setNewsletterPreview:a}=ee(),{t:o}=j();return e.jsxs(y,{flexDirection:{xs:"column",sm:"row"},gap:{xs:"spacing.200",sm:"spacing.200"},justifyContent:"space-between",children:[e.jsxs(y,{alignItems:"center",gap:{xs:"spacing.100",sm:"spacing.200"},children:[e.jsx(xe,{checked:n.subscribed,id:n.name,onCheckedChange:c=>{t({...n,subscribed:!!c})},style:{padding:U("spacing.100")}}),e.jsxs(l,{space:"spacing.50",children:[e.jsx(fe,{cursor:"pointer",fontSize:"md",fontWeight:s,htmlFor:n.name,children:n.name}),e.jsx(v,{fontSize:"xs",children:n.description})]})]}),n.imageUrl?e.jsx(y,{flexDirection:"column",justifyContent:"center",children:e.jsx(b,{"aria-live":"polite",className:Je,color:"brand",onClick:()=>{a(n)},size:"sm",variant:"secondary",width:"100%",children:r?.imageUrl===n.imageUrl?o("newsletter.previewing"):o("newsletter.preview")})}):null]})}function kt({children:n,groupName:t,isChecked:s,onCheckedChange:r}){return e.jsxs(l,{className:ve,padding:{xs:"spacing.200",sm:"spacing.300"},space:"spacing.300",children:[e.jsxs(y,{alignItems:"center",gap:{xs:"spacing.100",sm:"spacing.200"},children:[e.jsx(xe,{checked:s,id:t,onCheckedChange:r,style:{padding:U("spacing.100")}}),e.jsx(fe,{cursor:"pointer",fontSize:"md",fontWeight:"bold",htmlFor:t,children:t})]}),e.jsx(h,{asChild:!0,paddingLeft:{xs:"spacing.0",sm:"spacing.600"},children:e.jsx(l,{space:"spacing.300",children:n})})]})}function Zt(){const{newsletters:n,handleChangeNewsletter:t,handleChangeNewsletterGroup:s}=Se();return n?Object.keys(n).filter(r=>n[r].length!==0).map(r=>{if(n[r].length===1)return e.jsx(h,{className:ve,padding:{xs:"spacing.200",sm:"spacing.300"},children:e.jsx(he,{labelFontWeight:"bold",newsletter:n[r][0],onCheckedChange:c=>{t(c,r)}})},`${r}:${n[r][0].name}`);let a=!1;const o=n[r].filter(c=>c.subscribed);return o.length===n[r].length?a=!0:o.length===0?a=!1:a="indeterminate",e.jsx(kt,{groupName:r,isChecked:a,onCheckedChange:c=>{s(c,r)},children:n[r].sort((c,p)=>(c.displayOrder??0)-(p.displayOrder??0)).map(c=>e.jsx(he,{labelFontWeight:"normal",newsletter:c,onCheckedChange:p=>{t(p,r)}},`${r}:${c.name}`))},r)}):e.jsx(y,{alignItems:"center",justifyContent:"space-around",style:{minHeight:200},children:e.jsx(K,{})})}function Ie({children:n,height:t}){return e.jsx($,{name:"default",borderRadius:"sm",padding:"spacing.200",style:{boxShadow:"0px 2px 8px 0px rgba(209, 209, 209, 0.5)",transition:"height 0.3s ease",height:t},children:n})}function _({children:n}){const t=i.useRef(null),[s,r]=i.useState(void 0);return i.useEffect(()=>{const a=()=>{t.current&&r(t.current.scrollHeight)};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),()=>{o.disconnect()}},[n]),e.jsx(Ie,{height:s&&s+32,children:e.jsx(h,{ref:t,children:n})})}function Lt({handleToggle:n}){const{isLoading:t,getProfileError:s,profileData:r}=Z(),{t:a}=j(),{user:o}=F();if(s instanceof we)return e.jsx(v,{color:"error",children:s.message});if(t||!r)return null;const c={Male:"formOptions.gender.male",Female:"formOptions.gender.female","Non-binary":"formOptions.gender.nonBinary","None of the above":"formOptions.gender.none"},p=r.gender?a(c[r.gender]):"";return e.jsx("section",{role:"region","aria-label":a("profileForm.heading"),children:e.jsx(h,{padding:{xs:"spacing.200",md:"spacing.500"},children:e.jsxs(h,{position:"relative",children:[e.jsx(l,{space:"spacing.400",children:e.jsxs(l,{space:"spacing.400",children:[e.jsxs(l,{children:[e.jsx(P,{className:N,children:a("formFields.firstName")}
1),e.jsx(v,{fontSize:"lg",children:r.firstName})]}),e.jsxs(l,{children:[e.jsx(P,{className:N,children:a("formFields.gender")}),e.jsx(v,{fontSize:"lg",children:p})]}),e.jsxs(l,{children:[e.jsx(P,{className:N,children:a("formFields.birthYear")}),e.jsx(v,{fontSize:"lg",children:r.birthYear})]}),e.jsxs(l,{children:[e.jsx(P,{className:N,children:a("formFields.postcode")}),r.postcode?e.jsx(v,{fontSize:"lg",children:r.postcode}):e.jsx(v,{color:"text-subtler",fontSize:"lg",children:a("formFields.notProvided")})]})]})}),e.jsx(y,{flexDirection:"row",gap:"spacing.200",right:"0",style:{position:"absolute",top:0},children:e.jsxs(b,{"aria-label":a("button.editProfile"),onClick:()=>{n&&n(),w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:editAccount:click:editAccountFlow"},identification:{janrainUUID:o.id??"",hashedEmail:o.emailHash??""}})},style:{fontWeight:"normal",color:"#0063ed"},variant:"text",children:[e.jsx(J,{size:24,weight:"regular"}),a("button.edit")]})})]})})})}function Vt({handleToggle:n}){const{t}=j(),{user:s}=F(),{profileData:r,refetch:a}=Z(),o=ye(),{control:c,handleSubmit:p,formState:g,setError:x}=X({defaultValues:{firstName:r?.firstName,gender:r?.gender,birthYear:r?.birthYear,postcode:r?.postcode}}),{mutate:u}=D.useMutation("patch","/profile",{onSuccess:()=>{a(),n?.()},onError:d=>{x("root",{type:"generic"})}}),C=d=>{r?.firstName===d.firstName&&r?.gender===d.gender&&r?.birthYear===d.birthYear&&r?.postcode===d.postcode?x("root",{type:"changesRequired"}):u({body:d})};return e.jsxs(W,{cols:{sm:1,md:3},gap:"spacing.200",children:[e.jsx(k,{col:{sm:1,md:1},children:e.jsxs(l,{padding:{xs:"spacing.200",md:"spacing.500"},space:"spacing.100",children:[e.jsx(P,{fontSize:{xs:"2xl",md:"5xl"},children:t("profileForm.heading")}),e.jsx(v,{children:t("profileForm.p1")})]})}),e.jsx(k,{col:{sm:1,md:2},children:e.jsx("form",{onSubmit:d=>{p(C)(d)},children:e.jsx($,{name:"raised",children:e.jsxs(l,{padding:{xs:"spacing.200",md:"spacing.500"},space:"spacing.400",width:"100%",children:[e.jsx(M,{control:c,name:"firstName",render:({field:d})=>e.jsx(R,{error:!!g.errors.firstName,helperText:o(g.errors.firstName),label:t("formFields.firstName"),children:e.jsx(H.Root,{...d,autoComplete:"given-name"})}),rules:{required:!0}}),e.jsx(M,{control:c,name:"gender",render:({field:d})=>e.jsx(tt,{field:d,error:g.errors.gender}),rules:{required:!0}}),e.jsx(M,{control:c,name:"birthYear",render:({field:d})=>e.jsx(nt,{field:d,error:g.errors.birthYear}),rules:{required:!0}}),e.jsx(M,{control:c,name:"postcode",render:({field:d})=>e.jsx(R,{error:!!g.errors.postcode,helperText:o(g.errors.postcode),label:t("formFields.postcode"),children:e.jsx(H.Root,{...d,autoComplete:"postal-code"})}),rules:{pattern:{value:/^(?:0[289]\d{2}|[13-689]\d{3}|2[0-8]\d{2}|290\d|291[0-4]|7[0-4]\d{2}|7[89]\d{2})$/,message:t("formError.postcode")}}}),e.jsxs(y,{flexDirection:{xs:"column",sm:"row"},gap:"spacing.200",paddingY:"spacing.100",children:[e.jsx(b,{className:S,onClick:()=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:editAccount:click:saveChanges"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}})},type:"submit",variant:"primary",children:t("button.saveChanges")}),e.jsx(b,{className:S,onClick:()=>{w.push({event:"userInteraction",userInteractionDetails:{interactionName:"mysbs:editAccount:click:cancel"},identification:{janrainUUID:s.id??"",hashedEmail:s.emailHash??""}}),n&&n()},variant:"secondary",children:t("button.cancel")})]}),e.jsxs("div",{role:"alert",children:[g.errors.root?.type==="changesRequired"&&e.jsx(q,{children:t("formError.changesRequired")}),g.errors.root?.type==="generic"&&e.jsx(q,{children:t("formError.generic")})]})]})})})})]})}function Nt(){const{isLoading:n}=Z(),{t}=j();return et(t("manageAccount.heading")),n?e.jsx(h,{style:{height:"100vh"}}):e.jsxs(l,{space:{xs:"spacing.200",sm:"spacing.400"},children:[e.jsx(h,{padding:{xs:"spacing.200",sm:"spacing.400",md:"spacing.600"},children:e.jsxs(l,{space:"spacing.200",children:[e.jsx(_e,{fontSize:{xs:"5xl",md:"7xl"},children:t("manageAccount.heading")}),e.jsx(h,{children:e.jsx(v,{children:t("manageAccount.p1")})})]})}),e.jsx("section",{role:"region","aria-label":t("changeEmailForm.editEmail"),children:e.jsx(_,{children:e.jsx(ue,{InitialComponent:bt,TargetComponent:Et})})}),e.jsx(_,{children:e.jsx(ue,{InitialComponent:Lt,TargetComponent:Vt})}),e.jsxs(y,{flexDirection:{xs:"column",sm:"row"},gap:"spacing.200",paddingX:{xs:"spacing.0",sm:"spacing.400"},paddingY:"spacing.200",children:[e.jsx(Pt,{}),e.jsx(wt,{})]}),e.jsx(l,{asChild:!0,paddingX:{xs:"spacing.200",sm:"spacing.500"}
1,paddingY:"spacing.300",space:"spacing.100",children:e.jsxs("section",{role:"region","aria-label":t("newsletter.sectionHeading"),children:[e.jsx(P,{fontSize:"5xl",fontWeight:"bold",children:t("adOptOut.heading")}),e.jsx(h,{color:"text-subtle",fontSize:"2xs",children:e.jsx(B,{components:[e.jsx(v,{color:"text-subtle",fontSize:"2xs",fontWeight:"bold"},"bold"),e.jsx(z,{color:"text-subtle",href:"https://help.sbs.com.au/hc/en-au/articles/360002023835",rel:"noopener noreferrer",target:"_blank",textDecoration:"underline"},"link")],i18nKey:"adOptOut.description"})})]})}),e.jsx(_,{children:e.jsx(xt,{})}),e.jsx(l,{asChild:!0,paddingX:{xs:"spacing.200",sm:"spacing.500"},paddingY:"spacing.300",space:"spacing.100",children:e.jsxs("section",{role:"region","aria-label":t("newsletter.sectionHeading"),children:[e.jsx(P,{fontSize:"5xl",fontWeight:"bold",children:t("newsletter.sectionHeading")}),e.jsx(h,{color:"text-subtle",fontSize:"2xs",children:e.jsx(B,{components:[e.jsx(z,{color:"text-subtle",href:"https://www.sbs.com.au/aboutus/terms-and-conditions",rel:"noopener noreferrer",target:"_blank",textDecoration:"underline"},"newsletter.termsOfServiceLink"),e.jsx(z,{color:"text-subtle",href:"https://www.sbs.com.au/privacy-policy",rel:"noopener noreferrer",target:"_blank",textDecoration:"underline"},"newsletter.privacyPolicyLink")],i18nKey:"newsletter.tosAndPrivacy",values:{termsOfService:t("newsletter.termsOfService"),privacyPolicy:t("newsletter.privacyPolicy")}})})]})}),e.jsx(qe,{flip:!1,children:e.jsx(l,{dir:"ltr",children:e.jsxs(Ft,{children:[e.jsxs(W,{cols:5,gap:{xs:"spacing.200",sm:"spacing.400"},children:[e.jsx(k,{col:{xs:5,md:3},children:e.jsx(Ie,{children:e.jsx(l,{space:"spacing.200",dir:"ltr",children:e.jsx(Zt,{})})})}),e.jsx(ce,{below:"md",js:!0,children:e.jsx(k,{col:{xs:5,md:2},children:e.jsx(Dt,{})})})]}),e.jsx(ce,{above:"sm",js:!0,children:e.jsx(Ht,{})})]})})})]})}const dn=()=>[{title:"My Account"}],mn=Le(function(){return e.jsx(Nt,{})});export{mn as default,dn as meta};

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.