PageSourceSearch

https://saferestorehelp.com/assets/ActivateLicense-tGv1stog.js

js saferestorehelp.com collected 2026-10-04 21:44:13 UTC 7,383 bytes, 1 lines download raw bytes

1import{j as e}from"./query-DLf6jQ7_.js";import{a as r,L as d}from"./vendor-B-xW6FxA.js";import{K as j,B as N,a as w,D as k,g as C}from"./index-Dl_m57S2.js";import{C as S}from"./check-8kcePVWA.js";import{C as L}from"./copy-C5ddMmf_.js";import{L as R}from"./loader-circle-phX4kCmI.js";import{C as X}from"./circle-check-big-DgwbXNy9.js";import{A as p}from"./arrow-right-yrfNys5z.js";import{C as K}from"./circle-x-Ck2dTlHe.js";import"./ui-GpmADA3y.js";function U(){const[s,y]=r.useState(""),[m,u]=r.useState(""),[l,i]=r.useState("idle"),[t,x]=r.useState(null),[f,n]=r.useState(""),[v,h]=r.useState(!1),o=async()=>{if(s.trim()){i("loading"),n(""),x(null);try{const c=await(await C("POST","/api/license/validate",{licenseKey:s.trim(),email:m.trim()||void 0})).json();c.valid?(i("valid"),x(c)):(i("invalid"),n(c.error||"Invalid license key"))}catch{i("invalid"),n("Unable to verify license. Please try again.")}}},g={recovery_consumer:"Recovery Starter",recovery_personal:"Recovery Personal",recovery_professional:"Recovery Pro",recovery_forensic:"Recovery Forensic",mobile_consumer:"Cloud Tools",drone_recovery:"AerialRestore — Drone Footage Recovery"},b=()=>{navigator.clipboard.writeText(s.trim()),h(!0),setTimeout(()=>h(!1),2e3)};return e.jsxs("div",{className:"max-w-xl mx-auto space-y-8 pt-8","data-testid":"page-activate",children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-cyan-500/10 to-blue-500/10 border border-cyan-500/20 mb-2",children:e.jsx(j,{className:"h-7 w-7 text-cyan-400"})}),e.jsx("h1",{className:"text-3xl md:text-4xl font-black text-white",children:"Verify Your License"}),e.jsx("p",{className:"text-gray-400 max-w-md mx-auto",children:"Enter your SafeRestore license key to verify it's valid and check your plan details."})]}),e.jsxs("div",{className:"glass-card rounded-2xl p-6 md:p-8 space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{htmlFor:"license-key",className:"text-sm font-semibold text-gray-300",children:"License Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:"license-key",type:"text",value:s,onChange:a=>{y(a.target.value.toUpperCase()),i("idle")},placeholder:"SR-XXXX-XXXX-XXXX",className:"w-full rounded-xl bg-white/[0.05] border border-white/10 px-4 py-3 text-white font-mono text-sm placeholder:text-gray-600 focus:outline-none focus:border-cyan-500/40 focus:ring-1 focus:ring-cyan-500/20 transition-all","data-testid":"input-license-key",onKeyDown:a=>a.key==="Enter"&&o()}),s&&e.jsx("button",{onClick:b,className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-white transition-colors","data-testid":"button-copy-key",children:v?e.jsx(S,{className:"h-4 w-4 text-emerald-400"}):e.jsx(L,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{htmlFor:"email",className:"text-sm font-semibold text-gray-300",children:["Email ",e.jsx("span",{className:"text-gray-600 font-normal",children:"(optional)"})]}),e.jsx("input",{id:"email",type:"email",value:m,onChange:a=>u(a.target.value),placeholder:"[email protected]",className:"w-full rounded-xl bg-white/[0.05] border border-white/10 px-4 py-3 text-white text-sm placeholder:text-gray-600 focus:outline-none focus:border-cyan-500/40 focus:ring-1 focus:ring-cyan-500/20 transition-all","data-testid":"input-email",onKeyDown:a=>a.key==="Enter"&&o()})]}),e.jsxs(N,{onClick:o,disabled:!s.trim()||l==="loading",className:"w-full cta-glow rounded-xl bg-gradient-to-r from-cyan-500 to-blue-500 hover:from-cyan-400 hover:to-blue-400 text-white font-bold py-3 text-base transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"button-verify",children:[l==="loading"?e.jsx(R,{className:"h-5 w-5 animate-spin mr-2"}):e.jsx(w,{className:"h-5 w-5 mr-2"}),l==="loading"?"Verifying...":"Verify License"]})]}),l==="valid"&&t&&e.jsxs("div",{className:"rounded-2xl bg-emerald-500/10 border border-emerald-500/30 p-6 space-y-4 animate-fade-in-up","data-testid":"result-valid",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(X,{className:"h-6 w-6 text-emerald-400"}),e.jsx("h2",{className:"text-lg font-bold text-white",children:"License Valid"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"rounded-xl bg-white/[0.04] p-3",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Plan"}),e.jsx("p",{className:"text-sm font-semibold text-white","data-testid":"text-plan-name",children:g[t.productType]||t.productType})]}),e.jsxs("div",{className:"rounded-xl bg-white/[0.04] p-3",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Level"}),e.jsx("p",{className:"text-sm font-semibold text-white","data-testid":"text-plan-level",children:t.level||"Full"})]}),t.activatedAt&&e.jsxs("div",{className:"rounded-xl bg-white/[0.04] p-3",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Activated"}),e.jsx("p",{className:"text-sm font-semibold text-white",children:new Date(t.activatedAt).toLocaleDateString()})]}),t.features&&e.jsxs("div",{className:"rounded-xl bg-white/[0.04] p-3 col-span-2",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Included Features"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.features.slice(0,8).map(a=>e.jsx("span",{className:"rounded-md bg-emerald-500/10 border border-emerald-500/20 px-2 py-0.5 text-xs text-emerald-400",children:a},a))})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3",children:[e.jsxs(d,{href:"/download",className:"inline-flex items-center gap-2 text-sm text-cyan-400 hover:text-cyan-300 font-semibold transition-colors","data-testid":"link-download-after-verify",children:[e.jsx(k,{className:"h-4 w-4"}),"Download SafeRestore",e.jsx(p,{className:"h-3.5 w-3.5"})]}),e.jsxs(d,{href:`/feedback?${new URLSearchParams({...t.email?{email:t.email}:{},product:t.productType,...t.licenseKey?{key:t.licenseKey}:{}}).toString()}`,className:"inline-flex items-center gap-2 text-sm text-blue-400 hover:text-blue-300 font-semibold transition-colors","data-testid":"link-leave-review-after-verify",children:["Leave a review",e.jsx(p,{className:"h-3.5 w-3.5"})]})]})]}),l==="invalid"&&e.jsxs("div",{className:"rounded-2xl bg-red-500/10 border border-red-500/30 p-6 space-y-3 animate-fade-in-up","data-testid":"result-invalid",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(K,{className:"h-6 w-6 text-red-400"}),e.jsx("h2",{className:"text-lg font-bold text-white",children:"Invalid License"})]}),e.jsx("p",{className:"text-sm text-gray-300",children:f}),e.jsxs("p",{className:"text-xs text-gray-500",children:["If you believe this is an error, contact"," ",e.jsx("a",{href:"mailto:[email protected]",className:"text-cyan-400 hover:text-cyan-300 transition-colors",children:"[email protected]"})]})]}),e.jsx("div",{className:"text-center space-y-3 pt-4",children:e.jsxs("p",{className:"text-sm text-gray-500",children:["Don't have a license?"," ",e.jsx(d,{href:"/download",className:"text-cyan-400 hover:text-cyan-300 font-medium transition-colors","data-testid":"link-get-saferestore",children:"Download SafeRestore free"}
1)," ","and scan your drive first."]})})]})}export{U 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.