diff --git a/index.html b/index.html
index c53126f..0f052f7 100644
--- a/index.html
+++ b/index.html
@@ -176,7 +176,7 @@ function renderEv(){
}
// ===== ANALYTICS =====
-function renderAn(){
+function renderAn(){try{
var all=ev||[],done=all.filter(function(e){return e.s==="done"}),late=all.filter(function(e){return e.s==="late"}),warn=all.filter(function(e){return e.s==="warn"}),wait=all.filter(function(e){return e.s==="wait"}),dp=all.length?Math.round(done.length/all.length*100):0;
var h="
"+done.length+"
Исполнено ("+dp+"%)
"+warn.length+"
В процессе
"+late.length+"
Просрочено
";
var brData=[];br.forEach(function(b,i){var it=all.filter(function(e){return e.b===i});var d=it.filter(function(e){return e.s==="done"}).length;var l=it.filter(function(e){return e.s==="late"}).length;brData.push({name:b,done:d,total:it.length,late:l,pct:it.length?Math.round(d/it.length*100):0})});brData.sort(function(a,b){return a.pct-b.pct});
@@ -194,13 +194,13 @@ function nu(){var all=ev||[],n=[],now=new Date();all.forEach(function(e){if(e.s=
document.getElementById("nd").innerHTML=n.length?n.map(function(x){return""+x.c+" "+esc(x.m)+" "+x.t+"
"}).join(""):"Нет уведомлений
"}
// ===== REPORTS =====
-function renderRp(){var b=0;for(var i=0;i"+M(i)+"";
h+="— ";for(var i=0;i"+M(i)+"";
h+=" CSV HTML ";
h+="Хранилище: "+(b>1048576?(b/1048576).toFixed(1)+" МБ":(b/1024).toFixed(0)+" КБ")+"
";
h+="💾 Сохранить всё 📥 Загрузить 🗑 Очистить ";
- document.getElementById("pg-rp").innerHTML=h}
+ document.getElementById("pg-rp").innerHTML=h}catch(e){document.getElementById("pg-rp").innerHTML="";}
function dCSV(){var f=parseInt(document.getElementById("rf").value),t=parseInt(document.getElementById("rt").value),all=ev||[],csv="\uFEFF№;Филиал;Мероприятие;Статус;Срок\n";all.forEach(function(e){csv+=e.id+";"+br[e.b]+";\""+e.t.replace(/"/g,'""')+"\";"+st[e.s]+";"+e.due+"\n"});var a=document.createElement("a");a.href=URL.createObjectURL(new Blob([csv]));a.download="otchet.csv";a.click()}
function dHTML(){var f=parseInt(document.getElementById("rf").value),t=parseInt(document.getElementById("rt").value),all=ev||[],h="Отчёт ПБ Сводный отчёт ПБ ";all.forEach(function(e){var cl={done:"g",warn:"a",late:"r",wait:""}[e.s];h+=""+e.id+". "+esc(e.t)+" "+br[e.b]+" | "+sec[e.sec]+" | Срок: "+e.due+" | "+st[e.s]+"
";var d=getMD(e.id,-1);for(var i=f;i<=t;i++){var m=ms[i];if(d[m]&&d[m].report)h+="
"+M(i)+" "+esc(d[m].report)+"
"}if(e.sub)e.sub.forEach(function(s,si){var sd=getMD(e.id,si);for(var i=f;i<=t;i++){var m=ms[i];if(sd[m]&&sd[m].report)h+="
"+s.l+") "+M(i)+" "+esc(sd[m].report)+"
"}});h+="
"});h+="";try{var a=document.createElement("a");a.href=URL.createObjectURL(new Blob(["\uFEFF"+h],{type:"text/html"}));a.download="otchet.html";a.click()}catch(e){alert("Слишком большой")}}
function exp(){var d={events:ev,date:new Date().toISOString(),files:{},sc:{}};for(var i=0;i"+late.length+"
Просрочено
";