(function(){vara,b,c,d,e,f,g;d=function(a,b){varc,d,e,f;e=[];for(dinb.prototype)try{f=b.prototype[d],null==a[d]&&"function"!=typeoff?e.push(a[d]=f):e.push(void0)}catch(g){c=g}returne},a={},null==a.options&&(a.options={}),c={checks:{xhr:{url:function(){return"/favicon.ico?_="+(newDate).getTime()},timeout:5e3,type:"HEAD"},image:{url:function(){return"/favicon.ico?_="+(newDate).getTime()}},active:"xhr"},checkOnLoad:!1,interceptRequests:!0,reconnect:!0,deDupBody:!1},e=function(a,b){varc,d,e,f,g,h;for(c=a,h=b.split("."),d=e=0,f=h.length;f>e&&(g=h[d],c=c[g],"object"==typeofc);d=++e);returnd===h.length-1?c:void0},a.getOption=function(b){vard,f;returnf=null!=(d=e(a.options,b))?d:e(c,b),"function"==typeoff?f():f},"function"==typeofwindow.addEventListener&&window.addEventListener("online",function(){returnsetTimeout(a.confirmUp,100)},!1),"function"==typeofwindow.addEventListener&&window.addEventListener("offline",function(){returna.confirmDown()},!1),a.state="up",a.markUp=function(){returna.trigger("confirmed-up"),"up"!==a.state?(a.state="up",a.trigger("up")):void0},a.markDown=function(){returna.trigger("confirmed-down"),"down"!==a.state?(a.state="down",a.trigger("down")):void0},f={},a.on=function(b,c,d){vare,g,h,i,j;if(g=b.split(" "),g.length>1){for(j=[],h=0,i=g.length;i>h;h++)e=g[h],j.push(a.on(e,c,d));returnj}returnnull==f[b]&&(f[b]=[]),f[b].push([d,c])},a.off=function(a,b){varc,d,e,g,h;if(null!=f[a]){if(b){for(e=0,h=[];e<f[a].length;)g=f[a][e],d=g[0],c=g[1],c===b?h.push(f[a].splice(e,1)):h.push(e++);returnh}returnf[a]=[]}},a.trigger=function(a){varb,c,d,e,g,h,i;if(null!=f[a]){for(g=f[a],i=[],d=0,e=g.length;e>d;d++)h=g[d],b=h[0],c=h[1],i.push(c.call(b));returni}},b=function(a,b,c){vard,e,f,g,h;returnh=function(){returna.status&&a.status<12e3?b():c()},null===a.onprogress?(d=a.onerror,a.onerror=function(){returnc(),"function"==typeofd?d.apply(this,arguments):void0},g=a.ontimeout,a.ontimeout=function(){returnc(),"function"==typeofg?g.apply(this,arguments):void0},e=a.onload,a.onload=function(){returnh(),"function"==typeofe?e.apply(this,arguments):void0}):(f=a.onreadystatechange,a.onreadystatechange=function(){return4===a.readyState?h():0===a.readyState&&c(),"function"==typeoff?f.apply(null,arguments):void0})},a.checks={},a.checks.xhr=function(){varc,d;d=newXMLHttpRequest,d.offline=!1,d.open(a.getOption("checks.xhr.type"),a.getOption("checks.xhr.url"),!0),null!=d.timeout&&(d.timeout=a.getOption("checks.xhr.timeout")),b(d,a.markUp,a.markDown);try{d.send()}catch(e){c=e,a.markDown()}returnd},a.checks.image=function(){varb;returnb=document.createElement("img"),b.onerror=a.markDown,b.onload=a.markUp,void(b.src=a.getOption("checks.image.url"))},a.checks.down=a.markDown,a.checks.up=a.markUp,a.check=function(){returna.trigger("checking"),a.checks[a.getOption("checks.active")]()},a.confirmUp=a.confirmDown=a.check,a.onXHR=function(a){varb,c,e;returne=function(b,c){vard;returnd=b.open,b.open=function(e,f,g,h,i){returna({type:e,url:f,async:g,flags:c,user:h,password:i,xhr:b}),d.apply(b,arguments)}},c=window.XMLHttpRequest,window.XMLHttpRequest=function(a){varb,d,f;returnf=newc(a),e(f,a),d=f.setRequestHeader,f.headers={},f.setRequestHeader=function(a,b){returnf.headers[a]=b,d.call(f,a,b)},b=f.overrideMimeType,f.overrideMimeType=function(a){returnf.mimeType=a,b.call(f,a)},f},d(window.XMLHttpRequest,c),null!=window.XDomainRequest?(b=window.XDomainRequest,window.XDomainRequest=function(){vara;returna=newb,e(a),a},d(window.XDomainRequest,b)):void0},g=function(){returna.getOption("interceptRequests")&&a.onXHR(function(c){vard;returnd=c.xhr,d.offline!==!1?b(d,a.markUp,a.confirmDown):void0}),a.getOption("checkOnLoad")?a.check():void0},setTimeout(g,0),window.Offline=a}).call(this),function(){vara,b,c,d,e,f,g,h,i;if(!window.Offline)thrownewError("Offline Reconnect brought in without offline.js");d=Offline.reconnect={},f=null,e=function(){vara;returnnull!=d.state&&"inactive"!==d.state&&Offline.trigger("reconnect:stopped"),d.state="inactive",d.remaining=d.delay=null!=(a=Offline.ge