PageSourceSearch

https://sendunlimitedemail.com/sue/mod-2sZuscWs.js

js sendunlimitedemail.com collected 2026-10-05 06:23:57 UTC 5,617 bytes, 1 lines download raw bytes

1import{r as i,j as e,e as p,t as c,L as u,C as f}from"./edge-BOITG1XR.js";import{K as h}from"./mod-BBgDTOoh.js";import{R as g}from"./mod-RPxq32x0.js";import{M as y}from"./mod-BeUkR8P5.js";import{C as j}from"./mod-E2spV6fa.js";import{S as v}from"./mod-BhJ1UrQN.js";const N=t=>t?new Date(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"}):"Never",b=({license:t})=>t.is_active?t.status==="suspended"?e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-orange-100 text-orange-700",children:"Suspended"}):t.status==="revoked"?e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-700",children:"Revoked"}):t.is_expired?e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-600",children:"Expired"}):t.license_type==="lifetime"?e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-violet-100 text-violet-700",children:"Lifetime"}):e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-emerald-100 text-emerald-700",children:"Active"}):e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-slate-100 text-slate-500",children:"Inactive"});function E(){const[t,l]=i.useState([]),[n,a]=i.useState(!0),r=async()=>{a(!0);try{const s=await p.get("/customer/licenses");l(s.data?.data??s.data??[])}catch{c.error("Failed to load licenses")}finally{a(!1)}};return i.useEffect(()=>{r()},[]),n?e.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:e.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-violet-500"})}):t.length===0?e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-20 text-center",children:[e.jsx(h,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"No Licenses Yet"}),e.jsx("p",{className:"text-gray-500",children:"Purchase a software product to see your license keys here."})]}):e.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"My Licenses"}),e.jsx("button",{onClick:r,className:"text-slate-400 hover:text-slate-600 p-1.5 rounded-lg hover:bg-slate-100",children:e.jsx(g,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"space-y-3",children:t.map(s=>e.jsx(_,{license:s},s.id))})]})}function _({license:t}){const[l,n]=i.useState(!1),[a,r]=i.useState(!1),s=t.license_key?t.license_key.slice(0,4)+"-****-****-"+t.license_key.slice(-4):"????-????-????-????",d=()=>{navigator.clipboard.writeText(t.license_key),r(!0),c.success("License key copied!"),setTimeout(()=>r(!1),2e3)},o=t.active_activations_count??t.activations_count??0,x=t.activation_limit??t.license_product?.max_activations_default??"—";return e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[t.product?.image_url&&e.jsx("img",{src:t.product.image_url,alt:t.license_product?.name??"",className:"w-11 h-11 rounded-lg object-cover shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-gray-900",children:t.license_product?.name??"Software License"}),e.jsxs("p",{className:"text-xs text-gray-400 mt-0.5 capitalize",children:[t.license_type," · ",t.platform??"Any platform"]})]})]}),e.jsx(b,{license:t})]}),e.jsxs("div",{className:"flex items-center gap-2 bg-gray-50 rounded-lg px-3 py-2.5 font-mono text-sm mb-4",children:[e.jsx("span",{className:"flex-1 truncate text-gray-800 select-all",children:l?t.license_key:s}),e.jsx("button",{onClick:()=>n(m=>!m),className:"text-xs text-gray-400 hover:text-gray-600 px-1.5 whitespace-nowrap",children:l?"Hide":"Reveal"}),e.jsx("button",{onClick:d,className:`text-xs font-medium px-3 py-1 rounded-md transition-colors ${a?"bg-green-100 text-green-700":"bg-violet-100 text-violet-700 hover:bg-violet-200"}`,children:a?"Copied!":"Copy"})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 text-center text-sm mb-4",children:[e.jsxs("div",{className:"bg-gray-50 rounded-lg py-2.5",children:[e.jsxs("p",{className:"font-semibold text-gray-800",children:[o," / ",x]}),e.jsxs("p",{className:"text-xs text-gray-500 flex items-center justify-center gap-1 mt-0.5",children:[e.jsx(y,{className:"w-3 h-3"}),"Devices"]})]}),e.jsxs("div",{className:"bg-gray-50 rounded-lg py-2.5",children:[e.jsx("p",{className:"font-semibold text-gray-800 capitalize",children:t.license_type}),e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"Type"})]}),e.jsxs("div",{className:"bg-gray-50 rounded-lg py-2.5",children:[e.jsx("p",{className:"font-semibold text-gray-800",children:t.license_type==="lifetime"?"∞":N(t.expires_at)}),e.jsxs("p",{className:"text-xs text-gray-500 flex items-center justify-center gap-1 mt-0.5",children:[e.jsx(j,{className:"w-3 h-3"}),"Expires"]})]})]}),t.is_suspected&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-amber-700 bg-amber-50 rounded-lg px-3 py-2 mb-3",children:[e.jsx(v,{className:"w-3.5 h-3.5 shrink-0"}
1),"Suspicious activity detected on this license. Contact support if this is unexpected."]}),e.jsxs(u,{to:`/licenses/${t.id}`,className:"flex items-center justify-between text-sm text-violet-600 hover:text-violet-700 font-medium px-1",children:[t.license_type==="lifetime"?"Manage devices · Transfer to new PC":"Manage devices & details",e.jsx(f,{className:"w-4 h-4"})]})]})}export{E 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.