// Compiled with JSCompilerTask
// Turner XMP, Release Build, © 2008 Turner Broadcasting System, Inc. A Time Warner Company.  Version: 0.1.696.2070
// xmp_services, xmp_services_0_1_696_2070.js

xmp.i_$16X="/PlayerContexts/Global/ControlStream";xmp.CONTROL_STREAM_SERVICE="ControlStream";xmp.i_$16Y="Media Type";xmp.i_$16Z="Environment Label";xmp.i_$170="Url";xmp.i_$171="Reconnect Retries";xmp.i_$172="Reconnect Retry Interval";xmp.i_$173="RefreshInterval";xmp.i_$174="Start Delay";xmp.i_$175="controlStreamResource";xmp.i_$176="{{environment_label}}";xmp.i_$177="name";xmp.i_$178="label";xmp.i_$179="webUrl";xmp.i_$17A="resource";xmp.i_$17B="retrieved from the web";xmp.i_$17C="received from trigger";xmp.i_$17D="StartDelay";xmp.i_$17E="RefreshResources";xmp.i_$17F="Reconnect";xmp.$.$47=function(){this.p_$7M=null;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0043\u006F\u006E\u0074\u0072\u006F\u006C\u0053\u0074\u0072\u0065\u0061\u006D',xmp.$.$47);xmp.$.$47.prototype.i_$S5=function(aa){try{this.p_$X=xmp.$.$16.i_$S2(xmp.CONTROL_STREAM_SERVICE);this.p_$BR(aa);this.p_$7M=aa;this.p_$GR();var ba=xmp.$.$1B.i_$P4().getGlobalContextNode().getNodeForPath(xmp.i_$16X);this.p_$GS(ba);this.p_$GT=xmp.$.$49.i_$17G(xmp.$.$T.OS,this,this.p_$78);this.p_$GU(ba);this.p_$GV();}
catch(e){this.p_$2G("Initializing.",e);}};xmp.$.$47.prototype.i_$WW=function(){if(this.p_$GT){this.p_$GT.i_$T9();}
if(this.p_$GW){this.p_$GW.i_$RN();this.p_$GW=null;}
if(this.p_$GX){this.p_$GX.i_$RN();this.p_$GX=null;}
this.p_$GR();};xmp.$.$47.prototype.p_$GV=function(){if(0===this.p_$GY){this.p_$GZ();}
else{this.p_$GW=this.p_$7F({id:xmp.i_$17D,interval:this.p_$GY,handler:this.p_$H0});this.p_$GW.i_$RL();}};xmp.$.$47.prototype.p_$BR=function(ca){if(!ca){throw new xmp.$.$4B("Validating listener.","Missing control stream listener.");}
if(false===xmp.i_$OR(ca.i_$17H)){throw new xmp.$.$4B("Validating listener.","Invalid control stream listener.  Missing \"i_onControlStreamError\" handler.");}
if(false===xmp.i_$OR(ca.i_$17I)){throw new xmp.$.$4B("Validating listener.","Invalid control stream listener.  Missing \"i_onControlStreamTrigger\" handler.");}
if(false===xmp.i_$OR(ca.i_$17J)){throw new xmp.$.$4B("Validating listener.","Invalid control stream listener.  Missing \"i_onControlStreamTriggerInit\" handler.");}};xmp.$.$47.prototype.p_$H1=function(da){if(da.name.length===0){throw new xmp.$.$4B("Validating resource.","Missing control stream resource name.");}
if(da.label.length===0){throw new xmp.$.$4B("Validating resource.","Missing control stream resource label.");}
if(da.webUrl.length===0){throw new xmp.$.$4B("Validating resource.","Missing control stream \""+da.name+"\" web url.");}};xmp.$.$47.prototype.p_$GS=function(ea){var fa=ea.getString(xmp.i_$16Y,xmp.NO_DEFAULT_VALUE);if(fa.length===0){throw new xmp.$.$4B("Initializing properties.","Missing control stream media type.");}
var ga=xmp.$.$2Z.i_$10K(fa);if(false===xmp.i_$OR(ga)){throw new xmp.$.$4B("Initializing properties.","Invalid control stream media type \""+fa+"\".");}
this.p_$78=ga.mimeType;this.p_$1T=ea.getString(xmp.i_$170,xmp.NO_DEFAULT_VALUE);if(this.p_$1T.length===0){throw new xmp.$.$4B("Initializing properties.","Missing control stream url.");}
this.p_$H2=ea.getInt(xmp.i_$172,0);if(this.p_$H2===0){throw new xmp.$.$4B("Initializing properties.","Missing control stream reconnect retry interval.");}
this.p_$H3=ea.getInt(xmp.i_$171,0);this.p_$GY=ea.getInt(xmp.i_$174,0);var ha=ea.getNodeForPath(xmp.i_$173);this.p_$H4=ha.getInt(xmp.$.$T.OS,0);if(this.p_$H4===0){throw new xmp.$.$4B("Initializing properties.","Missing control stream refresh interval for the \""+xmp.$.$T.OS+"\" platform.");}};xmp.$.$47.prototype.p_$GU=function(ia){this.p_$H5={};var ja=ia.getString(xmp.i_$16Z,xmp.NO_DEFAULT_VALUE);if(ja.Length===0){throw new xmp.$.$4B("Initializing resources.","Missing control stream environment label.");}
var ka=ia.retrieveChildren();var la=ka.length;for(var i=0;i<la;i++){var ma=ka[i];if(ma.getName()===xmp.i_$173){continue;}
var na=ma.getString(xmp.i_$178,xmp.NO_DEFAULT_VALUE);na=na.replace(xmp.i_$176,ja);var oa={initialized:false,name:ma.getString(xmp.i_$177,xmp.NO_DEFAULT_VALUE),label:na,webUrl:ma.getString(xmp.i_$179,xmp.NO_DEFAULT_VALUE),data:null};this.p_$H1(oa);this.p_$H5[oa.name]=oa;}};xmp.$.$47.prototype.p_$H6=function(pa){for(var qa=xmp.$.$4.i_$Q7(this.p_$H5);qa.i_$Q9();qa.i_$QB()){this.p_$H7(qa.i_$QD(),pa);}};xmp.$.$47.prototype.p_$H7=function(ra,sa){var ta=((true===sa)?this.p_$H8:this.p_$AG);var ua=new xmp.$.$M(xmp.CONTROL_STREAM_SERVICE,ta,this);ua.i_$V6(xmp.i_$17A,ra);var va=xmp.$.$7.i_$P4();va.i_$RF(xmp.CONTROL_STREAM_SERVICE,ua,xmp.i_$175,ra.webUrl,xmp.$.$A.i_$RY,null);};xmp.$.$47.prototype.p_$AG=function(wa,xa){this.p_$H9(wa,xa,this.p_$7M.i_$17I,true);};xmp.$.$47.prototype.p_$H8=function(ya,za){var Aa=null;try{Aa=ya.i_$V8(xmp.i_$17A,{});this.p_$H9(ya,za,this.p_$7M.i_$17J,false);Aa.initialized=true;}
catch(e){if(Aa){if(false===Aa.initialized){try{this.p_$7M.i_$17J(Aa.name,null);}
catch(e2){}
Aa.initialized=true;}}}};xmp.$.$47.prototype.p_$HA=function(Ba,Ca,Da,Ea,Fa){this.p_$HB(Ca,Da);if(true===Ea&&false===this.p_$HC(Ca,Da)){this.p_$X.info((new Date()).toString()+" - Ignoring resource \""+Ca.name+"\" "+Ba+".  Already up to date ("+Da.modifiedDate+").");return;}
Ca.data=Da;this.p_$X.info((new Date()).toString()+" - Resource \""+Ca.name+"\" "+Ba+".");Fa.call(this.p_$7M,Ca.name,Da);};xmp.$.$47.prototype.p_$HC=function(Ga,Ha){if(!Ga.data){return true;}
return(Ha.modifiedDate>Ga.data.modifiedDate);};xmp.$.$47.prototype.p_$HB=function(Ia,Ja){if(!Ja){throw new xmp.$.$4B("Validating resource data.","NULL resource data.");}
if(!Ja.id||Ja.id.length===0){throw new xmp.$.$4B("Validating resource data.","Invalid control stream resource \""+Ia.name+"\" data.  Missing resource id.");}
if(Ia.label!==Ja.id){throw new xmp.$.$4B("Validating resource data.","Invalid control stream resource \""+Ia.name+"\" data id \""+Ja.id+"\".  Expected \""+Ia.label+"\".");}};xmp.$.$47.prototype.p_$7F=function(Ka){var La=new xmp.$.$M(Ka.id,Ka.handler,this);return new xmp.$.$1C(Ka.id,Ka.interval,-1,La);};xmp.$.$47.prototype.p_$GZ=function(){this.p_$HD();this.p_$H6(true);this.p_$GX=this.p_$7F({id:xmp.i_$17E,interval:this.p_$H4,handler:this.p_$HE});this.p_$GX.i_$RL();};xmp.$.$47.prototype.p_$H0=function(Ma,Na){try{this.p_$GW.i_$RN();this.p_$GW=null;this.p_$GZ();}
catch(e){this.p_$2G("Starting after delay.",e);}};xmp.$.$47.prototype.p_$HE=function(Oa,Pa){try{this.p_$H6(false);}
catch(e){this.p_$2G("Refreshing all resources.",e);}};xmp.$.$47.prototype.p_$2G=function(Qa,e){var Ra=e;if(false===(Ra instanceof xmp.$.$4B)){Ra=new xmp.$.$4B(((e.context)?e.context:Qa),((e.rawMessage)?e.rawMessage:e.message));Ra.setInnerError(e);}
this.p_$HF(Ra);if(!this.p_$7M){xmp.handleFatalError(Ra);}
else if(true===xmp.i_$OR(this.p_$7M.i_$17H)){this.p_$GT.i_$T9();this.p_$7M.i_$17H(Ra);}};xmp.$.$47.prototype.i_$17K=function(e){this.p_$HF(e);this.p_$HG();};xmp.$.$47.prototype.i_$17L=function(Sa,Ta){var Ua=null;try{Ua=this.p_$HH(Sa);this.p_$HI(Sa,Ua);var Va=xmp.$.$S.i_$VP(Ta);var Wa=this.p_$HJ(Va);this.p_$HA(xmp.i_$17C,Ua,Wa,false,this.p_$7M.i_$17I);this.p_$X.info(Va);}
catch(e){var Xa="TRIGGER PROCESSING ERROR.";if(Ua){Xa="TRIGGER \""+Ua.name+"\" PROCESSING ERROR.";}
this.p_$HF(e);this.p_$H7(this.p_$HH(Sa));}};xmp.$.$47.prototype.i_$17M=function(){this.p_$X.info("Connected.");this.p_$GR();};xmp.$.$47.prototype.i_$17N=function(e){this.p_$7M.i_$YV(e);};xmp.$.$47.prototype.i_$17O=function(e){this.p_$7M.i_$YW(e);};xmp.$.$47.prototype.p_$HG=function(){if(!this.p_$HK){this.p_$HL=0;this.p_$HK=this.p_$7F({id:xmp.i_$17F,interval:this.p_$H2,handler:this.p_$HM});this.p_$HK.i_$RL();}};xmp.$.$47.prototype.p_$HM=function(Ya,Za){try{if(true===this.p_$GT.i_$17P()||(this.p_$H3>0&&this.p_$HL===this.p_$H3)){if(this.p_$HL===this.p_$H3&&false===this.p_$GT.i_$17P()){this.p_$X.warn("Control stream reconnect retry maximum "+this.p_$H3+" limit reached...");}
this.p_$GR();return;}
this.p_$HL++;this.p_$X.warn("Control stream reconnect retry "+this.p_$HL+"...");this.p_$HD();this.p_$H6(false);}
catch(e){this.p_$HF(e);}};xmp.$.$47.prototype.p_$HH=function($a){for(var ab=xmp.$.$4.i_$Q7(this.p_$H5);ab.i_$Q9();ab.i_$QB()){var bb=ab.i_$QD();if(bb.label===$a){return bb;}}
return null;};xmp.$.$47.prototype.p_$HF=function(e){this.p_$X.warn(e.message);};xmp.$.$47.prototype.p_$HD=function(){var cb=this.p_$GT.i_$T5(this.p_$1T);if(cb){this.p_$X.info("Connecting to \""+cb+"\".");}};xmp.$.$47.prototype.p_$GR=function(){if(this.p_$HK){this.p_$HK.i_$RN();this.p_$HK=null;}
this.p_$HL=0;};xmp.$.$47.prototype.p_$HI=function(db,eb){if(!eb){throw new xmp.$.$4B("Validating trigger.","Missing control stream resource configuration for \""+db+"\" trigger.");}};xmp.$.$47.prototype.p_$HJ=function(fb){var gb=xmp.i_$OO(fb);return this.p_$HN('('+gb+')');};xmp.$.$47.prototype.p_$HN=function(hb){return eval(hb);};xmp.$.$47.prototype.p_$H9=function(ib,jb,kb,lb){try{var mb=ib.i_$V8(xmp.i_$17A,{});if(true===jb.i_$SF()){throw new xmp.$.$4B("Initializing resources.","Unable to retrieve control stream resource \""+mb.name+"\" from url \""+mb.webUrl+"\". \n\n"+jb.i_$RG());}
this.p_$HA(xmp.i_$17B,mb,jb.i_$SO(),true,kb);}
catch(e){var nb="";if(e instanceof xmp.$.$4B){nb=e.message;}
else{nb="Unable to retrieve control stream resource \""+mb.name+"\" from url \""+mb.webUrl+"\". \n\n"+e.message;}
this.p_$X.warn(nb);if(false===lb){throw e;}}};xmp.$.$47.prototype.i_$17P=function(){return this.p_$GT.i_$17P();};xmp.CONTROL_STREAM_READER="ControlStreamReader";xmp.$.$48=function(ob,pb){this.p_$7M=ob;this.p_$78=pb;this.p_$HO=false;this.p_$B5=new xmp.$.$2T();this.p_$B6=this.p_$B5.i_$11E(xmp.i_$111);xmp.$.$2X.i_$10X(this.i_$PU(),this);this.p_$7L=xmp.$.$2X.i_$11J(this.i_$PU(),xmp.i_$11L);this.p_$7Z=new xmp.$.$1P(this.i_$PU());this.p_$7Z.i_$YA(xmp.i_$11L,xmp.DHTML_VIEWPORT);this.p_$7Z.i_$YA(this.p_$78,xmp.DHTML_VIEWPORT);};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0043\u006F\u006E\u0074\u0072\u006F\u006C\u0053\u0074\u0072\u0065\u0061\u006D\u0052\u0065\u0061\u0064\u0065\u0072',xmp.$.$48);xmp.$.$48.prototype.i_$T5=function(qb){var rb=this.p_$HP(qb);if(false===this.p_$BJ(rb)){this.p_$B6.i_$T5(this,rb);}
return rb.getURI();};xmp.$.$48.prototype.i_$T9=function(){this.p_$B6.i_$T9(this);this.p_$HO=false;};xmp.$.$48.prototype.p_$HP=function(sb){var tb=new xmp.$.$K();tb.setMimeTypes([this.p_$78]);tb.setURI(sb);tb.setStreamingMode(xmp.CONTROL_STREAMING_MODE);xmp.$.$2Z.i_$10I(this,tb);return tb;};xmp.$.$48.prototype.i_$106=function(ub,vb){try{if(ub===xmp.OPEN){this.p_$B6.i_$YB(this);this.p_$HO=true;this.p_$7M.i_$17M();}
else if(ub===xmp.ENDED){throw new xmp.$.$4C("Handling native player state change.","Control stream ended.");}}
catch(e){this.p_$2G("Handling native player state change.",e);}};xmp.$.$48.prototype.i_$108=function(wb,xb){try{this.p_$7M.i_$17L(wb,xb);}
catch(e){this.p_$2G("Forwarding trigger to listener.",e);}};xmp.$.$48.prototype.i_$107=function(e){this.p_$2G("Forwarding native player error to listener.",e);};xmp.$.$48.prototype.i_$105=function(yb,zb){};xmp.$.$48.prototype.i_$10A=function(Ab,Bb){if(this.p_$B6.i_$X4()===xmp.ERRORS){return;}
this.p_$B6.i_$T5(this,Bb.node);};xmp.$.$48.prototype.i_$109=function(Cb,Db){};xmp.$.$48.prototype.i_$XU=function(Eb,Fb){Fb.data.viewport=Eb;Fb.player.i_$Q7(Fb.data);this.p_$7L=Fb.player;};xmp.$.$48.prototype.i_$XC=function(Gb,Hb,Ib,Jb){var Kb=document.createElement("div");Kb.setAttribute(xmp.ID_ATTRIBUTE,Hb);Kb.setAttribute(xmp.NAME_ATTRIBUTE,Hb);Kb.style.width="1px";Kb.style.height="1px";xmp.i_$PD(document.body,Kb,document.body.firstChild);return Kb;};xmp.$.$48.prototype.i_$XF=function(Lb,Mb){var Nb=xmp.i_$PB(Mb);if(Nb){var Ob=xmp.i_$PC(Nb);Ob.removeChild(Nb);}};xmp.$.$48.prototype.i_$XV=function(Pb,Qb){if(this.p_$B6.i_$X4()===xmp.ERRORS){return;}
if(Qb===null){return;}
this.p_$7Z.i_$Z6(this,this.i_$PU(),Pb.i_$XN(),Qb);};xmp.$.$48.prototype.i_$XT=function(e){this.p_$2G("Forwarding viewport error to listener.",e);};xmp.$.$48.prototype.i_$SW=function(Rb,e){this.p_$7M.i_$17K(e);};xmp.$.$48.prototype.i_$YV=function(e){this.p_$7M.i_$17N(e);};xmp.$.$48.prototype.i_$YW=function(e){this.p_$7M.i_$17O(e);};xmp.$.$48.prototype.p_$2G=function(Sb,e){this.p_$HO=false;this.p_$B6.i_$ZI(this);if(false===(e instanceof xmp.$.$27)){this.p_$BG();}
var Tb=e;if(false===(Tb instanceof xmp.$.$4C)){Tb=new xmp.$.$4C(((e.context)?e.context:Sb),((e.rawMessage)?e.rawMessage:e.message));Tb.setInnerError(e);}
this.p_$7M.i_$17K(Tb);};xmp.$.$48.prototype.p_$BJ=function(Ub){try{this.p_$B6.i_$T9(this);var Vb=Ub.getMimeType();var Wb=xmp.$.$2X.i_$11J(this.i_$PU(),Vb);if(!Wb){throw new xmp.$.$22("Initializing native player..","Unable to find native player for MIME type \""+Vb+"\".");}
var Xb={player:Wb,data:{group:this.i_$PU(),viewport:null,volume:0,mute:true,node:Ub,fullscreenEnabled:false,stretchToFit:false}};if(false===this.p_$7Z.i_$Z6(this,this.i_$PU(),Ub.getMimeType(),Xb)){if(Wb.i_$X4()!==this.p_$7L.i_$X4()){Wb.i_$Q7({group:this.i_$PU(),viewport:this.p_$7Z.i_$Z5(),volume:0,mute:true,node:Ub,fullscreenEnabled:false,stretchToFit:false});this.p_$7L=Wb;return true;}
return false;}
return true;}
catch(e){this.p_$BG();throw e;}
return false;};xmp.$.$48.prototype.p_$BG=function(){var Yb=xmp.$.$2X.i_$11J(this.i_$PU(),xmp.i_$11L);if(this.p_$7Z.i_$Z5()===null){this.p_$7Z.i_$Z7(this,this.i_$PU(),xmp.i_$11L,null);}
Yb.i_$Q7({group:this.i_$PU(),viewport:this.p_$7Z.i_$Z5(),volume:0,mute:true,node:null,fullscreenEnabled:false,stretchToFit:false});this.p_$7L=Yb;};xmp.$.$48.prototype.i_$PU=function(){return xmp.CONTROL_STREAM_READER;};xmp.$.$48.prototype.i_$ZG=function(){return this.p_$7L;};xmp.$.$48.prototype.i_$ZE=function(Zb,$b){var ac=this.p_$B5.i_$11E(Zb);ac.i_$ZJ(this,$b,this.p_$B6);this.p_$B6=ac;};xmp.$.$48.prototype.i_$17P=function(){return this.p_$HO;};xmp.$.$49=function(){return{i_$17G:function(bc,cc,dc){if(bc===xmp.WINDOWS_PLATFORM){return new xmp.$.$48(cc,dc);}
else{return new xmp.$.$4A(cc,dc);}}};}();xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0043\u006F\u006E\u0074\u0072\u006F\u006C\u0053\u0074\u0072\u0065\u0061\u006D\u0052\u0065\u0061\u0064\u0065\u0072\u0046\u0061\u0063\u0074\u006F\u0072\u0079',xmp.$.$49,true);xmp.$.$4A=function(ec,fc){};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u004E\u0075\u006C\u006C\u0053\u0074\u0072\u0065\u0061\u006D\u0052\u0065\u0061\u0064\u0065\u0072',xmp.$.$4A);xmp.$.$4A.prototype.i_$T5=function(gc){return null;};xmp.$.$4A.prototype.i_$T9=function(){};xmp.$.$4A.prototype.i_$17P=function(){return false;};xmp.$.$4B=function(hc,ic){xmp.$.$4B.ctor.call(this,"ControlStreamError",hc,ic);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.$.$4B);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0043\u006F\u006E\u0074\u0072\u006F\u006C\u0053\u0074\u0072\u0065\u0061\u006D\u0045\u0072\u0072\u006F\u0072',xmp.$.$4B);xmp.$.$4C=function(jc,kc){xmp.$.$4C.ctor.call(this,"ControlStreamReaderError",jc,kc);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.$.$4C);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0043\u006F\u006E\u0074\u0072\u006F\u006C\u0053\u0074\u0072\u0065\u0061\u006D\u0052\u0065\u0061\u0064\u0065\u0072\u0045\u0072\u0072\u006F\u0072',xmp.$.$4C);xmp.$.$4D=function(lc,mc){xmp.$.$4D.ctor.call(this,"ImageRetrieverError",lc,mc);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.$.$4D);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0049\u006D\u0061\u0067\u0065\u0052\u0065\u0074\u0072\u0069\u0065\u0076\u0065\u0072\u0045\u0072\u0072\u006F\u0072',xmp.$.$4D);xmp.i_$17Q="/PlayerContexts/Global/ImageRetriever";xmp.IMAGE_RETRIEVER_SERVICE="ImageRetriever";xmp.i_$17R="Refresh Interval";xmp.i_$17S="Start Delay";xmp.i_$17T="url";xmp.$.$4E=function(){this.p_$7M=null;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0049\u006D\u0061\u0067\u0065\u0052\u0065\u0074\u0072\u0069\u0065\u0076\u0065\u0072',xmp.$.$4E);xmp.$.$4E.prototype.i_$S5=function(nc){try{this.p_$X=xmp.$.$16.i_$S2(xmp.IMAGE_RETRIEVER_SERVICE);this.p_$HQ(nc);this.p_$7M=nc;this.p_$HR=(Math.round(Math.random()*(10000000-1))+1);var oc=xmp.$.$1B.i_$P4().getGlobalContextNode().getNodeForPath(xmp.i_$17Q);this.p_$GS(oc);this.p_$GU(oc);this.p_$GV();}
catch(e){this.p_$2G("Initializing.",e);}};xmp.$.$4E.prototype.i_$WW=function(){if(this.p_$GW){this.p_$GW.i_$RN();this.p_$GW=null;}
if(this.p_$GX){this.p_$GX.i_$RN();this.p_$GX=null;}};xmp.$.$4E.prototype.p_$GV=function(){if(0===this.p_$GY){this.p_$GZ();}
else{this.p_$GW=this.p_$7F({id:xmp.i_$17D,interval:this.p_$GY,handler:this.p_$H0});this.p_$GW.i_$RL();}};xmp.$.$4E.prototype.p_$GZ=function(){this.p_$GX=this.p_$7F({id:xmp.i_$17E,interval:this.p_$H4,handler:this.p_$HE});this.p_$GX.i_$RL();this.p_$H6();};xmp.$.$4E.prototype.p_$HQ=function(pc){if(!pc){throw new xmp.$.$4D("Validating listener.","Missing image retriever listener.");}
if(false===xmp.i_$OR(pc.i_$17U)){throw new xmp.$.$4D("Validating listener.","Invalid image retriever listener.  Missing \"i_onRetrieveImage\" handler.");}
if(false===xmp.i_$OR(pc.i_$17V)){throw new xmp.$.$4D("Validating listener.","Invalid image retriever listener.  Missing \"i_onImageRetrieverError\" handler.");}};xmp.$.$4E.prototype.p_$H1=function(qc){if(qc.name.length===0){throw new xmp.$.$4D("Validating resource.","Missing image retriever resource name.");}
if(qc.url.length===0){throw new xmp.$.$4D("Validating resource.","Missing image retriever \""+qc.name+"\" url.");}};xmp.$.$4E.prototype.p_$GS=function(rc){this.p_$H4=rc.getInt(xmp.i_$17R,0);if(this.p_$H4===0){throw new xmp.$.$4D("Initializing properties.","Missing image retriever refresh interval.");}
this.p_$GY=rc.getInt(xmp.i_$17S,0);};xmp.$.$4E.prototype.p_$GU=function(sc){this.p_$H5={};var tc=sc.retrieveChildren();var uc=tc.length;for(var i=0;i<uc;i++){var vc=tc[i];var wc={name:vc.getString(xmp.i_$177,xmp.NO_DEFAULT_VALUE),url:vc.getString(xmp.i_$17T,xmp.NO_DEFAULT_VALUE)};this.p_$H1(wc);this.p_$H5[wc.name]=wc;}};xmp.$.$4E.prototype.p_$H6=function(){try{var xc=xmp.getImageRoot();var yc=this.p_$HS();for(var zc=xmp.$.$4.i_$Q7(this.p_$H5);zc.i_$Q9();zc.i_$QB()){try{var Ac=zc.i_$QD();var Bc=xc+Ac.url+"?"+yc;this.p_$7M.i_$17U(Ac.name,Bc);this.p_$X.info((new Date()).toString()+" - Image resource \""+Ac.name+"\" retrieval refresh ("+yc+").");}
catch(e){var Cc="";if(e instanceof xmp.$.$4D){Cc=e.message;}
else{Cc="Error retrieving image resource \""+Ac.name+"\" from url \""+Bc+"\". \n\n"+e.message;}
this.p_$X.warn(Cc);}}}
catch(e2){this.p_$2G("Refreshing all resources.",e2);}};xmp.$.$4E.prototype.p_$7F=function(Dc){var Ec=new xmp.$.$M(Dc.id,Dc.handler,this);return new xmp.$.$1C(Dc.id,Dc.interval,-1,Ec);};xmp.$.$4E.prototype.p_$HE=function(Fc,Gc){this.p_$H6();};xmp.$.$4E.prototype.p_$2G=function(Hc,e){var Ic=e;if(false===(Ic instanceof xmp.$.$4D)){Ic=new xmp.$.$4D(((e.context)?e.context:Hc),((e.rawMessage)?e.rawMessage:e.message));Ic.setInnerError(e);}
this.p_$HF(Ic);if(!this.p_$7M){xmp.handleFatalError(Ic);}
else if(true===xmp.i_$OR(this.p_$7M.i_$17V)){this.p_$7M.i_$17V(Ic);}};xmp.$.$4E.prototype.p_$HF=function(e){this.p_$X.warn(e.message);};xmp.$.$4E.prototype.p_$H0=function(Jc,Kc){var Lc="";try{this.p_$GW.i_$RN();this.p_$GW=null;this.p_$GZ();}
catch(e){this.p_$2G("Starting after delay.",e);}};xmp.$.$4E.prototype.p_$HS=function(){return"cacheID="+this.p_$HR++;};xmp.$.$4F=function(){var Mc={};return{p_$HT:function(Nc){if(!Nc){throw new xmp.util.internals.InvalidArgsError("Missing service name.");}
if(!this.p_$HU){this.p_$HU={};}
var Oc=this.p_$HU[Nc];if(Oc){return Oc;}
if(Nc===xmp.CONTROL_STREAM_SERVICE){Oc=new xmp.$.$47();this.p_$HU[Nc]=Oc;return Oc;}
else if(Nc===xmp.IMAGE_RETRIEVER_SERVICE){Oc=new xmp.$.$4E();this.p_$HU[Nc]=Oc;return Oc;}
throw new xmp.$.$2H("Retrieving service.","Unable to create service \""+Nc+"\".");},i_$S5:function(Pc,Mc){var Qc=Mc.length;for(var i=0;i<Qc;i++){this.p_$HT(Mc[i]).i_$S5(Pc);}},i_$WW:function(){for(var Rc=xmp.$.$4.i_$Q7(this.p_$HU);Rc.i_$Q9();Rc.i_$QB()){var Sc=Rc.i_$QD();Sc.i_$WW();}}};}();xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0053\u0065\u0072\u0076\u0069\u0063\u0065\u0052\u0065\u0067\u0069\u0073\u0074\u0072\u0079',xmp.$.$4F,true);

