Registry.require(["promise","syncinfo","uri","helper"],function(){(function(f){var t=Registry.get("promise"),A=Registry.get("syncinfo"),B=Registry.get("uri"),C=Registry.get("helper"),p=function(c,b){c&&b&&Object.keys(b).forEach(function(a){c[a]=b[a]})},h=function(c,b){var a;if("string"===typeof k)a="G";else{a=k.tracker[c||"default"];if(null===a)return;a=(a||k.tracker["default"]).match(/[0-9]*/g).join("").split("").map(function(a){return String.fromCharCode(a.charCodeAt(0)+23)}).join("")}return[a].concat(b?
[b]:[]).join(".")},l=function(){return{tracker:"default UA-40782729-1 script UA-40782729-2 script_update UA-40782729-2 naverr UA-40782729-3".split(" ")}},u=function(){return"UA-40861355-1"},v=function(){return"UA-57518333-1"},w=function(){return"UA-83591358-1"},q={"default":l,gcal:l,G3XV:l,fire:l,neuu:v,jecn:v,dhdg:function(){return{options:["default",{sampleRate:1}],tracker:["script","UA-40861355-2","script_update","UA-40861355-3","error","UA-40861355-4","naverr","UA-40861355-5","default","UA-40861355-6",
"browser",null]}},dcgo:u,bnim:u,mfdh:l,gz80:l,heif:w,"5snx":w},k=function(c){var b=c();"string"===typeof b&&(b={tracker:["default",b]});var a,d={options:{},tracker:{}};Object.keys(d).forEach(function(c){if(b[c])for(a=0;a<b[c].length;a+=2)d[c][b[c][a]]=b[c][a+1]});return d}(q[rea.runtime.short_id]||q["default"]),D=[{msg:"a disconnected port"},{msg:"Function.prototype.apply: Arguments list has wrong type",url:"event_bindings"},{msg:"Script error."}],x=!1,y=!1,m=!1;f._gaq=f._gaq||[];var n=[],E=function(){console.log("statistics: Unable to load GA -> enable emergency mode");
var c={},b=function(){var a;(a=f.localStorage.getItem("ga_clientId"))||(a=C.createUUID(),localStorage.setItem("ga_clientId",a));return a};f.ga=function(a,d,e,f,h,m,g){if("create"==a)c[f.name]=d;else{a=a.split(".");var k,l,n;(k=a[0])&&(l=c[k])&&(n=a[1])&&"send"==n&&"object"!=typeof f&&(g={v:1,aip:1,t:d,dl:location.href,cid:b(),tid:l,ni:g&&g.nonInteraction?1:void 0,z:Date.now()},p(g,"event"==d?{ec:e,ea:f,el:h,ev:void 0}:{dp:e}),d="https://www.google-analytics.com/collect?"+B.hash2params(g),e=new XMLHttpRequest,
e.onerror=function(a){console.log("statistics: sending data failed",a)},e.open("GET",d),e.send(null))}};f.ga.getByName=function(){return{get:function(a){if("clientId"===a)return b()}}}},F=function(){var c=function(){for(var b;b=n.shift();)b();n=!1};(function(b,a,d,e){b.GoogleAnalyticsObject="ga";b.ga=b.ga||function(){(b.ga.q=b.ga.q||[]).push(arguments)};b.ga.l=1*new Date;d=a.createElement("script");e=a.getElementsByTagName("script")[0];d.async=!0;d.src="https://ssl.google-analytics.com/analytics.js";
d.addEventListener("load",c,!1);d.addEventListener("error",function(){E();c()},!1);e.parentNode.insertBefore(d,e)})(f,document)},g=function(c){if(c){var b=arguments;z().done(function(){f.ga.apply(f,b)})}},H=function(){y||(n.push(function(){var c=[],b={};Object.keys(k.tracker).forEach(function(a){var d=h(a);if(d&&!b[d]){b[d]=!0;var e={name:d};p(e,null);p(e,(k.options||{})[a]);c.push(["create",k.tracker[a],"auto",e]);c.push([d+".set","checkProtocolTask",null]);c.push([d+".set","anonymizeIp",!0]);c.push([d+
".set","forceSSL",!0])}});c.forEach(function(a){f.ga.apply(f,a)});g(h("pageview","send"),"pageview",f.location.pathname||f.location.href);q[rea.runtime.short_id]||window.setTimeout(G,3E4)}),F(),y=!0)},G=function(){m&&g(h("extension","send"),"event","Extension","ID",rea.runtime.id+" @ "+navigator.userAgent,null,{nonInteraction:!0})},r=function(c,b,a){if(m&&c.search){void 0===b&&(b="");void 0===a&&(b+=" "+window.location.href,a="");var d=!1;D.forEach(function(a){if(a.msg||a.url)a.msg&&-1==c.search(a.msg)||
a.url&&-1==b.search(a.url)||(d=!0)});d||g(h("error","send"),"event","Error",c,b+":"+a,null,{nonInteraction:!0})}},z=function(){var c=t();!1===n?c.resolve():n.push(c.resolve);return c.promise()},I=function(){var c=null,b;return function(){return b?b:null===c?b=A.getUtc().then(function(a){b=null;c=a.getTime()-Date.now();window.setTimeout(function(){c=null},6E4);return c}).fail(function(){window.setTimeout(function(){b=null},6E5)}):t.Pledge(c)}}();Registry.register("statistics","5454",{init:function(c,
b){window.onerror=function(a,d,e,f,g){var h="";if(g)try{h=g.stack}catch(k){}r(a,b+" "+c+"@"+rea.extension.urls.prepareForReport(d),[e+":"+f,h].join(";"))};document.onsecuritypolicyviolation=function(a){var d="";if(a)try{d=a.stack}catch(e){}r("CSP violation of "+a.effectiveDirective,b+" "+c+"@"+rea.extension.urls.prepareForReport(a.documentURI),[a.sourceFile," -> ",a.lineNumber+":"+a.columnNumber,d].join(";"))};x=!0},setEnabled:function(c){x&&(m=c)&&H()},tB:function(c){if(m){var b="";c.updated&&(b=
"Updated");g(h("browser","send"),"event","Browser",b,navigator.userAgent,null,{nonInteraction:!0})}},tS:function(c,b,a){if(m){var d="",e;"i"===a?(d="Installed",c+=" <"+(b?b:"?")+">"):"u"===a?(d="Updated",e=h("script_update","send")):"b"===a?(d="Blacklisted",c+=" <"+(b?b:"?")+">"):"m"===a?(d="Revealed",c=b):d="Removed";g(e||h("script","send"),"event","Script",d,c,null,{nonInteraction:!1})}},tE:r,tG:function(c,b,a){if(m){var d="",e="";"clicked"===c?(e="Click",d=b+":"+a):"button"===c?(e="Button",d=b):
"dialog"===c&&(e="Dialog");g(h("begging","send"),"event","Begging",e,d,null,{nonInteraction:!1})}},tN:function(c,b,a){if(m){var d;I().then(function(a){d=a;return z()}).done(function(){g(h("naverr","send"),"pageview",c,{metric1:a,dimension1:f.ga.getByName(h()).get("clientId"),dimension2:String(Date.now()+d),nonInteraction:!1})})}}})})(window)});
