PageSourceSearch

https://core-wisevideo.replit.app/assets/Auth-DaNRtfn-.js

js core-wisevideo.replit.app collected 2026-10-03 03:50:59 UTC 15,467 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CoreWiseAmbientBackground-B1m31T1R.js","assets/index-D28LxU68.js","assets/react-vendor-PQKF9aal.js","assets/radix-vendor-Bwh9l8BA.js","assets/framer-BbKTcU6c.js","assets/index-NdMw7Nq5.css"])))=>i.map(i=>d[i]);
2import{d as Y,e as Z,u as ee,f as te,g as se,i as ae,_ as ie,h as ne,j as re,k as oe,l as le,L as k,I as M,m as H}from"./index-D28LxU68.js";import{r as n,j as e}from"./react-vendor-PQKF9aal.js";import{C as P,L as W}from"./Layout-CafzJVfr.js";import{u as ce}from"./useQuery-DFLxjhTO.js";import{C as de}from"./ClickParticles-Sy9lJTSv.js";import{W as ue,a as me,H as he}from"./TierIcons-CcCcYvxv.js";import{r as xe,c as pe}from"./community-stats-D95Z7Wbk.js";import{u as fe,m as i,A}from"./framer-BbKTcU6c.js";import"./radix-vendor-Bwh9l8BA.js";import"./zap-DBokzY6D.js";import"./tier-access-Cq6rSVD0.js";import"./arrow-right-DizagChK.js";import"./search-gxMIFmi4.js";import"./plus-DyZb0dHg.js";function O(l){return l[Math.floor(Math.random()*l.length)]}function B({id:l,type:y,placeholder:j,value:p,onChange:t,label:h,required:d,minLength:r,testId:x,onInputFocus:o}){const[f,c]=n.useState(!1),g=()=>{c(!0),o==null||o()};return e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{htmlFor:l,className:f?"obsidian-label-lit":"auth-label-unfocused transition-colors duration-300",children:h}),e.jsx(M,{id:l,type:y,placeholder:j,value:p,onChange:t,onFocus:g,onBlur:()=>c(!1),required:d,minLength:r,"data-testid":x,className:"obsidian-input rounded-xl h-11"})]})}function ze(){const{signup:l,login:y,user:j}=Y(),[,p]=Z(),{t,translations:h}=ee(),{isNightLight:d}=te(),[r,x]=n.useState(()=>typeof window=="undefined"?!1:new URLSearchParams(window.location.search).get("mode")==="login"),[o,f]=n.useState(""),[c,g]=n.useState(""),[v,u]=n.useState(""),[w,E]=n.useState(!1),[S,R]=n.useState(!1),b=fe(),{isLite:F}=se(),[_,D]=n.useState(!0),[I,V]=n.useState(null),{data:m}=ce(pe),q=n.useRef(null),[N,be]=n.useState(!0),[U,L]=n.useState([!1,!1,!1]);n.useEffect(()=>{if(!N||b)return;const s=[setTimeout(()=>L(a=>[!0,a[1],a[2]]),2e3),setTimeout(()=>L(a=>[a[0],!0,a[2]]),2300),setTimeout(()=>L(a=>[a[0],a[1],!0]),2600)];return()=>s.forEach(clearTimeout)},[N,b]),n.useEffect(()=>{const s=()=>{D(window.innerWidth>1024)};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),n.useEffect(()=>{b||F||ae()&&ie(()=>import("./CoreWiseAmbientBackground-B1m31T1R.js"),__vite__mapDeps([0,1,2,3,4,5])).then(s=>V(()=>s.CoreWiseAmbientBackground)).catch(s=>{})},[b,F]);const G=n.useMemo(()=>O(h.auth.signupOptions),[h]),$=n.useMemo(()=>O(h.auth.loginOptions),[h]),C=r?$:G,z=()=>new URLSearchParams(window.location.search).get("redirect")||"/";if(j)return window.location.href=z(),null;const T=async s=>{s.preventDefault(),u(""),E(!0);try{r?await y(o,c):await l(o,c),R(!0),setTimeout(()=>{window.location.href=z()},800)}catch(a){u(a.message||"Something went wrong")}finally{E(!1)}},Q=e.jsx(e.Fragment,{children:e.jsx(ne,{className:"space-y-1 relative z-10",children:e.jsxs(re,{className:"text-[1rem] auth-heading-serif text-center flex items-center justify-center gap-2 min-h-[2rem]",children:[e.jsx("img",{src:P,alt:"CoreWise",className:"w-10 h-10"}),C.title]})})});return b?e.jsx(W,{hideFooter:!0,children:e.jsx("div",{className:"flex flex-col items-center justify-center min-h-[calc(100dvh-5rem)] overflow-x-hidden -mt-4 md:-mt-8 py-6",children:e.jsxs(oe,{className:"w-[min(90vw,380px)] sm:w-[380px]",children:[Q,e.jsxs(le,{children:[e.jsxs("form",{onSubmit:T,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{htmlFor:"email",children:t("auth.emailLabel")}),e.jsx(M,{id:"email",type:"email",placeholder:t("auth.youAtExample"),value:o,onChange:s=>f(s.target.value),required:!0,"data-testid":"input-email"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{htmlFor:"password",children:t("auth.passwordLabel")}),e.jsx(M,{id:"password",type:"password",placeholder:t(r?"auth.yourPassword":"auth.atLeast6Chars"),value:c,onChange:s=>g(s.target.value),required:!0,minLength:r?1:6,"data-testid":"input-password"})]}),v&&e.jsx("div",{className:"text-sm text-red-400 bg-red-950/50 border border-red-900/50 p-3 rounded-lg","data-testid":"text-error",children:v}),e.jsx("button",{type:"submit",className:"w-full bg-gradient-to-r from-[#f4d03f] to-[#d4af37] text-theme-inverted font-bold py-4 rounded-xl",disabled:w,"data-testid":"button-submit",children:w?e.jsx(H,{className:"w-4 h-4 animate-spin mx-auto"}):C.button}),e.jsxs("div",{className:"relative my-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("div",{className:"w-full border-t border-theme"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:t("auth.or")}
2)})]}),e.jsxs("a",{href:"/api/google-login",className:"w-full flex items-center justify-center gap-3 bg-surface-medium hover:bg-surface-light border border-theme text-foreground font-medium py-3 rounded-xl transition-all duration-200","data-testid":"button-google-login",children:[e.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),t("auth.continueWithGoogle")]})]}),e.jsx("div",{className:"mt-6 text-center text-sm space-y-2",children:r?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-navy-medium",children:[t("auth.noAccount")," ",e.jsx("button",{type:"button",onClick:()=>{x(!1),u("")},className:"text-amber-warm hover:underline font-medium","data-testid":"button-switch-signup",children:t("auth.signUp")})]}),e.jsx("p",{children:e.jsx("a",{href:"/forgot-password",className:"text-muted-foreground hover:text-amber-warm hover:underline text-xs","data-testid":"link-forgot-password",children:t("auth.forgotPassword")})})]}):e.jsxs("p",{className:"text-navy-medium",children:[t("auth.hasAccount")," ",e.jsx("button",{type:"button",onClick:()=>{x(!0),u("")},className:"text-amber-warm hover:underline font-medium","data-testid":"button-switch-login",children:t("auth.signIn")})]})})]})]})})}):e.jsxs(W,{hideFooter:!0,children:[I&&e.jsx(I,{isMobile:!_}),e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[calc(100dvh-5rem)] relative overflow-x-hidden -mt-4 md:-mt-8 py-6",children:[e.jsx(i.div,{ref:q,className:"mb-6 w-[min(90vw,480px)] sm:w-[480px]",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1,ease:"easeOut"},onClick:m?()=>p("/about"):void 0,role:m?"link":void 0,tabIndex:m?0:-1,onKeyDown:m?(s=>{(s.key==="Enter"||s.key===" ")&&p("/about")}):void 0,style:{cursor:m?"pointer":"default"},children:e.jsx("div",{className:"grid grid-cols-3 gap-2",children:m?[{value:m.totalExtractions,label:t("about.stats.wisdomSynthesized"),icon:ue,color:"#f97316",decimals:0},{value:m.totalWords,label:t("about.stats.wordsExtracted"),icon:me,color:"#4285f4",decimals:0},{value:xe(m),label:t("about.stats.minutesSaved"),icon:he,color:"#10a37f",decimals:0}].map((s,a)=>{const K=s.icon;return e.jsxs(i.div,{className:"text-center auth-stat-card rounded-xl px-2 py-3",initial:{opacity:0,scale:.8},animate:N?{opacity:1,scale:1}:{},transition:{type:"spring",stiffness:200,damping:15,delay:.6+a*.12},children:[e.jsx(i.div,{className:"inline-flex items-center justify-center mb-1",animate:U[a]&&!b?{scale:[1,1.2,1]}:{},transition:{duration:.4},children:e.jsx(K,{className:"w-[4.5rem] h-[4.5rem] sm:w-20 sm:h-20",color:s.color})}),e.jsx("div",{children:e.jsx(ge,{value:s.value,isVisible:N,duration:1.5+a*.3,prefersReducedMotion:b,decimals:s.decimals,color:s.color})}),e.jsx("p",{className:"text-[0.72rem] sm:text-[0.825rem] mt-0.5 auth-stat-label leading-tight",style:{color:d?"rgba(61,53,40,0.58)":"rgba(255,255,255,0.52)",letterSpacing:"0.03em"},children:s.label.split(/\s+/).map((J,X)=>e.jsx("span",{className:"block",children:J},X))})]},s.label)}):[0,1,2].map(s=>e.jsxs("div",{className:"text-center auth-stat-card rounded-xl px-2 py-3 animate-pulse",children:[e.jsx("div",{className:`w-[4.5rem] h-[4.5rem] sm:w-20 sm:h-20 rounded-full mx-auto mb-1 ${d?"bg-black/5":"bg-white/5"}`}),e.jsx("div",{className:`h-6 w-10 rounded mx-auto mb-1 ${d?"bg-black/5":"bg-white/5"}`}),e.jsx("div",{className:`h-3 w-14 rounded mx-auto mt-0.5 ${d?"bg-black/5":"bg-white/5"}`})]},s))})}),e.jsx(A,{children:S&&e.jsxs(i.div,{className:"absolute inset-0 flex items-center justify-center z-50 pointer-events-none",initial:{opacity:0}
2,animate:{opacity:1},exit:{opacity:0},children:[e.jsx(i.div,{initial:{scale:0},animate:{scale:[0,1.5,1]},transition:{duration:.5,ease:"easeOut"},className:"text-6xl",children:"✨"}),Array.from({length:12}).map((s,a)=>e.jsx(i.div,{className:"absolute w-2 h-2 rounded-full",style:{backgroundColor:["#d4af37","#f4d03f","#fef3c7"][a%3]},initial:{x:0,y:0,scale:1,opacity:1},animate:{x:Math.cos(a*30*Math.PI/180)*150,y:Math.sin(a*30*Math.PI/180)*150,scale:0,opacity:0},transition:{duration:.8,ease:"easeOut"}},a))]})}),e.jsx(i.div,{initial:{opacity:0,scale:1.05,y:10},animate:{opacity:S?.5:1,scale:S?1.05:1,y:0},transition:{type:"spring",stiffness:390,damping:44,mass:1.2},children:e.jsx("div",{children:e.jsxs("div",{className:"relative w-[min(90vw,400px)] sm:w-[400px] p-8 md:p-10 rounded-[2rem] overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 obsidian-card-bg rounded-[2rem]"}),e.jsx("div",{className:"absolute inset-0 rounded-[2rem] obsidian-specular pointer-events-none"}),e.jsx("div",{className:"absolute inset-0 rounded-[2rem] obsidian-noise pointer-events-none"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:"space-y-1 mb-6",children:e.jsx(A,{mode:"wait",children:e.jsx(i.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.3},children:e.jsxs("h2",{className:"text-[1rem] auth-heading-serif text-center flex items-center justify-center gap-2 min-h-[2rem] text-foreground whitespace-pre-line",children:[e.jsx(i.span,{animate:{rotate:[0,10,-10,0]},transition:{duration:2,repeat:1/0,delay:1},children:e.jsx("img",{src:P,alt:"CoreWise",className:"w-10 h-10 obsidian-logo-glow"})}),C.title]})},r?"login":"signup")})}),e.jsxs("form",{onSubmit:T,className:"space-y-4",children:[e.jsx(i.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.15,duration:.4,ease:"easeOut"},children:e.jsx(B,{id:"email",type:"email",placeholder:t("auth.youAtExample"),value:o,onChange:s=>f(s.target.value),label:t("auth.emailLabel"),required:!0,testId:"input-email",onInputFocus:()=>{}})}),e.jsx(i.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.25,duration:.4,ease:"easeOut"},children:e.jsx(B,{id:"password",type:"password",placeholder:t(r?"auth.yourPassword":"auth.atLeast6Chars"),value:c,onChange:s=>g(s.target.value),label:t("auth.passwordLabel"),required:!0,minLength:r?1:6,testId:"input-password",onInputFocus:()=>{}})}),e.jsx(A,{children:v&&e.jsx(i.div,{initial:{opacity:0,y:-10,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:-10,height:0},className:"text-sm text-red-400 bg-red-950/30 border border-red-900/30 p-3 rounded-xl","data-testid":"text-error",children:v})}),e.jsx(i.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.35,duration:.4,ease:"easeOut"},children:e.jsx(de,{particleCount:16,colors:["#d4af37","#fbbf24","#f59e0b","#fef3c7"],shape:"spark",spread:100,className:"w-full",children:e.jsx(i.button,{type:"submit",className:"w-full obsidian-cta text-[var(--btn-text)] font-bold py-4 rounded-xl transition-all duration-200",disabled:w,"data-testid":"button-submit",whileHover:{scale:1.02},whileTap:{scale:.97},children:w?e.jsx(H,{className:"w-4 h-4 animate-spin mx-auto"}):C.button})})}),e.jsxs(i.div,{initial:{opacity:0}
2,animate:{opacity:1},transition:{delay:.45,duration:.4},children:[e.jsxs("div",{className:"relative my-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("div",{className:"w-full border-t obsidian-divider"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-transparent backdrop-blur-sm px-3 auth-or-label",children:t("auth.or")})})]}),e.jsxs(i.a,{href:"/api/google-login",className:"w-full flex items-center justify-center gap-3 obsidian-google font-medium py-3 rounded-xl","data-testid":"button-google-login",whileHover:{scale:1.02,y:-1},whileTap:{scale:.98},children:[e.jsxs(i.svg,{className:"w-5 h-5",viewBox:"0 0 24 24",whileHover:{y:-1},children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),t("auth.continueWithGoogle")]})]})]}),e.jsx(i.div,{initial:{opacity:0}
2,animate:{opacity:1},transition:{delay:.55,duration:.4},className:"mt-6 text-center text-sm space-y-2",children:r?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"auth-toggle-text",children:[t("auth.noAccount")," ",e.jsx(i.button,{type:"button",onClick:()=>{x(!1),u("")},className:"text-amber-warm hover:underline font-medium","data-testid":"button-switch-signup",whileHover:{scale:1.05},whileTap:{scale:.95},children:t("auth.signUp")})]}),e.jsx("p",{children:e.jsx("a",{href:"/forgot-password",className:"auth-toggle-text hover:text-amber-warm hover:underline text-sm font-medium","data-testid":"link-forgot-password",children:t("auth.forgotPassword")})})]}):e.jsxs("p",{className:"auth-toggle-text",children:[t("auth.hasAccount")," ",e.jsx(i.button,{type:"button",onClick:()=>{x(!0),u("")},className:"text-amber-warm hover:underline font-medium","data-testid":"button-switch-login",whileHover:{scale:1.05},whileTap:{scale:.95},children:t("auth.signIn")})]})})]})]})})})]})]})}function ge({value:l,isVisible:y,duration:j,prefersReducedMotion:p,decimals:t=0,color:h}){const[d,r]=n.useState(0);n.useEffect(()=>{if(!y)return;if(p){r(l);return}let o;const f=c=>{o||(o=c);const g=Math.min((c-o)/(j*1e3),1),v=1-Math.pow(1-g,3),u=Math.pow(10,t);r(Math.round(v*l*u)/u),g<1&&requestAnimationFrame(f)};requestAnimationFrame(f)},[y,l,j,p,t]);const x=t>0?d.toLocaleString("en-US",{minimumFractionDigits:t,maximumFractionDigits:t}):d.toLocaleString();return e.jsx("span",{className:"text-xl sm:text-2xl font-bold auth-stat-number",style:{color:h||"#fbbf24"},children:x})}export{ze as default};

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.