1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8295],{9415:(e,a,s)=>{"use strict";s.d(a,{I:()=>t});let t=(e,a,s,t)=>{if(t){let s,n=decodeURIComponent(t);n.startsWith("{")&&n.endsWith("}")?(s=n.substring(1,n.length-1),e.push("/".concat(a).concat(s))):e.push("/".concat(a,"/").concat(t))}else s.current_organization&&s.admin_booking_processes_pending_count>0?e.push("/".concat(a,"/dashboard?tab=approvals&approvals=pending")):!s.current_organization||s.current_organization.show_dashboard_search?e.push("/".concat(a,"/dashboard?tab=courses&tab_courses=recommended&user_recommendations=true")):e.push("/".concat(a,"/dashboard"))}},12070:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});var t=s(55427),n=s(97867);let r=e=>{let{handleValue:a,onChange:s,disabled:r=!1,type:l="text",value:o,inputParentClassName:i,...c}=e,[d,u]=(0,n.useState)("");return(0,t.jsxs)("div",{className:"".concat(i||""," "),children:[(0,t.jsx)("input",{...c,onKeyDown:a=>e.onKeyDown&&e.onKeyDown(a),"data-dir-maps-input":e.dataDirMapsInput,"data-dir-sbb-input":e.dataDirSbbInput,onBlur:e.onBlur,name:e.name,placeholder:e.placeholder,className:"TextInput h6 fw_300 ".concat(e.className?e.className:""," ").concat(r?"opacity-05 ":""),type:l,value:o||d,onChange:e=>(e=>{a?a&&a(e.target.value):u(e.target.value),s&&s(e)})(e),disabled:r}),e.error&&(0,t.jsx)("p",{className:"small_paragraph error-msg",children:e.error}),e.icon&&e.icon]})}},34879:(e,a,s)=>{"use strict";s.d(a,{A:()=>u});var t=s(55427),n=s(33722),r=s(14782),l=s.n(r),o=s(77829),i=s.n(o);s(97867);var c=s(3540),d=s(52692);let u=e=>{let{imageAlt:a,imageSrc:s,contents:r}=e,o=(0,c.useRouter)(),{t:u,lang:m}=(0,d.A)("register"),h=new Date().getFullYear();return(0,t.jsxs)("div",{className:"Side-nav WizardSideNav flex_column_space_between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i(),{href:"/",children:(0,t.jsx)("div",{className:"WizardSideNav__logo",children:(0,t.jsx)(n.rSU,{"aria-label":"Eduwo logo",className:"WizardSideNav__logo--image"})})}),(0,t.jsx)("div",{className:"Side-nav__image",children:(0,t.jsx)(l(),{alt:null!=a?a:"raphael tobler",src:null!=s?s:"/assets/images/Raphael-Tobler.jpg",fill:!0,sizes:"(max-width: 768px) 100vw,(max-width: 1200px) 50vw, 33vw"})})]}),(0,t.jsx)("div",{className:"Side-nav__content",children:r&&r.map((e,a)=>(0,t.jsxs)("div",{className:"Side-nav__content--item mb_30",children:[(0,t.jsx)("h6",{className:"btn-label mb_10 fw_600",children:e.title}),(0,t.jsx)("p",{className:"btn-label fw_300",children:e.content})]},a))}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{onClick:()=>o.push("/".concat(m,"/impressum")),className:"WizardSideNav__footer--date flex_align_center mb_10 pointer",children:[(0,t.jsx)("p",{className:"btn-label mr_10 c_f0000 fw_300",children:u("common:Datenschutz")}),(0,t.jsx)(n.pTT,{})]}),(0,t.jsxs)("div",{onClick:()=>o.push("/".concat(m,"/impressum")),className:"WizardSideNav__footer--date flex_align_center pointer",children:[(0,t.jsx)("p",{className:"btn-label mr_10 c_f0000 fw_300",children:u("common:AGB")}),(0,t.jsx)(n.pTT,{})]}),(0,t.jsx)("div",{className:"WizardSideNav__footer--copyrights mt_30 mb_50",children:(0,t.jsxs)("span",{className:"btn-label c_f0000 fw_300",children:["\xa9 eduwo ",h]})})]})]})}},60641:(e,a,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return s(74488)}])},74488:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>A});var t=s(55427),n=s(27152),r=s(97867),l=s(20548),o=s(77829),i=s.n(o),c=s(81622),d=s(87994),u=s(12070),m=s(11772),h=s(99238),p=s(38095),_=s(52692),v=s(3540),x=s(9408),f=s(38111),j=s(62523);let g={email:{mandatory:!0},password:{mandatory:!0}},w=e=>{let{autoLoginError:a,onUserRedirect:s}=e,[n,o]=(0,r.useState)(!1),{handleSetUser:w,handleSetAuthToken:b,handleSetDashboardUser:N}=(0,f.Z2)(),[y,k]=(0,r.useState)(""),{t:S,lang:C}=(0,_.A)("register"),A=(0,v.useRouter)(),{redirect_url:E}=A.query;(0,r.useEffect)(()=>{a&&k(a)},[a]);let z=(e=>{var a;let{t:s}=(0,_.A)("wizard"),t={};null==(a=Object)||a.keys(null==e?void 0:e.dataFields).forEach(a=>{if("email"===a){var n;t={...t,[a]:(null==(n=e.dataFields[a])?void 0:n.mandatory)?h.Yj().required(s("common:Please enter your email")).email(s("common:Invalid email")):h.Yj()};return}if("password"===a){t={...t,[a]:h.Yj().required(s("common:Please enter your password"))};return}});let n=h.Ik().shape({...t});return(0,p.Wx)({initialValues:{email:"",password:"",...e.initialValues},validateOnBlur:!1,validateOnChange:!1,validationSchema:n,onSubmit:(a,s)=>{e.onSubmit(a,s)}})})({initialValues:{email:"",password:""},onSubmit:async e=>T(e),dataFields:g}),T=async e=>{if(e.password.length<8)return void k(S("common:password-length"));o(!0),(0,m.G)({method:"post",url:"/login",data:e}).then(e=>{j.A.defaults.headers.common.Authorization="Bearer ".concat(e.access_token);let a=e.user_auth;w(a),N(a),(0,x.O)(2592e3,e.access_token).then(()=>{b(e.access_token),s(a,E)})}).catch(e=>{var a,s;if(o(!1),(null==e||null==(a=e.response)?void 0:a.status)===429)return void k(S("common:too-many-attempts"));k((null==(s=e.response)?void 0:s.data.message)||e.message)}).finally(()=>o(!1))},W=async(e,a)=>{await z.setFieldValue(e,a),z.setFieldError(e,S("common:Please enter your ".concat(e.replace("_"," "))))},P=e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),z.handleSubmit())},D=async e=>{e.preventDefault();let{name:a,value:s}=e.target;if(!s)return void W(a,s);await z.setFieldValue(a,s),z.setErrors({...z.errors,[a]:""}),await z.validateField(a)},F=e=>{z.validateField(e.target.name),z.handleBlur(e)};return(0,t.jsx)("div",{className:"column_centered_start register-content ",children:(0,t.jsxs)("form",{onSubmit:e=>e.preventDefault(),className:"register-form",children:[(0,t.jsxs)("h1",{className:"h4 mb_40",children:[S("Wilkommen zur\xfcck bei")," eduwo.ch"]}),(0,t.jsx)(u.A,{placeholder:S("common:E-Mail Adresse"),className:"full_width bg_f7f7f7 px_30 py_10 h_50 paragraph fw_400 mb_20",inputParentClassName:"full_width",onChange:D,onBlur:F,onKeyDown:P,value:z.values.email,error:z.errors.email,type:"email",name:"email"}),(0,t.jsx)(d.A,{placeholder:S("common:Password"),className:"full_width bg_f7f7f7 px_30 py_10 h_50 paragraph fw_400",inputParentClassName:"password-input position_relative",onChange:D,onBlur:F,onKeyDown:P,value:z.values.password,error:z.errors.password,name:"password"}),(0,t.jsx)("div",{className:"flex_justify_end",children:(0,t.jsx)(i(),{href:"/".concat(C,"/recover"),children:(0,t.jsx)(l.default,{className:"mb_20",type:"reverse_link",label:S("Forgot Password?")})})}),y&&(0,t.jsx)("p",{className:"c_red mb_10",children:y}),n?(0,t.jsx)("div",{className:"full_width centered",children:(0,t.jsx)(c.A,{type:"normal"})}):(0,t.jsx)(l.default,{onClick:z.handleSubmit,className:"full_width centered mb_40",label:S("common:Einloggen")}),(0,t.jsx)(l.default,{onClick:()=>A.push("/".concat(C,"/register")),type:"reverse_link",label:S("common:Profil erstellen")})]})})};var b=s(34879),N=s(92257),y=s(72230),k=s(9415),S=s(58310);let C=()=>{let{width:e}=(0,N.A)(),{t:a,lang:s}=(0,_.A)("register"),{handleSetUser:l,handleSetAuthToken:o,handleSetDashboardUser:i}=(0,f.Z2)(),{authToken:c,isUserLoading:d}=(0,f.Z2)(),[u,h]=(0,r.useState)(!1),[p,g]=(0,r.useState)(null),[C,A]=(0,r.useState)(0),E=(0,v.useRouter)(),z=[{title:a("Be part of it"),content:a("bodyText1")},{title:a("Mehr Funktionen"),content:a("bodyText2")},{title:a("Wertvolle Kontakte"),content:a("bodyText3")},{title:a("Profitieren und gewinnen"),content:a("bodyText4")}];(0,r.useEffect)(()=>
1{if(u){let e=setInterval(()=>{A(a=>{let s=a+5;return s>=100&&clearInterval(e),s<=100?s:100})},200);return()=>clearInterval(e)}},[u]);let T=async e=>{(0,m.G)({url:"/authenticate_token",method:"post",data:{token:e}}).then(e=>{(0,x.O)(120,e.access_token).then(()=>{window.location.href="/"})})},W=(e,a)=>(0,k.I)(E,s,e,a),P=async(e,a)=>{h(!0),A(0);try{let s=await (0,m.G)({method:"post",url:"/auto_login",data:{remember_token:e}});j.A.defaults.headers.common.Authorization="Bearer ".concat(s.access_token);let t=s.user_auth;l(t),i(t),await (0,x.O)(172800,s.access_token),o(s.access_token),A(100),setTimeout(()=>{W(t,a)},500)}catch(e){var s,t;g((null==e||null==(t=e.response)||null==(s=t.data)?void 0:s.message)||e.message||"Authentication failed"),h(!1)}};return((0,r.useEffect)(()=>{let{auto_login:e,auto_token:a,redirect_url:s,auth_token:t}=E.query;if("true"===e&&a)return void P(a,s);t&&(async()=>await T(t))()},[E.query]),d&&!y.Y)?null:(c&&(E.query.redirect_url?W({},E.query.redirect_url):E.push("/".concat(s,"/dashboard"))),(0,t.jsxs)(t.Fragment,{children:[u&&(0,t.jsxs)(S.default,{isOpen:!0,contentClassName:"auto-login-modal",children:[(0,t.jsxs)("div",{className:"auth-modal-header",children:[(0,t.jsx)("h3",{children:a("common:authenticating")}),(0,t.jsxs)("div",{className:"secure-badge",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M12 16V12",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M12 8H12.01",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),a("common:Secure Connection")]})]}),(0,t.jsxs)("div",{className:"auth-modal-content",children:[(0,t.jsxs)("div",{className:"loader-container",children:[(0,t.jsxs)("div",{className:"dots-flow",children:[(0,t.jsx)("div",{className:"dot"}),(0,t.jsx)("div",{className:"dot"}),(0,t.jsx)("div",{className:"dot"}),(0,t.jsx)("div",{className:"dot"}),(0,t.jsx)("div",{className:"dot"})]}),(0,t.jsx)("div",{className:"progress-bar",children:(0,t.jsx)("div",{className:"progress-fill",style:{width:"".concat(C,"%")}})}),(0,t.jsxs)("div",{className:"progress-status",children:[C,"%"]})]}),(0,t.jsxs)("p",{className:"auth-message",children:[a("common:connecting-to-account"),"..."]})]})]}),c?(0,t.jsx)("div",{style:{height:"100vh"},className:"full_width centered",children:(0,t.jsx)("h3",{className:"c_blue",children:a("You are already logged in")})}):(0,t.jsxs)("div",{className:"container flex",children:[e>n.A.tablet&&(0,t.jsx)(b.A,{imageSrc:"/assets/images/laptop-image.png",contents:z}),(0,t.jsx)(w,{autoLoginError:p,onUserRedirect:W})]})]}))},A=()=>(0,t.jsx)(C,{})},87994:(e,a,s)=>{"use strict";s.d(a,{A:()=>o});var t=s(55427),n=s(33722),r=s(97867),l=s(12070);let o=e=>{let{className:a,inputParentClassName:s,...o}=e,[i,c]=(0,r.useState)(!1),d=e=>c(e),u=["full_width bg_f7f7f7 px_30 py_10 h_50 paragraph fw_400",a].join(" "),m=["mb_30 position_relative password-input",s].join(" "),h=i?(0,t.jsx)(n.CEd,{onClick:()=>d(!1)}):(0,t.jsx)(n.prs,{onClick:()=>d(!0)});return(0,t.jsx)(l.A,{inputParentClassName:m,className:u,icon:h,type:i?"text":"password",...o})}}},e=>{e.O(0,[1472,636,6593,8792],()=>e(e.s=60641)),_N_E=e.O()}]);
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.