try { //--[2016-07-13] Defines customObj for AAM DIL (load before DIL code) mps.aam=mps.aam||{}; mps.aam.INIT = function(){ /*--[ CONFIGURATION ]------------------------------------------------*/ mps.aam._scripts = { 'example': mps._protocol()+'//site.com/example.js', } mps.aam._opts = { 'visitornamespace':'A8AB776A5245B4220A490D44@AdobeOrg', } mps.aam._conf = { 'missingval':'UNKNOWN', 'rootpage':{'type':'home','cat':'home'}, 'cleanregex':/[^-a-z0-9_~. \s]/ig, 'maxlength':25, } mps.aam._status = 0; if(typeof(mps.aam.opts=='object')) mps._merge(mps.aam._opts,mps.aam.opts) if(typeof(mps.aam.conf=='object')) mps._merge(mps.aam._conf,mps.aam.conf) this.cd={}; this._data={}; mps.aam.defineData = function() { this._data.cid = mps.pagevars.cid; this._data.cat = mps.pagevars.cats; this._data.type = mps.pagevars.type; this._data.mpspath = mps._trim(mps.pagevars.path,'/').split('/'); this._data.pathsegs = mps._trim(window.location.pathname,'/').split('/'); this._data.hostsegs = window.location.host.split('.'); // handle path prefix format if(this._data.mpspath[0].indexOf(':')>-1) { var _seg = this._data.mpspath[0].split(':'); this._data.pathprefix = _seg[0]; if(_seg[1]=='') { this._data.mpspath.shift(); } else { this._data.mpspath[0] = _seg[1]; } } this._data.pageinfo={} if(mpscall.is_content===0 || mpscall.is_content==='0') this._data.pageinfo.notcontent=1; if(mpscall.is_content===1 || mpscall.is_content==='1') this._data.pageinfo.iscontent=1; if(this._data.mpspath===0) { this._data.pageinfo.home=1; if(this._data.cat.length===0) this._data.cat.push(this._conf.rootpage.cat); if(this._data.type=='') this._data.type=this._conf.rootpage.cat(type); } this._l('executed: defineData'); return this._data; } mps.aam.setData = function(){ // set nbcu context data variables this.cd['nbcu_contenttype'] = mps.pagevars.type ? mps.pagevars.type : 'page'; this.cd['nbcu_brand'] = mps.pagevars.instance.split('-')[0]; this.cd['nbcu_cleantitle'] = mps.aam._clean(window.document.title,50).replace(/\s\s+/g,' '); // set mps context data variables this.cd['mps_contentid'] = this._data.cid; this.cd['mps_path'] = mps.pagevars.path; if(mps._ext && mps._ext._insertedads) this.cd['mps_cats'] = this._data.cat.join('|'); for(var i=0; i0) this.cd = mps._merge(this.cd, mps.data) for(var i in this.cd) { var _cdval = this.cd[i]; var _isarr = 0; if(typeof(_cdval)=='boolean') _cdval=_cdval+0; if(typeof(_cdval)=='number') _cdval=_cdval.toString(); if(Object.prototype.toString.call(this.cd[i])==='[object Array]') { _cdval.sort(); _isarr = 1; //_cdval=_cdval.join(','); } if(typeof(_cdval)!='string' && !_isarr) { this._l('(skipped applyData: '+i+')'); continue; } _set[i] = _cdval; this.customObj[i] = _cdval; } this._l('executed: applyData'); } mps.aam._status = 1; this._l('INITIALIZED'); return mps.aam._status; } /*--[ INTERNAL ]------------------------------------------------*/ mps.aam._clean=function(str,maxlength,nospaces,lowercase){ if(typeof(maxlength)=='undefined' && this._conf && this._conf.maxlength>0) maxlength = this._conf.maxlength; if(typeof(str)=='boolean') str=str+0; if(typeof(str)=='number') str=str.toString(); if(typeof(str)!='string') return ''; str = str.replace(this._conf.cleanregex,''); if(nospaces) str=str.replace(' ',''); if(maxlength) str=str.substring(0,maxlength); if(lowercase) str.toLowerCase(); return str; } mps.aam._getQS=function(){var a;(window.onpopstate=function(){var b,c=/\+/g,d=/([^&=]+)=?([^&]*)/g,e=window.location.search.substring(1);for(a={};b=d.exec(e);)a[decodeURIComponent(b[1].replace(c," "))]=decodeURIComponent(b[2].replace(c," "))})();return a}; mps.aam._l=function(msg,label){ if(typeof(msg)=='boolean') msg=msg+0; if(typeof(msg)=='number') msg=msg.toString(); if(typeof(msg)=='object') msg=JSON.stringify(msg); if(typeof(msg)!='string') msg='<'+typeof(msg)+'>'; if((typeof(label)!='string'||label.length==0)&&mps.aam._l.label) label = mps.aam._l.label; if(typeof(label)!='string') label=''; mps._d('\u2022'+label+'\u279e '+msg); return msg; }; mps.aam._l.label = '[mps/aam]'; /*--[ EXECUTION ]------------------------------------------------*/ mps.aam.EXECUTE = function(){ this.defineData(); this.setData(); this._applyData(); this._l('EXECUTION COMPLETE'); this._l(this.customObj); return this.customObj; } if(mps.aam.INIT()) window.customObj = mps.aam.EXECUTE(); // /*DEVELOPMENT*/ aam=mps.aam /* This is a Global Component MPS Component Name: adobe-audience-manager.js MPS Component Service ID: adobe-audience-manager MPS Component Path: http://mps.nbcuni.com/request/component/todayshow?name=adobe-audience-manager */ //DIL library starts. ***Not to be altered** "function"!==typeof window.DIL&&(window.DIL=function(a,c){var d=[],b,f;a!==Object(a)&&(a={});var g,k,m,u,w,n,q,D,x,B,K,E;g=a.partner;k=a.containerNSID;m=!!a.disableDestinationPublishingIframe;u=a.iframeAkamaiHTTPS;w=a.mappings;n=a.uuidCookie;q=!0===a.enableErrorReporting;D=a.visitorService;x=a.declaredId;B=!0===a.removeFinishedScriptsAndCallbacks;K=!0===a.delayAllUntilWindowLoad;E=!0===a.disableIDSyncs;var L,M,N,H,F,O,P,Q;L=!0===a.disableScriptAttachment;M=!0===a.disableCORSFiring;N=!0===a.disableDefaultRequest; H=a.afterResultForDefaultRequest;F=a.dpIframeSrc;O=!0===a.testCORS;P=!0===a.useJSONPOnly;Q=a.visitorConstructor;q&&DIL.errorModule.activate();var T=!0===window._dil_unit_tests;(b=c)&&d.push(b+"");if(!g||"string"!==typeof g)return b="DIL partner is invalid or not specified in initConfig",DIL.errorModule.handleError({name:"error",message:b,filename:"dil.js"}),Error(b);b="DIL containerNSID is invalid or not specified in initConfig, setting to default of 0";if(k||"number"===typeof k)k=parseInt(k,10), !isNaN(k)&&0<=k&&(b="");b&&(k=0,d.push(b),b="");f=DIL.getDil(g,k);if(f instanceof DIL&&f.api.getPartner()===g&&f.api.getContainerNSID()===k)return f;if(this instanceof DIL)DIL.registerDil(this,g,k);else return new DIL(a,"DIL was not instantiated with the 'new' operator, returning a valid instance with partner = "+g+" and containerNSID = "+k);var A={IS_HTTPS:"https:"===document.location.protocol,POST_MESSAGE_ENABLED:!!window.postMessage,COOKIE_MAX_EXPIRATION_DATE:"Tue, 19 Jan 2038 03:14:07 UTC"},I= {stuffed:{}},l={},p={firingQueue:[],fired:[],firing:!1,sent:[],errored:[],reservedKeys:{sids:!0,pdata:!0,logdata:!0,callback:!0,postCallbackFn:!0,useImageRequest:!0},callbackPrefix:"demdexRequestCallback",firstRequestHasFired:!1,useJSONP:!0,abortRequests:!1,num_of_jsonp_responses:0,num_of_jsonp_errors:0,num_of_cors_responses:0,num_of_cors_errors:0,corsErrorSources:[],num_of_img_responses:0,num_of_img_errors:0,toRemove:[],removed:[],readyToRemove:!1,platformParams:{d_nsid:k+"",d_rtbd:"json",d_jsonv:DIL.jsonVersion+ "",d_dst:"1"},nonModStatsParams:{d_rtbd:!0,d_dst:!0,d_cts:!0,d_rs:!0},modStatsParams:null,adms:{TIME_TO_CATCH_ALL_REQUESTS_RELEASE:2E3,calledBack:!1,mid:null,noVisitorAPI:!1,VisitorAPI:null,instance:null,releaseType:"no VisitorAPI",isOptedOut:!0,isOptedOutCallbackCalled:!1,admsProcessingStarted:!1,process:function(e){try{if(!this.admsProcessingStarted){this.admsProcessingStarted=!0;var s=this,a,h,b,d;if("function"===typeof e&&"function"===typeof e.getInstance){if(D===Object(D)&&(a=D.namespace)&&"string"=== typeof a)h=e.getInstance(a,{idSyncContainerID:k});else{this.releaseType="no namespace";this.releaseRequests();return}if(h===Object(h)&&h instanceof e&&"function"===typeof h.isAllowed&&"function"===typeof h.getMarketingCloudVisitorID&&"function"===typeof h.getCustomerIDs&&"function"===typeof h.isOptedOut){this.VisitorAPI=e;if(!h.isAllowed()){this.releaseType="VisitorAPI not allowed";this.releaseRequests();return}this.instance=h;b=function(e){"VisitorAPI"!==s.releaseType&&(s.mid=e,s.releaseType="VisitorAPI", s.releaseRequests())};d=h.getMarketingCloudVisitorID(b);if("string"===typeof d&&d.length){b(d);return}setTimeout(function(){"VisitorAPI"!==s.releaseType&&(s.releaseType="timeout",s.releaseRequests())},this.TIME_TO_CATCH_ALL_REQUESTS_RELEASE);return}this.releaseType="invalid instance"}else this.noVisitorAPI=!0;this.releaseRequests()}}catch(c){this.releaseRequests()}},releaseRequests:function(){this.calledBack=!0;p.registerRequest()},getMarketingCloudVisitorID:function(){return this.instance?this.instance.getMarketingCloudVisitorID(): null},getMIDQueryString:function(){var e=v.isPopulatedString,s=this.getMarketingCloudVisitorID();e(this.mid)&&this.mid===s||(this.mid=s);return e(this.mid)?"d_mid="+this.mid+"&":""},getCustomerIDs:function(){return this.instance?this.instance.getCustomerIDs():null},getCustomerIDsQueryString:function(e){if(e===Object(e)){var s="",a=[],h=[],b,d;for(b in e)e.hasOwnProperty(b)&&(h[0]=b,d=e[b],d===Object(d)&&(h[1]=d.id||"",h[2]=d.authState||0,a.push(h),h=[]));if(h=a.length)for(e=0;e=b)return"Error: config.minutesToLive needs to be a positive number";d=t.encodeAndBuildRequest(["",e.dpid,e.dpuuid||""],",");e=["ibs",h(e.dpid),"img", h(a),b,"",d];y.addMessage(e.join("|"));p.firstRequestHasFired&&y.requestToProcess();return"Successfully queued"},aamIdSync:function(e){if(E)return"Error: id syncs have been disabled";if(e!==Object(e)||"string"!==typeof e.dpuuid||!e.dpuuid.length)return"Error: config or config.dpuuid is empty";e.url="//dpm.demdex.net/ibs:dpid="+e.dpid+"&dpuuid="+e.dpuuid;return this.idSync(e)},passData:function(e){if(v.isEmptyObject(e))return"Error: json is empty or not an object";y.ibsDeleted.push(e.ibs);delete e.ibs; C.defaultCallback(e);return e},getPlatformParams:function(){return p.platformParams},getEventCallConfigParams:function(){var e=p,a=e.modStatsParams,b=e.platformParams,h;if(!a){a={};for(h in b)b.hasOwnProperty(h)&&!e.nonModStatsParams[h]&&(a[h.replace(/^d_/,"")]=b[h]);e.modStatsParams=a}return a}},C={corsMetadata:function(){var e="none",a=!0;"undefined"!==typeof XMLHttpRequest&&XMLHttpRequest===Object(XMLHttpRequest)&&("withCredentials"in new XMLHttpRequest?e="XMLHttpRequest":(new Function("/*@cc_on return /^10/.test(@_jscript_version) @*/"))()? e="XMLHttpRequest":"undefined"!==typeof XDomainRequest&&XDomainRequest===Object(XDomainRequest)&&(a=!1),0>>0;if("function"!== typeof b)throw new TypeError;for(var g=Array(d),f=0;f>>0;if("function"!==typeof b)throw new TypeError;for(var g=[],f=0;fthis.LIMIT);a++);this.errorMessage=1