1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[430],{42325:(e,s,t)=>{t.d(s,{_:()=>d});var r=t(95155),a=t(12115),l=t(52619),i=t.n(l),o=t(14767),n=t(40970);function d(e){let{isOpen:s,onClose:t}=e,[l,d]=(0,a.useState)(""),[c,x]=(0,a.useState)(!1),[m,u]=(0,a.useState)(null),[h,g]=(0,a.useState)(!1),[p,f]=(0,a.useState)(""),[y,b]=(0,a.useState)(0),v=(0,o.U)();(0,a.useEffect)(()=>{if(y>0){let e=setTimeout(()=>b(y-1),1e3);return()=>clearTimeout(e)}},[y]),(0,a.useEffect)(()=>{s||(g(!1),f(""),d(""),u(null),b(0))},[s]),(0,a.useEffect)(()=>{s&&(async()=>{let{data:{user:e}}=await v.auth.getUser();e&&t()})()},[s,v,t]);let j=async e=>{e.preventDefault(),x(!0),u(null);try{let{error:e}=await v.auth.signInWithOtp({email:l,options:{emailRedirectTo:"".concat(window.location.origin,"/auth/callback"),data:{site_variant:n.CQ.variant}}});if(e)throw e;f(l),g(!0),b(60),u(null)}catch(e){u({type:"error",text:e instanceof Error?e.message:"Failed to send magic link. Please try again."})}finally{x(!1)}},w=async()=>{if(!(y>0)){x(!0),u(null);try{let{error:e}=await v.auth.signInWithOtp({email:p,options:{emailRedirectTo:"".concat(window.location.origin,"/auth/callback"),data:{site_variant:n.CQ.variant}}});if(e)throw e;b(60),u({type:"success",text:"Magic link resent!"})}catch(e){u({type:"error",text:e instanceof Error?e.message:"Failed to resend magic link. Please try again."})}finally{x(!1)}}},N=async()=>{try{let{error:e}=await v.auth.signInWithOAuth({provider:"google",options:{redirectTo:"".concat(window.location.origin,"/auth/callback")}});if(e)throw e}catch(e){u({type:"error",text:e instanceof Error?e.message:"Failed to sign in with Google. Please try again."})}};return s?(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center overflow-y-auto",children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:t,"aria-hidden":"true"}),(0,r.jsx)("div",{className:"relative z-50 mx-4 w-full max-w-md",children:(0,r.jsxs)("div",{className:"rounded-2xl border border-gray-200 bg-white p-5 shadow-2xl sm:p-8",children:[(0,r.jsx)("button",{onClick:t,className:"absolute right-4 top-4 text-gray-400 transition-colors hover:text-gray-600","aria-label":"Close modal",children:(0,r.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),h?(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"mb-6 flex justify-center",children:(0,r.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-gradient-to-br from-green-400 to-green-500",children:(0,r.jsx)("svg",{className:"h-8 w-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})})}),(0,r.jsx)("h2",{className:"mb-2 text-2xl font-bold text-gray-900",children:"Check your email!"}),(0,r.jsx)("p",{className:"mb-2 text-sm text-gray-600",children:"We sent a magic link to:"}),(0,r.jsx)("p",{className:"mb-4 font-semibold text-gray-900",children:p}),(0,r.jsxs)("p",{className:"mb-6 text-sm text-gray-600",children:["Click the link in your email to sign in.",(0,r.jsx)("br",{}),"The link expires in 1 hour."]}),m&&(0,r.jsx)("div",{className:"mb-6 rounded-lg p-4 ".concat("success"===m.type?"bg-green-50 text-green-800":"bg-red-50 text-red-800"),role:"alert",children:(0,r.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:["success"===m.type?(0,r.jsx)("svg",{className:"h-5 w-5 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):(0,r.jsx)("svg",{className:"h-5 w-5 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 9.293 8.707 7.293z",clipRule:"evenodd"})}),(0,r.jsx)("span",{className:"text-sm font-medium",children:m.text})]})}),(0,r.jsx)("button",{onClick:w,disabled:c||y>0,className:"w-full rounded-lg bg-gray-900 px-4 py-3 text-sm font-semibold text-white shadow-md transition-colors hover:bg-black focus:outline-none focus:ring-2 focus:ring-gray-700 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:c?"Sending...":y>0?"Resend available in ".concat(y,"s"):"Resend magic link"}),(0,r.jsx)("button",{onClick:()=>{g(!1),f(""),d(""),u(null),b(0)},className:"mt-4 text-sm font-medium text-primary transition-colors hover:text-primary-dark",children:"Use a different email address"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-4 text-center sm:mb-6",children:[(0,r.jsx)("div",{className:"mb-4 flex justify-center",children:(0,r.jsx)("div",{className:"rounded-full bg-primary/10 p-2 sm:p-3",children:(0,r.jsx)("svg",{className:"h-6 w-6 text-primary sm:h-8 sm:w-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})})}),(0,r.jsx)("h2",{className:"text-xl font-bold text-gray-900 sm:text-2xl",children:"You've reached your anonymous limit"}),(0,r.jsxs)("p",{className:"mt-2 text-sm text-gray-600",children:["Sign up for free to continue analyzing"," ","video"===n.CQ.variant?"videos":"images"]}),(0,r.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"No credit card required"})]}),m&&(0,r.jsx)("div",{className:"mb-6 rounded-lg p-4 ".concat("success"===m.type?"bg-green-50 text-green-800":"bg-red-50 text-red-800"),role:"alert",children:(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:["success"===m.type?(0,r.jsx)("svg",{className:"h-5 w-5 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):(0,r.jsx)("svg",{className:"h-5 w-5 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 9.293 8.707 7.293z",clipRule:"evenodd"})}),(0,r.jsx)("span",{className:"text-sm font-medium",children:m.text})]})}),(0,r.jsxs)("form",{onSubmit:j,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"modal-email",className:"block text-sm font-medium text-gray-700",children:"Email address"}
1),(0,r.jsx)("input",{type:"email",id:"modal-email",value:l,onChange:e=>d(e.target.value),required:!0,className:"mt-1 block w-full rounded-lg border border-gray-300 px-4 py-2.5 text-gray-900 placeholder-gray-500 focus:border-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-700 sm:py-3",placeholder:"[email protected]",disabled:c})]}),(0,r.jsx)("button",{type:"submit",disabled:c,className:"w-full rounded-lg bg-gray-900 px-4 py-2.5 text-sm font-semibold text-white shadow-md transition-colors hover:bg-black focus:outline-none focus:ring-2 focus:ring-gray-700 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 sm:py-3",children:c?"Sending...":"Send Magic Link"})]}),(0,r.jsxs)("div",{className:"relative my-4 sm:my-6",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,r.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,r.jsx)("div",{className:"relative flex justify-center text-sm",children:(0,r.jsx)("span",{className:"bg-white px-4 text-gray-500",children:"OR"})})]}),(0,r.jsxs)("button",{onClick:N,type:"button",className:"flex w-full items-center justify-center space-x-3 rounded-lg border-2 border-gray-300 bg-white px-4 py-2.5 text-sm font-semibold text-gray-700 transition-colors hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-700 focus:ring-offset-2 sm:py-3",children:[(0,r.jsxs)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",children:[(0,r.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"}),(0,r.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"}),(0,r.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"}),(0,r.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"})]}),(0,r.jsx)("span",{children:"Continue with Google"})]}),(0,r.jsxs)("div",{className:"mt-4 space-y-2 sm:mt-6",children:[(0,r.jsx)("p",{className:"text-center text-xs font-medium text-gray-900",children:"Free account benefits:"}),(0,r.jsxs)("div",{className:"flex items-start space-x-2 text-xs text-gray-600",children:[(0,r.jsx)("svg",{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),(0,r.jsx)("span",{children:"50 analyses per day (10x more)"})]}),(0,r.jsxs)("div",{className:"flex items-start space-x-2 text-xs text-gray-600",children:[(0,r.jsx)("svg",{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),(0,r.jsx)("span",{children:"Video deepfake detection"})]}),(0,r.jsxs)("div",{className:"flex items-start space-x-2 text-xs text-gray-600",children:[(0,r.jsx)("svg",{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),(0,r.jsx)("span",{children:"Pro dashboard & analysis history"})]})]})]}),(0,r.jsxs)("p",{className:"mt-4 text-center text-xs text-gray-500 sm:mt-6",children:["By signing up, you agree to our"," ",(0,r.jsx)(i(),{href:"/terms",className:"text-primary hover:underline",children:"Terms of Service"})," ","and"," ",(0,r.jsx)(i(),{href:"/privacy",className:"text-primary hover:underline",children:"Privacy Policy"})]})]})})]}):null}},69957:(e,s,t)=>{t.d(s,{U:()=>d});var r=t(95155),a=t(12115),l=t(24484),i=t(97928),o=t(67910);function n(e){return e>=80?"text-red-600":e>=60?"text-orange-600":e>=40?"text-yellow-600":e>=20?"text-blue-600":"text-green-600"}function d(e){let{onSignupNeeded:s,isAuthenticated:t}=e,[d,x]=(0,a.useState)({status:"idle"}),m=(0,a.useRef)(null);(0,a.useEffect)(()=>()=>{m.current&&URL.revokeObjectURL(m.current)},[]);let u=async e=>{try{let s=e,t="undefined"!=typeof navigator&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.userAgent.includes("Mac")&&"ontouchend"in document);if(t){if(e.size>i.NI)throw Error("Video is too large (".concat((e.size/1048576).toFixed(1),"MB). Maximum upload size on iOS is ").concat(i.NI/0x40000000,"GB."))}else if(e.size>i.Lw){let t=!1;try{if(await (0,o.qZ)(e),!(0,o.LN)())throw Error("Browser does not support video trimming");x({status:"processing",progress:0});let r=await (0,o.YR)(e,i.yP,e=>{x(s=>"processing"===s.status?{...s,progress:e}:s)});if(r.blob.size<1e3)throw Error("Video trimming produced an empty result.");if(r.blob.size>i.Lw)throw Error("Trimmed video still exceeds upload limit.");let a={"video/mp4":".mp4","video/webm":".webm","video/quicktime":".mov"}[r.blob.type]||".webm";s=new File([r.blob],"trimmed_".concat(e.name.replace(/\.[^.]+$/,"")).concat(a),{type:r.blob.type}),t=!0}catch(e){console.warn("Trimming failed, falling back to direct upload:",e)}if(!t){if(e.size>i.r2)throw Error("Video is too large (".concat((e.size/1048576).toFixed(1),"MB) and could not be trimmed. Maximum upload size is ").concat(i.r2/1048576,"MB. Please try a shorter or lower-resolution video."));s=e}}let r=t?i.NI:i.r2;if(s.size>r)throw Error("Video file is too large (".concat((s.size/1048576).toFixed(1),"MB). Maximum upload size is ").concat(r/1048576,"MB."));x({status:"uploading",uploadProgress:0});let a=await fetch("/api/video-presign",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contentType:s.type||"video/mp4"})});if(!a.ok){let e=await a.json();throw Error(e.error||"Failed to prepare video upload")}let l=await a.json(),n=!1;if(l.upload){let e=new FormData;for(let[s,t]of Object.entries(l.upload.fields))e.append(s,t);e.append("file",s),await new Promise((s,t)=>{let r=new XMLHttpRequest;r.upload.addEventListener("progress",e=>{if(e.lengthComputable){let s=Math.round(e.loaded/e.total*100);x(e=>"uploading"===e.status?{...e,uploadProgress:s}:e)}}),r.addEventListener("load",()=>{r.status>=200&&r.status<300?s():t(Error("Failed to upload video to storage"))}),r.addEventListener("error",()=>{t(Error("Failed to upload video to storage"))}),r.addEventListener("abort",()=>{t(Error("Video upload was cancelled"))}),r.open("POST",l.upload.url),r.send(e)}),n=!0}else if(l.mock)n=!0;else throw Error("Upload preparation failed: no upload credentials received");if(!n)throw Error("Video upload did not complete successfully");x({status:"loading"});let d=await fetch("/api/video-score",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({s3Key:l.key,contentType:s.type||"video/mp4"})});if(!d.ok){let e=await d.json();throw Error(e.error||"Failed to analyze video")}let c=await d.json();if("number"!=typeof c.overallScore||!c.results)throw Error("Invalid response from video analysis service");x({status:"success",result:c}),window.dispatchEvent(new CustomEvent("usage-updated"))}catch(r){let e=r instanceof Error?r.message:"Unknown error";!t&&(e.includes("Anonymous daily limit exceeded")||e.includes("IP limit exceeded"))&&s?(s(),x({status:"idle"})):x({status:"error",error:e})}},h=()=>{x({status:"idle"})};if("success"===d.status){let e=d.result.overallScore,s=(0,i.wR)(e);return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"rounded-xl bg-gradient-to-br ".concat(e>=80?"from-red-50 to-red-100":e>=60?"from-orange-50 to-orange-100":e>=40?"from-yellow-50 to-yellow-100":e>=20?"from-blue-50 to-blue-100":"from-green-50 to-green-100"," p-4 shadow-lg sm:p-6"),children:(0,r.jsxs)("div",{className:"space-y-3 sm:space-y-4",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"mb-1.5 text-xs font-medium text-gray-600 sm:mb-2 sm:text-sm",children:"AI Detection Score"}),(0,r.jsxs)("div",{className:"text-5xl font-bold sm:text-6xl ".concat(n(e)),children:[e,(0,r.jsx)("span",{className:"text-2xl sm:text-3xl",children:"/100"})]}),(0,r.jsx)("div",{className:"mt-2 sm:mt-3",children:(0,r.jsx)("span",{className:"inline-block rounded-full px-3 py-1 text-xs font-semibold sm:px-4 sm:text-sm ".concat(e>=80?"bg-red-100 text-red-800":e>=60?"bg-orange-100 text-orange-800":e>=40?"bg-yellow-100 text-yellow-800":e>=20?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"),children:s})})]}),(0,r.jsx)("div",{className:"border-t border-gray-300 pt-3 sm:pt-4",children:(0,r.jsx)("p",{className:"text-center text-xs leading-relaxed text-gray-700 sm:text-sm",children:d.result.explanation})}),(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-2 border-t border-gray-300 pt-3 sm:pt-4",children:[(0,r.jsx)(c,{title:"Image",subScore:d.result.results.image}),(0,r.jsx)(c,{title:"Video",subScore:d.result.results.video}),(0,r.jsx)(c,{title:"Audio",subScore:d.result.results.audio})]}),(0,r.jsxs)("div",{className:"mt-3 sm:mt-4",children:[(0,r.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-white/50 sm:h-2",children:(0,r.jsx)("div",{className:"h-full transition-all duration-1000 ease-out ".concat(e>=80?"bg-red-500":e>=60?"bg-orange-500":e>=40?"bg-yellow-500":e>=20?"bg-blue-500":"bg-green-500"),style:{width:"".concat(e,"%")}})}),(0,r.jsxs)("div",{className:"mt-1.5 flex justify-between text-[10px] text-gray-600 sm:mt-2 sm:text-xs",children:[(0,r.jsx)("span",{children:"Authentic"}),(0,r.jsx)("span",{children:"AI-Generated"})]})]})]})}),(0,r.jsx)("button",{onClick:h,className:"w-full rounded-lg border border-gray-300 bg-white px-4 py-3 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-700 focus:ring-offset-2",children:"Analyze Another Video"})]})}return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(l.u,{onFileSelect:u,disabled:"idle"!==d.status,showPreview:!1}),"processing"===d.status&&(0,r.jsx)("div",{className:"rounded-xl border border-gray-200 bg-gray-50 p-6",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-3",children:[(0,r.jsx)("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-gray-200 border-t-gray-900"}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("p",{className:"font-medium text-gray-900",children:"Processing video..."}),(0,r.jsxs)("p",{className:"text-sm text-gray-700",children:[Math.round(d.progress),"% processed"]})]}),(0,r.jsx)("div",{className:"h-2 w-full overflow-hidden rounded-full bg-gray-200",children:(0,r.jsx)("div",{className:"h-full rounded-full bg-primary transition-all duration-300",style:{width:"".concat(d.progress,"%")}})})]})}),"uploading"===d.status&&(0,r.jsx)("div",{className:"rounded-xl border border-gray-200 bg-gray-50 p-6",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-3",children:[(0,r.jsx)("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-gray-200 border-t-gray-900"}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("p",{className:"font-medium text-gray-900",children:"Uploading video..."}),(0,r.jsxs)("p",{className:"text-sm text-gray-700",children:[d.uploadProgress,"% uploaded"]})]}),(0,r.jsx)("div",{className:"h-2 w-full overflow-hidden rounded-full bg-gray-200",children:(0,r.jsx)("div",{className:"h-full rounded-full bg-primary transition-all duration-300",style:{width:"".concat(d.uploadProgress,"%")}})})]})}),"loading"===d.status&&(0,r.jsx)("div",{className:"rounded-xl border border-gray-200 bg-gray-50 p-6",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsx)("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-gray-200 border-t-gray-900"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-gray-900",children:"Analyzing video..."}),(0,r.jsx)("p",{className:"text-sm text-gray-700",children:"Video analysis can take up to 2 minutes"})]})]})}),"error"===d.status&&(0,r.jsx)("div",{className:"rounded-xl border border-red-200 bg-red-50 p-6",children:(0,r.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,r.jsx)("svg",{className:"h-6 w-6 flex-shrink-0 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-medium text-red-900",children:"Analysis failed"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-red-700",children:d.error}),(0,r.jsx)("button",{onClick:h,className:"mt-3 text-sm font-medium text-red-800 underline hover:text-red-900",children:"Try again"})]})]})})]})}function c(e){var s;let{title:t,subScore:a}=e,l=null==a||null==(s=a.probabilities)?void 0:s.ai,i="number"!=typeof l||isNaN(l)?null:l;return null===i?(0,r.jsxs)("div",{className:"flex flex-col items-center rounded-lg bg-white/50 px-2 py-2",children:[(0,r.jsx)("p",{className:"text-xs font-medium text-gray-400",children:t}),(0,r.jsx)("p",{className:"text-xs text-gray-400",children:"N/A"})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center rounded-lg border bg-white/70 px-2 py-2 ".concat(i>=80?"border-red-200":i>=60?"border-orange-200":i>=40?"border-yellow-200":i>=20?"border-blue-200":"border-green-200"),children:[(0,r.jsx)("p",{className:"text-xs font-medium text-gray-600",children:t}),(0,r.jsxs)("p",{className:"text-lg font-bold ".concat(n(i)),children:[Math.round(i),"%"]})]})}},82442:(e,s,t)=>{t.d(s,{f:()=>l});var r=t(95155),a=t(61507);function l(e){let{score:s,model:t,explanation:l}=e,i=(0,a.Vt)(s),o=l||(0,a.HC)(s);return(0,r.jsx)("div",{className:"rounded-xl bg-gradient-to-br ".concat(s>=80?"from-red-50 to-red-100":s>=60?"from-orange-50 to-orange-100":s>=40?"from-yellow-50 to-yellow-100":s>=20?"from-lime-50 to-lime-100":"from-green-50 to-green-100"," p-4 shadow-lg sm:p-6"),children:(0,r.jsxs)("div",{className:"space-y-3 sm:space-y-4",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"mb-1.5 text-xs font-medium text-gray-600 sm:mb-2 sm:text-sm",children:"AI Detection Score"}),(0,r.jsxs)("div",{className:"text-5xl font-bold sm:text-6xl ".concat(s>=80?"text-red-600":s>=60?"text-orange-600":s>=40?"text-yellow-600":s>=20?"text-lime-600":"text-green-600"),children:[s,(0,r.jsx)("span",{className:"text-2xl sm:text-3xl",children:"/100"})]}),(0,r.jsx)("div",{className:"mt-2 sm:mt-3",children:(0,r.jsx)("span",{className:"inline-block rounded-full px-3 py-1 text-xs font-semibold sm:px-4 sm:text-sm ".concat(s>=80?"bg-red-100 text-red-800":s>=60?"bg-orange-100 text-orange-800":s>=40?"bg-yellow-100 text-yellow-800":s>=20?"bg-lime-100 text-lime-800":"bg-green-100 text-green-800"),children:i})})]}),(0,r.jsx)("div",{className:"border-t border-gray-300 pt-3 sm:pt-4",children:(0,r.jsx)("p",{className:"text-center text-xs leading-relaxed text-gray-700 sm:text-sm",children:o})}),t&&(0,r.jsxs)("div",{className:"text-center text-xs text-gray-500",children:["Analyzed by: ",(0,r.jsx)("span",{className:"font-medium",children:t})]}),(0,r.jsxs)("div",{className:"mt-3 sm:mt-4",children:[(0,r.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-white/50 sm:h-2",children:(0,r.jsx)("div",{className:"h-full transition-all duration-1000 ease-out ".concat(s>=80?"bg-red-500":s>=60?"bg-orange-500":s>=40?"bg-yellow-500":s>=20?"bg-lime-500":"bg-green-500"),style:{width:"".concat(s,"%")}})}),(0,r.jsxs)("div",{className:"mt-1.5 flex justify-between text-[10px] text-gray-600 sm:mt-2 sm:text-xs",children:[(0,r.jsx)("span",{children:"Authentic"}),(0,r.jsx)("span",{children:"AI-Generated"})]})]})]})})}}}]);
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.