1import{a2 as ee,bI as r,au as m,ay as te,ar as t,cf as o,aD as M,cn as P,cc as U,bP as v,cm as e,as as A,d9 as n,bX as se,i as S,at as _,az as p,cZ as oe,cH as ae,cz as le,J as ne,aA as a,X as ie,O as de,bW as re,dc as ce,bh as E,aq as ue,T as O}from"./IZR80Hiv.js";import me from"./DfXqnVZF.js";import{_ as fe}from"./DZT2KoOl.js";import{_ as q}from"./nfvzbKwC.js";import{b as be,u as _e}from"./Cqx7zjrR.js";import pe from"./CjWk7KZ6.js";import ye from"./BHTsBYuv.js";import{_ as ge,a as ve}from"./CoJdxEv1.js";import"./tzD8GLeG.js";import"./CFfjvsq2.js";import"./w7OgtN2g.js";import"./C1NYP8cu.js";import"./D3LLoGlr.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"93.1-production"};var i=new s.Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="3fefd1e4-7150-4cc6-bd15-f527d994b088",s._sentryDebugIdIdentifier="sentry-dbid-3fefd1e4-7150-4cc6-bd15-f527d994b088")}catch{}})();const he={},we={role:"status","aria-live":"polite","aria-busy":"true",class:"atm-loader-card max-w-sm animate-pulse rounded-lg bg-gray-100 p-4"},Re={class:"sr-only"};function ke(s,i){return r(),m("div",we,[i[0]||(i[0]=te('<div aria-hidden="true"><div class="mb-4 h-6 rounded-sm bg-gray-200"></div><div class="space-y-2"><div class="h-4 rounded-sm bg-gray-200"></div><div class="h-4 w-5/6 rounded-sm bg-gray-200"></div></div></div>',1)),t("span",Re,o(s.$t("loading")),1)])}const xe=Object.assign(ee(he,[["render",ke]]),{__name:"AtmLoaderCard"}),Ae={key:0,class:"mol-account-address"},$e={class:"md:h-full"},Ce={class:"not-italic"},Le={class:"text-woom-grey-form"},ze={key:2},Ne={key:3},Se=M({__name:"AccountAddress",props:{address:{},isDefault:{type:Boolean}},setup(s){const i=s,f=P(),{account:d}=U(f),h=v(i.address?.territoryCode||""),D=v(i.address?.zoneCode||""),{data:$,pending:y}=be(h,D);return(C,l)=>{const F=xe,g=q;return s.address?(r(),m("div",Ae,[e(y)?(r(),A(F,{key:0})):(r(),A(g,{key:1,class:"group",content:""},{default:n(()=>[t("div",$e,[se(C.$slots,"default"),t("address",Ce,[s.isDefault?(r(),m(S,{key:0},[t("span",Le,o(e(d)?.address.default_address_label),1),l[0]||(l[0]=t("br",null,null,-1))],64)):_("",!0),t("span",null,o(s.address.firstName)+" "+o(s.address.lastName),1),l[4]||(l[4]=t("br",null,null,-1)),t("span",null,o(s.address.address1),1),s.address.address2?(r(),m(S,{key:1},[l[1]||(l[1]=t("br",null,null,-1)),t("span",null,o(s.address.address2),1)],64)):_("",!0),l[5]||(l[5]=t("br",null,null,-1)),t("span",null,o(s.address.zip),1),l[6]||(l[6]=p(" Â ",-1)),t("span",null,o(s.address.city),1),s.address.territoryCode&&s.address.zoneCode&&e($)?(r(),m("span",ze,[l[2]||(l[2]=t("br",null,null,-1)),p(" "+o(e($)),1)])):_("",!0),s.address.country?(r(),m("span",Ne,[l[3]||(l[3]=t("br",null,null,-1)),p(" "+o(s.address.country),1)])):_("",!0),l[7]||(l[7]=t("br",null,null,-1)),t("span",null,o(s.address.phoneNumber),1)])])]),_:3}))])):_("",!0)}}}),De=Object.assign(Se,{__name:"MolAccountAddress"}),Fe={class:"col-span-2 md:col-span-6"},Te={class:"mb-5 flex flex-col gap-1"},je={class:"flex flex-col pr-12 max-lg:gap-1 lg:grid lg:grid-cols-[max-content_1fr] lg:gap-x-2"},Ie={class:"whitespace-nowrap"},Ee={class:"font-bold"},Oe={class:"whitespace-nowrap"},Be={class:"font-bold"},Ve={class:"whitespace-nowrap"},Me={class:"font-bold"},Pe=["aria-label"],Ue={class:"whitespace-nowrap"},qe={class:"overflow-hidden font-bold wrap-break-word"},We=["href"],Je={class:"absolute top-3 right-3"},Ke={class:"col-span-2 md:col-span-6"},Xe={class:"mb-5 flex flex-col gap-1"},Ze={class:"relative grid gap-3 xl:grid-cols-[1fr_auto]"},Ge={key:0,class:"flex flex-col gap-3"},He={class:"float-right flex gap-1 @max-sm:flex-col"},Qe={class:"float-right flex gap-1 @max-sm:flex-col"},Ye={class:"col-span-2 md:col-span-12"},et={class:"mb-5 flex flex-col gap-1"},B="/all",tt=M({__name:"settings",setup(s){const i=P(),{account:f,customer:d}=U(i),{getA11yLabel:h,getDescription:D,getFamilyRoleOption:$,handleAccountDialog:y}=_e(),C=oe(),{locale:l,t:F}=ae(),{t:g}=le({useScope:"local"}),j=ue(()=>{const b=d.value?.familyRole?.value;return b?$(b)?.label||b:""}),w=v(!1),R=v(!1),L=v(!1),z=v(),W=D(v([d.value?.defaultAddress]),"address"),J=async b=>{const c=b.submitter?.formAction?.endsWith(B)?"all":"selected";z.value=c,L.value=!1;try{if(!d.value||!d.value.emailAddress?.emailAddress)throw new Error("No customer");await $fetch(`/${l.value}/customer/unsubscribe`,{method:"POST",body:{action:c,customerId:d.value.id,email:d.value.emailAddress.emailAddress,newsletter:w.value,ridersclub:R.value}})}catch(k){console.error(k),L.value=!0}finally{z.value=void 0,L.value?C.add({severity:"error",summary:F("error.adminApi"),life:O,group:"headless"}):(C.add({severity:"success",summary:g("success"),life:O,group:"headless"}),w.value=!1,R.value=!1,i.customerRefresh())}};return(b,c)=>{const k=de,T=me,N=fe,x=q,I=De,K=pe,X=ye,Z=ge,G=ve,H=ie,Q=ne;return e(f)?(r(),A(Q,{key:0},{default:n(()=>[a(H,null,{default:n(()=>[t("div",Fe,[a(x,{"aria-labelledby":"account-profile",class:"group h-full"},{default:n(()=>[t("div",Te,[a(k,{"font-bold":!1,id:"account-profile",class:"font-display"},{default:n(()=>[p(o(e(g)("title")),1)]),_:1}),t("p",null,o(e(g)("copy")),1)]),a(x,{content:""},{default:n(()=>[t("dl",je,[t("dt",Ie,o(b.$t("forms.firstName"))+":",1),t("dd",Ee,o(e(d)?.firstName),1),t("dt",Oe,o(b.$t("forms.lastName"))+":",1),t("dd",Be,o(e(d)?.lastName),1),t("dt",Ve,o(e(g)("familyRoleLabel"))+":",1),t("dd",Me,[e(j)?(r(),m(S,{key:0},[p(o(e(j)),1)],64)):(r(),m("span",{key:1,"aria-label":e(g)("noFamilyRole")}," - ",8,Pe))]),t("dt",Ue,o(b.$t("forms.email"))+":",1),t("dd",qe,[t("a",{href:`mailto:${e(d)?.emailAddress?.emailAddress}`},o(e(d)?.emailAddress?.emailAddress),9,We)])]),t("div",Je,[a(N,{"aria-label":e(h)("profile","edit"),onClick:c[0]||(c[0]=u=>e(y)("profile",{action:"edit"}))},{default:n(()=>[a(T)]),_:1},8,["aria-label"])])]),_:1})]),_:1})]),t("div",Ke,[e(d)?(r(),A(x,{key:0,"aria-labelledby":"account-address",class:"h-full"},{default:n(()=>[t("div",Xe,[a(k,{"font-bold":!1,id:"account-address",class:"font-display"},{default:n(()=>[p(o(e(f).address.title),1)]),_:1}),t("p",null,o(e(W)),1)]),t("div",Ze,[e(d).defaultAddress?(r(),m("div",Ge,[a(I,{address:e(d).defaultAddress,refresh:e(i).customerRefresh,class:"@container","is-default":""},{default:n(()=>[t("div",He,[a(N,{"aria-label":e(h)("address","edit"),onClick:c[1]||(c[1]=u=>e(y)("address",{action:"edit",address:e(d).defaultAddress,isDefaultAddress:!0}))},{default:n(()=>[a(T)]),_:1},8,["aria-label"])])]),_:1}
1,8,["address","refresh"]),(r(!0),m(S,null,re(e(d).addresses.edges,u=>(r(),A(I,{address:u.node,refresh:e(i).customerRefresh,class:"@container"},{default:n(()=>[t("div",Qe,[a(N,{"aria-label":e(h)("address","edit"),onClick:Y=>e(y)("address",{action:"edit",address:u.node})},{default:n(()=>[a(T)]),_:1},8,["aria-label","onClick"]),a(N,{"aria-label":e(h)("address","delete"),onClick:Y=>e(y)("address",{action:"delete",address:u.node})},{default:n(()=>[a(K)]),_:1},8,["aria-label","onClick"])])]),_:2},1032,["address","refresh"]))),256))])):_("",!0),a(X,{"aria-label":e(f)?.address.button.default,class:"xl:aspect-2/3 xl:max-w-30.25",onClick:c[2]||(c[2]=u=>e(y)("address",{action:"add"}))},{default:n(()=>[p(o(e(f)?.address.button.default),1)]),_:1},8,["aria-label"])])]),_:1})):_("",!0)]),t("div",Ye,[a(x,{"aria-labelledby":"account-unsubscribe"},{default:n(()=>[t("div",et,[a(k,{"font-bold":!1,id:"account-unsubscribe",class:"font-display"},{default:n(()=>[p(o(e(f).unsubscribe.title),1)]),_:1}),t("p",null,o(e(f).unsubscribe.copy),1)]),t("form",{class:"relative",method:"post",onSubmit:ce(J,["prevent"])},[a(x,{content:""},{default:n(()=>[a(Z,{"newsletter-checked":e(w),"onUpdate:newsletterChecked":c[3]||(c[3]=u=>E(w)?w.value=u:null),"riders-club-checked":e(R),"onUpdate:ridersClubChecked":c[4]||(c[4]=u=>E(R)?R.value=u:null),"form-action-all":B,"show-error":e(L),class:"m-2.5 gap-4 lg:w-198","hide-sms":""},null,8,["newsletter-checked","riders-club-checked","show-error"])]),_:1}),a(G,{disabled:!(e(w)||e(R)),"loading-all":e(z)==="all","loading-selected":e(z)==="selected",class:"mt-6 justify-end","cta-styling":"solid-secondary","form-action":"all"},null,8,["disabled","loading-all","loading-selected"])],32)]),_:1})])]),_:1})]),_:1})):_("",!0)}}});function V(s){const i=s;i.__i18n=i.__i18n||[],i.__i18n.push({locale:"",resource:{da:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Bare et par detaljer for at fÃ¥ hjulene til at køre rundt."}},familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Rolle i familien"}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"Ingen relation tildelt endnu"}},success:{t:0,b:{t:2,i:[{t:3}],s:"Afmelding gennemført"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Lidt om dig"}}},de:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Details zu deiner Fahrt."}},familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Rolle in der Familie"}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"Keine Auswahl getroffen"}},success:{t:0,b:{t:2,i:[{t:3}],s:"Abmeldung erfolgreich"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Steckbrief"}}},en:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Just a few details to keep things rolling."}},familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Family Role"}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"No role assigned"}},success:{t:0,b:{t:2,i:[{t:3}],s:"Unsubscription successful"}},title:{t:0,b:{t:2,i:[{t:3}],s:"A little about you"}}},fi:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Tarvitsemme vain muutamia tietoja sinusta."}},familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Rooli perheessä"}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"Ei määritettyä roolia"}},success:{t:0,b:{t:2,i:[{t:3}],s:"Tilauksen peruminen onnistui"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Sinun tietosi"}}},fr:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Quelques informations pour continuer."}},familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Rôle dans la famille "}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"Aucun rôle renseigné"}},success:{t:0,b:{t:2,i:[{t:3}],s:"Votre désinscription a bien été prise en compte"}},title:{t:0,b:{t:2,i:[{t:3}],s:"à propos de vous"}}},nl:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Wij hebben nog wat gegevens van je nodig."}},familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Rol binnen het gezin"}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"Geen rol toegewezen"}},success:{t:0,b:{t:2,i:[{t:3}],s:"Afmelden gelukt"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Meer over jou"}}},sv:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Bara nÃ¥gra uppgifter till â sedan rullar vi vidare."}},familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Din roll i familjen"}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"Ingen roll tilldelad"}},success:{t:0,b:{t:2,i:[{t:3}],s:"Avregistrering slutförd"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Lite om dig"}}},pl:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Kilka szczegóÅów, żeby wszystko toczyÅo siÄ, jak należy."}},familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Rola w rodzinie"}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"Nie przypisano roli"}},success:{t:0,b:{t:2,i:[{t:3}],s:"PomyÅlnie zrezygnowano z subskrypcji"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Profil"}}},es:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Solo algunos detalles para que todo siga sobre ruedas."}},familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Rol en la familia"}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"Sin rol asignado"}},success:{t:0,b:{t:2,i:[{t:3}],s:"Suscripción cancelada correctamente"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Algunos datos sobre ti"}}},ro:{copy:{t:0,b:{t:2,i:[{t:3}],s:"Doar câteva informaÈii pentru a putea continua."}}
1,familyRoleLabel:{t:0,b:{t:2,i:[{t:3}],s:"Rol în familie"}},noFamilyRole:{t:0,b:{t:2,i:[{t:3}],s:"Niciun rol atribuit"}},success:{t:0,b:{t:2,i:[{t:3}],s:"Dezabonare reuÈitÄ"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Câteva detalii despre tine"}}}}})}typeof V=="function"&&V(tt);export{tt as default}; 2//# sourceMappingURL=qECtiHvL.js.map
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.