PageSourceSearch

https://botify.ai/static/js/5212.12f4d052.chunk.js

js botify.ai collected 2026-09-24 09:17:42 UTC 3,094 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunklanding_v3=self.webpackChunklanding_v3||[]).push([[5212],{55212(e,t,n){n.d(t,{CustomTokenAuth:()=>_});var a=n(5544),i=n(9950),r=n(71356),o=n(28429),s=n(11531),c=n(87962),l=n(73629),u=n(8130),d=n(47273),h=n(43538),m=n(65403),k=n(99866),g=n(99220),v=n(90990);var p=n(44414);const f=(0,r.xI)(),y=["auth/invalid-custom-token","auth/custom-token-mismatch","auth/user-disabled"],_=()=>{const e=(0,o.Zp)(),t=(0,i.useState)(null),_=(0,a.A)(t,2),b=_[0],w=_[1],x=(0,i.useRef)(!1),j=(0,i.useCallback)(async()=>{if(x.current)return;(0,m.Kz)();const t=(0,m.tO)();if(t){x.current=!0,w(null);try{var a;await f.authStateReady();const n=(null===(a=f.currentUser)||void 0===a?void 0:a.uid)||null,i=await(0,r.p)(f,t);n&&n!==i.user.uid&&(s.d.resetToken(),k.K_.clearChatStorage(),(0,g.No)());const o=await i.user.getIdToken();await s.d.login(o,{isAnonymous:!0}),(0,c._t)(),await(0,c.jp)(),(0,m.e5)(),e((0,h.l)()||"/",{replace:!0})}catch(i){if(u._w.loginError({device_id:d.j.deviceId(),error:null===i||void 0===i?void 0:i.message,error_code:null===i||void 0===i?void 0:i.code}),"auth/custom-token-mismatch"===(null===i||void 0===i?void 0:i.code)&&(e=>{n.e(2083).then(n.bind(n,2083)).then(t=>t.captureException(e)).catch(()=>{})})(i),y.includes(null===i||void 0===i?void 0:i.code))return void w({kind:"expired",message:"This link has expired. Please open the app again."});w({kind:"retryable",message:"auth/network-request-failed"===(null===i||void 0===i?void 0:i.code)?"No connection. Check your network and try again.":"Sign-in failed. Please try again."})}finally{x.current=!1}}else w({kind:"expired",message:"This link is invalid or has already been used."})},[e]);(0,i.useEffect)(()=>{j()},[j]);const C=()=>{(0,m.e5)(),(0,v.G5)()?v.bW.navigateBack():e("/",{replace:!0})};return b?(0,p.jsxs)("div",{className:"custom-token-auth",children:[(0,p.jsx)("p",{className:"custom-token-auth__message",children:b.message}),(0,p.jsxs)("div",{className:"custom-token-auth__actions",children:["retryable"===b.kind&&(0,p.jsx)("button",{type:"button",className:"custom-token-auth__btn custom-token-auth__btn_primary",onClick:j,children:"Try again"}),(0,p.jsx)("button",{type:"button",className:"custom-token-auth__btn",onClick:C,children:(0,v.G5)()?"Back to the app":"Go to main page"})]})]}):(0,p.jsx)(l.y$,{})}},43538(e,t,n){n.d(t,{l:()=>o});const a="after_login",i=["/auth/email-link","/auth/custom-token"],r=(e,t)=>{const n=null===e||void 0===e?void 0:e.trim();if(!n)return null;let a;try{a=new URL(n,t)}catch(s){return null}if(a.origin!==t)return null;const r="".concat(a.pathname).concat(a.search).concat(a.hash);if(!r.startsWith("/")||r.startsWith("//"))return null;const o=a.pathname.replace(/\/+$/,"")||"/";return i.includes(o)?null:r},o=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href;try{e=new URL(t)}catch(o){return null}const n=r(e.searchParams.get(a),e.origin);if(n)return n;const i=e.searchParams.get("continueUrl");if(!i)return null;try{const t=new URL(i,e.origin);return r(t.searchParams.get(a),e.origin)}catch(s){return null}}}}]);

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.