-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-BAbfAGEA.js
More file actions
1 lines (1 loc) · 8.31 KB
/
Copy pathchunk-BAbfAGEA.js
File metadata and controls
1 lines (1 loc) · 8.31 KB
1
import{h as z,n as D,r as o,j as e,o as M,x as L,y as $,m as A,L as N,t as C}from"../entries/pages.BZkyDMuN.js";import{t as F}from"./chunk-BV5gZXWk.js";import{e as O}from"./chunk-xkf-bONq.js";import{e as P}from"./chunk-Cq-cMZ7G.js";import{e as B}from"./chunk-CC14kyiO.js";import{S as Z}from"./chunk-CBT6qAS5.js";import{S as K}from"./chunk-BVXW0dSo.js";import{S as Y}from"./chunk-D8YfSULr.js";import{u as G,e as V}from"./chunk-c2x3GJcM.js";import{M as H}from"./chunk-Dy64sI8m.js";import{r as U}from"./chunk-DHHx9tvU.js";import"./chunk-BXl3LOEh.js";/* empty css *//* empty css */import"./chunk-DZ3G3RW6.js";const v=["sm","md","lg"],h=({label:c,value:d,accent:m,children:x})=>e.jsxs("div",{className:"bg-[var(--snf-panel)] px-4 py-3",children:[e.jsx("div",{className:"snf-mono text-[9px] tracking-[0.22em] snf-dim mb-1",children:c}),x||e.jsx("div",{className:`snf-mono text-xs md:text-sm truncate ${m?"text-[var(--snf-phos)]":"text-[var(--snf-ink)]"}`,children:d})]}),ce=()=>{const{bookId:c,episodeId:d}=z(),{language:m,setBreadcrumbs:x,settings:i,setSetting:y,prefersReducedMotion:g,scrollRef:E}=D(),{data:k}=G(m),n=o.useMemo(()=>(k||[]).find(s=>Number(s.bookId)===Number(c)),[k,c]),l=o.useMemo(()=>n?n.episodes.findIndex(s=>Number(s.id)===Number(d)):-1,[n,d]),t=l>=0?n.episodes[l]:null,u=l>0?n.episodes[l-1]:null,b=n&&l>=0&&l<n.episodes.length-1?n.episodes[l+1]:null,{text:S,loading:I}=V(t?.filename),a=m==="tr";o.useEffect(()=>{x([{label:"ARCHIVE",path:"/snf/archive"},n?{label:n.bookTitle,path:`/snf/archive/${n.bookId}`}:null,t?{label:t.title}:null].filter(Boolean))},[x,n,t]);const[p,j]=o.useState(!0);o.useEffect(()=>{if(!i.decrypt||g){j(!1);return}j(!0);const s=setTimeout(()=>j(!1),650);return()=>clearTimeout(s)},[t?.filename,i.decrypt,g]);const[R,T]=o.useState(0);o.useEffect(()=>{const s=E.current;if(!s)return;const r=()=>{const f=s.scrollHeight-s.clientHeight;T(f>4?Math.min(100,s.scrollTop/f*100):0)};return r(),s.addEventListener("scroll",r,{passive:!0}),()=>s.removeEventListener("scroll",r)},[E,t?.filename,S,p,i.readingFont,i.textSize]);const w=s=>{const r=v.indexOf(i.textSize),f=Math.min(v.length-1,Math.max(0,r+s));y("textSize",v[f])};return e.jsxs(Z,{children:[e.jsx(Y,{title:`${t?.title||"Dossier"} | Serfs and Frauds Terminal`,description:`Decrypted field report: ${t?.title||""} from From Serfs and Frauds.`,keywords:["serfs and frauds","dossier",t?.title]}),!t&&e.jsx("div",{className:"snf-mono text-sm snf-dim animate-pulse",children:"locating dossier…"}),t&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sticky top-0 z-30 -mx-4 md:-mx-8 px-4 md:px-8 py-2 bg-[var(--snf-bg)]/95 backdrop-blur-sm",children:[e.jsxs("div",{className:"flex items-center justify-between snf-mono text-[9px] tracking-[0.22em] snf-dim mb-1.5",children:[e.jsx("span",{className:"snf-phos-text",children:a?"ŞİFRE ÇÖZÜMÜ":"DECRYPTION"}),e.jsxs("span",{children:[Math.round(R),"%"]})]}),e.jsx("div",{className:"snf-progress-track",children:e.jsx("div",{className:"snf-progress-fill",style:{width:`${R}%`}})})]}),e.jsxs("article",{className:"max-w-4xl mx-auto pt-6",children:[e.jsxs("header",{className:"mb-6",children:[e.jsxs("div",{className:"snf-vt snf-phos-text text-base md:text-lg mb-3 flex items-center gap-3",children:[e.jsx(B,{size:16,weight:"bold"}),"DOSSIER ",String(n.bookId).padStart(2,"0"),".",String(t.id).padStart(2,"0"),e.jsx("span",{className:"snf-divider flex-grow"}),e.jsx("span",{className:"snf-dim",children:t.date})]}),e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsx("h1",{className:"snf-display snf-glow snf-aberrate text-3xl md:text-5xl lg:text-6xl font-bold uppercase leading-[0.95] text-[var(--snf-phos)]",children:e.jsx(K,{text:t.title,speedMs:20})}),e.jsx("span",{className:"snf-stamp text-[10px] md:text-xs mt-2 hidden sm:block flex-none",children:a?"GİZLİ":"CLASSIFIED"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-px bg-[var(--snf-line)] border border-[var(--snf-line)] mb-6",children:[e.jsx(h,{label:a?"KÂTİP":"SCRIBE",value:t.author,accent:!0}),e.jsx(h,{label:a?"DOSYALANDI":"FILED",value:t.date}),e.jsx(h,{label:a?"REVİZE":"REVISED",value:t.updated||"—"}),e.jsx(h,{label:a?"YETKİ":"CLEARANCE",children:e.jsxs("div",{className:"snf-mono text-xs md:text-sm text-[var(--snf-phos)] flex items-center gap-1.5",children:[e.jsx(M,{size:14,weight:"fill"})," LVL 20"]})})]}),e.jsxs("div",{className:"snf-panel flex flex-wrap items-center gap-x-5 gap-y-2 px-4 py-2.5 mb-6",children:[e.jsxs("span",{className:"snf-mono text-[10px] tracking-[0.2em] snf-dim flex items-center gap-2",children:[e.jsx(L,{size:15,weight:"bold"})," RENDER"]}),e.jsx("div",{className:"flex items-center gap-1",children:[["terminal",a?"TERMİNAL":"TERMINAL"],["document",a?"BELGE":"DOCUMENT"]].map(([s,r])=>e.jsx("button",{type:"button",onClick:()=>y("readingFont",s),className:`snf-mono text-[10px] uppercase tracking-[0.15em] px-2.5 py-1 border transition-colors ${i.readingFont===s?"border-[rgba(var(--snf-phos-rgb),0.6)] text-[var(--snf-phos)] bg-[rgba(var(--snf-phos-rgb),0.08)]":"border-transparent snf-dim hover:text-[var(--snf-phos)]"}`,children:r},s))}),e.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[e.jsx("span",{className:"snf-mono text-[10px] tracking-[0.2em] snf-dim",children:"SIZE"}),e.jsx("button",{type:"button",onClick:()=>w(-1),className:"snf-btn !px-2 !py-1","aria-label":"decrease text size",children:e.jsx(P,{size:12,weight:"bold"})}),e.jsx("span",{className:"snf-mono text-[11px] snf-phos-text w-6 text-center uppercase",children:i.textSize}),e.jsx("button",{type:"button",onClick:()=>w(1),className:"snf-btn !px-2 !py-1","aria-label":"increase text size",children:e.jsx($,{size:12,weight:"bold"})})]})]}),e.jsxs("div",{className:"snf-printout px-8 sm:px-12 md:px-16 py-8 md:py-10",children:[e.jsxs("div",{className:"snf-mono text-[10px] tracking-[0.25em] snf-dim mb-6 flex items-center gap-2",children:[e.jsx("span",{className:"snf-rec"}),p?a?"ŞİFRE ÇÖZÜLÜYOR…":"INTERCEPT DECRYPTING…":a?"AKTARIM BAŞLIYOR":"INTERCEPT BEGINS"]}),I||p?e.jsx("div",{className:"space-y-3 pl-2",children:[...Array(7)].map((s,r)=>e.jsx("div",{className:"h-3 snf-redact rounded-sm",style:{width:`${55+r*41%42}%`}},r))}):e.jsx(A.div,{initial:g?!1:{opacity:0},animate:{opacity:1},transition:{duration:.5},className:"snf-reading snf-printout-body pl-2 md:pl-6","data-font":i.readingFont,"data-size":i.textSize,children:e.jsx(H,{rehypePlugins:[U],children:S})}),!I&&!p&&e.jsxs("div",{className:"mt-12 pt-6 border-t border-dashed border-[var(--snf-line)] flex items-end justify-between gap-4",children:[e.jsxs("span",{className:"snf-mono text-[9px] uppercase tracking-[0.35em] snf-dim",children:["▸ ",a?"AKTARIM SONU":"END OF TRANSMISSION"]}),e.jsxs("span",{className:"text-right",children:[e.jsx("span",{className:"block snf-display italic text-lg text-[var(--snf-phos)] snf-glow-soft",children:t.author}),e.jsx("span",{className:"block snf-mono text-[8px] uppercase tracking-[0.3em] snf-dim mt-0.5",children:"verified_seal"})]})]})]}),e.jsxs("nav",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 mt-8",children:[e.jsx("div",{children:u&&e.jsxs(N,{to:`/snf/archive/${n.bookId}/${u.id}`,className:"snf-row group flex items-center gap-3 px-4 py-3.5 h-full",children:[e.jsx(F,{size:18,weight:"bold",className:"snf-phos-text flex-none group-hover:-translate-x-1 transition-transform"}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block snf-mono text-[9px] tracking-[0.2em] snf-dim",children:a?"ÖNCEKİ":"PRIOR"}),e.jsx("span",{className:"block snf-mono text-xs text-[var(--snf-ink)] truncate",children:u.title})]})]})}),e.jsxs(N,{to:`/snf/archive/${n.bookId}`,className:"snf-row flex items-center justify-center gap-2 px-4 py-3.5 snf-mono text-[10px] uppercase tracking-[0.3em] text-[var(--snf-phos)]",children:[e.jsx(C,{size:16,weight:"bold"}),a?"DİZİN":"INDEX"]}),e.jsx("div",{children:b&&e.jsxs(N,{to:`/snf/archive/${n.bookId}/${b.id}`,className:"snf-row group flex items-center justify-end gap-3 px-4 py-3.5 h-full text-right",children:[e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block snf-mono text-[9px] tracking-[0.2em] snf-dim",children:a?"SONRAKİ":"NEXT"}),e.jsx("span",{className:"block snf-mono text-xs text-[var(--snf-ink)] truncate",children:b.title})]}),e.jsx(O,{size:18,weight:"bold",className:"snf-phos-text flex-none group-hover:translate-x-1 transition-transform"})]})})]})]})]})]})};export{ce as default};