Meta Description" name="description" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>GOD'S EYE — India</title>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@4.10.0/dist/tf.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/blazeface@0.1.0/dist/blazeface.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.js"></script>
<style>
:root{--bg:#010a14;--border:rgba(0,245,255,0.12);--cyan:#00f5ff;--cyanDim:rgba(0,245,255,0.15);--cyanGlow:rgba(0,245,255,0.07);--amber:#ffb300;--red:#ff2244;--green:#00ff88;--text:#8dd8f0;--dim:#3a6677}
*{box-sizing:border-box;margin:0;padding:0}
body{background:var(--bg);color:var(--text);font-family:'Courier New',monospace;min-height:100vh;overflow-x:hidden}
body::before{content:'';position:fixed;inset:0;pointer-events:none;z-index:999;background:repeating-linear-gradient(0deg,rgba(0,0,0,0.04) 0,rgba(0,0,0,0.04) 1px,transparent 1px,transparent 3px)}
#header{background:linear-gradient(180deg,#070f20,#040c1a);border-bottom:1px solid var(--border);padding:10px 16px;position:sticky;top:0;z-index:100}
#header-title{font-size:20px;font-weight:bold;letter-spacing:8px;color:#fff;text-align:center;text-shadow:0 0 30px var(--cyan),0 0 60px var(--cyanDim)}
#header-sub{font-size:7px;letter-spacing:4px;color:var(--dim);text-align:center;margin:3px 0 8px}
#header-stats{display:flex;justify-content:space-around}
.stat-box{text-align:center}
.stat-label{font-size:6px;color:var(--dim);letter-spacing:2px}
.stat-val{font-size:12px;font-weight:bold;letter-spacing:1px}
#status-bar{display:flex;gap:10px;flex-wrap:wrap;padding:6px 16px;background:#030c18;border-bottom:1px solid var(--border);align-items:center}
.status-item{display:flex;align-items:center;gap:5px;font-size:7px;letter-spacing:1px}
.dot{width:7px;height:7px;border-radius:50%;animation:pulse 1.8s ease-in-out infinite;flex-shrink:0}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:0.4;transform:scale(1.5)}}
#clock{margin-left:auto;font-size:12px;color:var(--cyan);letter-spacing:2px;font-weight:bold}
.section{border-bottom:1px solid var(--border)}
.sec-hdr{padding:8px 16px;background:#030c18;display:flex;justify-content:space-between;align-items:center;font-size:8px;letter-spacing:3px;color:var(--dim)}
.sec-status{font-size:8px;letter-spacing:1px}
#cam-wrapper{position:relative;background:#000;min-height:260px;overflow:hidden}
#cam-video{width:100%;display:none;transform:scaleX(-1)}
#cam-canvas{position:absolute;top:0;left:0;width:100%;height:100%;display:none;transform:scaleX(-1)}
#cam-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:radial-gradient(ellipse at center,#001a2a,#010a14)}
#cam-eye{width:80px;height:80px;border-radius:50%;border:2px solid rgba(0,245,255,0.3);display:flex;align-items:center;justify-content:center;font-size:36px;position:relative;box-shadow:0 0 40px var(--cyanDim)}
#cam-eye::after{content:'';position:absolute;inset:-8px;border-radius:50%;border:1px solid rgba(0,245,255,0.2);animation:spin 4s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
#cam-btn{background:transparent;border:1px solid var(--cyan);color:var(--cyan);padding:12px 28px;cursor:pointer;font-size:11px;font-family:'Courier New',monospace;letter-spacing:3px;box-shadow:0 0 20px var(--cyanDim);-webkit-tap-highlight-color:transparent;touch-action:manipulation}
#cam-rec{position:absolute;top:8px;left:8px;font-size:9px;color:var(--red);letter-spacing:2px;text-shadow:0 0 10px var(--red);display:none;animation:blink 1.2s infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0.3}}
#cam-time{position:absolute;top:8px;right:8px;font-size:8px;color:var(--cyan);background:rgba(0,0,0,0.5);padding:2px 6px;display:none}
.cam-corner{position:absolute;width:16px;height:16px;display:none}
.tl{top:4px;left:4px;border-top:1px solid rgba(0,245,255,0.5);border-left:1px solid rgba(0,245,255,0.5)}
.tr{top:4px;right:4px;border-top:1px solid rgba(0,245,255,0.5);border-right:1px solid rgba(0,245,255,0.5)}
.bl{bottom:4px;left:4px;border-bottom:1px solid rgba(0,245,255,0.5);border-left:1px solid rgba(0,245,255,0.5)}
.br{bottom:4px;right:4px;border-bottom:1px solid rgba(0,245,255,0.5);border-right:1px solid rgba(0,245,255,0.5)}
#face-stats{padding:10px 16px;background:#030c18}
.face-item{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid rgba(255,255,255,0.04);font-size:9px}
#map{height:260px}
#map-controls{padding:10px 16px;background:#030c18}
#gps-btn{width:100%;padding:10px;background:transparent;border:1px solid var(--cyan);color:var(--cyan);font-size:10px;font-family:'Courier New',monospace;letter-spacing:3px;cursor:pointer;margin-bottom:8px;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
#tab-bar{display:flex;border-bottom:1px solid var(--border);background:#030c18}
.tab-btn{flex:1;padding:9px 4px;background:transparent;border:none;border-bottom:2px solid transparent;color:var(--dim);font-size:7px;letter-spacing:2px;cursor:pointer;font-family:'Courier New',monospace;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.tab-btn.active{color:var(--cyan);background:var(--cyanGlow);border-bottom-color:var(--cyan)}
.tab-panel{display:none;padding:12px 16px}
.tab-panel.active{display:block}
.data-row{display:flex;justify-content:space-between;align-items:flex-start;padding:5px 0;border-bottom:1px solid rgba(255,255,255,0.04);gap:8px}
.data-label{font-size:8px;color:var(--dim);letter-spacing:1px;flex-shrink:0}
.data-val{font-size:9px;color:var(--text);text-align:right;word-break:break-all}
.data-section{font-size:7px;color:var(--dim);letter-spacing:2px;margin:10px 0 6px}
.warn-card{margin-top:12px;padding:10px 12px;background:rgba(255,34,68,0.05);border:1px solid rgba(255,34,68,0.2);border-left:3px solid var(--red);font-size:8px;color:var(--dim);line-height:1.8}
.warn-title{color:var(--red);font-size:8px;font-weight:bold;margin-bottom:4px;letter-spacing:1px}
.alert-item{padding:8px 10px;margin-bottom:5px;border:1px solid rgba(0,245,255,0.1);border-radius:2px;font-size:9px;line-height:1.5}
.alert-lvl{font-size:8px;font-weight:bold;letter-spacing:1px;margin-bottom:2px}
.alert-time{font-size:7px;color:var(--dim);margin-top:2px}
.leaflet-container{background:#010a14!important}
.god-tip{background:#010a14!important;border:1px solid rgba(0,245,255,0.3)!important;color:var(--cyan)!important;font-family:monospace;font-size:10px}
#boot-screen{position:fixed;inset:0;background:#000;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:9999;padding:30px}
#boot-title{font-size:24px;font-weight:bold;letter-spacing:8px;color:#fff;margin-bottom:20px;text-shadow:0 0 20px var(--cyan)}
#boot-log{font-size:11px;color:rgba(0,245,255,0.6);line-height:2.2;white-space:pre-wrap;max-width:380px}
@keyframes ripple{0%{transform:scale(1);opacity:1}100%{transform:scale(3);opacity:0}}
</style>
</head>
<body>
<div id="boot-screen">
<div id="boot-title">◉ GOD'S EYE</div>
<div id="boot-log"></div>
</div>
<div id="app" style="display:none">
<div id="header">
<div id="header-title">GOD'S EYE</div>
<div id="header-sub">INDIA SURVEILLANCE DEMO — FREE STACK</div>
<div id="header-stats">
<div class="stat-box"><div class="stat-label">FACES</div><div class="stat-val" id="stat-faces" style="color:var(--dim)">0</div></div>
<div class="stat-box"><div class="stat-label">AI MODEL</div><div class="stat-val" id="stat-model" style="color:var(--amber);font-size:9px">LOADING</div></div>
<div class="stat-box"><div class="stat-label">YOUR IP</div><div class="stat-val" id="stat-ip" style="color:var(--dim);font-size:9px">...</div></div>
<div class="stat-box"><div class="stat-label">GPS</div><div class="stat-val" id="stat-gps" style="color:var(--dim);font-size:9px">OFF</div></div>
</div>
</div>
<div id="status-bar">
<div class="status-item"><div class="dot" id="dot-cam" style="background:var(--dim)"></div><span>CAMERA</span></div>
<div class="status-item"><div class="dot" id="dot-ai" style="background:var(--amber)"></div><span>FACE AI</span></div>
<div class="status-item"><div class="dot" id="dot-ip" style="background:var(--dim)"></div><span>IP</span></div>
<div class="status-item"><div class="dot" id="dot-gps" style="background:var(--dim)"></div><span>GPS</span></div>
<div id="clock"></div>
</div>
<div class="section">
<div class="sec-hdr">◉ CAMERA — REAL AI FACE DETECTION <span class="sec-status" id="cam-status" style="color:var(--dim)">● STANDBY</span></div>
<div id="cam-wrapper">
<video id="cam-video" autoplay playsinline muted></video>
<canvas id="cam-canvas"></canvas>
<div class="cam-corner tl"></div><div class="cam-corner tr"></div>
<div class="cam-corner bl"></div><div class="cam-corner br"></div>
<div id="cam-rec">⬤ REC</div>
<div id="cam-time"></div>
<div id="cam-overlay">
<div id="cam-eye">👁</div>
<div style="text-align:center">
<button id="cam-btn" onclick="startCamera()">▶ ACTIVATE CAMERA</button>
<div id="cam-model-status" style="margin-top:10px;font-size:8px;color:var(--dim);letter-spacing:1px">Loading AI model...</div>
</div>
</div>
</div>
<div id="face-stats">
<div style="font-size:8px;color:var(--dim);letter-spacing:2px">DETECTED FACES</div>
<div id="face-list" style="margin-top:6px;color:var(--dim);font-size:9px">Camera offline</div>
</div>
</div>
<div class="section">
<div class="sec-hdr">◉ LIVE LOCATION MAP <span class="sec-status" id="map-status" style="color:var(--dim)">● LOADING</span></div>
<div id="map"></div>
<div id="map-controls">
<button id="gps-btn" onclick="requestGPS()">📍 REQUEST EXACT GPS LOCATION</button>
<div id="gps-data" style="font-size:9px;color:var(--dim)">Tap button for real GPS coordinates</div>
</div>
</div>
<div class="section">
<div id="tab-bar">
<button class="tab-btn active" onclick="switchTab('ip',this)">IP DATA</button>
<button class="tab-btn" onclick="switchTab('device',this)">DEVICE</button>
<button class="tab-btn" onclick="switchTab('network',this)">NETWORK</button>
<button class="tab-btn" onclick="switchTab('alerts',this)">ALERTS</button>
</div>
<div id="tab-ip" class="tab-panel active">
<div style="font-size:7px;color:var(--dim);letter-spacing:2px;margin-bottom:10px">REAL IP INTEL — ip-api.com (FREE)</div>
<div id="ip-content" style="font-size:9px;color:var(--dim)">Fetching your IP data...</div>
</div>
<div id="tab-device" class="tab-panel">
<div style="font-size:7px;color:var(--dim);letter-spacing:2px;margin-bottom:10px">BROWSER FINGERPRINT — YOUR DEVICE</div>
<div id="device-content"></div>
</div>
<div id="tab-network" class="tab-panel">
<div style="font-size:7px;color:var(--dim);letter-spacing:2px;margin-bottom:10px">NETWORK + GPS DATA</div>
<div id="network-content"></div>
</div>
<div id="tab-alerts" class="tab-panel">
<div style="font-size:7px;color:var(--dim);letter-spacing:2px;margin-bottom:10px">LIVE THREAT FEED</div>
<div id="alert-feed"></div>
</div>
</div>
</div>
<script>
// BOOT
const bootLines=[
"INITIALIZING GOD'S EYE v4.2.0...",
"DEVICE: "+(navigator.userAgent.includes('Mobile')?'MOBILE DETECTED':'DESKTOP DETECTED'),
"NATGRID CONNECTION... [OK]","AADHAAR: 1.38B RECORDS LOADED",
"TELECOM INTERCEPT: JIO/AIRTEL/BSNL [LIVE]","IP INTELLIGENCE... [READY]",
"AI FACE RECOGNITION: LOADING...","CAMERA: STANDBY","GPS MODULE: STANDBY",
"▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%","ACCESS GRANTED. WELCOME, OPERATOR."
];
let bi=0,bt="";
const bl=document.getElementById("boot-log");
const bint=setInterval(()=>{
if(bi<bootLines.length){bt+=bootLines[bi++]+"\n";bl.innerHTML=bt+'<span style="animation:blink 0.7s infinite;display:inline-block">█</span>';}
else{clearInterval(bint);setTimeout(()=>{document.getElementById("boot-screen").style.display="none";document.getElementById("app").style.display="block";},500);}
},240);
// CLOCK
setInterval(()=>{
document.getElementById("clock").textContent=new Date().toLocaleTimeString("en-IN",{hour12:false});
const ct=document.getElementById("cam-time");
if(ct.style.display!=="none") ct.textContent=new Date().toLocaleTimeString();
},1000);
// TABS
function switchTab(id,btn){
document.querySelectorAll(".tab-panel").forEach(p=>p.classList.remove("active"));
document.querySelectorAll(".tab-btn").forEach(b=>b.classList.remove("active"));
document.getElementById("tab-"+id).classList.add("active");
btn.classList.add("active");
}
// DATA ROW
function row(label,val,color){
return`<div class="data-row"><span class="data-label">${label}</span><span class="data-val"${color?` style="color:${color}"`:""} >${val||"N/A"}</span></div>`;
}
// IP FETCH
fetch("https://ip-api.com/json/?fields=status,country,countryCode,region,regionName,city,zip,lat,lon,timezone,offset,isp,org,as,asname,reverse,mobile,proxy,hosting,query")
.then(r=>r.json()).then(d=>{
document.getElementById("stat-ip").textContent=d.query;
document.getElementById("stat-ip").style.color="var(--cyan)";
document.getElementById("dot-ip").style.background="var(--green)";
document.getElementById("ip-content").innerHTML=
row("PUBLIC IP",d.query,"var(--cyan)")+row("ISP",d.isp)+row("ORGANIZATION",d.org)+
row("AS",d.as)+row("REVERSE DNS",d.reverse||"none")+
row("COUNTRY",d.country+" ("+d.countryCode+")")+row("REGION",d.regionName)+
row("CITY",d.city)+row("ZIP",d.zip)+
row("LATITUDE",String(d.lat),"var(--cyan)")+row("LONGITUDE",String(d.lon),"var(--cyan)")+
row("TIMEZONE",d.timezone)+row("UTC OFFSET",(d.offset>=0?"+":"")+d.offset/3600+"h")+
row("MOBILE NETWORK",d.mobile?"YES":"NO",d.mobile?"var(--amber)":"")+
row("PROXY/VPN",d.proxy?"⚠ DETECTED":"CLEAN",d.proxy?"var(--red)":"var(--green)")+
row("DATACENTER",d.hosting?"YES":"NO")+
`<div class="warn-card"><div class="warn-title">⚠ THIS IS YOUR REAL DATA</div>Every line above is real — fetched from your actual IP. No login, no API key needed. This is what any website knows about you instantly.</div>`;
if(window.mapReady) addMarker(d.lat,d.lon,false,d.city);
else window.pendingIP={lat:d.lat,lon:d.lon,city:d.city};
}).catch(()=>{document.getElementById("ip-content").innerHTML='<div style="color:var(--red)">Failed — check internet</div>';});
// DEVICE
const ua=navigator.userAgent;
const os=/Android/.test(ua)?"Android "+((ua.match(/Android ([0-9.]+)/)||[])[1]||""):/iPhone|iPad/.test(ua)?"iOS":/Windows/.test(ua)?"Windows":/Mac/.test(ua)?"macOS":/Linux/.test(ua)?"Linux":"Unknown";
const br=/Edg/.test(ua)?"Edge":/Chrome/.test(ua)?"Chrome "+((ua.match(/Chrome\/([0-9]+)/)||[])[1]||""):/Firefox/.test(ua)?"Firefox":/Safari/.test(ua)?"Safari":"Unknown";
let webgl="N/A";
try{const c=document.createElement("canvas");const g=c.getContext("webgl")||c.getContext("experimental-webgl");if(g)webgl=g.getParameter(g.RENDERER);}catch(e){}
document.getElementById("device-content").innerHTML=
row("OS",os,"var(--cyan)")+row("BROWSER",br)+row("PLATFORM",navigator.platform)+
row("SCREEN",screen.width+"×"+screen.height)+row("VIEWPORT",window.innerWidth+"×"+window.innerHeight)+
row("COLOR DEPTH",screen.colorDepth+"-bit")+row("PIXEL RATIO",window.devicePixelRatio+"x")+
row("CPU CORES",navigator.hardwareConcurrency||"N/A","var(--amber)")+
row("RAM",navigator.deviceMemory?navigator.deviceMemory+" GB":"N/A","var(--amber)")+
row("LANGUAGE",navigator.language)+row("TIMEZONE",Intl.DateTimeFormat().resolvedOptions().timeZone)+
row("TOUCH",navigator.maxTouchPoints>0?"YES ("+navigator.maxTouchPoints+" pts)":"NO")+
row("COOKIES",navigator.cookieEnabled?"ENABLED":"DISABLED")+
row("DO NOT TRACK",navigator.doNotTrack==="1"?"YES — IGNORED":"NOT SET","var(--red)")+
row("GPU",webgl);
if(navigator.getBattery){navigator.getBattery().then(b=>{
document.getElementById("device-content").innerHTML+=
`<div class="data-section">BATTERY</div>`+
row("LEVEL",Math.round(b.level*100)+"%",b.level<0.2?"var(--red)":"var(--green)")+
row("CHARGING",b.charging?"YES ⚡":"NO",b.charging?"var(--green)":"")+
row("TO FULL",b.chargingTime===Infinity?"N/A":Math.round(b.chargingTime/60)+"min")+
row("TO EMPTY",b.dischargingTime===Infinity?"N/A":Math.round(b.dischargingTime/60)+"min");
});}
// NETWORK
const conn=navigator.connection||{};
document.getElementById("network-content").innerHTML=
row("ONLINE",navigator.onLine?"ONLINE":"OFFLINE",navigator.onLine?"var(--green)":"var(--red)")+
row("TYPE",conn.type||"N/A")+row("EFFECTIVE TYPE",conn.effectiveType||"N/A","var(--cyan)")+
row("DOWNLINK",conn.downlink?conn.downlink+" Mbps":"N/A")+
row("RTT",conn.rtt?conn.rtt+"ms":"N/A",conn.rtt>200?"var(--red)":"var(--green)")+
row("SAVE DATA",conn.saveData?"YES":"NO")+
`<div class="data-section">GPS (REAL)</div><div id="gps-tab-data" style="font-size:9px;color:var(--dim)">Tap GPS button on map above</div>`;
// MAP
const map=L.map('map',{zoomControl:false,attributionControl:false}).setView([20.5937,78.9629],5);
L.tileLayer('https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png',{maxZoom:19}).addTo(map);
window.mapReady=true;
document.getElementById("dot-map").style.background="var(--green)";
document.getElementById("map-status").textContent="● ACTIVE";
document.getElementById("map-status").style.color="var(--green)";
if(window.pendingIP) addMarker(window.pendingIP.lat,window.pendingIP.lon,false,window.pendingIP.city);
let mapMarker=null;
function addMarker(lat,lon,isGPS,label){
const col=isGPS?"#ff2244":"#ffb300";
const icon=L.divIcon({
html:`<div style="width:18px;height:18px;border-radius:50%;background:${col};box-shadow:0 0 16px ${col}"></div>`,
className:'',iconSize:[18,18],iconAnchor:[9,9]
});
if(mapMarker) mapMarker.remove();
mapMarker=L.marker([lat,lon],{icon}).addTo(map).bindTooltip((isGPS?"📍 GPS: ":"📡 IP: ")+label,{direction:"top",className:"god-tip"});
map.setView([lat,lon],isGPS?15:11,{animate:true});
if(isGPS&&window.gpsAcc) L.circle([lat,lon],{radius:window.gpsAcc,color:"#ff2244",fillColor:"#ff224411",fillOpacity:1,weight:1,dashArray:"3,4"}).addTo(map);
}
function requestGPS(){
document.getElementById("gps-btn").textContent="⏳ ACQUIRING SIGNAL...";
document.getElementById("stat-gps").textContent="...";
document.getElementById("stat-gps").style.color="var(--amber)";
navigator.geolocation.getCurrentPosition(pos=>{
const lat=pos.coords.latitude,lon=pos.coords.longitude,acc=pos.coords.accuracy;
window.gpsAcc=acc;
document.getElementById("gps-btn").textContent="✓ GPS LOCKED — TAP TO REFRESH";
document.getElementById("dot-gps").style.background="var(--green)";
document.getElementById("stat-gps").textContent="±"+Math.round(acc)+"m";
document.getElementById("stat-gps").style.color="var(--green)";
addMarker(lat,lon,true,lat.toFixed(4)+", "+lon.toFixed(4));
const gpsHTML=row("LATITUDE",lat.toFixed(7),"var(--cyan)")+row("LONGITUDE",lon.toFixed(7),"var(--cyan)")+
row("ACCURACY","±"+Math.round(acc)+"m",acc<50?"var(--green)":"var(--amber)")+
row("ALTITUDE",pos.coords.altitude?pos.coords.altitude.toFixed(1)+"m":"N/A")+
row("SPEED",pos.coords.speed?(pos.coords.speed*3.6).toFixed(1)+" km/h":"STATIONARY")+
row("HEADING",pos.coords.heading?pos.coords.heading.toFixed(1)+"°":"N/A");
document.getElementById("gps-data").innerHTML=gpsHTML;
document.getElementById("gps-tab-data").innerHTML=gpsHTML;
},err=>{
document.getElementById("gps-btn").textContent="✗ DENIED — TAP TO RETRY";
document.getElementById("gps-data").innerHTML=`<span style="color:var(--red)">${err.message}</span>`;
document.getElementById("dot-gps").style.background="var(--red)";
},{enableHighAccuracy:true,timeout:20000,maximumAge:0});
}
// FACE DETECTION
let faceModel=null;
async function loadModel(){
try{
faceModel=await blazeface.load();
document.getElementById("stat-model").textContent="ONLINE";
document.getElementById("stat-model").style.color="var(--green)";
document.getElementById("dot-ai").style.background="var(--green)";
document.getElementById("cam-model-status").textContent="✓ Face AI ready";
document.getElementById("cam-model-status").style.color="var(--green)";
}catch(e){
document.getElementById("stat-model").textContent="FAILED";
document.getElementById("stat-model").style.color="var(--red)";
document.getElementById("cam-model-status").textContent="AI failed — check internet";
}
}
loadModel();
async function startCamera(){
document.getElementById("cam-btn").textContent="ACCESSING...";
try{
const stream=await navigator.mediaDevices.getUserMedia({video:{facingMode:"user",width:{ideal:1280},height:{ideal:720}},audio:false});
const v=document.getElementById("cam-video");
v.srcObject=stream; await v.play();
document.getElementById("cam-overlay").style.display="none";
v.style.display="block";
document.getElementById("cam-canvas").style.display="block";
document.getElementById("cam-rec").style.display="block";
document.getElementById("cam-time").style.display="block";
document.querySelectorAll(".cam-corner").forEach(c=>c.style.display="block");
document.getElementById("cam-status").textContent="● LIVE";
document.getElementById("cam-status").style.color="var(--red)";
document.getElementById("dot-cam").style.background="var(--green)";
document.getElementById("face-list").style.color="var(--text)";
detectLoop();
}catch(e){
document.getElementById("cam-btn").textContent="✗ DENIED — TAP TO RETRY";
document.getElementById("cam-status").textContent="● DENIED";
document.getElementById("cam-status").style.color="var(--dim)";
document.getElementById("cam-overlay").style.display="flex";
document.getElementById("cam-model-status").textContent="⚠ Allow camera permission and reload";
document.getElementById("cam-model-status").style.color="var(--red)";
}
}
async function detectLoop(){
const v=document.getElementById("cam-video");
const canvas=document.getElementById("cam-canvas");
const ctx=canvas.getContext("2d");
canvas.width=v.videoWidth||640; canvas.height=v.videoHeight||480;
ctx.clearRect(0,0,canvas.width,canvas.height);
if(faceModel&&v.readyState>=2){
try{
const preds=await faceModel.estimateFaces(v,false);
canvas.width=v.videoWidth; canvas.height=v.videoHeight;
ctx.clearRect(0,0,canvas.width,canvas.height);
document.getElementById("stat-faces").textContent=preds.length;
document.getElementById("stat-faces").style.color=preds.length>0?"var(--red)":"var(--dim)";
let html=preds.length===0?'<div style="color:var(--dim)">No faces in frame</div>':'';
preds.forEach((p,i)=>{
const [x1,y1]=p.topLeft,[x2,y2]=p.bottomRight;
const w=x2-x1,h=y2-y1,prob=(p.probability[0]*100).toFixed(1);
const col=parseFloat(prob)>=90?"#ff2244":"#ffb300";
const cs=Math.min(w,h)*0.2;
ctx.strokeStyle=col; ctx.lineWidth=3;
[[x1,y1],[x2,y1],[x1,y2],[x2,y2]].forEach(([cx,cy],ci)=>{
const sx=ci%2===0?1:-1,sy=ci<2?1:-1;
ctx.beginPath(); ctx.moveTo(cx,cy+sy*cs); ctx.lineTo(cx,cy); ctx.lineTo(cx+sx*cs,cy); ctx.stroke();
});
ctx.fillStyle=col+"bb"; ctx.fillRect(x1,y1-26,Math.min(w,180),26);
ctx.fillStyle="#fff"; ctx.font="bold 13px monospace";
ctx.fillText("FACE-"+String(i+1).padStart(2,"0")+" "+prob+"%",x1+5,y1-7);
if(p.landmarks){
const lc=["#00f5ff","#00f5ff","#ffb300","#ff6688","#ff6688","#ff6688"];
p.landmarks.forEach(([lx,ly],li)=>{
ctx.beginPath(); ctx.arc(lx,ly,4,0,Math.PI*2);
ctx.fillStyle=lc[li]||"#00f5ff"; ctx.fill();
});
}
const sy2=y1+((Date.now()*0.1)%h);
const sg=ctx.createLinearGradient(x1,sy2,x2,sy2);
sg.addColorStop(0,"transparent"); sg.addColorStop(0.5,col+"55"); sg.addColorStop(1,"transparent");
ctx.fillStyle=sg; ctx.fillRect(x1,sy2-1,w,2);
html+=`<div class="face-item"><span>FACE-${String(i+1).padStart(2,"0")}</span><span style="color:${col}">MATCH ${prob}% · ${Math.round(w)}×${Math.round(h)}px</span></div>`;
});
document.getElementById("face-list").innerHTML=html;
}catch(e){}
}
requestAnimationFrame(detectLoop);
}
// ALERTS
const ALERTS=[
{lvl:"CRITICAL",msg:"Biometric mismatch · IGI T3 · TGT-0231"},
{lvl:"WARN",msg:"Unknown device ping · Marine Drive · CAM-0892"},
{lvl:"CRITICAL",msg:"Face match 98.7% · NH-48 · TGT-0451 ACTIVE"},
{lvl:"INFO",msg:"ANPR complete · 2.1M plates · Chennai"},
{lvl:"WARN",msg:"Social spike +420% · protest · Mumbai"},
{lvl:"INFO",msg:"Telecom sync · 1.38B Aadhaar linked"},
{lvl:"CRITICAL",msg:"Movement anomaly · Kolkata docks · TGT-0451"},
{lvl:"WARN",msg:"IMSI catcher · 3 devices acquired · Delhi"},
];
const lvlCol=l=>l==="CRITICAL"?"var(--red)":l==="WARN"?"var(--amber)":"var(--cyan)";
let ai=0;
function pushAlert(){
const a=ALERTS[ai++%ALERTS.length];
const feed=document.getElementById("alert-feed");
const el=document.createElement("div");
el.className="alert-item";
el.style.borderLeft="3px solid "+lvlCol(a.lvl);
if(a.lvl==="CRITICAL") el.style.background="rgba(255,34,68,0.05)";
el.innerHTML=`<div class="alert-lvl" style="color:${lvlCol(a.lvl)}">${a.lvl}</div><div>${a.msg}</div><div class="alert-time">${new Date().toLocaleTimeString()}</div>`;
feed.insertBefore(el,feed.firstChild);
if(feed.children.length>10) feed.removeChild(feed.lastChild);
}
setInterval(pushAlert,3500);
pushAlert();pushAlert();pushAlert();
</script>
</body>
</html>
7
5
421KB
1613KB
609.0ms
616.0ms
650.0ms