function parseUri(t){for(var e=parseUri.options,a=e.parser[e.strictMode?"strict":"loose"].exec(t),s={},o=14;o--;)s[e.key[o]]=a[o]||"";return s[e.q.name]={},s[e.key[12]].replace(e.q.parser,function(t,a,o){a&&(s[e.q.name][a]=o)}),s}function getScript(t,e){var a=document.createElement("script");a.src=t,a.async=!0,a.onreadystatechange=a.onload=function(){e.done||a.readyState&&!/loaded|complete/.test(a.readyState)||(e.done=!0,e())},document.querySelector("head").appendChild(a)}parseUri.options={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"params",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},initHTML=function(t,e,a,s,o,r){var i=document.createElement("div");if(i.id="stat"+e,i.className="stats "+o,i.dataset.id=e,"XXX"==e){(n=document.createElement("style")).innerHTML=".stats{display: flex;justify-content: center;align-items: center;}.bc{position: absolute;margin: 0 auto;width:100%;bottom:5px;}.tr{position: absolute;right:0px;top:0px;}.tl{position: absolute;left:0px;top:0px;}.br{position: absolute;right:0px;bottom:0px;}.bl{position: absolute;left:0px;bottom:0px;}.tc{position: absolute;margin: auto auto 0px 45%;top:0px;}.rel{position: relative;margin-left:auto;margin-right:auto;}",document.getElementsByTagName("head")[0].appendChild(n),i.innerHTML='Vous devez mettre le bon numéro de ressource'}else if("0"!=a&&(i.innerHTML+=''),"0"!=s){var n=document.createElement("style");n.innerHTML=".stats{display: flex;justify-content: center;align-items: center;}.bc{position: absolute;margin: 0 auto;width:100%;bottom:5px;}.stats.lock:hover #status{opacity:1;z-index:1}#status{opacity:0;transition: all 0.4s ease-in-out;position:absolute;padding:17px;z-index:-1}.tr{position: absolute;right:0px;top:0px;}.tl{position: absolute;left:0px;top:0px;}.br{position: absolute;right:0px;bottom:0px;}.bl{position: absolute;left:0px;bottom:0px;}.tc{position: absolute;margin: auto auto 0px 45%;top:0px;}.rel{position: relative;margin-left:auto;margin-right:auto;}.rate>input{position:absolute;top:-9999px;opacity:0}.logo_uved_stat{float:left;}.rate{float:right;text-align:center;}.rate:not(:checked)>.star-icon{width:28px;height:28px;fill:#ccc;cursor:pointer;float:right}.rate>input:checked~.star-icon{fill:#ffc700}.rate:not(:checked)>.star-icon:hover,.rate:not(:checked)>.star-icon:hover~.star-icon{fill:#deb217}.rate>.star-icon:hover~input:checked~.star-icon,.rate>input:checked+.star-icon:hover,.rate>input:checked+.star-icon:hover~.star-icon,.rate>input:checked~.star-icon:hover,.rate>input:checked~.star-icon:hover~.star-icon{fill:#c59b08}#votes{clear: right;float:right;color:#666;width:100%}",document.getElementsByTagName("head")[0].appendChild(n),i.innerHTML+='
'}if("rel"==o){var c=document.getElementById("stats");c.parentNode.insertBefore(i,c.nextSibling)}else document.body.appendChild(i)},window.onload=function(t){var e,a=parseUri(document.getElementById("stats").getAttribute("src"));e="https://www.uved.fr/";var s=a.params.id,o=a.params.count,r=a.params.rate,i=a.params.pos,n=a.params.img;initHTML(e,s,o,r,i,n),window.jQuery?initStar(e,s):getScript("https://code.jquery.com/jquery-3.2.1.min.js",function(){initStar(e,s)})},initStar=function(t,e){$(".star-icon").bind({click:function(a){$.ajax({type:"POST",dataType:"json",url:t+"rate/"+e+"/"+$(this).data("value")+".json",dataType:"json",crossDomain:!0}).done(function(t){t.error?$("#votes").html(t.server):($("#stars-"+t.rates).prop("checked",!0),$("#votes").html(t.votes),$("#status").html(t.status))}),$(".star-icon").unbind().css("cursor","default"),$("#stat"+e).click(function(t){t.preventDefault()}).addClass("lock")}});$.ajax({type:"GET",dataType:"json",url:t+"votes/"+e+".json",crossDomain:!0}).done(function(t){void 0!==t.rates?($("#stars-"+t.rates).prop("checked",!0),$("#votes").html(t.votes),$("#status").html(t.status)):0==e?($("#status").html("Problème technique, vote impossible"),$(".star-icon").unbind().css("cursor","default"),$("form.rate"+e).click(function(t){t.preventDefault()}).addClass("lock")):$("#votes").html("Soyez le premier à voter!")})};