(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8747],{2210:(e,s,a)=>{"use strict";a.d(s,{A:()=>d});var t=a(95155),n=a(35695),l=a(26715),o=a(12115),r=a(93347),i=a(43626),c=a(66983);function d(){let e=(0,l.jE)(),s=(0,n.useRouter)(),[a,d]=(0,o.useState)(!1),{user:m}=(0,o.useContext)(c.E0);async function h(){d(!0),localStorage.getItem("auth"),await (0,i.A)("/auth/logout","POST",{}),localStorage.removeItem("verifyEmail"),e.refetchQueries({queryKey:["getUserData"]})}return(0,o.useEffect)(()=>{a&&(null==m?void 0:m.loggedIn)===!1&&(s.push("/auth"),d(!1))},[null==m?void 0:m.loggedIn,a,s]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("button",{onClick:h,className:"btn btn-primary btn-sm fs-sm rounded d-lg-inline-flex w-100",disabled:a,children:a?"Logging out...":(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.KnM,{className:"fs-xl"}),"\xa0\xa0Logout"]})})})}},3004:e=>{e.exports={navNoPadding:"footer_navNoPadding__W_tC0",footerBackground:"footer_footerBackground__nLiMM"}},17200:e=>{e.exports={loginButton:"navLogin_loginButton__qSChj",signupButton:"navLogin_signupButton__zEnjm"}},22666:(e,s,a)=>{"use strict";a.d(s,{default:()=>b});var t=a(95155),n=a(66766),l=a(6874),o=a.n(l),r=a(61206),i=a.n(r),c=a(17200),d=a.n(c),m=a(12515),h=a(2210),u=a(12115);function g(e){let{logout:s,user:a}=e,[n,l]=(0,u.useState)(0),r=()=>{document.body.style.overflow=""};return(0,u.useEffect)(()=>{(null==a?void 0:a.loggedIn)===!0?l(1):(null==a?void 0:a.loggedIn)===!1&&l(2)},[a]),(0,t.jsx)(t.Fragment,{children:0===n?(0,t.jsx)("p",{}):1===n&&s?(0,t.jsx)(h.A,{}):1===n?(0,t.jsxs)(o(),{href:"/dashboard",onClick:r,className:"btn btn-primary btn-sm fs-sm rounded d-lg-inline-flex w-100",children:[(0,t.jsx)(m._ht,{className:"fs-xl"}),"\xa0\xa0Dashboard"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o(),{href:"/auth",onClick:r,className:"btn btn-outline-primary btn-sm fs-sm ".concat(d().loginButton),children:"Login"}),(0,t.jsx)(o(),{href:"/auth/register",onClick:r,className:"btn btn-primary btn-sm fs-sm ".concat(d().signupButton),children:"Sign-Up"})]})})}var x=a(35695);let p=()=>{let e=(0,x.useRouter)();return(0,u.useEffect)(()=>{let s=()=>{window.google.accounts.id.initialize({client_id:"655899909526-dd6f8k60kjq2mk6nh56cqnu9rlco78op.apps.googleusercontent.com",callback:a}),window.google.accounts.id.prompt()},a=s=>{console.log("Google ID Token:",s.credential),e.push("/auth/callback?token="+s.credential)};(()=>{let e=document.createElement("script");e.src="https://accounts.google.com/gsi/client",e.async=!0,e.defer=!0,document.body.appendChild(e),e.onload=s})()},[]),(0,t.jsx)("div",{})};var v=a(66983);function b(e){let{loginRequired:s=!1,logout:a=!1,oneTap:l=!1}=e,r=(0,x.useRouter)(),[c,d]=(0,u.useState)(!1),{user:m}=(0,u.useContext)(v.E0),h=()=>{document.body.style.overflow=""};return(0,u.useEffect)(()=>{d(["browser.lol","v7.browser.lol","dev1.srv.browser.lol"].includes(window.location.hostname)),!0===s&&(null==m?void 0:m.status)==="loggedout"&&(console.log("Not logged in, redirecting to /auth"),r.push("/auth"))},[m]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("header",{className:"header navbar navbar-expand-lg position-absolute navbar-sticky",children:[(null==m?void 0:m.loggedIn)===!1&&!0===l&&c?(0,t.jsx)(p,{}):null,(0,t.jsxs)("div",{className:"container px-3",children:[(0,t.jsx)(o(),{href:"/",className:"navbar-brand pe-3",children:(0,t.jsx)(n.default,{src:"/img/logo.svg",width:200,height:300,alt:"Browser.lol",className:i().icon,priority:!0})}),(0,t.jsxs)("div",{id:"navbarNav",className:"offcanvas offcanvas-end",children:[(0,t.jsxs)("div",{className:"offcanvas-header border-bottom",children:[(0,t.jsx)("h5",{className:"offcanvas-title",children:"Menu"}),(0,t.jsx)("button",{type:"button",className:"btn-close","data-bs-dismiss":"offcanvas","aria-label":"Close"})]}),(0,t.jsx)("div",{className:"offcanvas-body",children:(0,t.jsxs)("ul",{className:"navbar-nav me-auto mb-2 mb-lg-0",children:[(0,t.jsx)("li",{className:"nav-item",children:(0,t.jsx)(o(),{onClick:h,href:"/create",className:"nav-link mb-md-0 mb-3",children:(0,t.jsx)("b",{className:"gradientText",children:"Create new Session"})})}),(0,t.jsx)("li",{className:"nav-item",children:(0,t.jsx)(o(),{onClick:h,href:"/upgrade",className:"nav-link mb-md-0 mb-3",children:"Upgrade"})}),(0,t.jsx)("li",{className:"nav-item",children:(0,t.jsx)(o(),{onClick:h,href:"/blog",className:"nav-link mb-md-0 mb-3",children:"Blog"})}),(0,t.jsx)("li",{className:"nav-item",children:(0,t.jsx)(o(),{href:"/contact",onClick:h,className:"nav-link mb-md-0 mb-3",children:"Contact"})})]})}),(0,t.jsx)("div",{className:"offcanvas-header border-top",children:(0,t.jsx)("div",{className:"w-100",children:(0,t.jsx)(g,{logout:a,user:m})})})]}),(0,t.jsx)("button",{type:"button",className:"navbar-toggler","data-bs-toggle":"offcanvas","data-bs-target":"#navbarNav","aria-controls":"navbarNav","aria-expanded":"false","aria-label":"Toggle navigation",children:(0,t.jsx)("span",{className:"navbar-toggler-icon"})}),(0,t.jsx)("div",{className:"d-none d-lg-inline",children:(0,t.jsx)(g,{logout:a,user:m})})]})]})})}a(95799),a(85716)},22792:(e,s,a)=>{"use strict";a.d(s,{default:()=>m});var t=a(95155),n=a(3004),l=a.n(n),o=a(27859),r=a(12115),i=a(6874),c=a.n(i),d=a(29911);function m(){let[e,s]=(0,r.useState)(0);return(0,r.useEffect)(()=>{localStorage.getItem("auth")?s(1):s(2)},[]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("section",{className:"container py-4",hidden:2!==e,children:(0,t.jsx)("div",{className:"bg-secondary rounded-3 py-3 px-3 px-sm-4 px-lg-5 px-xl-0",children:(0,t.jsxs)("div",{className:"row align-items-center py-lg-2 m-0",children:[(0,t.jsx)("div",{className:"col-xl-7 col-md-8 offset-xl-1 mb-4 mb-md-0",children:(0,t.jsxs)("div",{className:"d-flex align-items-center flex-wrap flex-sm-nowrap",children:[(0,t.jsx)("img",{className:"mx-sm-0 mx-auto my-2",src:"/img/notification.svg",width:110,alt:"Bell icon"}),(0,t.jsxs)("div",{className:"ps-4 ms-sm-3",children:[(0,t.jsx)("h2",{className:"h4 mb-0 mt-3",children:"Do you like it here? Register now!"}),(0,t.jsx)("p",{children:"Beyond just accessing more robust features, registration means you're always in the loop for any updates or new tools we roll out. Plus, you'll get the inside track on special offers and exclusive discounts. "})]})]})}),(0,t.jsx)("div",{className:"col-xl-4 col-md-3",children:(0,t.jsx)("div",{className:"ps-lg-5 ms-xl-2 text-center",children:(0,t.jsxs)(c(),{href:"/auth/register",className:"btn btn-outline-primary fs-3 mb-3 px-sm-4 mx-auto",children:[(0,t.jsx)(d.tmC,{style:{width:"40px",maxWidth:"40px"}}),"\xa0 Register"]})})})]})})}),(0,t.jsx)("hr",{}),(0,t.jsx)("div",{className:"footer pt-2 pb-1 mt-2 mt-md-0 ",children:(0,t.jsx)("div",{className:"container pt-lg-4",children:(0,t.jsxs)("div",{className:"row ",children:[(0,t.jsxs)("div",{className:"col-lg-4 col-md-6",children:[(0,t.jsx)("div",{className:"navbar-brand text-dark p-0 me-0 mb-2 mb-lg-2 ",children:(0,t.jsx)("img",{src:"/img/logo.svg",width:"170",height:"300",alt:"Browser.lol",className:l().icon})}),(0,t.jsx)("p",{className:"fs-sm pb-lg-3 mb-4",children:"Unleash unrestricted browsing with our virtual browser. No installation or setup required. Access it from your browser, visit blocked sites safely, and stay virus-free."})]}),(0,t.jsx)("div",{className:"col-xl-6 col-lg-7 col-md-5 offset-md-1 pt-md-1 pt-lg-0",children:(0,t.jsxs)("div",{id:"footer-links",className:"row",children:[(0,t.jsx)("div",{className:"col-xl-4 col-lg-3",children:(0,t.jsx)("div",{id:"social-links",className:" d-block",children:(0,t.jsxs)("ul",{className:"nav flex-column mb-2 mb-lg-0",children:[(0,t.jsx)("li",{className:"nav-item ",children:(0,t.jsx)(c(),{href:"/imprint",className:"nav-link d-inline-block ".concat(l().navNoPadding," mb-2 mb-md-0"),children:"Imprint"})}),(0,t.jsx)("li",{className:"nav-item ",children:(0,t.jsx)(c(),{href:"/privacy",className:"nav-link d-inline-block ".concat(l().navNoPadding," mb-2 mb-md-0"),children:"Privacy Policy"})}),(0,t.jsx)("li",{className:"nav-item",children:(0,t.jsx)(c(),{href:"/terms",className:"nav-link d-inline-block ".concat(l().navNoPadding," mb-2 mb-md-0"),children:"Terms of Service"})}),(0,t.jsx)("li",{className:"nav-item",children:(0,t.jsx)(c(),{href:"/partner",className:"nav-link d-inline-block ".concat(l().navNoPadding," mb-2 mb-md-0"),children:"Partner"})}),(0,t.jsx)("li",{className:"nav-item",children:(0,t.jsx)(c(),{href:"https://status.browser.lol",className:"nav-link d-inline-block ".concat(l().navNoPadding," mb-5 mb-md-0"),children:"Status"})})]})})}),(0,t.jsx)("div",{className:"col-lg-4 pr-3",children:(0,t.jsx)("div",{id:"useful-links",className:" d-lg-block","data-bs-parent":"#footer-links",children:(0,t.jsxs)("div",{className:" card card-bordered card-hover ",children:[(0,t.jsx)("p",{style:{marginBottom:"5px",marginTop:"15px"},children:(0,t.jsx)("a",{href:"http://www.playwire.com",rel:"noopener",target:"_blank",children:(0,t.jsx)("img",{src:"https://www.playwire.com/hubfs/Powered-by-Playwire-Badges/Ads-Powered-by-playwire-2021-standalone-large-300px.png",alt:"Playwire",width:"160",loading:"lazy",style:{width:"160px",marginLeft:"auto",marginRight:"auto",display:"block"}})})}),(0,t.jsx)("p",{style:{textAlign:"center",marginBottom:"12px"},children:(0,t.jsx)("a",{href:"https://www.playwire.com/contact-direct-sales",rel:"noopener",style:{textDecoration:"none",color:"black"},children:"Advertise on this site."})})]})})}),(0,t.jsx)("a",{href:"https://zap-hosting.com/en/",className:"fw-medium text-center text-decoration-none col-xl-4 col-lg-5 pt-2 pt-lg-0 text-center pb-2",alt:"Zap Hosting",children:(0,t.jsxs)("div",{className:" card card-bordered card-hover ",children:[(0,t.jsx)("b",{className:"mb-2 mt-2 text-dark",children:"Servers hosted by"}),(0,t.jsx)("img",{src:"/img/zap-hosting.png",width:"70",height:"auto",className:"m-2 mx-auto mt-0",alt:"Zap Hosting"})]})})]})}),(0,t.jsxs)("p",{className:"nav d-block fs-xs text-center text-md-start pb-xl-4 mt-0 mb-4 pb-lg-0 mb-0 pl-0",children:["\xa9 ",new Date().getFullYear()," All rights reserved.\xa0",(0,t.jsx)("a",{className:"nav-link d-inline-block p-0",href:"https://zesiger.net/",target:"_blank",rel:"noopener",children:"Zesiger.net"})]})]})})}),(0,t.jsxs)("a",{href:"#top",className:"btn-scroll-top","data-scroll":!0,children:[(0,t.jsx)("span",{className:"btn-scroll-top-tooltip text-muted fs-sm me-2",children:"Go back to the top"}),(0,t.jsx)(o.mlL,{className:"btn-scroll-top-icon"})]}),(0,t.jsx)("script",{src:"/js/bootstrap.bundle.min.js"})]})}},43626:(e,s,a)=>{"use strict";async function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{console.log("Requesting ".concat(s," to ").concat(e," with options: ").concat(JSON.stringify(a)));let t=localStorage.getItem("auth");if(""!==e)return await n(e,s,t,a);return{status:"ok"}}catch(e){return console.error("Error in fetchApi: ".concat(e.message)),{status:"error",message:e.message||"An unknown error occurred"}}}async function n(e,s,a,t){try{var n;let l,o;l=((n="api.browser.lol",void 0===n)?void 0:n.length)>0?"https://".concat("api.browser.lol","/v7").concat(e):"".concat(window.location.origin,"/v7").concat(e),o="GET"===s?await fetch(l,{method:s,headers:{Authorization:"Bearer ".concat(a),"Content-Type":"application/json"}}):await fetch(l,{method:s,headers:{Authorization:"Bearer ".concat(a),"Content-Type":"application/json"},body:JSON.stringify(t)});let r=await o.json();if(null==r?void 0:r.status)return console.log("Request succeeded to ".concat(e,": ").concat(JSON.stringify(r))),!0===r.forceLogout?(console.warn("Unauthorized. Cleaning up..."),localStorage.removeItem("auth")):(null==r?void 0:r.authToken)&&localStorage.setItem("auth",r.authToken),r;return console.log("Request failed to ".concat(e,": ").concat(JSON.stringify(r))),{status:"error",message:"Invalid server response"}}catch(e){return console.error("Error in fetchUrl: ".concat(e.message)),{status:"error",message:"Failed to connect to server. Please try again later."}}}a.d(s,{A:()=>t})},61206:e=>{e.exports={icon:"header_icon__bvG0i",cookiealert:"header_cookiealert__sKi7W",show:"header_show___oF_v",acceptcookies:"header_acceptcookies__y5gYj"}},66983:(e,s,a)=>{"use strict";a.d(s,{E0:()=>u,Ft:()=>m,default:()=>g});var t=a(95155),n=a(87017),l=a(26715),o=a(95799),r=a(12115),i=a(31195);a(71711);var c=a(50192),d=a(15666);let m=null,h=new n.E,u=(0,r.createContext)();function g(e){let{children:s}=e,[a,n]=(0,r.useState)({});return(0,r.useEffect)(()=>{i.Ay.initialize("AW-16989828804")},[]),(0,t.jsx)(u.Provider,{value:{user:a,setUser:n},children:(0,t.jsxs)(l.Ht,{client:h,children:[(0,t.jsxs)(d.zE,{children:[(0,t.jsx)(o.N9,{position:"top-center"}),s]}),(0,t.jsx)(c.E,{initialIsOpen:!1})]})})}}}]);