PageSourceSearch

https://buteyko.com/_next/static/chunks/pages/login-cbe9be4f1dfa27a6.js

js buteyko.com collected 2026-10-04 16:09:56 UTC 8,531 bytes, 9 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[295],{27864:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return s(73915)}])},93356:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});var r=s(74848);s(96540);let l=e=>{let{message:t,onClose:s,className:l="",onAccept:n}=e;return(0,r.jsxs)("div",{className:"flex items-center justify-between rounded bg-blue-400 px-4 py-3 text-white shadow-md ".concat(l),role:"alert",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("svg",{className:"mr-2 h-6 w-6 fill-current",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{d:"M10 0C4.5 0 0 4.5 0 10s4.5 10 10 10 10-4.5 10-10S15.5 0 10 0zm0 18c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8zm0-13c-.6 0-1 .4-1 1v5c0 .6.4 1 1 1s1-.4 1-1V6c0-.6-.4-1-1-1zm0 10c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z"})}),(0,r.jsx)("span",{className:"font-semibold",children:t})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[n&&(0,r.jsx)("button",{className:"rounded-full border border-white bg-white px-4 py-2 text-blue-400 hover:border-blue-500 hover:text-blue-500",onClick:n,children:"Accept"}),(0,r.jsx)("button",{onClick:s,className:"ml-4 rounded-full p-1 hover:bg-blue-600 focus:outline-none","aria-label":"Close",children:(0,r.jsx)("svg",{className:"h-4 w-4 fill-current",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{d:"M14.3 5.7c-.4-.4-1-.4-1.4 0L10 8.6 7.1 5.7c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4L8.6 10l-2.9 2.9c-.4.4-.4 1 0 1.4.2.2.5.3.7.3.2 0 .5-.1.7-.3L10 11.4l2.9 2.9c.2.2.5.3.7.3.2 0 .5-.1.7-.3.4-.4.4-1 0-1.4L11.4 10l2.9-2.9c.4-.4.4-1 0-1.4z"})})})]})]})}},73915:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s(74848),l=s(33013),n=s(29965),o=s.n(n),i=s(91106),a=s.n(i),c=s(86715),d=s(96540),u=s(96452),h=s(93356),m=s(59580),x=s(57595),p=s(74906);function f(){let[e,t]=(0,d.useState)(""),[s,n]=(0,d.useState)(""),[i,f]=(0,d.useState)(!1),g=(0,c.useRouter)(),{userDetails:b}=(0,x.U)(),[w,j]=(0,d.useState)(""),[v,N]=(0,d.useState)(!1),[y,C]=(0,d.useState)(!1),E=async t=>{t.preventDefault(),N(!0);try{let t=await (0,l.signIn)("credentials",{email:e,password:s,redirect:!1});(null==t?void 0:t.error)&&(console.log(t.error),j(t.error))}catch(e){console.error("Error logging in:",e),j(e.message),N(!1)}},k=()=>{C(!0),(0,l.signIn)("google",{callbackUrl:"".concat(window.location.origin,"/portal/lessons"),redirect:!1}).catch(()=>{C(!1)})};return(0,d.useEffect)(()=>{(null==b?void 0:b.isPaid)&&g.push("/portal/lessons"),b&&!b.isPaid&&g.push("/payment")},[b,g]),(0,r.jsxs)(m.A,{children:[w&&(0,r.jsx)(h.A,{message:w,onClose:()=>j("")}),(0,r.jsxs)("main",{className:"flex min-h-[calc(100vh-55px)] w-full flex-col items-center py-10",children:[(0,r.jsxs)("div",{className:"mb-8 text-center",children:[(0,r.jsx)("h1",{className:"mb-2 text-3xl font-bold",children:"Login to Buteyko Pro"}),(0,r.jsx)("p",{className:"text-gray-600",children:"Access your account and continue your breathing journey"})]}),(0,r.jsxs)("section",{className:"w-full max-w-lg rounded-xl border border-gray-200 bg-white p-6 shadow-lg",children:[(0,r.jsx)("div",{className:"mb-8 flex items-center justify-between border-b border-gray-100 pb-4",children:(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Account Login"})}),(0,r.jsxs)("button",{onClick:()=>{(0,p.A)(g.pathname,"Google Login Button","Clicked"),k()},className:"mb-6 flex w-full items-center justify-center rounded-full border border-gray-300 bg-white px-4 py-3 text-gray-700 hover:bg-gray-50",children:[(0,r.jsx)(o(),{src:"/images/Google_Logo.png",alt:"Google",width:20,height:20,className:"mr-2"}),(0,r.jsx)("span",{children:y?"Signing in...":"Sign in with Google"})]}),(0,r.jsxs)("div",{className:"mb-6 flex w-full items-center",children:[(0,r.jsx)("div",{className:"flex-grow border-t border-gray-300"}),(0,r.jsx)("span",{className:"mx-4 text-gray-500",children:"OR"}),(0,r.jsx)("div",{className:"flex-grow border-t border-gray-300"})]}),(0,r.jsxs)("form",{onSubmit:E,className:"w-full",children:[(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)("input",{type:"email",value:e,onCh
1ange:e=>t(e.target.value),placeholder:"Email",className:"w-full rounded border border-gray-300 p-3",required:!0})}),(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:i?"text":"password",value:s,onChange:e=>n(e.target.value),placeholder:"Password",className:"w-full rounded border border-gray-300 p-3",required:!0}),(0,r.jsx)("button",{type:"button",onClick:()=>f(!i),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-600",children:i?(0,r.jsx)(u.mx3,{}):(0,r.jsx)(u.Ny1,{})})]})}),(0,r.jsx)("div",{className:"mb-4 text-right",children:(0,r.jsx)(a(),{href:"/forgot-password",onClick:()=>{(0,p.A)(g.pathname,"Forgot Password Button","Clicked")},className:"text-sm text-blue-500 hover:underline",children:"Forgot password?"})}),(0,r.jsx)("button",{type:"submit",className:"w-full rounded-full bg-blue-400 px-4 py-3 font-medium text-white hover:bg-blue-500",disabled:v,children:v?"Logging in...":"Log in"}),(0,r.jsxs)("div",{className:"mt-4 text-center text-xl",children:["Don't have an account?"," ",(0,r.jsx)(a(),{href:"/order",onClick:()=>{(0,p.A)(g.pathname,"Sign Up Button","Clicked")},className:"text-blue-500 hover:underline",children:"Sign up"})]})]})]})]})]})}},86297:(e,t,s)=>{"use strict";s.d(t,{N:()=>g});var r=s(74848),l=s(96540),n=s(86719),o=s(28601),i=s(35446);class a extends l.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function c({children:e,isPresent:t}){let s=(0,l.useId)(),n=(0,l.useRef)(null),o=(0,l.useRef)({width:0,height:0,top:0,left:0}),{nonce:c}=(0,l.useContext)(i.Q);return(0,l.useInsertionEffect)(()=>{let{width:e,height:r,top:l,left:i}=o.current;if(t||!n.current||!e||!r)return;n.current.dataset.motionPopId=s;let a=document.createElement("style");return c&&(a.nonce=c),document.head.appendChild(a),a.sheet&&a.sheet.insertRule(`
2          [data-motion-pop-id="${s}"] {
3            position: absolute !important;
4            width: ${e}px !important;
5            height: ${r}px !important;
6            top: ${l}px !important;
7            left: ${i}px !important;
8          }
9        `),()=>{document.head.removeChild(a)}},[t]),(0,r.jsx)(a,{isPresent:t,childRef:n,sizeRef:o,children:l.cloneElement(e,{ref:n})})}let d=({children:e,initial:t,isPresent:s,onExitComplete:i,custom:a,presenceAffectsLayout:d,mode:h})=>{let m=(0,o.M)(u),x=(0,l.useId)(),p=(0,l.useCallback)(e=>
9{for(let t of(m.set(e,!0),m.values()))if(!t)return;i&&i()},[m,i]),f=(0,l.useMemo)(()=>({id:x,initial:t,isPresent:s,custom:a,onExitComplete:p,register:e=>(m.set(e,!1),()=>m.delete(e))}),d?[Math.random(),p]:[s,p]);return(0,l.useMemo)(()=>{m.forEach((e,t)=>m.set(t,!1))},[s]),l.useEffect(()=>{s||m.size||!i||i()},[s]),"popLayout"===h&&(e=(0,r.jsx)(c,{isPresent:s,children:e})),(0,r.jsx)(n.t.Provider,{value:f,children:e})};function u(){return new Map}var h=s(29473),m=s(85238);let x=e=>e.key||"";function p(e){let t=[];return l.Children.forEach(e,e=>{(0,l.isValidElement)(e)&&t.push(e)}),t}var f=s(25128);let g=({children:e,exitBeforeEnter:t,custom:s,initial:n=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:c="sync"})=>{(0,m.V)(!t,"Replace exitBeforeEnter with mode='wait'");let u=(0,l.useMemo)(()=>p(e),[e]),g=u.map(x),b=(0,l.useRef)(!0),w=(0,l.useRef)(u),j=(0,o.M)(()=>new Map),[v,N]=(0,l.useState)(u),[y,C]=(0,l.useState)(u);(0,f.E)(()=>{b.current=!1,w.current=u;for(let e=0;e<y.length;e++){let t=x(y[e]);g.includes(t)?j.delete(t):!0!==j.get(t)&&j.set(t,!1)}},[y,g.length,g.join("-")]);let E=[];if(u!==v){let e=[...u];for(let t=0;t<y.length;t++){let s=y[t],r=x(s);g.includes(r)||(e.splice(t,0,s),E.push(s))}"wait"===c&&E.length&&(e=E),C(p(e)),N(u);return}let{forceRender:k}=(0,l.useContext)(h.L);return(0,r.jsx)(r.Fragment,{children:y.map(e=>{let t=x(e),l=u===y||g.includes(t);return(0,r.jsx)(d,{isPresent:l,initial:(!b.current||!!n)&&void 0,custom:l?void 0:s,presenceAffectsLayout:a,mode:c,onExitComplete:l?void 0:()=>{if(!j.has(t))return;j.set(t,!0);let e=!0;j.forEach(t=>{t||(e=!1)}),e&&(null==k||k(),C(w.current),i&&i())},children:e},t)})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[682,379,344,580,636,593,792],()=>t(27864)),_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.