const DATA = [ { "name": "أمل احمد محمد مجرشي", "url": "https://stat2025-map.static.hf.space/TG/01.html" }, { "name": "غيداء يحي بن دحباش سودي", "url": "https://stat2025-map.static.hf.space/TG/02.html" }, { "name": "فهد عبد الخالق الغامدي", "url": "https://stat2025-map.static.hf.space/TG/03.html" }, { "name": "محمد ماجد بن محمد القصاب", "url": "https://stat2025-map.static.hf.space/TG/04.html" }, { "name": "العنود محمد عبدالله التميمي", "url": "https://stat2025-map.static.hf.space/TG/05.html" }, { "name": "مرتضى محمد عبدالله السيهاتي", "url": "https://stat2025-map.static.hf.space/TG/06.html" }, { "name": "ساره عيسى بن عباس المطوع", "url": "https://stat2025-map.static.hf.space/TG/07.html" }, { "name": "أمل احمد مبارك الحمادي", "url": "https://stat2025-map.static.hf.space/TG/08.html" }, { "name": "ديما علي هادي حكمي", "url": "https://stat2025-map.static.hf.space/TG/09.html" }, { "name": "خديجة حسين هنبوبه", "url": "https://stat2025-map.static.hf.space/TG/10.html" }, { "name": "ميعاد سند محمد الهاجري", "url": "https://stat2025-map.static.hf.space/TG/11.html" }, { "name": "عمران فخري عمران الشرفا", "url": "https://stat2025-map.static.hf.space/TG/12.html" }, { "name": "علي إبراهيم محمد الغامدي", "url": "https://stat2025-map.static.hf.space/TG/13.html" }, { "name": "ريم مساعد عثمان السبت", "url": "https://stat2025-map.static.hf.space/TG/14.html" }, { "name": "شيماء نجم بن عبدالله الرويشد", "url": "https://stat2025-map.static.hf.space/TG/15.html" }, { "name": "مروة سلمان بن سلمان العاشور", "url": "https://stat2025-map.static.hf.space/TG/16.html" }, { "name": "منال احمد القحطاني", "url": "https://stat2025-map.static.hf.space/TG/17.html" }, { "name": "ريم جعفر ال مسعود القحطاني", "url": "https://stat2025-map.static.hf.space/TG/18.html" }, { "name": "جمانة محمد بن علي ال دغرير", "url": "https://stat2025-map.static.hf.space/TG/19.html" }, { "name": "روابي محمد حمد الزبيران", "url": "https://stat2025-map.static.hf.space/TG/20.html" }, { "name": "أحمد جابر بن احمد الشهري", "url": "https://stat2025-map.static.hf.space/TG/21.html" }, { "name": "علي عيسى بن سعيد الهاشم", "url": "https://stat2025-map.static.hf.space/TG/22.html" }, { "name": "سكينة حسين علي ال خلف", "url": "https://stat2025-map.static.hf.space/TG/23.html" }, { "name": "إيناس ناصر الشريف", "url": "https://stat2025-map.static.hf.space/TG/24.html" }, { "name": "محاسن سلطان عبدالله الأحمد", "url": "https://stat2025-map.static.hf.space/TG/25.html" }, { "name": "حصه جاسم بن احمد القرناس", "url": "https://stat2025-map.static.hf.space/TG/26.html" }, { "name": "نوت فواز حميد الشمري", "url": "https://stat2025-map.static.hf.space/TG/27.html" }, { "name": "عبد الملك عبدالرحمن محمد العصيل", "url": "https://stat2025-map.static.hf.space/TG/28.html" }, { "name": "بدر عبدالعزيز بن عبدالرحمن العبدالعظيم", "url": "https://stat2025-map.static.hf.space/TG/29.html" }, { "name": "ناهد عبداللطيف محمد الخوفي", "url": "https://stat2025-map.static.hf.space/TG/30.html" }, { "name": "اشواق فيحان شوردي المطيري", "url": "https://stat2025-map.static.hf.space/TG/31.html" }, { "name": "عوض عبدالله رديني المطيري", "url": "https://stat2025-map.static.hf.space/TG/32.html" } ]; function normalizeArabic(s) { if (!s) return ""; return String(s) .trim() .toLowerCase() .replace(/[\u064B-\u065F\u0670\u06D6-\u06ED]/g, "") .replace(/\u0640/g, "") .replace(/[إأآٱ]/g, "ا") .replace(/ى/g, "ي") .replace(/ة/g, "ه") .replace(/^ال\s+/g, "") .replace(/\s+/g, " "); } function escapeHtml(str) { return String(str) .replaceAll("&", "&") .replaceAll("<", "<") .replaceAll(">", ">") .replaceAll('"', """) .replaceAll("'", "'"); } function highlightMatch(name, rawQuery) { if (!rawQuery) return escapeHtml(name); const tokens = rawQuery.trim().split(/\s+/).filter(Boolean); if (!tokens.length) return escapeHtml(name); const t = tokens[0]; const idx = name.indexOf(t); if (idx === -1) return escapeHtml(name); const before = escapeHtml(name.slice(0, idx)); const mid = escapeHtml(name.slice(idx, idx + t.length)); const after = escapeHtml(name.slice(idx + t.length)); return `${before}${mid}${after}`; } const elQ = document.getElementById("q"); const elResults = document.getElementById("results"); const elCount = document.getElementById("countPill"); const elTotal = document.getElementById("totalChip"); const toast = document.getElementById("toast"); const toastText = document.getElementById("toastText"); elTotal.innerHTML = `إجمالي: ${DATA.length}`; function showToast(msg = "تم نسخ الرابط") { toastText.textContent = msg; toast.classList.add("show"); clearTimeout(window.__toastT); window.__toastT = setTimeout(() => toast.classList.remove("show"), 1200); } async function copyLink(url) { try { await navigator.clipboard.writeText(url); showToast(); } catch (e) { const ta = document.createElement("textarea"); ta.value = url; document.body.appendChild(ta); ta.select(); document.execCommand("copy"); document.body.removeChild(ta); showToast(); } } function renderResults(list, rawQuery) { elResults.innerHTML = ""; if (!list.length) { elCount.textContent = "النتائج: 0"; elResults.innerHTML = `