function Pr(a,b,d){this.Init(a,b,d)}m("AdfScriptLoadingService",Pr);r.v(Pr);
Pr.ga=function(){this.Qca="sameOrigin";m("AdfScriptLoadingService.POLICY_SAME_ORIGIN",Pr.Qca);this.Pca="crossOrigin";m("AdfScriptLoadingService.POLICY_CROSS_ORIGIN",Pr.Pca);this.Oya="auto";m("AdfScriptLoadingService.POLICY_AUTO",Pr.Oya);this.UJ=0;m("AdfScriptLoadingService.METHOD_ANY",Pr.UJ);this.tw=1;m("AdfScriptLoadingService.METHOD_SYNCHRONOUS",Pr.tw);this.vya=2;m("AdfScriptLoadingService.METHOD_ASYNCHRONOUS",Pr.vya);this.ZD=3;m("AdfScriptLoadingService.METHOD_BACKGROUND",Pr.ZD);this.bda=0;m("AdfScriptLoadingService.STATUS_LOADING",
Pr.bda);this.nza=1;m("AdfScriptLoadingService.STATUS_LOADED",Pr.nza)};m("AdfScriptLoadingService.InitClass",Pr.ga);
Pr.prototype.Init=function(a,b,d){Pr.h.Init.call(this);u.assert(null==d||d==Pr.Qca||d==Pr.Pca||d==Pr.Oya);this.RU=a;this.NU=b;this.cOa=d;this.SM=[];this.Gma=null;this.a6=!1;this.Dma=[];this.tnb=this.D(this.eQa);this.r$a=this.D(this.s$a);u.assert(null!=this.NU);a=this.NU.location.hostname;u.assert(null!=a);this.Xlb=new RegExp("^(http|https):([\\w-]+\\.)?"+a+"[:/]","i");if(!this.Fma){a={};b=b.getElementsByTagName("script");for(d=0;d<b.length;d++){var e=Pr.cpa(b[d].getAttribute("src"));e&&(a[e]=!0)}this.Fma=
a}};r.a("AdfScriptLoadingService.prototype.Init",{Init:Pr.prototype.Init});Pr.prototype.ey=function(a,b){var d=Pr.cpa(a);this.Fma[d]||(d=Pr.cpa(a),this.Fma[d]=!0,d=this.Cba(a,b),fD(this,d))};r.a("AdfScriptLoadingService.prototype.addLibraryScript",{ey:Pr.prototype.ey});Pr.prototype.aqa=function(a){a=new eD(this.RU,a);fD(this,a)};r.a("AdfScriptLoadingService.prototype.addInlineScript",{aqa:Pr.prototype.aqa});Pr.prototype.Z7=function(a,b,d){a=new bD(a,b,d);fD(this,a)};
r.a("AdfScriptLoadingService.prototype.addCallbackScript",{Z7:Pr.prototype.Z7});Pr.prototype.bqa=function(a){u.Ja(a);this.Dma.push(a)};r.a("AdfScriptLoadingService.prototype.addLoadListener",{bqa:Pr.prototype.bqa});Pr.prototype.wUa=function(a){var b=this.Dma;a=b.indexOf(a);-1<a&&b.splice(a,1)};r.a("AdfScriptLoadingService.prototype.removeLoadListener",{wUa:Pr.prototype.wUa});
Pr.prototype.Cba=function(a,b){var d=null;return d=this.cOa==Pr.Qca||(this.cOa==Pr.Pca?0:"/"==a.charAt(0)||this.Xlb.test(a))||b==Pr.tw?new gD(this.zd(),a,b):new dD(this.zd(),this.Zv(),a,b)};r.a("AdfScriptLoadingService.prototype.CreateLibraryLoadableScript",{Cba:Pr.prototype.Cba});Pr.prototype.zd=function(){return this.RU};r.a("AdfScriptLoadingService.prototype.GetDomWindow",{zd:Pr.prototype.zd});Pr.prototype.Zv=function(){return this.NU};r.a("AdfScriptLoadingService.prototype.GetDomDocument",{Zv:Pr.prototype.Zv});
function fD(a,b){var d=a.SM.length;if(0<d&&b.tj()!==Pr.ZD){for(var e=!1,f=0;f<d;++f)if(a.SM[f].tj()===Pr.ZD){a.SM.splice(f,0,b);e=!0;break}e||a.SM.push(b)}else a.SM.push(b);hD(a)}function hD(a){if(!a.Gma){for(var b=a.SM;0<b.length;){var d=a.Gma=b.shift(),e=d.tj();if(e===Pr.tw)d.load(a.tnb);else{e===Pr.ZD?iD(a):(b=a,b.a6||(b.LW(Pr.bda),b.a6=!0));d.load(a.r$a);return}}iD(a)}}function iD(a){a.a6&&(a.a6=!1,a.LW(Pr.nza))}Pr.prototype.LW=function(a){for(var b=this.Dma,d=0;d<b.length;d++)b[d](a)};
Pr.prototype.eQa=function(){this.Gma=null};Pr.prototype.s$a=function(){this.eQa();hD(this)};Pr.cpa=function(a){return a?a.replace(/;[^\?]*/,""):null};