1import{d as q,b as P,aU as x,w as T,m as F,o as R,bG as n,n as U,bT as C}from"./CelG4gE-.js";const N={render(){return C("div")}},j=q({...N,__name:"index",async setup(O){let r,o;const{isAuthenticated:d,refreshCustomerInformation:f,details:g,redirectToLogin:m}=P(),i=x();d.value?([r,o]=T(()=>f()),await r,o()):([r,o]=T(()=>m({sourceUrl:`/${i.currentRoute.value.query?.sourceUrl||""}`})),await r,o());const p=[{flag:"push_notification",redirectTo:"/onboarding/meldingen"},{flag:"firstname",redirectTo:"/onboarding/voornaam"}],a=F([]);function y(){a.value=[],g.value?.preferences?.ecom?.notification===null&&a.value.push("push_notification")}async function _(){try{const{keys:e}=await n.keys();if(!e.includes("onboarding"))return[];const{value:t}=await n.get({key:"onboarding"});return t?JSON.parse(t):[]}catch(e){return console.error("Failed to load onboarding data:",e),[]}}async function v(){y();const e=await _(),t=a.value.filter(s=>!e.includes(s)),w=i.currentRoute.value.query,b=w?.redirectTo,{keys:k}=await n.keys(),c=k.includes("registration-sourceUrl")?(await n.get({key:"registration-sourceUrl"})).value:w?.sourceUrl||"/",S={...c&&{sourceUrl:c},...b&&{redirectTo:b}},h=new URLSearchParams(S).toString();if(t.length){const s=t.includes("firstname")?"firstname":t[0],u=p.find(l=>l.flag===s);if(u){await n.set({key:"onboarding",value:JSON.stringify([...e,s])});const l=h?`${u.redirectTo}?${h}`:u.redirectTo;await U(l);return}}await U(c||"/mijn/jumbo",{replace:!0})}return R(()=>{v()}),{isAuthenticated:d,refreshCustomerInformation:f,details:g,redirectToLogin:m,router:i,onboardingSteps:p,missingFlags:a,computeMissingFlags:y,getPromptedFlags:_,initializeOnboarding:v}}});export{j as default};
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.