1 |
- window._br_runtime&&window._br_runtime.server||function(k){for(var R,t,r,n=document.cookie.split(";"),i=0,o=n.length;i<o;i++)if(/br-resp-key/i.test(t=n[i])){R=(R=(r=t.split("="))&&r.length&&r[1]||"").replace(/[\'\"]/g,""),document.cookie=t+";expires="+(new Date).toGMTString();break}function x(e){return k.encodeURIComponent?k.encodeURIComponent(e):e}function h(){return Date.now?Date.now():(new Date).valueOf()}function s(e){if(C.sended&&(this.ready()||e)&&this.errors.length){var t=[],a={};for(var r in w.each(this.errors,function(e,t,r){t=p(e.e1,e.e2,e.e3,e.e6);var n=a[t];n?n.ep=n.ep+1:a[t]={o:e.e0-C.st,e:e.e1,ec:r.length,ep:1,l:e.e2||0,c:e.e3||0,m:e.e6||"",r:e.e4,s:e.e5||""}}),a)t.push(a[r]);var n=w.mkurl(C.server.beacon,"er",{}),i=this.errors.length;w.POST(n,w.stringify({err:t}),{},function(e,t){e||q.errors.splice(0,i)})}}function u(){q.initend()}function c(){"complete"===b.readyState&&q.initend()}function d(e){function t(){q.send()}return!!C.load_time||(q.initend(),C.load_time=h(),!0===e?t():setTimeout(t,0))}function l(){q.flush||d(!0),w.bind(s,q)(!0),q.sa(!0),q.flush=!0}function f(){q.touch||(q.touch=h())}function p(e,t,r,n){return e+t+r+(n||"")}function m(e){return"string"==typeof e?e.length:window.ArrayBuffer&&e instanceof ArrayBuffer?e.byteLength:window.Blob&&e instanceof Blob?e.size:e&&e.length?e.length:0}function g(r){return function(){var e=arguments;if(!this._ignore){var t=w.args.apply(this,e);this._runtime={method:t[0],url:t[1],start:h()}}try{return r.apply(this,e)}catch(t){return Function.prototype.apply.call(r,this,e)}}}function v(p){return function(){function r(e){var t,r,n=s._runtime;if(n){if(4!==n.readyState&&(n.end=h()),n.endAll=h(),n.s=s.status,""==s.responseType||"text"==s.responseType)n.res=m(s.responseText);else if(s.response)n.res=m(s.response);else try{n.res=m(s.responseText)}catch(o){n.res=0}r=L&&L.timing?L.timing.loadEventEnd:C.load_time,t={n:n.url,m:n.method,st:n.s,o:n.start-C.st,req:n.req,res:n.res,e:n.endAll-n.start,f:n.fb?n.fb-n.start:0,rd:n.fb?n.end-n.fb:0,cb:u||0,p:n.param,oe:0==r?1:n.start-r?0:1},s.getAllResponseHeaders&&(t.h=(s.getAllResponseHeaders()||"").substring(0,2e3));try{t.g=t.h.toLowerCase().indexOf("br-resp-key"),-1==t.g?t.g="":s.getResponseHeader&&(t.g=s.getResponseHeader("br-resp-key"))}catch(o){}if(C.aa&&C.aa.push(t),C.server.custom_urls&&C.server.custom_urls.length&&!q.ct){if(!C.pattern){C.pattern=[];for(var i=0;i<C.server.custom_urls.length;i++)C.pattern.push(new RegExp(C.server.custom_urls[i]))}for(i=0;i<C.pattern.length;i++)if(a.url.match(C.pattern[i])){q.ct=a.end+u;break}}q.sa(),s._runtime=null}}function i(){2==s.readyState&&s._runtime&&(s._runtime.fb=s._runtime.fb||h()),4==s.readyState&&r()}function e(n){return function(){var e,t;2==s.readyState&&s._runtime&&(s._runtime.fb=s._runtime.fb||h()),4==s.readyState&&s._runtime&&(s._runtime.end=e=h(),s._runtime.readyState=4);try{t=n&&n.apply(this,arguments)}catch(r){}return 4==s.readyState&&(u=h()-e),i(),t}}function o(t){return function(){var e=s._runtime;if(e)switch(t){case"abort":case"error":case"timeout":r();break;case"loadstart":e.start=h()}return!0}}var t,n=arguments;if(!this._ignore){this._runtime.start=h(),this._runtime.req=n[0]?m(n[0]):0,this._runtime.param=n[0]?((t=n[0]).toString?t.toString():"").substring(0,2e3):"";var s=this,u=0,c=w.wrap(!1,this,"onreadystatechange",e);c||w.sh(this,"readystatechange",i,!1),function(e,t){for(var r=0;r<t.length;r++){var n=t[r];w.sh(e,n,o(n),!1)}}(this,["error","progress","abort","load","loadstart","loadend","timeout"]),c||setTimeout(function(){w.wrap(!1,s,"onreadystatechange",e)},0)}var d=(new Date).getTime()%1e8;try{var l=C.server;l&&l.id&&this._runtime&&w.filtered(this._runtime.url)&&(this._runtime.r=d,this.setRequestHeader&&this.setRequestHeader("X-Request-Id",l.id+";r="+d))}catch(f){}try{return p.apply(this,n)}catch(f){return Function.prototype.apply.call(p,this,n)}}}var y,_=k.XMLHttpRequest,b=document,S=(y=b.getElementsByTagName("base")||[]).length&&(_b=y[y.length-1]&&y[y.length-1].href||"")||"",w={filtered:function(e){var t,r,n=k.location;if(e=w.trim(e)){if((e=e.toLowerCase()).startsWith("//")&&(e=n.protocol+e),!e.startsWith("http"))return!0;var a=(t={},(r=/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?/.exec(e))&&(t.protocol=(r[1]||"http")+":",t.hostname=r[3],t.port=r[4]||""),t),i=a.protocol===n.protocol&&a.hostname===n.hostname;return i&&(i=a.port===n.port||!n.port&&("http:"===n.protocol&&"80"===a.port||"https"===n.protocol&&"443"===a.port)),i}return!1},wrap:function(e,t,r,n,a){try{var i=t[r]}catch(o){if(!e)return!1}if(!i&&!e)return!1;if(i&&i._wraped)return!1;try{t[r]=n(i,a)}catch(o){return!1}return t[r]._wraped=i,!0},unwrap:function(e,t){try{var r=e[t]._wraped;r&&(e[t]=r)}catch(n){}},each:function(e,t){if(e)for(var r=0;r<e.length;r++)e[r]&&t&&t(e[r],r,e)},mkurl:function(e,t,r){var n=/^https/i.test(b.URL)?"https":"http";for(var a in n+="://"+e+"/"+t,n+="?av=1.7.0",n+="&v=1.8.0",n+="&key="+x(C.server.key),n+="&ref="+x(b.URL),n+="&referer="+x(b.referrer),n+="&base="+x(S),n+="&rand="+h(),n+="&pvid="+E,n+="&aid="+C.server.id,n+="&if="+(k.top&&k.self&&k.top===k.self?0:1),C.server.get_ip&&(n+="&cip="+C.cip+"&ua="+C.ua),"pf"!==t&&C&&(C.agent=C.agent||k._br_runtime.agent,C.agent&&(n+="&n="+x(C.agent.n))),r||{})n+="&"+a+"="+r[a];return n},scriptGet:function(e,t){function r(){t&&t.apply(this,arguments),n.parentNode&&n.parentNode.removeChild(n)}var n=b.createElement("script");n.setAttribute("src",e),this.sh(n,"readystatechange",function(e){("loaded"==n.readyState||4==n.readyState)&&r("loaded")},!1),this.sh(n,"load",function(e){return r("load"),!0},!1),this.sh(n,"error",function(){return r("error"),!0},!1);var a=b.getElementsByTagName("script")[0];a&&a.parentNode.insertBefore(n,a)},GET:function(e,t){function r(){t&&t.apply(this,arguments),n.parentNode&&n.parentNode.removeChild(n)}if(k.navigator&&k.navigator.sendBeacon&&e.startsWith("http"))return k.navigator.sendBeacon(e,null);var n=b.createElement("img");n.setAttribute("src",e),n.setAttribute("style","display:none"),this.sh(n,"readystatechange",function(){("loaded"==n.readyState||4==n.readyState)&&r("loaded")},!1),this.sh(n,"load",function(){return r("load"),!0},!1),this.sh(n,"error",function(){return r("error"),!0},!1),b.body.appendChild(n)},fpt:function(e,t,r){function n(e,t,r){var n=b.createElement(e);try{for(var a in t)n[a]=t[a]}catch(o){var i="<"+e;for(var a in t)i+=" "+a+'="'+t[a]+'"';i+=">",r||(i+="</"+e+">"),n=b.createElement(i)}return n}var a=n("div",{style:"display:none;"}),i=n("iframe",{name:"_br_post_frm",width:0,height:0,style:"display:none;"}),o=n("form",{style:"display:none;",action:e,enctype:"application/x-www-form-urlencoded",method:"post",target:"_br_post_frm"}),s=n("input",{name:"data",type:"hidden"},!0);return s.value=t,o.appendChild(s),a.appendChild(i),a.appendChild(o),b.body.appendChild(a),o.submit(),i.onreadystatechange=function(){("complete"===i.readyState||4===i.readyState)&&(r&&r(null,i.innerHTML),b.body.removeChild(a))},!0},POST:function(e,t,r,n,a){if(!a&&navigator&&navigator.sendBeacon&&e.startsWith("http")){var i=navigator.sendBeacon(e,t);return n(!i),i}var o=null,s=window.XDomainRequest;if(s)return(o=new s).open("POST",e),o.onload=function(){n(null,o.responseText)},this.sh(o,"load",function(){n(null,o.responseText)},!1),this.sh(o,"error",function(){n("POST("+e+")error")},!1),this.wrap(!0,o,"onerror",function(e){return function(){return n&&n("post error",o.responseText),!0}}),o.send(t),!0;if(!_)return!1;(o=new _).overrideMimeType&&o.overrideMimeType("text/html");try{o._ignore=!0}catch(d){}var u=0;o.onreadystatechange=function(){4==o.readyState&&200==o.status&&(0==u&&n&&n(null,o.responseText),u++)},a&&this.sh(o,"error",function(){n&&n("post error",o.responseText)}),o.onerror&&this.wrap(!0,o,"onerror",function(e){return function(){return n&&n("post error",o.responseText),"function"!=typeof e||e.apply(this,arguments)}});try{o.open("POST",e,!0)}catch(d){}for(var c in r)o.setRequestHeader&&o.setRequestHeader(c,r[c]);return o.send(t),!0},sh:function(e,t,r,n){return e.addEventListener?e.addEventListener(t,r,n):!!e.attachEvent&&e.attachEvent("on"+t,r)},args:function(){var e=[];return[].push.apply(e,arguments),e},stringify:function e(t){switch(typeof t){case"object":if(!t)return"null";if(t instanceof Array){for(var r="[",n=0;n<t.length;n++)r+=(0<n?",":"")+e(t[n]);return r+"]"}for(var a in r="{",n=0,t)if("function"!=typeof t[a]){var i=e(t[a]);r+=(0<n?",":"")+e(a)+":"+i,n++}return r+"}";case"string":return'"'+t.replace(/([\"\\])/g,"\\$1").replace(/\r/g,"\\r").replace(/\n/g,"\\n")+'"';case"number":return t.toString();case"boolean":return t?"true":"false";case"function":return e(t.toString());case"undefined":default:return'"undefined"'}},parseJSON:function(e){if(e&&"string"==typeof e)return(k.JSON?k.JSON.parse:function(e){return new Function("return "+e)()})(e)},trim:String.prototype.trim?function(e){return null==e?"":String.prototype.trim.call(e)}:function(e){return null==e?"":e.toString().replace(/(^\s+)|(\s+$)/g,"")},extend:function(e,t){if(e&&t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},bind:function(e,t){return function(){e.apply(t,arguments)}}},C=k._br_runtime=w.extend({st:h(),ra:[],c_ra:[],aa:[],snd_du:function(){return this.server.adu?1e3*this.server.adu:1e4},cc:function(){return this.server.ac||10}},k._br_runtime||{}),T=k.location.host||"";C.cip="",k._br_runtime.ua=k.navigator&&k.navigator.userAgent.replace(/;/g,""),C.server={get_ip:!1,id:"1664",beacon:this.get_ip?T:"bupload.bonree.com",key:"iRiIZP9b7eQ",trace_threshold:4000.0,key_el:[],sr:100.0,upload_time:120,sip:"127.0.0.1",get_ip_url:(/^https/i.test(b.URL)?"https":"http")+"://getip.bonree.com/getIp"},C.server.beacon_cfg=C.server.beacon+"/config/v1.7.0/1664.js",w.scriptGet((/^https/i.test(b.URL)?"https":"http")+"://"+C.server.beacon_cfg,function(e){if(k.bonree_config_param&&w.extend(C.server,bonree_config_param),C.server&&(!C.server.sr||100*Math.random()<=C.server.sr)){for(var t=[["load",function(){C.beforeload=!0,d()}],["beforeunload",l],["pagehide",l],["unload",l]],r=0;r<t.length;r++)w.sh(k,t[r][0],t[r][1],!1);var n=[["scroll",f],["keypress",f],["click",f],["DOMContentLoaded",u],["readystatechange",c]];for(r=0;r<n.length;r++)w.sh(b,n[r][0],n[r][1],!1)}else q&&(q.errors=undefined),C.aa=undefined}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.indexOf(e,t)===t});var E=function(){function e(e){return e<0?NaN:e<=30?0|Math.random()*(1<<e):e<=53?(0|Math.random()*(1<<30))+(0|Math.random()*(1<<e-30))*(1<<30):NaN}function t(e,t){for(var r=e.toString(16),n=t-r.length,a="0";0<n;n>>>=1,a+=a)1&n&&(r=a+r);return r}return t(e(32),8)+"-"+t(e(16),4)+"-"+t(16384|e(12),4)+"-"+t(32768|e(14),4)+"-"+t(e(48),12)}(),L=k.performance?k.performance:k.Performance;L&&(w.sh(L,"resourcetimingbufferfull",function(){var e=L.getEntriesByType("resource");e&&(C.ra=C.ra.concat(e),L.clearResourceTimings())},!1),w.sh(L,"webkitresourcetimingbufferfull",function(){var e=L.getEntriesByType("resource");e&&(C.ra=C.ra.concat(e),L.webkitClearResourceTimings())},!1));var q=C.metric={ready:function(){return C.load_time},initend:function(){C.end_time||(C.end_time=h(),this._h=setInterval(function(){q.sa()},2e3))},send:function(){if(this.sended||!this.ready())return!1;var e,t=C.st,a={},i={};try{e=0<(0<(i=function(){function e(e){return r[e]-n}var t={};if(L&&L.timing){var r=L.timing,n=r.navigationStart?r.navigationStart:r.fetchStart,a=e("redirectStart"),i=e("redirectEnd"),o=e("fetchStart"),s=e("domainLookupStart"),u=e("domainLookupEnd"),c=e("connectStart"),d=e("connectEnd"),l=e("secureConnectionStart"),f=e("requestStart"),p=e("responseStart"),h=e("responseEnd"),m=e("domLoading"),g=e("domInteractive"),v=e("domContentLoadedEventStart"),y=e("domContentLoadedEventEnd"),_=e("domComplete"),b=e("loadEventStart"),S=e("loadEventEnd"),w=e("unloadEventStart"),T=e("unloadEventEnd");t.ns=n,0<=i&&0<=a&&i<a||(0<=a&&(t.es=a),0<=i&&(t.ee=i)),0<=o&&(t.f=o),0<=u&&0<=s&&u<s||(0<=s&&(t.ds=s),0<=u&&(t.de=u)),0<=d&&0<=c&&d<c||(0<=c&&(t.cs=c),0<=d&&(t.ce=d)),0<=l&&(t.sl=l),0<=f&&(t.qs=f),0<=h&&0<=p&&h<p||(0<=p&&(t.rs=p),0<=h&&(t.re=h)),0<=m&&(t.ol=m),0<=g&&(t.oi=g),0<=y&&0<=v&&y<v||(0<=v&&(t.os=v),0<=y&&(t.oe=y)),0<=_&&(t.oc=_),0<=S&&0<=b&&S<b||(0<=S?(0<=b&&(t.ls=b),t.le=S):(0<=b&&(t.ls=b),t.ue=C.load_time-n,t.ue<t.ls&&(t.ue=t.ls))),0<=T&&0<=w&&T<w||(0<=w&&(t.tus=w),0<=T&&(t.tue=T))}else t={t:n=C.st,os:C.end_time-n,ls:C.load_time-n};t.je=q.errors.length,t.gid=R||"";var E=C.agent||k._br_runtime&&k._br_runtime.agent;return E&&(t.id=x(E.id),t.a=E.a,t.q=E.q,t.tid=x(E.tid),t.n=x(E.n)),C.beforeload?t.bl=0:t.bl=1,t.sh=k.screen&&k.screen.height,t.sw=k.screen&&k.screen.width,t}()).ls?i.ls:C.load_time-t)-C.server.trace_threshold?1:0,i.sp=e,a=function(e){function t(e){return 0<c[e]?Math.round(1e3*c[e])/1e3:0}function i(e,t){if(null==e||null==t)return!1;try{var r=e.match(t)}catch(n){r=null}return r?1:0}function o(e,t){if(null==e||null==t)return!1;var r,n,a,i=!1,o=!1,s=0,u=0;for(a=n=0;n<e.length;n++){if(t.length<=a){if(0!=s){o=!0,n=s,a=u,u=s=0;continue}break}if("*"!=(r=t.charAt(a)))if(o)e.charAt(n)==r&&(o=!1,s=n+1,u=a,a++);else{if("?"!=r&&r!=e.charAt(n)){if(i=!1,0!=s){o=!0,n=s,a=u,u=s=0;continue}break}a++}else{if(a==t.length-1){i=!0;break}o=!0,a++}}return n==e.length&&a==t.length&&(i=!0),i}function r(e){var t=C.server.key_el,r=0;if(t&&t.length<1)return!1;for(var n,a=0;n=t[a],a<t.length;a++){switch(n.p){case 1:String(e)===n.r&&(r=n.c);break;case 2:r=o(e,n.r)&&(r=n.c);break;case 3:r=i(e,n.r)&&(r=n.c)}if(r)return r}return r}if(L&&L.getEntriesByType){var n={tr:!0,tt:x(b.title),charset:b.characterSet},a=L.getEntriesByType("resource"),s=C.ra;a&&(s=s.concat(a),L.clearResourceTimings?L.clearResourceTimings():L.webkitClearResourceTimings&&L.webkitClearResourceTimings()),n.res=[];for(var u=0;u<s.length;u++){var c=s[u];if("xmlhttprequest"!==c.initiatorType){var d={o:t("startTime"),rt:c.initiatorType,n:c.name,f:t("fetchStart"),ds:t("domainLookupStart"),de:t("domainLookupEnd"),cs:t("connectStart"),ce:t("connectEnd"),sl:t("secureConnectionStart"),qs:t("requestStart"),re:t("responseStart"),rs:t("responseEnd"),es:t("redirectStart"),ee:t("redirectEnd")};w.filtered(c.name)?d.cr=0:d.cr=1,r(c.name)?(d.kc=r(c.name),n.res.push(d)):e&&n.res.push(d)}}return n}}(e)}catch(n){}a=a?w.stringify(a):"";var o=this;C.sended=this.sended;var r=function(e,t){e&&e.substr("error")?window._br_runtime.cip=C.server.sip:window._br_runtime.cip=t||"",C.sended=!0;var r=w.mkurl(C.server.beacon,"pf",i);a.length&&w.POST(r,a,{},function(e,t){})||w.GET(r),o.sa();var n=w.bind(s,o);n(),q._k=setInterval(n,1e4),C.server.upload_time&&setTimeout(function(){w.bind(s,q)(!0),void q.sa(!0)&&clearInterval(q._k)&&clearInterval(q._h),C.sended=!1},1e3*C.server.upload_time)};return C.server.get_ip?w.POST(C.server.get_ip_url,null,null,r,!0):r(),!0},sa:function(e){if(C.sended&&(this.ready()||e)&&C.aa.length&&(e||!this._last_send||h()-this._last_send>C.snd_du()||C.aa.length>=C.cc())){var t=w.mkurl(C.server.beacon,"as"),r=w.stringify({xhr:C.aa}),n=C.aa.length;w.POST(t,r,{},function(e,t){e||C.aa.splice(0,n)}),this._last_send=h()}},errors:[]},A={};if(k.addEventListener?w.sh(k,"error",function(e){var t=arguments;if(0!=t.length){var r={};if(r.e0=h(),r.e1="",r.e2=0,r.e3=0,r.e4="","string"==typeof e)r.e1=t[0],2<t.length&&(r.e2=t[2]||0,r.e4=t[1]),3<t.length&&(r.e3=t[3]||0);else if(e instanceof Event||k.ErrorEvent&&e instanceof ErrorEvent){if(r.e1=e.message||(e.error&&e.error.constructor.name)+(e.error&&e.error.message)||"",r.e2=e.lineno||0,r.e3=e.colno||0,r.e4=e.filename||e.error&&e.error.fileName||e.target&&e.target.baseURI||"",r.e5=null,r.e6=null,r.e7=0,e.error){r.e5=e.error.stack||"",r.e6=e.error.moduleName||"";var n=p(r.e1,r.e2,r.e3,r.e6);r.e7=A[n]?0:1}if("unknown"===r.e1&&"unknown"===r.e4)return}q.errors&&q.errors.push(r)}},!1):k.onerror=function(e,t,r,n,a){var i={};if(i.e0=h(),i.e1=e,i.e2=r,i.e3=n,i.e4=t,a){var o=p(e,r,n,a.moduleName);i.e5=a.stack||"",i.e6=a.moduleName||"",i.e7=A[o]?0:1,A[o]=!0}q.errors&&q.errors.push(i)},w.wrap(!1,k,"requestAnimationFrame",function(e){return function(){return C.firstPaint=h(),(k.requestAnimationFrame=e).apply(this,arguments)}}),_)if(_.prototype)w.wrap(!1,_.prototype,"open",g),w.wrap(!1,_.prototype,"send",v);else{w.ie=7;var N=_;k.XMLHttpRequest=function(){var e=new N;return w.wrap(!1,e,"open",g),w.wrap(!1,e,"send",v),e}}else k.ActiveXObject&&(w.ie=6)}(window);
|