PageSourceSearch

https://pdfendpoint.com/_next/static/chunks/7348.20893ea9edbf27f5.js

js pdfendpoint.com collected 2026-10-04 00:03:59 UTC 14,887 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5072fa94-1744-4a95-b95d-d33b87556b91",e._sentryDebugIdIdentifier="sentry-dbid-5072fa94-1744-4a95-b95d-d33b87556b91")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7348],{30348:function(e,t,o){o.r(t);var s=o(85893),a=o(41664),r=o.n(a),n=o(72132),i=o(67294),l=o(11163),c=o(66338),u=o(54544),d=o(17385),p=o(84267),h=o(43609),g=o(81786),f=o(86371);let m={email:!0,password:!0},w={email:"",password:""};t.default=()=>{let e=(0,c.useDispatch)(),t=(0,l.useRouter)(),o=(0,c.useSelector)(e=>e.user.username);(0,c.useSelector)(e=>e.app.did_login_before);let a=(0,i.useRef)(null),b=(0,i.useRef)(null),[x,v]=(0,i.useState)(!1),[_,y]=(0,i.useState)({email:"",password:""}),[A,k]=(0,i.useState)(m),[E,j]=(0,i.useState)(w),[L,I]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=t.query.otk;e&&N(e)},[t.isReady]);let N=async e=>{v(!0);let o=null;try{o=await g.authService.loginOTK(e),console.log(o),o&&o.success?((0,h.handleLogin)(o.data,"form"),S(),t.push("".concat("https://pdfendpoint.com","/app/home"))):n.toast.error("Internal Error. Try again or contact support should this error continue.")}catch(e){return console.log(e),v(!1),n.toast.error("Internal Error. Try again or contact support should this error continue."),!1}},S=()=>{e((0,p.hideAuthModal)())},R=async()=>{if(!_.email)return k({...m,email:!1}),a.current.focus(),j({...w,email:"Email cannot be empty"});if(!_.password)return k({...m,password:!1}),b.current.focus(),j({...w,password:"Password cannot be empty"});v(!0);let e=null;try{e=await g.authService.login(_.email,_.password,L)}catch(e){return console.log(e),v(!1),n.toast.error("Internal Error. Try again or contact support should this error continue."),!1}if(e&&e.success)(0,h.handleLogin)(e.data,"form"),S(),console.log(e),e.data.profile.email_verification_required?t.push("".concat("https://pdfendpoint.com","/auth/verify?email=").concat(e.data.profile.email)):t.push("".concat("https://pdfendpoint.com","/app/home"));else if(e&&!e.success&&e.error&&e.error.name)switch(console.log(e),e.error.name){case"missing_email":n.toast.error("Empty Email"),k({...m,email:!1}),j({...w,email:"Email cannot be empty"}),a.current.focus();break;case"invalid_email":n.toast.error("Invalid Email."),k({...m,email:!1}),j({...w,email:"Email is invalid. Enter a valid email address."}),a.current.focus();break;case"duplicate_email":n.toast.error("Email is already in use"),k({...m,email:!1}),j({...w,email:"Email already in use. Use a different email or login instead."}),a.current.focus();break;case"missing_password":n.toast.error("Password can not be empty"),k({...m,password:!1}),j({...w,password:"Password can not be empty"}),b.current.focus();break;case"invalid_password":n.toast.error("Wrong Password"),k({...m,password:!1}),j({...w,password:"Password is not correct"}),b.current.focus();break;case"password_too_long":n.toast.error("Password too long."),k({...m,password:!1}),j({...w,password:"Password too long. Passwords can be up to 62 characters long"}),b.current.focus();break;case"password_too_short":n.toast.error("Password too short."),k({...m,password:!1}),j({...w,password:"Password too short. Passwords must be at least 8 characters long"}),b.current.focus();break;default:n.toast.error("Internal Error. Try again or contact support should this error continue.")}v(!1)},T=(e,t)=>{k({...m}),y({..._,[e]:t})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r(),{href:"/",className:"mb-4 inline-flex items-center text-xl font-semibold text-gray-900 dark:text-white",onClick:()=>S(),children:(0,s.jsx)(u.T,{})}),(0,s.jsxs)("h1",{className:"mb-2 font-display text-2xl font-bold leading-tight tracking-tight text-gray-700 dark:text-white",children:["Welcome back",o?", ".concat(o,"!"):""]}),(0,s.jsxs)("p",{className:"mb-2 text-sm font-light text-gray-500 dark:text-gray-300",children:["Don’t have an account?"," ",(0,s.jsx)(r(),{href:"/auth/signup",className:"font-medium text-blue-600 hover:underline dark:text-blue-500",onClick:()=>S(),children:"Sign up"}),"."]}),(0,s.jsx)(f.Z,{stage:"login",loading:x,onOneTapLogin:()=>v(!0),onSocialLogin:()=>v(!0)}),(0,s.jsxs)("div",{className:"mt-3 mb-3 flex items-center",children:[(0,s.jsx)("div",{className:"h-0.5 w-full bg-gray-200 dark:bg-gray-700"}),(0,s.jsx)("div",{className:"px-5 text-center text-gray-500 dark:text-gray-400",children:"or"}),(0,s.jsx)("div",{className:"h-0.5 w-full bg-gray-200 dark:bg-gray-700"})]}),(0,s.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,s.jsx)("div",{className:"grid gap-4 sm:grid-cols-1",children:(0,s.jsxs)("form",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"email",className:"mb-1 ml-2 block text-sm font-medium text-black dark:text-white",children:"Email"}),(0,s.jsx)(d.Input,{autoComplete:"username",forwardRef:a,type:"email",name:"email",id:"email",size:"large",className:"block w-full  ",placeholder:"[email protected]",required:"",value:_.email,onChange:e=>T("email",e.target.value),isInvalid:!A.email,disabled:x,invalidMessage:E.email})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"password",className:"mb-1 ml-2 block text-sm font-medium text-black dark:text-white",children:"Password"}),(0,s.jsx)(d.Input,{autoComplete:"password",forwardRef:b,type:"password",name:"password",id:"password",placeholder:"••••••••",size:"large",className:"block w-full  ",required:"",value:_.password,S:!0,onChange:e=>T("password",e.target.value),valid:A.password,disabled:x,onEnter:()=>R(),isInvalid:!A.password,invalidMessage:E.password})]})]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:"flex items-start"}),(0,s.jsx)(r(),{href:"/auth/forgot",className:"text-sm font-medium text-blue-600 hover:underline dark:text-blue-500",onClick:()=>S(),children:"Forgot password?"})]}),(0,s.jsx)(d.Button,{size:"large",className:"block w-full text-base",style:"primary",loading:x,disabled:!_.email||!_.password,onClick:()=>R(),children:"Login"})]})]})}},86371:function(e,t,o){o.d(t,{Z:function(){return g}});var s=o(85893),a=o(25675),r=o.n(a),n=o(67294),i=o(11163),l=o(17385),c={src:"/_next/static/media/google.811c5c6a.svg",height:24,width:24,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/github.64d88092.svg",height:1024,width:1024,blurWidth:0,blurHeight:0},d=o(66338),p=o(84267),h=o(43609),g=e=>{let{stage:t="signup",loading:o,onOneTapLogin:a,onSocialLogin:g,onFailed:f}=e,m=(0,i.useRouter)(),w=(0,d.useDispatch)(),b=(0,d.useSelector)(e=>e.app.show_google_login_prompt);(0,n.useEffect)(()=>{let e=setTimeout(()=>{if(window.google){window.google.accounts.id.initialize({client_id:"686417564364-k54kddainnfpmci5n98j3uhl7iq355d6.apps.googleusercontent.com",callback:e=>{a(!0),w((0,p.hideAuthModal)(!0)),m.push({pathname:"/auth/oauth/google_one_tap",query:e})}});let{innerWidth:e}=window;innerWidth&&innerWidth>1340&&b&&(console.log("[GoogleOneTap] show"),window.google.accounts.id.prompt())}else console.log("not found")},500);return()=>{clearTimeout(e)}},[]);let x=e=>{w((0,p.hideAuthModal)(!0));let o=(0,h.getSocialLoginURL)("google",t);m.push(o)},v=e=>{w((0,p.hideAuthModal)(!0));let o=(0,h.getSocialLoginURL)("github",t);m.push(o)};return(0,s.jsxs)("div",{className:" space-y-2 py-3",id:"social-login-container",children:[(0,s.jsxs)(l.Button,{className:"w-full",disabled:o,onClick:e=>x(e),children:[(0,s.jsx)(r(),{className:"mr-2 w-[16px]",alt:"github logo",src:c,width:"16px",height:"16px"}),"signup"==t?"Sign up":"Login"," with Google"]}),(0,s.jsxs)(l.Button,{className:"w-full",disabled:o,onClick:e=>v(e),children:[(0,s.jsx)(r(),{className:"mr-2 w-[16px]",alt:"github logo",src:u,width:"16px",height:"16px"}),"signup"==t?"Sign up":"Login"," with GitHub"]})]})}},54544:function(e,t,o){o.d(t,{T:function(){return l}});var s=o(85893),a=o(25675),r=o.n(a),n=o(86010),i={src:"/_next/static/media/logo.02298529.png",height:512,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAUVBMVEVMaXEsQq8VhkEVfkj43RYfnkATfzq+IxwcQbHntBPfR0ckab7ssQYDgo//
1aBvwswf/UEOpRWZOSdLvPDjNshR0wykdXu76yhEbR8AXi0PLJyIOZp1mAAAAGHRSTlMAmnlpIeVOjF/9INdwzI2wE/24/Ver0/zLjiRxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAOklEQVR4nEXLyxaAEAAA0UmEIvQi//+hjhaZ1d0M/LkgpdbAZbOtHah7P+MHf6QVEO/2lAlYZjBmzA05wQGI2o3X+QAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8};function l(e){let{style:t="",justText:o=!1}=e;return(0,s.jsxs)("div",{className:"flex  items-center",children:[!o&&(0,s.jsx)(r(),{src:i,height:36,className:(0,n.default)("light"==t?"brightness-0 invert":"","mr-0.5"),alt:"pdfEndpoint Logo"}),(0,s.jsx)("span",{className:(0,n.default)("light"==t?"text-white":"text-black dark:text-white"," self-center whitespace-nowrap font-display text-xl font-bold  md:text-2xl"),children:"pdfEndpoint"})]})}},43609:function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});let s=o(38754),a=o(61757)._(o(76666)),r=o(44001),n=o(72132),i=s._(o(5152)),l=o(40846),c=o(84267),u=o(64869),d=o(6098),p=(0,i.default)(o.e(1916).then(o.t.bind(o,1916,19)),{loadableGenerated:{webpack:()=>[1916]},ssr:!0}),h="https://pdfendpoint.com",g="".concat(h,"/auth/oauth/google"),f="".concat(h,"/auth/oauth/github");e.exports={handleLogin:(e,t)=>{if(r.store.dispatch((0,l.setAuthToken)(e.auth)),r.store.dispatch((0,c.setLoginState)(!0)),r.store.dispatch((0,u.setIdentifier)(e.user_id)),e&&e.action)switch(e.action){case"login":(0,d.sendEvent)("login",{event_category:"conversion",event_label:"login",value:0,currency:"USD"});break;case"signup":(0,d.sendEvent)("sign_up",{event_category:"conversion",event_label:"sign_up",value:1,currency:"USD"}),(0,d.setUserData)(e.profile&&e.profile.email),(0,d.sendConversion)(d.ADS_SIGNUP_LABEL)}if("google"!=t&&"google_one_tap"!=t?r.store.dispatch((0,c.hideGoogleLogin)()):r.store.dispatch((0,c.showGoogleLogin)()),e.profile&&e.profile.timezone)for(let t=0;t<p.length;t++)e.profile.timezone==p[t].key&&(e.profile.timezone={...p[t]});e.profile.customer_details.country||(e.profile.customer_details.country="US"),e.profile.customer_details.state||(e.profile.customer_details.state="AL");let o=a.getCurrentScope();return o.setTag("logged_in",!0),o.setUser({user_id:e.profile.user_id,email:e.profile.email,account_id:e.profile.account_id}),r.store.dispatch((0,u.setUser)(e.profile)),!0},handleLogout:()=>{r.store.dispatch((0,c.setLoginState)(!1)),r.store.dispatch((0,u.logoutUser)()),r.store.dispatch((0,l.resetApiToken)()),a.getCurrentScope().clear(),n.toast.success("Logout Successful")},getSocialLoginURL:(e,t)=>{let o=JSON.stringify({product:"pdfendpoint",is_login:"login"==t,is_signup:"signup"==t});switch(e){case"google":return console.log("[SOCIAL] Login with Google - init"),encodeURI("https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?client_id=".concat("686417564364-k54kddainnfpmci5n98j3uhl7iq355d6.apps.googleusercontent.com","&redirect_uri=").concat(g,"&scope=openid profile email&response_type=code&state=").concat(o,"&access_type=offline&service=lso&o2v=1&flowName=GeneralOAuthFlow"));case"google_one_tap":return console.log("[SOCIAL] Login with Google One Tap - init"),encodeURI("https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?client_id=".concat("686417564364-k54kddainnfpmci5n98j3uhl7iq355d6.apps.googleusercontent.com","&redirect_uri=").concat(g,"&scope=openid profile email&response_type=code&state=").concat(o,"&access_type=offline&service=lso&o2v=1&flowName=GeneralOAuthFlow"));case"github":return console.log("[SOCIAL] Login with Github - init"),encodeURI("https://github.com/login/oauth/authorize?client_id=".concat("b7e1053d83a8d9c4b0fe","&scope=user user:email&state=").concat(o,"&access_type=offline&redirect_uri=").concat(f))}}}},81786:function(e,t,o){o.r(t),o.d(t,{authService:function(){return a}});var s=o(21806);let a={signup:function(e,t,o,a,r,n,i){return(0,s._)("https://api.hub.saritra.com/v1/auth/pdfendpoint/signup",!1,"post",{email:e,password:t,captcha_v3:o,fp_ref:a,fp_tid:r,timezone:n,locale:i},null)},login:function(e,t,o){return(0,s._)("https://api.hub.saritra.com/v1/auth/pdfendpoint/login",!1,"post",{email:e,password:t,remember_me:o},null)},loginOTK:function(e){return(0,s._)("https://api.hub.saritra.com/v1/auth/pdfendpoint/otk",!1,"post",{otk:e},null)},socialLogin:function(e,t){return(0,s._)("https://api.hub.saritra.com/v1/auth/pdfendpoint/oauth",!1,"post",t,null)},verifyEmail:function(e,t){return(0,s._)("https://api.hub.saritra.com/v1/auth/pdfendpoint/verify",!1,"get",null,{email:e,token:t})},resendVerifyEmail:function(e){return(0,s._)("https://api.hub.saritra.com/v1/auth/pdfendpoint/verify/resend",!1,"get",null,{email:e})},sendResetEmail:function(e,t){return(0,s._)("https://api.hub.saritra.com/v1/auth/pdfendpoint/forgot-password/",!1,"get",null,{email:e,captcha:t})},resetPasswordWithToken:function(e,t,o,a){return(0,s._)("https://api.hub.saritra.com/v1/auth/pdfendpoint/forgot-password/",!1,"post",{password:e,token:t,email:o,captcha:a},null)},resetPassword:function(e,t){return(0,s._)("https://api.hub.saritra.com/v1/auth/pdfendpoint/forgot-password/change",!0,"post",{old_password:e,new_password:t},null)}}},92935:function(e,t,o){o.d(t,{f:function(){return n}});var s=o(67294),a=o(56427);function r(e){var t;if(e.type)return e.type;let o=null!=(t=e.as)?t:"button";if("string"==typeof o&&"button"===o.toLowerCase())return"button"}
1function n(e,t){let[o,n]=(0,s.useState)(()=>r(e));return(0,a.e)(()=>{n(r(e))},[e.type,e.as]),(0,a.e)(()=>{o||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[o,t]),o}},37703:function(e,t,o){o.d(t,{g:function(){return r}});var s=o(67294);function a(e){return[e.screenX,e.screenY]}function r(){let e=(0,s.useRef)([-1,-1]);return{wasMoved(t){let o=a(t);return(e.current[0]!==o[0]||e.current[1]!==o[1])&&(e.current=o,!0)},update(t){e.current=a(t)}}}},58723:function(e,t,o){let s;o.d(t,{T:function(){return a},d:function(){return r}});var a=((s=a||{})[s.First=0]="First",s[s.Previous=1]="Previous",s[s.Next=2]="Next",s[s.Last=3]="Last",s[s.Specific=4]="Specific",s[s.Nothing=5]="Nothing",s);function r(e,t){let o=t.resolveItems();if(o.length<=0)return null;let s=t.resolveActiveIndex(),a=null!=s?s:-1,r=(()=>{switch(e.focus){case 0:return o.findIndex(e=>!t.resolveDisabled(e));case 1:{let e=o.slice().reverse().findIndex((e,o,s)=>(-1===a||!(s.length-o-1>=a))&&!t.resolveDisabled(e));return -1===e?e:o.length-1-e}case 2:return o.findIndex((e,o)=>!(o<=a)&&!t.resolveDisabled(e));case 3:{let e=o.slice().reverse().findIndex(e=>!t.resolveDisabled(e));return -1===e?e:o.length-1-e}case 4:return o.findIndex(o=>t.resolveId(o)===e.id);case 5:return null;default:!function(e){throw Error("Unexpected object: "+e)}(e)}})();return -1===r?s:r}}}]);

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.