SC CODE: Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("var_header_name", "js4.js")
31 STORE("var_header_description", "")
32 STORE("var_header_icon", "")
33 STORE("dURL", "")
34 STORE("docType", "TELA-JS-1")
35 STORE("subDir", "/")
36 STORE("fileCheckC", "08d2e6ac5301df0e01e341a6de7e9c33219a17c38fcadede3d138ec9488b3150")
37 STORE("fileCheckS", "1367d8c8aac613c75219da1d724115e51622408a051851b5627af0ffd9f0bafc")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
function IdentitySetup({onDone}){
const [mode,setMode]=useState('choose');
const [name,setName]=useState('');
const [nsecInput,setNsecInput]=useState('');
const [nsecError,setNsecError]=useState('');
const [loading,setLoading]=useState(false);
const inputS={width:'100%',background:'rgba(255,255,255,0.05)',border:'1px solid rgba(255,255,255,0.14)',borderRadius:4,padding:'10px 14px',fontFamily:'Syne,sans-serif',fontSize:13,color:'rgba(255,255,255,0.88)',outline:'none',caretColor:UI.orange,boxSizing:'border-box'};
const btnP={width:'100%',padding:'11px 0',background:UI.orange,border:'none',borderRadius:4,fontFamily:'Syne,sans-serif',fontSize:12,fontWeight:700,letterSpacing:'0.12em',textTransform:'uppercase',color:'#000',cursor:'pointer'};
const btnS={width:'100%',padding:'11px 0',background:'rgba(255,255,255,0.05)',border:'1px solid rgba(255,255,255,0.14)',borderRadius:4,fontFamily:'Syne,sans-serif',fontSize:12,fontWeight:700,letterSpacing:'0.12em',textTransform:'uppercase',color:'rgba(255,255,255,0.65)',cursor:'pointer'};
const createNew=async()=>{
setLoading(true);
const kp=await generateKeypair();
const id={...kp,displayName:name.trim()||'Anoniem',loginMethod:'generated'};
storage.set('lt_nostr_identity',JSON.stringify(id));onDone(id);setLoading(false);
};
return h('div',{style:{maxWidth:400,margin:'0 auto',paddingTop:96,paddingBottom:80,paddingLeft:24,paddingRight:24,display:'flex',flexDirection:'column',alignItems:'center'}},
h('div',{style:{width:56,height:56,borderRadius:'50%',border:'1px solid rgba(224,123,57,0.4)',display:'flex',alignItems:'center',justifyContent:'center',marginBottom:24}},h(Icon,{name:'shield',size:24,color:UI.orange})),
mode==='choose'&&h('div',{style:{width:'100%'}},
h('h2',{style:{fontFamily:'Syne,sans-serif',fontSize:22,fontWeight:700,color:'rgba(255,255,255,0.88)',marginBottom:8,textAlign:'center'}},'Identiteit kiezen'),
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:13,color:'rgba(255,255,255,0.40)',lineHeight:1.7,marginBottom:32,textAlign:'center'}},'Geen email. Geen wachtwoord. Volledig anoniem.'),
h('div',{style:{display:'flex',flexDirection:'column',gap:10}},
h('button',{onClick:()=>setMode('new'),style:btnP},'Anonieme identiteit aanmaken'),
h('button',{onClick:()=>setMode('nsec'),style:btnS},'Importeer met nsec sleutel')
)
),
mode==='nsec'&&h('div',{style:{width:'100%'}},
h('button',{onClick:()=>setMode('choose'),style:{background:'none',border:'none',cursor:'pointer',color:'rgba(255,255,255,0.35)',fontFamily:'Syne,sans-serif',fontSize:11,marginBottom:24,display:'flex',alignItems:'center',gap:4}},'<- Terug'),
h('h2',{style:{fontFamily:'Syne,sans-serif',fontSize:20,fontWeight:700,color:'rgba(255,255,255,0.88)',marginBottom:12,textAlign:'center',width:'100%'}},'Importeer nsec sleutel'),
h('div',{style:{width:'100%',padding:'10px 14px',background:'rgba(239,68,68,0.06)',border:'1px solid rgba(239,68,68,0.20)',borderRadius:4,marginBottom:16}},
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:11,color:'rgba(239,68,68,0.70)',margin:0,lineHeight:1.6}},'(!) Voer je privesleutel nooit in op sites die je niet vertrouwt.')
),
h('input',{placeholder:'nsec1... of hex',value:nsecInput,onChange:e=>{setNsecInput(e.target.value);setNsecError('')},type:'password',style:{...inputS,marginBottom:10,fontFamily:'JetBrains Mono,monospace',fontSize:12}}),
h('input',{placeholder:'Naam (optioneel)',value:name,onChange:e=>setName(e.target.value),style:{...inputS,marginBottom:12}}),
nsecError&&h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:11,color:'rgba(239,68,68,0.85)',marginBottom:10}},nsecError),
h('button',{onClick:()=>{},style:btnP},'Importeer en verbind')
),
mode==='new'&&h('div',{style:{width:'100%'}},
h('button',{onClick:()=>setMode('choose'),style:{background:'none',border:'none',cursor:'pointer',color:'rgba(255,255,255,0.35)',fontFamily:'Syne,sans-serif',fontSize:11,marginBottom:24,display:'flex',alignItems:'center',gap:4}},'<- Terug'),
h('h2',{style:{fontFamily:'Syne,sans-serif',fontSize:20,fontWeight:700,color:'rgba(255,255,255,0.88)',marginBottom:8,textAlign:'center',width:'100%'}},'Nieuwe anonieme identiteit'),
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:13,color:'rgba(255,255,255,0.40)',lineHeight:1.7,marginBottom:24,textAlign:'center',width:'100%'}},'Gegenereerd keypair in browser. Geen email. Geen wachtwoord.'),
h('input',{placeholder:'Kies een naam (optioneel)',value:name,onChange:e=>setName(e.target.value),onKeyDown:e=>e.key==='Enter'&&createNew(),style:{...inputS,marginBottom:12}}),
h('button',{onClick:createNew,disabled:loading,style:btnP},loading?'Aanmaken...':'Anonieme identiteit aanmaken')
),
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:10,color:'rgba(255,255,255,0.20)',marginTop:14,textAlign:'center'}},'Geen email. Geen wachtwoord. Geen data bij ons.')
);
}
// -- COMMUNITY OVERLAY --
function CommunityOverlay({globalIdentity}){
const [identity,setIdentity]=useState(null);
const [step,setStep]=useState('loading');
const [msgs,setMsgs]=useState([
{id:'1',content:'Beveiligde verbinding tot stand gebracht.',kind:'system',displayName:'Systeem',pubHex:'system',created_at:Date.now()-600000},
{id:'2',content:'Heeft iemand de banktransacties van Case #921 bekeken?',kind:'message',displayName:'Investigator_88',pubHex:'a3f9',created_at:Date.now()-300000},
{id:'3',content:'Ja, die matchen niet met de getuigenverklaring.',kind:'message',displayName:'OSINT_Fox',pubHex:'b7e2',created_at:Date.now()-120000},
]);
const [input,setInput]=useState('');
const [voted,setVoted]=useState(null);
const endRef=useRef(null);
useEffect(()=>{
if(globalIdentity){setIdentity(globalIdentity);setStep('ready');return;}
const s=storage.get('lt_nostr_identity');
if(s){try{setIdentity(JSON.parse(s));setStep('ready');}catch{setStep('new');}}else setStep('new');
},[globalIdentity]);
useEffect(()=>{endRef.current?.scrollIntoView({behavior:'smooth'})},[msgs]);
const send=useCallback(async()=>{
if(!input.trim()||!identity)return;
const content=input.trim();
setMsgs(m=>[...m,{id:Date.now().toString(),content,kind:'message',displayName:identity.displayName,pubHex:identity.pubHex,created_at:Date.now()}]);
setInput('');
},[input,identity]);
if(step==='loading') return h('div',{style:{display:'flex',alignItems:'center',justifyContent:'center',height:400}},h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:13,color:'rgba(255,255,255,0.35)'}},'Laden...'));
if(step==='new') return h(IdentitySetup,{onDone:id=>{setIdentity(id);setStep('ready')}});
return h('div',{style:{maxWidth:1280,margin:'0 auto',paddingTop:32,paddingBottom:80,paddingLeft:24,paddingRight:24}},
h('div',{style:{marginBottom:40,borderBottom:'1px solid rgba(255,255,255,0.11)',paddingBottom:24,display:'flex',justifyContent:'space-between',alignItems:'flex-end'}},
h('div',null,
h('div',{style:{fontFamily:'Syne,sans-serif',fontSize:28,fontWeight:700,letterSpacing:'0.18em',color:'rgba(255,255,255,0.68)',textTransform:'uppercase'}},'LINKTRACER'),
h('div',{style:{fontFamily:'Syne,sans-serif',fontSize:15,letterSpacing:'0.14em',color:UI.orange,textTransform:'uppercase',marginTop:4}},'Community')
),
identity&&h('div',{style:{display:'flex',alignItems:'center',gap:10,background:'rgba(255,255,255,0.04)',border:'1px solid rgba(255,255,255,0.10)',borderRadius:4,padding:'8px 14px'}},
h('div',{style:{width:8,height:8,borderRadius:'50%',background:'#4ade80',boxShadow:'0 0 6px rgba(74,222,128,0.5)'}}),
h('div',null,
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:12,fontWeight:700,color:'rgba(255,255,255,0.88)',margin:0}},identity.displayName),
h('p',{style:{fontFamily:'JetBrains Mono,monospace',fontSize:10,color:'rgba(255,255,255,0.30)',margin:0}},shortPub(identity.pubHex))
)
)
),
h('div',{style:{display:'grid',gridTemplateColumns:'240px 1fr 240px',gap:24}},
// left sidebar
h('div',{style:{display:'flex',flexDirection:'column',gap:16}},
h('div',{style:{padding:20,borderRadius:16,border:`1px solid ${UI.cardBorder}`,background:UI.cardBg}},
h('h3',{style:{fontSize:10,fontWeight:700,color:'rgba(255,255,255,0.40)',textTransform:'uppercase',letterSpacing:'0.18em',marginBottom:16,fontFamily:'Syne,sans-serif'}},'Meest bekeken'),
['Rob de Wijk','HCSS','Palantir Technologies'].map((item,i)=>h('div',{key:i,style:{display:'flex',justifyContent:'space-between',alignItems:'center',padding:'8px 0',cursor:'pointer'}},
h('span',{style:{fontSize:13,color:'rgba(255,255,255,0.75)',fontFamily:'Syne,sans-serif'}},item),
h(Icon,{name:'chevron-right',size:12,color:'rgba(255,255,255,0.30)'})
))
),
h('div',{style:{padding:20,borderRadius:16,border:'1px solid rgba(224,123,57,0.20)',background:'rgba(224,123,57,0.06)'}},
h('h3',{style:{fontSize:10,fontWeight:700,color:UI.orange,textTransform:'uppercase',letterSpacing:'0.18em',marginBottom:12,fontFamily:'Syne,sans-serif',display:'flex',alignItems:'center',gap:8}},h(Icon,{name:'shield',size:12,color:UI.orange}),' Privacy-garantie'),
h('p',{style:{fontSize:11,lineHeight:1.7,color:'rgba(255,255,255,0.45)',fontFamily:'Syne,sans-serif'}},'Berichten zijn gesigneerd met jouw privesleutel. Niemand kan jouw identiteit achterhalen.')
)
),
// chat
h('div',{style:{borderRadius:16,border:`1px solid ${UI.cardBorder}`,background:UI.cardBg,display:'flex',flexDirection:'column',height:500}},
h('div',{style:{padding:'12px 16px',borderBottom:`1px solid ${UI.cardBorder}`,display:'flex',alignItems:'center',gap:8}},
h('div',{style:{width:8,height:8,borderRadius:'50%',background:'#4ade80',boxShadow:'0 0 6px rgba(74,222,128,0.5)',animation:'pulse-dot 2s infinite'}}),
h('span',{style:{fontSize:12,fontWeight:700,textTransform:'uppercase',letterSpacing:'0.12em',color:'rgba(255,255,255,0.40)',fontFamily:'Syne,sans-serif'}},'Community Chat')
),
h('div',{style:{flex:1,overflowY:'auto',padding:16,display:'flex',flexDirection:'column',gap:12}},
msgs.map(evt=>h('div',{key:evt.id,style:{display:'flex',flexDirection:'column',gap:4,alignItems:evt.pubHex===identity?.pubHex?'flex-end':'flex-start'}},
h('span',{style:{fontSize:10,fontFamily:'Syne,sans-serif',color:'rgba(255,255,255,0.35)',padding:'0 4px'}},evt.kind==='system'?'Systeem':evt.displayName),
h('div',{style:{maxWidth:'80%',padding:'8px 12px',borderRadius:10,background:evt.kind==='system'?'rgba(255,255,255,0.04)':evt.pubHex===identity?.pubHex?'rgba(224,123,57,0.15)':'rgba(255,255,255,0.07)',border:`1px solid ${evt.kind==='system'?'rgba(255,255,255,0.06)':evt.pubHex===identity?.pubHex?'rgba(224,123,57,0.25)':UI.cardBorder}`,fontSize:13,color:'rgba(255,255,255,0.85)',fontFamily:'Syne,sans-serif',lineHeight:1.5}},evt.content)
)),
h('div',{ref:endRef})
),
h('div',{style:{padding:12,borderTop:`1px solid ${UI.cardBorder}`,background:'rgba(0,0,0,0.4)',display:'flex',gap:8}},
h('input',{value:input,onChange:e=>setInput(e.target.value),onKeyDown:e=>e.key==='Enter'&&send(),placeholder:`Stuur als ${identity?.displayName}...`,style:{flex:1,background:'rgba(255,255,255,0.05)',border:`1px solid ${UI.cardBorder}`,borderRadius:8,padding:'8px 12px',fontSize:13,color:'rgba(255,255,255,0.88)',outline:'none',fontFamily:'Syne,sans-serif'}}),
h('button',{onClick:send,disabled:!input.trim(),style:{padding:8,borderRadius:8,background:UI.orange,border:'none',display:'flex',alignItems:'center',cursor:'pointer',opacity:!input.trim()?0.4:1}},h(Icon,{name:'send',size:14,color:'#000'}))
)
),
// right sidebar
h('div',{style:{display:'flex',flexDirection:'column',gap:16}},
h('div',{style:{padding:20,borderRadius:16,border:`1px solid ${UI.cardBorder}`,background:UI.cardBg}},
h('h3',{style:{fontSize:10,fontWeight:700,color:'rgba(255,255,255,0.40)',textTransform:'uppercase',letterSpacing:'0.18em',marginBottom:16,fontFamily:'Syne,sans-serif',display:'flex',alignItems:'center',gap:8}},h(Icon,{name:'award',size:13,color:'rgba(255,255,255,0.40)'}),' Top Onderzoekers'),
[{name:'DeepThroat_2',tp:9420,badge:'?'},{name:'Archive_Rat',tp:8150,badge:'?'},{name:'OSINT_Fox',tp:4980,badge:'?'},{name:'TruthSeeker99',tp:3750,badge:''},{name:'Pattern_Match',tp:2100,badge:''}].map((u,i)=>
h('div',{key:i,style:{display:'flex',alignItems:'center',justifyContent:'space-between',padding:'8px 0',cursor:'pointer'}},
h('div',{style:{display:'flex',alignItems:'center',gap:10}},
h('span',{style:{fontSize:13,width:20,textAlign:'center'}},u.badge||`#${i+1}`),
h('span',{style:{fontSize:13,fontWeight:700,color:'rgba(255,255,255,0.80)',fontFamily:'Syne,sans-serif'}},u.name)
),
h('span',{style:{fontSize:11,fontFamily:'JetBrains Mono,monospace',color:UI.orange}},u.tp.toLocaleString()+' TP')
)
)
),
h('div',{style:{padding:20,borderRadius:16,border:'1px solid rgba(245,158,11,0.25)',background:'linear-gradient(135deg,rgba(224,123,57,0.08),rgba(0,0,0,0.2))',position:'relative',overflow:'hidden'}},
h('h3',{style:{fontSize:10,fontWeight:700,color:UI.orange,textTransform:'uppercase',letterSpacing:'0.18em',marginBottom:12,fontFamily:'Syne,sans-serif'}},'Community Poll'),
h('span',{style:{position:'absolute',top:12,right:12,fontSize:9,padding:'2px 6px',background:'rgba(239,68,68,0.3)',color:'rgba(239,68,68,0.9)',border:'1px solid rgba(239,68,68,0.4)',borderRadius:3,fontFamily:'Syne,sans-serif',fontWeight:700,textTransform:'uppercase'}},'Actief'),
h('p',{className:'serif',style:{fontSize:14,fontWeight:700,color:'rgba(255,255,255,0.88)',marginBottom:16,lineHeight:1.4}},'"Is de getuigenverklaring van getuige X betrouwbaar genoeg?"'),
[{id:1,label:'Ja, het bewijs ondersteunt het.',perc:65},{id:2,label:'Nee, te veel gaten.',perc:35}].map(opt=>
h('button',{key:opt.id,onClick:()=>setVoted(opt.id),disabled:!!voted,style:{width:'100%',position:'relative',height:40,background:'rgba(0,0,0,0.4)',border:`1px solid ${voted===opt.id?UI.orange:UI.cardBorder}`,borderRadius:8,cursor:voted?'default':'pointer',marginBottom:8,overflow:'hidden'}},
voted&&h('div',{style:{position:'absolute',inset:'0 auto 0 0',width:`${opt.perc}%`,background:voted===opt.id?'rgba(224,123,57,0.25)':'rgba(255,255,255,0.06)',transition:'width 1s'}}),
h('div',{style:{position:'absolute',inset:0,display:'flex',alignItems:'center',justifyContent:'space-between',padding:'0 12px'}},
h('span',{style:{fontSize:12,color:'rgba(255,255,255,0.85)',fontFamily:'Syne,sans-serif'}},opt.label),
voted&&h('span',{style:{fontSize:11,fontWeight:700,fontFamily:'JetBrains Mono,monospace',color:UI.orange}},opt.perc+'%')
)
)
),
h('p',{style:{fontSize:10,color:'rgba(255,255,255,0.30)',textAlign:'center',fontFamily:'Syne,sans-serif'}},'Jouw stem is anoniem gesigneerd.')
)
)
)
);
}
// -- HOLOGRAM BANNER --
function HologramBanner(){
const [visible,setVisible]=useState(true);
if(!visible)return null;
return h('div',{style:{position:'fixed',bottom:80,left:16,zIndex:100,background:'rgba(4,13,30,0.95)',border:'1px solid rgba(59,130,246,0.35)',borderRadius:10,padding:'10px 14px',maxWidth:300,backdropFilter:'blur(16px)',display:'flex',alignItems:'flex-start',gap:10}},
h('div',{style:{width:8,height:8,borderRadius:'50%',background:'#3B82F6',boxShadow:'0 0 8px #3B82F6',marginTop:4,flexShrink:0}}),
h('div',null,
h('p',{style:{fontSize:11,fontWeight:700,color:'rgba(59,130,246,0.9)',fontFamily:'Syne,sans-serif',marginBottom:2}},'HOLOGRAM / TELA'),
h('p',{style:{fontSize:10,color:'rgba(255,255,255,0.50)',fontFamily:'Syne,sans-serif',lineHeight:1.5}},HOLOGRAM?'Draait op DERO blockchain. Volledig gedecentraliseerd.':'Demo-modus. Deploy via hologram.derod.org voor volledige DERO-privacy.')
),
h('button',{onClick:()=>setVisible(false),style:{background:'none',border:'none',cursor:'pointer',color:'rgba(255,255,255,0.30)',padding:0,marginLeft:4,flexShrink:0}},h(Icon,{name:'x',size:12}))
);
}
// -- VIDEOS OVERLAY --
function VideosOverlay(){
const vids=[
{title:'Boekenclub #12 -- De Soevereine Mens',type:'Boekenclub',duration:'54:22',date:'8 mrt 2026'},
{title:'Dossier Update: Rob de Wijk & NAVO-connecties',type:'Dossier',duration:'38:44',date:'5 mrt 2026'},
{title:'Boekenclub #11 -- Shoshana Zuboff',type:'Boekenclub',duration:'61:08',date:'1 mrt 2026'},
*/ |
| SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("var_header_name", "js4.js")
31 STORE("var_header_description", "")
32 STORE("var_header_icon", "")
33 STORE("dURL", "")
34 STORE("docType", "TELA-JS-1")
35 STORE("subDir", "/")
36 STORE("fileCheckC", "08d2e6ac5301df0e01e341a6de7e9c33219a17c38fcadede3d138ec9488b3150")
37 STORE("fileCheckS", "1367d8c8aac613c75219da1d724115e51622408a051851b5627af0ffd9f0bafc")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
function IdentitySetup({onDone}){
const [mode,setMode]=useState('choose');
const [name,setName]=useState('');
const [nsecInput,setNsecInput]=useState('');
const [nsecError,setNsecError]=useState('');
const [loading,setLoading]=useState(false);
const inputS={width:'100%',background:'rgba(255,255,255,0.05)',border:'1px solid rgba(255,255,255,0.14)',borderRadius:4,padding:'10px 14px',fontFamily:'Syne,sans-serif',fontSize:13,color:'rgba(255,255,255,0.88)',outline:'none',caretColor:UI.orange,boxSizing:'border-box'};
const btnP={width:'100%',padding:'11px 0',background:UI.orange,border:'none',borderRadius:4,fontFamily:'Syne,sans-serif',fontSize:12,fontWeight:700,letterSpacing:'0.12em',textTransform:'uppercase',color:'#000',cursor:'pointer'};
const btnS={width:'100%',padding:'11px 0',background:'rgba(255,255,255,0.05)',border:'1px solid rgba(255,255,255,0.14)',borderRadius:4,fontFamily:'Syne,sans-serif',fontSize:12,fontWeight:700,letterSpacing:'0.12em',textTransform:'uppercase',color:'rgba(255,255,255,0.65)',cursor:'pointer'};
const createNew=async()=>{
setLoading(true);
const kp=await generateKeypair();
const id={...kp,displayName:name.trim()||'Anoniem',loginMethod:'generated'};
storage.set('lt_nostr_identity',JSON.stringify(id));onDone(id);setLoading(false);
};
return h('div',{style:{maxWidth:400,margin:'0 auto',paddingTop:96,paddingBottom:80,paddingLeft:24,paddingRight:24,display:'flex',flexDirection:'column',alignItems:'center'}},
h('div',{style:{width:56,height:56,borderRadius:'50%',border:'1px solid rgba(224,123,57,0.4)',display:'flex',alignItems:'center',justifyContent:'center',marginBottom:24}},h(Icon,{name:'shield',size:24,color:UI.orange})),
mode==='choose'&&h('div',{style:{width:'100%'}},
h('h2',{style:{fontFamily:'Syne,sans-serif',fontSize:22,fontWeight:700,color:'rgba(255,255,255,0.88)',marginBottom:8,textAlign:'center'}},'Identiteit kiezen'),
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:13,color:'rgba(255,255,255,0.40)',lineHeight:1.7,marginBottom:32,textAlign:'center'}},'Geen email. Geen wachtwoord. Volledig anoniem.'),
h('div',{style:{display:'flex',flexDirection:'column',gap:10}},
h('button',{onClick:()=>setMode('new'),style:btnP},'Anonieme identiteit aanmaken'),
h('button',{onClick:()=>setMode('nsec'),style:btnS},'Importeer met nsec sleutel')
)
),
mode==='nsec'&&h('div',{style:{width:'100%'}},
h('button',{onClick:()=>setMode('choose'),style:{background:'none',border:'none',cursor:'pointer',color:'rgba(255,255,255,0.35)',fontFamily:'Syne,sans-serif',fontSize:11,marginBottom:24,display:'flex',alignItems:'center',gap:4}},'<- Terug'),
h('h2',{style:{fontFamily:'Syne,sans-serif',fontSize:20,fontWeight:700,color:'rgba(255,255,255,0.88)',marginBottom:12,textAlign:'center',width:'100%'}},'Importeer nsec sleutel'),
h('div',{style:{width:'100%',padding:'10px 14px',background:'rgba(239,68,68,0.06)',border:'1px solid rgba(239,68,68,0.20)',borderRadius:4,marginBottom:16}},
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:11,color:'rgba(239,68,68,0.70)',margin:0,lineHeight:1.6}},'(!) Voer je privesleutel nooit in op sites die je niet vertrouwt.')
),
h('input',{placeholder:'nsec1... of hex',value:nsecInput,onChange:e=>{setNsecInput(e.target.value);setNsecError('')},type:'password',style:{...inputS,marginBottom:10,fontFamily:'JetBrains Mono,monospace',fontSize:12}}),
h('input',{placeholder:'Naam (optioneel)',value:name,onChange:e=>setName(e.target.value),style:{...inputS,marginBottom:12}}),
nsecError&&h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:11,color:'rgba(239,68,68,0.85)',marginBottom:10}},nsecError),
h('button',{onClick:()=>{},style:btnP},'Importeer en verbind')
),
mode==='new'&&h('div',{style:{width:'100%'}},
h('button',{onClick:()=>setMode('choose'),style:{background:'none',border:'none',cursor:'pointer',color:'rgba(255,255,255,0.35)',fontFamily:'Syne,sans-serif',fontSize:11,marginBottom:24,display:'flex',alignItems:'center',gap:4}},'<- Terug'),
h('h2',{style:{fontFamily:'Syne,sans-serif',fontSize:20,fontWeight:700,color:'rgba(255,255,255,0.88)',marginBottom:8,textAlign:'center',width:'100%'}},'Nieuwe anonieme identiteit'),
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:13,color:'rgba(255,255,255,0.40)',lineHeight:1.7,marginBottom:24,textAlign:'center',width:'100%'}},'Gegenereerd keypair in browser. Geen email. Geen wachtwoord.'),
h('input',{placeholder:'Kies een naam (optioneel)',value:name,onChange:e=>setName(e.target.value),onKeyDown:e=>e.key==='Enter'&&createNew(),style:{...inputS,marginBottom:12}}),
h('button',{onClick:createNew,disabled:loading,style:btnP},loading?'Aanmaken...':'Anonieme identiteit aanmaken')
),
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:10,color:'rgba(255,255,255,0.20)',marginTop:14,textAlign:'center'}},'Geen email. Geen wachtwoord. Geen data bij ons.')
);
}
// -- COMMUNITY OVERLAY --
function CommunityOverlay({globalIdentity}){
const [identity,setIdentity]=useState(null);
const [step,setStep]=useState('loading');
const [msgs,setMsgs]=useState([
{id:'1',content:'Beveiligde verbinding tot stand gebracht.',kind:'system',displayName:'Systeem',pubHex:'system',created_at:Date.now()-600000},
{id:'2',content:'Heeft iemand de banktransacties van Case #921 bekeken?',kind:'message',displayName:'Investigator_88',pubHex:'a3f9',created_at:Date.now()-300000},
{id:'3',content:'Ja, die matchen niet met de getuigenverklaring.',kind:'message',displayName:'OSINT_Fox',pubHex:'b7e2',created_at:Date.now()-120000},
]);
const [input,setInput]=useState('');
const [voted,setVoted]=useState(null);
const endRef=useRef(null);
useEffect(()=>{
if(globalIdentity){setIdentity(globalIdentity);setStep('ready');return;}
const s=storage.get('lt_nostr_identity');
if(s){try{setIdentity(JSON.parse(s));setStep('ready');}catch{setStep('new');}}else setStep('new');
},[globalIdentity]);
useEffect(()=>{endRef.current?.scrollIntoView({behavior:'smooth'})},[msgs]);
const send=useCallback(async()=>{
if(!input.trim()||!identity)return;
const content=input.trim();
setMsgs(m=>[...m,{id:Date.now().toString(),content,kind:'message',displayName:identity.displayName,pubHex:identity.pubHex,created_at:Date.now()}]);
setInput('');
},[input,identity]);
if(step==='loading') return h('div',{style:{display:'flex',alignItems:'center',justifyContent:'center',height:400}},h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:13,color:'rgba(255,255,255,0.35)'}},'Laden...'));
if(step==='new') return h(IdentitySetup,{onDone:id=>{setIdentity(id);setStep('ready')}});
return h('div',{style:{maxWidth:1280,margin:'0 auto',paddingTop:32,paddingBottom:80,paddingLeft:24,paddingRight:24}},
h('div',{style:{marginBottom:40,borderBottom:'1px solid rgba(255,255,255,0.11)',paddingBottom:24,display:'flex',justifyContent:'space-between',alignItems:'flex-end'}},
h('div',null,
h('div',{style:{fontFamily:'Syne,sans-serif',fontSize:28,fontWeight:700,letterSpacing:'0.18em',color:'rgba(255,255,255,0.68)',textTransform:'uppercase'}},'LINKTRACER'),
h('div',{style:{fontFamily:'Syne,sans-serif',fontSize:15,letterSpacing:'0.14em',color:UI.orange,textTransform:'uppercase',marginTop:4}},'Community')
),
identity&&h('div',{style:{display:'flex',alignItems:'center',gap:10,background:'rgba(255,255,255,0.04)',border:'1px solid rgba(255,255,255,0.10)',borderRadius:4,padding:'8px 14px'}},
h('div',{style:{width:8,height:8,borderRadius:'50%',background:'#4ade80',boxShadow:'0 0 6px rgba(74,222,128,0.5)'}}),
h('div',null,
h('p',{style:{fontFamily:'Syne,sans-serif',fontSize:12,fontWeight:700,color:'rgba(255,255,255,0.88)',margin:0}},identity.displayName),
h('p',{style:{fontFamily:'JetBrains Mono,monospace',fontSize:10,color:'rgba(255,255,255,0.30)',margin:0}},shortPub(identity.pubHex))
)
)
),
h('div',{style:{display:'grid',gridTemplateColumns:'240px 1fr 240px',gap:24}},
// left sidebar
h('div',{style:{display:'flex',flexDirection:'column',gap:16}},
h('div',{style:{padding:20,borderRadius:16,border:`1px solid ${UI.cardBorder}`,background:UI.cardBg}},
h('h3',{style:{fontSize:10,fontWeight:700,color:'rgba(255,255,255,0.40)',textTransform:'uppercase',letterSpacing:'0.18em',marginBottom:16,fontFamily:'Syne,sans-serif'}},'Meest bekeken'),
['Rob de Wijk','HCSS','Palantir Technologies'].map((item,i)=>h('div',{key:i,style:{display:'flex',justifyContent:'space-between',alignItems:'center',padding:'8px 0',cursor:'pointer'}},
h('span',{style:{fontSize:13,color:'rgba(255,255,255,0.75)',fontFamily:'Syne,sans-serif'}},item),
h(Icon,{name:'chevron-right',size:12,color:'rgba(255,255,255,0.30)'})
))
),
h('div',{style:{padding:20,borderRadius:16,border:'1px solid rgba(224,123,57,0.20)',background:'rgba(224,123,57,0.06)'}},
h('h3',{style:{fontSize:10,fontWeight:700,color:UI.orange,textTransform:'uppercase',letterSpacing:'0.18em',marginBottom:12,fontFamily:'Syne,sans-serif',display:'flex',alignItems:'center',gap:8}},h(Icon,{name:'shield',size:12,color:UI.orange}),' Privacy-garantie'),
h('p',{style:{fontSize:11,lineHeight:1.7,color:'rgba(255,255,255,0.45)',fontFamily:'Syne,sans-serif'}},'Berichten zijn gesigneerd met jouw privesleutel. Niemand kan jouw identiteit achterhalen.')
)
),
// chat
h('div',{style:{borderRadius:16,border:`1px solid ${UI.cardBorder}`,background:UI.cardBg,display:'flex',flexDirection:'column',height:500}},
h('div',{style:{padding:'12px 16px',borderBottom:`1px solid ${UI.cardBorder}`,display:'flex',alignItems:'center',gap:8}},
h('div',{style:{width:8,height:8,borderRadius:'50%',background:'#4ade80',boxShadow:'0 0 6px rgba(74,222,128,0.5)',animation:'pulse-dot 2s infinite'}}),
h('span',{style:{fontSize:12,fontWeight:700,textTransform:'uppercase',letterSpacing:'0.12em',color:'rgba(255,255,255,0.40)',fontFamily:'Syne,sans-serif'}},'Community Chat')
),
h('div',{style:{flex:1,overflowY:'auto',padding:16,display:'flex',flexDirection:'column',gap:12}},
msgs.map(evt=>h('div',{key:evt.id,style:{display:'flex',flexDirection:'column',gap:4,alignItems:evt.pubHex===identity?.pubHex?'flex-end':'flex-start'}},
h('span',{style:{fontSize:10,fontFamily:'Syne,sans-serif',color:'rgba(255,255,255,0.35)',padding:'0 4px'}},evt.kind==='system'?'Systeem':evt.displayName),
h('div',{style:{maxWidth:'80%',padding:'8px 12px',borderRadius:10,background:evt.kind==='system'?'rgba(255,255,255,0.04)':evt.pubHex===identity?.pubHex?'rgba(224,123,57,0.15)':'rgba(255,255,255,0.07)',border:`1px solid ${evt.kind==='system'?'rgba(255,255,255,0.06)':evt.pubHex===identity?.pubHex?'rgba(224,123,57,0.25)':UI.cardBorder}`,fontSize:13,color:'rgba(255,255,255,0.85)',fontFamily:'Syne,sans-serif',lineHeight:1.5}},evt.content)
)),
h('div',{ref:endRef})
),
h('div',{style:{padding:12,borderTop:`1px solid ${UI.cardBorder}`,background:'rgba(0,0,0,0.4)',display:'flex',gap:8}},
h('input',{value:input,onChange:e=>setInput(e.target.value),onKeyDown:e=>e.key==='Enter'&&send(),placeholder:`Stuur als ${identity?.displayName}...`,style:{flex:1,background:'rgba(255,255,255,0.05)',border:`1px solid ${UI.cardBorder}`,borderRadius:8,padding:'8px 12px',fontSize:13,color:'rgba(255,255,255,0.88)',outline:'none',fontFamily:'Syne,sans-serif'}}),
h('button',{onClick:send,disabled:!input.trim(),style:{padding:8,borderRadius:8,background:UI.orange,border:'none',display:'flex',alignItems:'center',cursor:'pointer',opacity:!input.trim()?0.4:1}},h(Icon,{name:'send',size:14,color:'#000'}))
)
),
// right sidebar
h('div',{style:{display:'flex',flexDirection:'column',gap:16}},
h('div',{style:{padding:20,borderRadius:16,border:`1px solid ${UI.cardBorder}`,background:UI.cardBg}},
h('h3',{style:{fontSize:10,fontWeight:700,color:'rgba(255,255,255,0.40)',textTransform:'uppercase',letterSpacing:'0.18em',marginBottom:16,fontFamily:'Syne,sans-serif',display:'flex',alignItems:'center',gap:8}},h(Icon,{name:'award',size:13,color:'rgba(255,255,255,0.40)'}),' Top Onderzoekers'),
[{name:'DeepThroat_2',tp:9420,badge:'?'},{name:'Archive_Rat',tp:8150,badge:'?'},{name:'OSINT_Fox',tp:4980,badge:'?'},{name:'TruthSeeker99',tp:3750,badge:''},{name:'Pattern_Match',tp:2100,badge:''}].map((u,i)=>
h('div',{key:i,style:{display:'flex',alignItems:'center',justifyContent:'space-between',padding:'8px 0',cursor:'pointer'}},
h('div',{style:{display:'flex',alignItems:'center',gap:10}},
h('span',{style:{fontSize:13,width:20,textAlign:'center'}},u.badge||`#${i+1}`),
h('span',{style:{fontSize:13,fontWeight:700,color:'rgba(255,255,255,0.80)',fontFamily:'Syne,sans-serif'}},u.name)
),
h('span',{style:{fontSize:11,fontFamily:'JetBrains Mono,monospace',color:UI.orange}},u.tp.toLocaleString()+' TP')
)
)
),
h('div',{style:{padding:20,borderRadius:16,border:'1px solid rgba(245,158,11,0.25)',background:'linear-gradient(135deg,rgba(224,123,57,0.08),rgba(0,0,0,0.2))',position:'relative',overflow:'hidden'}},
h('h3',{style:{fontSize:10,fontWeight:700,color:UI.orange,textTransform:'uppercase',letterSpacing:'0.18em',marginBottom:12,fontFamily:'Syne,sans-serif'}},'Community Poll'),
h('span',{style:{position:'absolute',top:12,right:12,fontSize:9,padding:'2px 6px',background:'rgba(239,68,68,0.3)',color:'rgba(239,68,68,0.9)',border:'1px solid rgba(239,68,68,0.4)',borderRadius:3,fontFamily:'Syne,sans-serif',fontWeight:700,textTransform:'uppercase'}},'Actief'),
h('p',{className:'serif',style:{fontSize:14,fontWeight:700,color:'rgba(255,255,255,0.88)',marginBottom:16,lineHeight:1.4}},'"Is de getuigenverklaring van getuige X betrouwbaar genoeg?"'),
[{id:1,label:'Ja, het bewijs ondersteunt het.',perc:65},{id:2,label:'Nee, te veel gaten.',perc:35}].map(opt=>
h('button',{key:opt.id,onClick:()=>setVoted(opt.id),disabled:!!voted,style:{width:'100%',position:'relative',height:40,background:'rgba(0,0,0,0.4)',border:`1px solid ${voted===opt.id?UI.orange:UI.cardBorder}`,borderRadius:8,cursor:voted?'default':'pointer',marginBottom:8,overflow:'hidden'}},
voted&&h('div',{style:{position:'absolute',inset:'0 auto 0 0',width:`${opt.perc}%`,background:voted===opt.id?'rgba(224,123,57,0.25)':'rgba(255,255,255,0.06)',transition:'width 1s'}}),
h('div',{style:{position:'absolute',inset:0,display:'flex',alignItems:'center',justifyContent:'space-between',padding:'0 12px'}},
h('span',{style:{fontSize:12,color:'rgba(255,255,255,0.85)',fontFamily:'Syne,sans-serif'}},opt.label),
voted&&h('span',{style:{fontSize:11,fontWeight:700,fontFamily:'JetBrains Mono,monospace',color:UI.orange}},opt.perc+'%')
)
)
),
h('p',{style:{fontSize:10,color:'rgba(255,255,255,0.30)',textAlign:'center',fontFamily:'Syne,sans-serif'}},'Jouw stem is anoniem gesigneerd.')
)
)
)
);
}
// -- HOLOGRAM BANNER --
function HologramBanner(){
const [visible,setVisible]=useState(true);
if(!visible)return null;
return h('div',{style:{position:'fixed',bottom:80,left:16,zIndex:100,background:'rgba(4,13,30,0.95)',border:'1px solid rgba(59,130,246,0.35)',borderRadius:10,padding:'10px 14px',maxWidth:300,backdropFilter:'blur(16px)',display:'flex',alignItems:'flex-start',gap:10}},
h('div',{style:{width:8,height:8,borderRadius:'50%',background:'#3B82F6',boxShadow:'0 0 8px #3B82F6',marginTop:4,flexShrink:0}}),
h('div',null,
h('p',{style:{fontSize:11,fontWeight:700,color:'rgba(59,130,246,0.9)',fontFamily:'Syne,sans-serif',marginBottom:2}},'HOLOGRAM / TELA'),
h('p',{style:{fontSize:10,color:'rgba(255,255,255,0.50)',fontFamily:'Syne,sans-serif',lineHeight:1.5}},HOLOGRAM?'Draait op DERO blockchain. Volledig gedecentraliseerd.':'Demo-modus. Deploy via hologram.derod.org voor volledige DERO-privacy.')
),
h('button',{onClick:()=>setVisible(false),style:{background:'none',border:'none',cursor:'pointer',color:'rgba(255,255,255,0.30)',padding:0,marginLeft:4,flexShrink:0}},h(Icon,{name:'x',size:12}))
);
}
// -- VIDEOS OVERLAY --
function VideosOverlay(){
const vids=[
{title:'Boekenclub #12 -- De Soevereine Mens',type:'Boekenclub',duration:'54:22',date:'8 mrt 2026'},
{title:'Dossier Update: Rob de Wijk & NAVO-connecties',type:'Dossier',duration:'38:44',date:'5 mrt 2026'},
{title:'Boekenclub #11 -- Shoshana Zuboff',type:'Boekenclub',duration:'61:08',date:'1 mrt 2026'},
*/'] |