1import{j as e,H as p}from"./app-DP13319Q.js";import{M as l}from"./index-WruS1vxz.js";import{F as c,f as h,aE as w}from"./index-CtyZ6W6U.js";/* empty css */function _({frame:t}){var i;const n=t.image_url&&t.image_url.toLowerCase().endsWith(".pdf"),d=t.image_url&&!n&&[".jpg",".jpeg",".png",".gif",".webp",".svg"].some(o=>t.image_url.toLowerCase().endsWith(o)),u=o=>{if(!o)return"";const x=new Date(o),s=Math.floor((new Date-x)/1e3);return s<60?"just now":s<3600?`${Math.floor(s/60)}m ago`:s<86400?`${Math.floor(s/3600)}h ago`:`${Math.floor(s/86400)}d ago`},a=(t==null?void 0:t.id)||"Unknown",r=(t==null?void 0:t.caption)||"Frame";return t!=null&&t.unique_id,t!=null&&t.created_at&&new Date(t.created_at).toLocaleString(),t!=null&&t.emoji_marker,t!=null&&t.approve,t!=null&&t.updated_at&&new Date(t.updated_at).toLocaleString(),e.jsxs(e.Fragment,{children:[e.jsxs(p,{children:[e.jsx("title",{children:`Preview Frame - ${a}`}),e.jsx("meta",{name:"description",content:`Preview of frame content: ${r}`})]}),e.jsx("div",{className:"min-h-screen py-8",children:e.jsx("div",{className:"flex justify-center",children:e.jsxs("div",{className:"w-full",children:[(t==null?void 0:t.pinned)===1&&e.jsx("div",{className:"absolute top-2 left-2 z-50","data-tooltip-id":"content-tooltip","data-tooltip-content":"Pinned Content",children:"ð"}),e.jsx("div",{className:"absolute top-2 right-2 z-50 cursor-pointer hidden touch-manipulation","data-tooltip-id":"content-tooltip","data-tooltip-content":"View content details",children:"ðï¸"}),(t==null?void 0:t.user)&&(t==null?void 0:t.created_at)&&(t==null?void 0:t.post_type)==="visitor"&&e.jsxs("div",{className:"flex items-start space-x-3 mb-4 w-full max-w-full touch-manipulation",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-teal-400 to-blue-500 rounded-full blur-sm opacity-60"}),e.jsx("img",{className:"relative w-8 h-8 rounded-full object-cover border border-gray-600 shadow-sm",src:t.user.profile_photo_url||`https://ui-avatars.com/api/?name=${encodeURIComponent(t.user.name||t.user.email||"User")}&color=FFFFFF&background=0D9488&bold=true`,alt:t.user.email||"User Avatar"})]}),e.jsxs("div",{className:"flex flex-col flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"font-medium text-white text-sm truncate",children:t.user.email?e.jsxs(e.Fragment,{children:[t.user.email.substring(0,2),"*".repeat(3),"@","*".repeat(3),(i=t.user.email.split("@")[1])==null?void 0:i.substring(t.user.email.split("@")[1].length-3)]}):"Anonymous User"}),t.user.is_verified&&e.jsxs("div",{className:"flex items-center space-x-1 px-1.5 py-0.5 bg-blue-500/20 rounded-full border border-blue-500/30",children:[e.jsx(c,{icon:h,className:"w-2.5 h-2.5 text-blue-400","aria-label":"Verified account"}),e.jsx("span",{className:"text-xs text-blue-300 font-medium",children:"Verified"})]})]}),e.jsx("div",{className:"flex items-center space-x-1 text-xs",children:e.jsxs("div",{className:"flex items-center space-x-1 text-gray-400 bg-gray-800/30 px-2 py-1 rounded-full",children:[e.jsx(c,{icon:w,className:"w-2.5 h-2.5 text-teal-400"}),e.jsx("span",{className:"text-gray-300 font-medium",children:u(t.created_at)})]})})]})]}),(t==null?void 0:t.caption)&&e.jsx(l,{source:t.caption,"data-color-mode":"dark",className:"w-full touch-manipulation overflow-hidden text-white mb-4"}),(t==null?void 0:t.reference)&&e.jsx(l,{source:t.reference,"data-color-mode":"dark",className:"w-full touch-manipulation overflow-hidden text-white mb-4"}),(t==null?void 0:t.url)&&e.jsx(l,{source:t.url,"data-color-mode":"dark",className:"w-full touch-manipulation overflow-hidden text-white mb-4",style:{background:"transparent"}}),n&&e.jsx("div",{className:"w-full h-full min-h-[400px]",children:e.jsx("iframe",{src:`/${t.image_url}`,className:"w-full h-full rounded-lg",frameBorder:"0",title:"PDF Preview",children:e.jsxs("p",{children:["Your browser does not support PDFs.",e.jsx("a",{href:`/${t.image_url}`,target:"_blank",rel:"noopener noreferrer",children:"Download the PDF"}),"."]})})}),d&&e.jsx(l,{source:`<img src="/${t.image_url}" style="width: 100%; border-radius: 0.5rem;" alt="Content Image" />`,"data-color-mode":"dark",className:"w-full touch-manipulation overflow-hidden"}),(t==null?void 0:t.link_url)&&e.jsx(l,{source:`[${t.link_url}](${t.link_url})`,"data-color-mode":"dark",className:"w-full touch-manipulation overflow-hidden text-lime-300"}),!(t!=null&&t.caption)&&!(t!=null&&t.reference)&&!(t!=null&&t.url)&&!(t!=null&&t.image_url)&&!(t!=null&&t.link_url)&&e.jsx("div",{className:"text-center text-gray-400 py-8",children:e.jsx("p",{children:"No content available in this frame."})})]})})})]})}export{_ 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.