!function e(t,n,i){function a(s,o){if(!n[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){return a(t[s][1][e]||e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;sa)return 1;if(a>i)return-1}return 0}if(!e)throw new Error("Visitor requires Adobe Marketing Cloud Org ID");var g=this;g.version="2.4.0";var _=i,m=_.Visitor;m.version=g.version,_.s_c_in||(_.s_c_il=[],_.s_c_in=0),g._c="Visitor",g._il=_.s_c_il,g._in=_.s_c_in,g._il[g._in]=g,_.s_c_in++,g._log={requests:[]};var p=_.document,h={POST_MESSAGE_ENABLED:!!_.postMessage,DAYS_BETWEEN_SYNC_ID_CALLS:1,MILLIS_PER_DAY:864e5,ADOBE_MC:"adobe_mc",ADOBE_MC_SDID:"adobe_mc_sdid",VALID_VISITOR_ID_REGEX:/^[0-9a-fA-F\-]+$/,ADOBE_MC_TTL_IN_MIN:5,POSITIVE_INT_REGEX:/^\d+$/,VERSION_REGEX:/vVersion\|((\d+\.)?(\d+\.)?(\*|\d+))(?=$|\|)/,HAS_JSON_STRINGIFY:window.JSON===Object(window.JSON)&&"function"==typeof window.JSON.stringify},S=function(e){return!Object.prototype[e]};g._hash=function(e){var t,n=0;if(e)for(t=0;t2&&(c=10),i=Math.floor(Math.random()*l),s+=a.substring(i,i+1),0===n&&9===i?l=3:(1===n||2===n)&&10!==l&&i<2?l=10:n>2&&(l=10);return r+s},g._getDomain=function(e){var t;if(!e&&_.location&&(e=_.location.hostname),t=e)if(/^[0-9.]+$/.test(t))t="";else{var n=",ac,ad,ae,af,ag,ai,al,am,an,ao,aq,ar,as,at,au,aw,ax,az,ba,bb,be,bf,bg,bh,bi,bj,bm,bo,br,bs,bt,bv,bw,by,bz,ca,cc,cd,cf,cg,ch,ci,cl,cm,cn,co,cr,cu,cv,cw,cx,cz,de,dj,dk,dm,do,dz,ec,ee,eg,es,et,eu,fi,fm,fo,fr,ga,gb,gd,ge,gf,gg,gh,gi,gl,gm,gn,gp,gq,gr,gs,gt,gw,gy,hk,hm,hn,hr,ht,hu,id,ie,im,in,io,iq,ir,is,it,je,jo,jp,kg,ki,km,kn,kp,kr,ky,kz,la,lb,lc,li,lk,lr,ls,lt,lu,lv,ly,ma,mc,md,me,mg,mh,mk,ml,mn,mo,mp,mq,mr,ms,mt,mu,mv,mw,mx,my,na,nc,ne,nf,ng,nl,no,nr,nu,nz,om,pa,pe,pf,ph,pk,pl,pm,pn,pr,ps,pt,pw,py,qa,re,ro,rs,ru,rw,sa,sb,sc,sd,se,sg,sh,si,sj,sk,sl,sm,sn,so,sr,st,su,sv,sx,sy,sz,tc,td,tf,tg,th,tj,tk,tl,tm,tn,to,tp,tr,tt,tv,tw,tz,ua,ug,uk,us,uy,uz,va,vc,ve,vg,vi,vn,vu,wf,ws,yt,",i=t.split("."),a=i.length-1,r=a-1;if(a>1&&i[a].length<=2&&(2===i[a-1].length||n.indexOf(","+i[a]+",")<0)&&r--,r>0)for(t="";a>=r;)t=i[a]+(t?".":"")+t,a--}return t},g.cookieRead=function(e){e=encodeURIComponent(e);var t=(";"+p.cookie).split(" ").join(";"),n=t.indexOf(";"+e+"="),i=n<0?n:t.indexOf(";",n+1);return n<0?"":decodeURIComponent(t.substring(n+2+e.length,i<0?t.length:i))},g.cookieWrite=function(e,t,n){var i,a=g.cookieLifetime;if(t=""+t,a=a?(""+a).toUpperCase():"",n&&"SESSION"!==a&&"NONE"!==a){if(i=""!==t?parseInt(a||0,10):-60)(n=new Date).setTime(n.getTime()+1e3*i);else if(1===n){var r=(n=new Date).getYear();n.setYear(r+2+(r<1900?1900:0))}}else n=0;return e&&"NONE"!==a?(p.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+"; path=/;"+(n?" expires="+n.toGMTString()+";":"")+(g.cookieDomain?" domain="+g.cookieDomain+";":""),g.cookieRead(e)===t):0},g._callbackList=null,g._callCallback=function(e,t){try{"function"==typeof e?e.apply(_,t):e[1].apply(e[0],t)}catch(e){}},g._registerCallback=function(e,t){t&&(null==g._callbackList&&(g._callbackList={}),null==g._callbackList[e]&&(g._callbackList[e]=[]),g._callbackList[e].push(t))},g._callAllCallbacks=function(e,t){if(null!=g._callbackList){var n=g._callbackList[e];if(n)for(;n.length>0;)g._callCallback(n.shift(),t)}},g._addQuerystringParam=function(e,t,n,i){var a=encodeURIComponent(t)+"="+encodeURIComponent(n),r=R.parseHash(e),s=R.hashlessUrl(e);if(-1===s.indexOf("?"))return s+"?"+a+r;var o=s.split("?"),c=o[0]+"?",l=o[1];return c+R.addQueryParamAtLocation(l,a,i)+r},g._extractParamFromUri=function(e,t){var n=new RegExp("[\\?&#]"+t+"=([^&#]*)").exec(e);if(n&&n.length)return decodeURIComponent(n[1])},g._parseAdobeMcFromUrl=n(h.ADOBE_MC),g._parseAdobeMcSdidFromUrl=n(h.ADOBE_MC_SDID),g._attemptToPopulateSdidFromUrl=function(t){var n=g._parseAdobeMcSdidFromUrl(t),i=1e9;n&&n.TS&&(i=R.getTimestampInSeconds()-n.TS),n&&n.SDID&&n[C]===e&&ih.ADOBE_MC_TTL_IN_MIN||t[C]!==e)return;r(t)}},g.resetState=function(e){e?g._mergeServerState(e):o()},g._mergeServerState=function(e){if(e)try{if(i=e,(e=R.isObject(i)?i:R.parseJSON(i))[g.marketingCloudOrgID]){var t=e[g.marketingCloudOrgID];n=t.customerIDs,R.isObject(n)&&g.setCustomerIDs(n),o(t.sdid)}}catch(e){throw new Error("`serverState` has an invalid format.")}var n,i},g._timeout=null,g._loadData=function(e,t,n,i){t=g._addQuerystringParam(t,"d_fieldgroup",e,1),i.url=g._addQuerystringParam(i.url,"d_fieldgroup",e,1),i.corsUrl=g._addQuerystringParam(i.corsUrl,"d_fieldgroup",e,1),x.fieldGroupObj[e]=!0,i===Object(i)&&i.corsUrl&&"XMLHttpRequest"===g._requestProcs.corsMetadata.corsType?g._requestProcs.fireCORS(i,n,e):g.useCORSOnly||g._loadJSONP(e,t,n)},g._loadJSONP=function(e,t,n){var i,a=0,r=0;if(t&&p){for(i=0;!a&&i<2;){try{a=(a=p.getElementsByTagName(i>0?"HEAD":"head"))&&a.length>0?a[0]:0}catch(e){a=0}i++}if(!a)try{p.body&&(a=p.body)}catch(e){a=0}if(a)for(i=0;!r&&i<2;){try{r=p.createElement(i>0?"SCRIPT":"script")}catch(e){r=0}i++}}if(t&&a&&r){r.type="text/javascript",r.src=t,a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r);var s=g.loadTimeout;n&&(null==g._timeout&&(g._timeout={}),g._timeout[e]=setTimeout(function(){n(!0)},s)),g._log.requests.push(t)}else n&&n()},g._clearTimeout=function(e){null!=g._timeout&&g._timeout[e]&&(clearTimeout(g._timeout[e]),g._timeout[e]=0)},g._isAllowedDone=!1,g._isAllowedFlag=!1,g.isAllowed=function(){return g._isAllowedDone||(g._isAllowedDone=!0,(g.cookieRead(g.cookieName)||g.cookieWrite(g.cookieName,"T",1))&&(g._isAllowedFlag=!0)),g._isAllowedFlag},g._fields=null,g._fieldsExpired=null;var D="MC",I="MCMID",C="MCORGID",v="MCCIDH",A="MCSYNCS",y="MCSYNCSOP",M="MCIDTS",b="MCOPTOUT",E="A",O="MCAID",T="AAM",k="MCAAMLH",L="MCAAMB",P="NONE";g._settingsDigest=0,g._getSettingsDigest=function(){if(!g._settingsDigest){var e=g.version;g.audienceManagerServer&&(e+="|"+g.audienceManagerServer),g.audienceManagerServerSecure&&(e+="|"+g.audienceManagerServerSecure),g._settingsDigest=g._hash(e)}return g._settingsDigest},g._readVisitorDone=!1,g._readVisitor=function(){if(!g._readVisitorDone){g._readVisitorDone=!0;var e,t,n,i,a,r,s=g._getSettingsDigest(),o=!1,c=g.cookieRead(g.cookieName),l=new Date;if(null==g._fields&&(g._fields={}),c&&"T"!==c)for((c=c.split("|"))[0].match(/^[\-0-9]+$/)&&(parseInt(c[0],10)!==s&&(o=!0),c.shift()),c.length%2==1&&c.pop(),e=0;e1?(a=parseInt(t[1],10),r=t[1].indexOf("s")>0):(a=0,r=!1),o&&(n===v&&(i=""),a>0&&(a=l.getTime()/1e3-60)),n&&i&&(g._setField(n,i,1),a>0&&(g._fields["expire"+n]=a+(r?"s":""),(l.getTime()>=1e3*a||r&&!g.cookieRead(g.sessionCookieName))&&(g._fieldsExpired||(g._fieldsExpired={}),g._fieldsExpired[n]=!0)));!g._getField(O)&&R.isTrackingServerPopulated()&&(c=g.cookieRead("s_vi"))&&((c=c.split("|")).length>1&&c[0].indexOf("v1")>=0&&((e=(i=c[1]).indexOf("["))>=0&&(i=i.substring(0,e)),i&&i.match(h.VALID_VISITOR_ID_REGEX)&&g._setField(O,i)))}},g._appendVersionTo=function(e){var t="vVersion|"+g.version,n=e?g._getCookieVersion(e):null;return n?R.areVersionsDifferent(n,g.version)&&(e=e.replace(h.VERSION_REGEX,t)):e+=(e?"|":"")+t,e},g._writeVisitor=function(){var e,t,n=g._getSettingsDigest();for(e in g._fields)S(e)&&g._fields[e]&&"expire"!==e.substring(0,6)&&(t=g._fields[e],n+=(n?"|":"")+e+(g._fields["expire"+e]?"-"+g._fields["expire"+e]:"")+"|"+t);n=g._appendVersionTo(n),g.cookieWrite(g.cookieName,n,1)},g._getField=function(e,t){return null==g._fields||!t&&g._fieldsExpired&&g._fieldsExpired[e]?null:g._fields[e]},g._setField=function(e,t,n){null==g._fields&&(g._fields={}),g._fields[e]=t,n||g._writeVisitor()},g._getFieldList=function(e,t){var n=g._getField(e,t);return n?n.split("*"):null},g._setFieldList=function(e,t,n){g._setField(e,t?t.join("*"):"",n)},g._getFieldMap=function(e,t){var n=g._getFieldList(e,t);if(n){var i,a={};for(i=0;i=0;g._callCallback(e,[i])},n);return i?i===m.OptOut.GLOBAL||i.indexOf(t)>=0:null}return!1},g.appendVisitorIDsTo=function(e){var t=h.ADOBE_MC,n=l([[I,g._getField(I)],[O,g._getField(O)],[C,g.marketingCloudOrgID]]);try{return g._addQuerystringParam(e,t,n)}catch(t){return e}},g.appendSupplementalDataIDTo=function(e,t){if(!(t=t||g.getSupplementalDataID(R.generateRandomString(),!0)))return e;var n=h.ADOBE_MC_SDID,i="SDID="+encodeURIComponent(t)+"|";i+=C+"="+encodeURIComponent(g.marketingCloudOrgID)+"|",i+="TS="+R.getTimestampInSeconds();try{return g._addQuerystringParam(e,n,i)}catch(t){return e}},g._xd={postMessage:function(e,t,n){var i=1;t&&(h.POST_MESSAGE_ENABLED?n.postMessage(e,t.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):t&&(n.location=t.replace(/#.*$/,"")+"#"+ +new Date+i+++"&"+e))},receiveMessage:function(e,t){var n;try{h.POST_MESSAGE_ENABLED&&(e&&(n=function(n){if("string"==typeof t&&n.origin!==t||"[object Function]"===Object.prototype.toString.call(t)&&!1===t(n.origin))return!1;e(n)}),_.addEventListener?_[e?"addEventListener":"removeEventListener"]("message",n,!1):_[e?"attachEvent":"detachEvent"]("\xe5",n))}catch(e){}}};var R={addListener:p.addEventListener?function(e,t,n){e.addEventListener(t,function(e){"function"==typeof n&&n(e)},!1)}:p.attachEvent?function(e,t,n){e.attachEvent("on"+t,function(e){"function"==typeof n&&n(e)})}:void 0,map:function(e,t){if(Array.prototype.map)return e.map(t);if(void 0===e||null==e)throw new TypeError;var n=Object(e),i=n.length>>>0;if("function"!=typeof t)throw new TypeError;for(var a=new Array(i),r=arguments[1],s=0;s0?e.substr(t):""},hashlessUrl:function(e){var t=e.indexOf("#");return t>0?e.substr(0,t):e},addQueryParamAtLocation:function(e,t,n){var i=e.split("&");return n=null!=n?n:i.length,i.splice(n,0,t),i.join("&")},isFirstPartyAnalyticsVisitorIDCall:function(e,t,n){return e===O&&(t||(t=g.trackingServer),n||(n=g.trackingServerSecure),!("string"!=typeof(i=g.loadSSL?n:t)||!i.length)&&i.indexOf("2o7.net")<0&&i.indexOf("omtrdc.net")<0);var i},isObject:function(e){return Boolean(e&&e===Object(e))},isLessThan:function(e,t){return g._compareVersions(e,t)<0},areVersionsDifferent:function(e,t){return 0!==g._compareVersions(e,t)},removeCookie:function(e){document.cookie=encodeURIComponent(e)+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"},isTrackingServerPopulated:function(){return!!g.trackingServer||!!g.trackingServerSecure},parseJSON:function(e,t){function i(e,n){var a,r,s=e[n];if(s&&"object"==typeof s)for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&(void 0!==(r=i(s,a))?s[a]=r:delete s[a]);return t.call(e,n,s)}if("object"==typeof JSON&&"function"==typeof JSON.parse)return JSON.parse(e,t);var n,r=/^[\],:{}\s]*$/,a=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,s=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,o=/(?:^|:|,)(?:\s*\[)+/g,l=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;if(e=String(e),l.lastIndex=0,l.test(e)&&(e=e.replace(l,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),r.test(e.replace(a,"@").replace(s,"]").replace(o,"")))return n=eval("("+e+")"),"function"==typeof t?i({"":n},""):n;throw new SyntaxError("JSON.parse")},getTimestampInSeconds:function(){return Math.round((new Date).getTime()/1e3)},parsePipeDelimetedKeyValues:function(e){for(var t={},n=e.split("|"),i=0,a=n.length;i0&&(ah=!1)),{corsType:_g,corsCookiesEnabled:ah}),getCORSInstance:function(){return"none"===this.corsMetadata.corsType?null:new _[this.corsMetadata.corsType]},fireCORS:function(e,t){function n(t){var n;try{if((n=JSON.parse(t))!==Object(n))return void i.handleCORSError(e,null,"Response is not JSON")}catch(t){return void i.handleCORSError(e,t,"Error parsing response as JSON")}try{for(var a=e.callback,r=_,s=0;s=r&&(e.splice(a,1),a--);return{dataPresent:s,dataValid:o}},manageSyncsSize:function(e){if(e.join("*").length>this.MAX_SYNCS_LENGTH)for(e.sort(function(e,t){return parseInt(e.split("-")[1],10)-parseInt(t.split("-")[1],10)});e.join("*").length>this.MAX_SYNCS_LENGTH;)e.shift()},fireSync:function(e,t,n,i,a,r){var s=this;if(e){if("img"===t.tag){var o,c,l,u,d=t.url,f=g.loadSSL?"https:":"http:";for(o=0,c=d.length;oh.DAYS_BETWEEN_SYNC_ID_CALLS},attachIframeASAP:function(){function e(){t.startedAttachingIframe||(document.body?t.attachIframe():setTimeout(e,30))}var t=this;e()}};g._destinationPublishing=F,g.timeoutMetricsLog=[];var N,x={isClientSideMarketingCloudVisitorID:null,MCIDCallTimedOut:null,AnalyticsIDCallTimedOut:null,AAMIDCallTimedOut:null,fieldGroupObj:{},setState:function(e,t){switch(e){case D:!1===t?!0!==this.MCIDCallTimedOut&&(this.MCIDCallTimedOut=!1):this.MCIDCallTimedOut=t;break;case E:!1===t?!0!==this.AnalyticsIDCallTimedOut&&(this.AnalyticsIDCallTimedOut=!1):this.AnalyticsIDCallTimedOut=t;break;case T:!1===t?!0!==this.AAMIDCallTimedOut&&(this.AAMIDCallTimedOut=!1):this.AAMIDCallTimedOut=t}}};g.isClientSideMarketingCloudVisitorID=function(){return x.isClientSideMarketingCloudVisitorID},g.MCIDCallTimedOut=function(){return x.MCIDCallTimedOut},g.AnalyticsIDCallTimedOut=function(){return x.AnalyticsIDCallTimedOut},g.AAMIDCallTimedOut=function(){return x.AAMIDCallTimedOut},g.idSyncGetOnPageSyncInfo=function(){return g._readVisitor(),g._getField(y)},g.idSyncByURL=function(e){var t=u(e||{});if(t.error)return t.error;var n,i,a=e.url,r=encodeURIComponent,s=F;return a=a.replace(/^https:/,"").replace(/^http:/,""),n=R.encodeAndBuildRequest(["",e.dpid,e.dpuuid||""],","),i=["ibs",r(e.dpid),"img",r(a),t.ttl,"",n], s.addMessage(i.join("|")),s.requestToProcess(),"Successfully queued"},g.idSyncByDataSource=function(e){return e===Object(e)&&"string"==typeof e.dpuuid&&e.dpuuid.length?(e.url="//dpm.demdex.net/ibs:dpid="+e.dpid+"&dpuuid="+e.dpuuid,g.idSyncByURL(e)):"Error: config or config.dpuuid is empty"},g._compareVersions=function(e,t){if(e===t)return 0;var n=e.toString().split("."),i=t.toString().split(".");return c(n.concat(i))?(d(n,i),f(n,i)):NaN},g._getCookieVersion=function(e){e=e||g.cookieRead(g.cookieName);var t=h.VERSION_REGEX.exec(e);return t&&t.length>1?t[1]:null},g._resetAmcvCookie=function(e){var t=g._getCookieVersion();t&&!R.isLessThan(t,e)||R.removeCookie(g.cookieName)},g.setAsCoopSafe=function(){j=!0},g.setAsCoopUnsafe=function(){j=!1},e.indexOf("@")<0&&(e+="@AdobeOrg"),g.marketingCloudOrgID=e,g.cookieName="AMCV_"+e,g.sessionCookieName="AMCVS_"+e,g.cookieDomain=g._getDomain(),g.cookieDomain===_.location.hostname&&(g.cookieDomain=""),g.loadSSL=_.location.protocol.toLowerCase().indexOf("https")>=0,g.loadTimeout=3e4,g.CORSErrors=[],g.marketingCloudServer=g.audienceManagerServer="dpm.demdex.net",g.sdidParamExpiry=30;var V={};V[k]=!0,V[L]=!0;var j=null;if(t&&"object"==typeof t){var U;for(U in t)S(U)&&(g[U]=t[U]);g.idSyncContainerID=g.idSyncContainerID||0,j="boolean"==typeof g.isCoopSafe?g.isCoopSafe:R.parseBoolean(g.isCoopSafe),g.resetBeforeVersion&&g._resetAmcvCookie(g.resetBeforeVersion),g._attemptToPopulateIdsFromUrl(),g._attemptToPopulateSdidFromUrl(),g._readVisitor();var H=g._getField(M),B=Math.ceil((new Date).getTime()/h.MILLIS_PER_DAY);!g.idSyncDisableSyncs&&F.canMakeSyncIDCall(H,B)&&(g._setFieldExpire(L,-1),g._setField(M,B)),g.getMarketingCloudVisitorID(),g.getAudienceManagerLocationHint(),g.getAudienceManagerBlob(),g._mergeServerState(g.serverState)}else g._attemptToPopulateIdsFromUrl(),g._attemptToPopulateSdidFromUrl();if(!g.idSyncDisableSyncs){F.checkDPIframeSrc();var G=function(){var e=F;e.readyToAttachIframe()&&e.attachIframe()};R.addListener(_,"load",function(){m.windowLoaded=!0,G()});try{g._xd.receiveMessage(function(e){F.receiveMessage(e.data)},F.iframeHost)}catch(e){}}g.whitelistIframeDomains&&h.POST_MESSAGE_ENABLED&&(g.whitelistIframeDomains=g.whitelistIframeDomains instanceof Array?g.whitelistIframeDomains:[g.whitelistIframeDomains],g.whitelistIframeDomains.forEach(function(t){var n=new a(e,t),i=s(g,n);g._xd.receiveMessage(i,t)}))};o.getInstance=function(e,t){if(!e)throw new Error("Visitor requires Adobe Marketing Cloud Org ID");e.indexOf("@")<0&&(e+="@AdobeOrg");var n=function(){var t=i.s_c_il;if(t)for(var n=0;n0&&T.domReady(T.bind(this.initialize,this))}function u(){var e=this.eventRegex=/^hover\(([0-9]+)\)$/,t=this.rules=[];T.each(T.rules,function(n){n.event.match(e)&&t.push([Number(n.event.match(e)[1]),n.selector])})}function g(e){this.delay=250,this.FB=e,T.domReady(T.bind(function(){T.poll(T.bind(this.initialize,this),this.delay,8)},this))}function d(t){T.domReady(T.bind(function(){this.twttr=t||e.twttr,this.initialize()},this))}function f(){this.lastURL=T.URL(),this._fireIfURIChanged=T.bind(this.fireIfURIChanged,this),this._onPopState=T.bind(this.onPopState,this),this._onHashChange=T.bind(this.onHashChange,this),this._pushState=T.bind(this.pushState,this),this._replaceState=T.bind(this.replaceState,this),this.initialize()}function h(e){T.BaseTool.call(this,e),this.defineListeners(),this.beaconMethod="plainBeacon",this.adapt=new h.DataAdapters,this.dataProvider=new h.DataProvider.Aggregate}function p(e){T.BaseTool.call(this,e),this.name=e.name||"VisitorID",this.initialize()}function m(e){T.BaseTool.call(this,e),this.varBindings={},this.events=[],this.products=[],this.customSetupFuns=[]}function v(){T.BaseTool.call(this),this.asyncScriptCallbackQueue=[],this.argsForBlockingScripts=[]}function y(e){T.BaseTool.call(this,e),this.styleElements={},this.targetPageParamsStore={}}function b(e){T.BaseTool.call(this,e),this.name=e.name||"Basic"}function S(e){T.BaseTool.call(this,e)}function _(e){T.BaseTool.call(this,e)}var D,I,C,E=Object.prototype.toString,k=e._satellite&&e._satellite.override,T={initialized:!1,$data:function(e,t,i){if(e){var a="__satellite__",r=T.dataCache,s=e[a];s||(s=e[a]=T.uuid++);var o=r[s];if(o||(o=r[s]={}),i===n)return o[t];o[t]=i}},uuid:1,dataCache:{},keys:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},values:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t},isArray:Array.isArray||function(e){return"[object Array]"===E.apply(e)},isObject:function(e){return null!=e&&!T.isArray(e)&&"object"==typeof e},isString:function(e){return"string"==typeof e},isNumber:function(e){return"[object Number]"===E.apply(e)&&!T.isNaN(e)},isNaN:function(e){return e!=e},isRegex:function(e){return e instanceof RegExp},isLinkTag:function(e){return!(!e||!e.nodeName||"a"!==e.nodeName.toLowerCase())},each:function(e,t,n){for(var i=0,a=e.length;i";t.push(e)}if(T.isArray(e))return"["+T.map(e,function(e){return T.stringify(e,t)}).join(",")+"]";if(T.isString(e))return'"'+String(e)+'"';if(T.isObject(e)){var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(i+": "+T.stringify(e[i],t));return"{"+n.join(", ")+"}"}return String(e)},trim:function(e){return null==e?null:e.trim?e.trim():e.replace(/^ */,"").replace(/ *$/,"")},bind:function(e,t){return function(){return e.apply(t,arguments)}},throttle:function(e,t){var n=null;return function(){var i=this,a=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(i,a)},t)}},domReady:function(e){function n(e){for(d=1;e=a.shift();)e()}var i,a=[],r=!1,s=t,o=s.documentElement,c=o.doScroll,l="DOMContentLoaded",u="addEventListener",g="onreadystatechange",d=/^loade|^c/.test(s.readyState);return s[u]&&s[u](l,i=function(){s.removeEventListener(l,i,r),n()},r),c&&s.attachEvent(g,i=function(){/^c/.test(s.readyState)&&(s.detachEvent(g,i),n())}),e=c?function(t){self!=top?d?t():a.push(t):function(){try{o.doScroll("left")}catch(n){return setTimeout(function(){e(t)},50)}t()}()}:function(e){d?e():a.push(e)}}(),loadScript:function(e,n){var i=t.createElement("script");T.scriptOnLoad(e,i,n),i.src=e,t.getElementsByTagName("head")[0].appendChild(i)},scriptOnLoad:function(e,t,n){function i(e){e&&T.logError(e),n&&n(e)}"onload"in t?(t.onload=function(){i()},t.onerror=function(){i(new Error("Failed to load script "+e))}):"readyState"in t&&(t.onreadystatechange=function(){var e=t.readyState;"loaded"!==e&&"complete"!==e||(t.onreadystatechange=null,i())})},loadScriptOnce:function(e,t){T.loadedScriptRegistry[e]||T.loadScript(e,function(n){n||(T.loadedScriptRegistry[e]=!0),t&&t(n)})},loadedScriptRegistry:{},loadScriptSync:function(e){t.write?T.domReadyFired?T.notify('Cannot load sync the "'+e+'" script after DOM Ready.',1):(e.indexOf('"')>-1&&(e=encodeURI(e)),t.write('')):T.notify('Cannot load sync the "'+e+'" script because "document.write" is not available',1)},pushAsyncScript:function(e){T.tools["default"].pushAsyncScript(e)},pushBlockingScript:function(e){T.tools["default"].pushBlockingScript(e)},addEventHandler:e.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},removeEventHandler:e.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},preventDefault:e.addEventListener?function(e){e.preventDefault()}:function(e){e.returnValue=!1},stopPropagation:function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()},containsElement:function(e,t){return e.contains?e.contains(t):!!(16&e.compareDocumentPosition(t))},matchesCss:function(n){function i(e,t){var n=t.tagName;return!!n&&e.toLowerCase()===n.toLowerCase()}var a=n.matchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||n.msMatchesSelector;return a?function(n,i){if(i===t||i===e)return!1;try{return a.call(i,n)}catch(r){return!1}}:n.querySelectorAll?function(e,t){if(!t.parentNode)return!1;if(e.match(/^[a-z]+$/i))return i(e,t);try{for(var n=t.parentNode.querySelectorAll(e),a=n.length;a--;)if(n[a]===t)return!0}catch(r){}return!1}:function(e,t){if(e.match(/^[a-z]+$/i))return i(e,t);try{return T.Sizzle.matches(e,[t]).length>0}catch(n){return!1}}}(t.documentElement),cssQuery:(D=t,D.querySelectorAll?function(e,t){var n;try{n=D.querySelectorAll(e)}catch(i){n=[]}t(n)}:function(e,t){if(T.Sizzle){var n;try{n=T.Sizzle(e)}catch(i){n=[]}t(n)}else T.sizzleQueue.push([e,t])}),hasAttr:function(e,t){return e.hasAttribute?e.hasAttribute(t):e[t]!==n},inherit:function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},toArray:function(){try{var e=Array.prototype.slice;return e.call(t.documentElement.childNodes,0)[0].nodeType,function(t){return e.call(t,0)}}catch(n){return function(e){for(var t=[],n=0,i=e.length;n=n||e()||setTimeout(i,t)}var a=0;t=t||1e3,i()},escapeForHtml:function(e){return e?String(e).replace(/\&/g,"&").replace(/\/g,">").replace(/\"/g,""").replace(/\'/g,"'").replace(/\//g,"/"):e}};T.availableTools={},T.availableEventEmitters=[],T.fireOnceEvents=["condition","elementexists"],T.initEventEmitters=function(){T.eventEmitters=T.map(T.availableEventEmitters,function(e){return new e})},T.eventEmitterBackgroundTasks=function(){T.each(T.eventEmitters,function(e){"backgroundTasks"in e&&e.backgroundTasks()})},T.initTools=function(e){var t={"default":new v},n=T.settings.euCookieName||"sat_track";for(var i in e)if(e.hasOwnProperty(i)){var a,r,s;if((a=e[i]).euCookie)if("true"!==T.readCookie(n))continue;if(!(r=T.availableTools[a.engine])){var o=[];for(var c in T.availableTools)T.availableTools.hasOwnProperty(c)&&o.push(c);throw new Error("No tool engine named "+a.engine+", available: "+o.join(",")+".")}(s=new r(a)).id=i,t[i]=s}return t},T.preprocessArguments=function(e,t,n,i,a){function r(e){return i&&T.isString(e)?e.toLowerCase():e}function s(e){var c={};for(var l in e)if(e.hasOwnProperty(l)){var u=e[l];T.isObject(u)?c[l]=s(u):T.isArray(u)?c[l]=o(u,i):c[l]=r(T.replace(u,t,n,a))}return c}function o(e){for(var i=[],a=0,o=e.length;athis.keepLimit&&this.messages.shift(),this.outputEnabled&&this.echo(n,e)},getHistory:function(){return this.messages},clearHistory:function(){this.messages=[]},setOutputState:function(e){this.outputEnabled!=e&&(this.outputEnabled=e,e?this.flush():this.flushed=!1)},echo:function(t,n){e.console&&e.console[t]("SATELLITE: "+n)},flush:function(){this.flushed||(T.each(this.messages,function(e){!0!==e[2]&&(this.echo(e[0],e[1]),e[2]=!0)},this),this.flushed=!0)}},T.notify=T.bind(T.Logger.message,T.Logger),T.cleanText=function(e){return null==e?null:T.trim(e).replace(/\s+/g," ")},T.cleanText.legacy=function(e){return null==e?null:T.trim(e).replace(/\s{2,}/g," ").replace(/[^\000-\177]*/g,"")},T.text=function(e){return e.textContent||e.innerText},T.specialProperties={text:T.text,cleanText:function(e){return T.cleanText(T.text(e))}},T.getObjectProperty=function(e,t,i){for(var a,r=t.split("."),s=e,o=T.specialProperties,c=0,l=r.length;c2){var n=arguments[2];"pageview"===t?T.dataElementSafe.pageviewCache[e]=n:"session"===t?T.setCookie("_sdsat_"+e,n):"visitor"===t&&T.setCookie("_sdsat_"+e,n,730)}else{if("pageview"===t)return T.dataElementSafe.pageviewCache[e];if("session"===t||"visitor"===t)return T.readCookie("_sdsat_"+e)}},T.dataElementSafe.pageviewCache={},T.realGetDataElement=function(t){var n;return t.selector?T.hasSelector&&T.cssQuery(t.selector,function(e){if(e.length>0){var i=e[0];"text"===t.property?n=i.innerText||i.textContent:t.property in i?n=i[t.property]:T.hasAttr(i,t.property)&&(n=i.getAttribute(t.property))}}):t.queryParam?n=t.ignoreCase?T.getQueryParamCaseInsensitive(t.queryParam):T.getQueryParam(t.queryParam):t.cookie?n=T.readCookie(t.cookie):t.jsVariable?n=T.getObjectProperty(e,t.jsVariable):t.customJS?n=t.customJS():t.contextHub&&(n=t.contextHub()),T.isString(n)&&t.cleanText&&(n=T.cleanText(n)),n},T.getDataElement=function(e,t,i){if(null==(i=i||T.dataElements[e]))return T.settings.undefinedVarsReturnEmpty?"":null;var a=T.realGetDataElement(i);return a===n&&i.storeLength?a=T.dataElementSafe(e,i.storeLength):a!==n&&i.storeLength&&T.dataElementSafe(e,i.storeLength,a),a||t||(a=i["default"]||""),T.isString(a)&&i.forceLowerCase&&(a=a.toLowerCase()),a},T.getVar=function(i,a,r){var s,o,c=T.data.customVars,l=r?r.target||r.srcElement:null,u={uri:T.URI(),protocol:t.location.protocol,hostname:t.location.hostname};if(T.dataElements&&i in T.dataElements)return T.getDataElement(i);if((o=u[i.toLowerCase()])===n)if("this."===i.substring(0,5))i=i.slice(5),o=T.getObjectProperty(a,i,!0);else if("event."===i.substring(0,6))i=i.slice(6),o=T.getObjectProperty(r,i);else if("target."===i.substring(0,7))i=i.slice(7),o=T.getObjectProperty(l,i);else if("window."===i.substring(0,7))i=i.slice(7),o=T.getObjectProperty(e,i);else if("param."===i.substring(0,6))i=i.slice(6),o=T.getQueryParam(i);else if(s=i.match(/^rand([0-9]+)$/)){var g=Number(s[1]),d=(Math.random()*(Math.pow(10,g)-1)).toFixed(0);o=Array(g-d.length+1).join("0")+d}else o=T.getObjectProperty(c,i);return o},T.getVars=function(e,t,n){var i={};return T.each(e,function(e){i[e]=T.getVar(e,t,n)}),i},T.replace=function(e,t,n,i){return"string"!=typeof e?e:e.replace(/%(.*?)%/g,function(e,a){var r=T.getVar(a,t,n);return null==r?T.settings.undefinedVarsReturnEmpty?"":e:i?T.escapeForHtml(r):r})},T.escapeHtmlParams=function(e){return e.escapeHtml=!0,e},T.searchVariables=function(e,t,n){if(!e||0===e.length)return"";for(var i=[],a=0,r=e.length;a0)return!1;if(e.expired)return!1;if("inview"===o&&t.inviewDelay!==e.inviewDelay)return!1;if(!u&&(!1===e.bubbleFireIfParent||0!==i&&!1===e.bubbleFireIfChildFired))return!1;if(e.selector&&!T.matchesCss(e.selector,n))return!1;if(!T.propertiesMatch(s,n))return!1;if(null!=c)if("string"==typeof c){if(c!==n.value)return!1}else if(!c.test(n.value))return!1;if(a)try{if(!a.call(n,t,l))return T.notify('Condition for rule "'+e.name+'" not met.',1),!1}catch(d){return T.notify('Condition for rule "'+e.name+'" not met. Error: '+d.message,1),!1}if(r){var g=T.find(r,function(i){try{return!i.call(n,t,l)}catch(d){return T.notify('Condition for rule "'+e.name+'" not met. Error: '+d.message,1),!0}});if(g)return T.notify("Condition "+g.toString()+' for rule "'+e.name+'" not met.',1),!1}return!0},T.evtHandlers={},T.bindEvent=function(e,t){var n=T.evtHandlers;n[e]||(n[e]=[]),n[e].push(t)},T.whenEvent=T.bindEvent,T.unbindEvent=function(e,t){var n=T.evtHandlers;if(n[e]){var i=T.indexOf(n[e],t);n[e].splice(i,1)}},T.bindEventOnce=function(e,t){var n=function(){T.unbindEvent(e,n),t.apply(null,arguments)};T.bindEvent(e,n)},T.isVMLPoisoned=function(e){if(!e)return!1;try{e.nodeName}catch(t){if("Attribute only valid on v:image"===t.message)return!0}return!1},T.handleEvent=function(e){if(!T.$data(e,"eventProcessed")){var t=e.type.toLowerCase(),n=e.target||e.srcElement,i=0,a=T.rules,r=(T.tools,T.evtHandlers[e.type]);if(T.isVMLPoisoned(n))T.notify("detected "+t+" on poisoned VML element, skipping.",1);else{r&&T.each(r,function(t){t(e)}),n&&n.nodeName?T.notify("detected "+t+" on "+n.nodeName,1):T.notify("detected "+t,1);for(var s=n;s;s=s.parentNode){var o=!1;if(T.each(a,function(t){T.ruleMatches(t,e,s,i)&&(T.notify('Rule "'+t.name+'" fired.',1),T.fireRule(t,s,e),i++,t.bubbleStop&&(o=!0))}),o)break}T.$data(e,"eventProcessed",!0)}}},T.onEvent=t.querySelectorAll?function(e){T.handleEvent(e)}:(I=[],(C=function(e){e.selector?I.push(e):T.handleEvent(e)}).pendingEvents=I,C),T.fireEvent=function(e,t){T.onEvent({type:e,target:t})},T.registerEvents=function(e,t){for(var n=t.length-1;n>=0;n--){var i=t[n];T.$data(e,i+".tracked")||(T.addEventHandler(e,i,T.onEvent),T.$data(e,i+".tracked",!0))}},T.registerEventsForTags=function(e,n){for(var i=e.length-1;i>=0;i--)for(var a=e[i],r=t.getElementsByTagName(a),s=r.length-1;s>=0;s--)T.registerEvents(r[s],n)},T.setListeners=function(){var e=["click","submit"];T.each(T.rules,function(t){"custom"===t.event&&t.hasOwnProperty("customEvent")&&!T.contains(e,t.customEvent)&&e.push(t.customEvent)}),T.registerEvents(t,e)},T.getUniqueRuleEvents=function(){return T._uniqueRuleEvents||(T._uniqueRuleEvents=[],T.each(T.rules,function(e){-1===T.indexOf(T._uniqueRuleEvents,e.event)&&T._uniqueRuleEvents.push(e.event)})),T._uniqueRuleEvents},T.setFormListeners=function(){if(!T._relevantFormEvents){var e=["change","focus","blur","keypress"];T._relevantFormEvents=T.filter(T.getUniqueRuleEvents(),function(t){return-1!==T.indexOf(e,t)})}T._relevantFormEvents.length&&T.registerEventsForTags(["input","select","textarea","button"],T._relevantFormEvents)},T.setVideoListeners=function(){if(!T._relevantVideoEvents){var e=["play","pause","ended","volumechange","stalled","loadeddata"];T._relevantVideoEvents=T.filter(T.getUniqueRuleEvents(),function(t){return-1!==T.indexOf(e,t)})}T._relevantVideoEvents.length&&T.registerEventsForTags(["video"],T._relevantVideoEvents)},T.readStoredSetting=function(t){try{return t="sdsat_"+t,e.localStorage.getItem(t)}catch(n){return T.notify("Cannot read stored setting from localStorage: "+n.message,2),null}},T.loadStoredSettings=function(){var e=T.readStoredSetting("debug"),t=T.readStoredSetting("hide_activity");e&&(T.settings.notifications="true"===e),t&&(T.settings.hideActivity="true"===t)},T.isRuleActive=function(e,t){function n(e,t){return t=a(t,{hour:e[f](),minute:e[h]()}),Math.floor(Math.abs((e.getTime()-t.getTime())/864e5))}function i(e,t){function n(e){return 12*e[g]()+e[d]()}return Math.abs(n(e)-n(t))}function a(e,t){var n=new Date(e.getTime());for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];switch(i){case"hour":n[p](a);break;case"minute":n[m](a);break;case"date":n[v](a)}}return n}function r(e,t){return 60*e[f]()+e[h]()>60*t[f]()+t[h]()}function s(e,t){return 60*e[f]()+e[h]()<60*t[f]()+t[h]()}var o=e.schedule;if(!o)return!0;var c=o.utc,l=c?"getUTCDate":"getDate",u=c?"getUTCDay":"getDay",g=c?"getUTCFullYear":"getFullYear",d=c?"getUTCMonth":"getMonth",f=c?"getUTCHours":"getHours",h=c?"getUTCMinutes":"getMinutes",p=c?"setUTCHours":"setHours",m=c?"setUTCMinutes":"setMinutes",v=c?"setUTCDate":"setDate";if(t=t||new Date,o.repeat){if(r(o.start,t))return!1;if(s(o.end,t))return!1;if(t=o.endRepeat)return!1;if("daily"===o.repeat){if(o.repeatEvery)if(n(o.start,t)%o.repeatEvery!=0)return!1}else if("weekly"===o.repeat){if(o.days){if(!T.contains(o.days,t[u]()))return!1}else if(o.start[u]()!==t[u]())return!1;if(o.repeatEvery)if(n(o.start,t)%(7*o.repeatEvery)!=0)return!1}else if("monthly"===o.repeat){if(o.repeatEvery)if(i(o.start,t)%o.repeatEvery!=0)return!1;if(o.nthWeek&&o.mthDay){if(o.mthDay!==t[u]())return!1;var y=Math.floor((t[l]()-t[u]()+1)/7);if(o.nthWeek!==y)return!1}else if(o.start[l]()!==t[l]())return!1}else if("yearly"===o.repeat){if(o.start[d]()!==t[d]())return!1;if(o.start[l]()!==t[l]())return!1;if(o.repeatEvery)if(Math.abs(o.start[g]()-t[g]())%o.repeatEvery!=0)return!1}}else{if(o.start>t)return!1;if(o.end0&&T.equalsIgnoreCase(e.substring(n),t)},T.getVisitorId=function(){var e=T.getToolsByType("visitor_id");return 0===e.length?null:e[0].getInstance()},T.URI=function(){var e=t.location.pathname+t.location.search;return T.settings.forceLowerCase&&(e=e.toLowerCase()),e},T.URL=function(){var e=t.location.href;return T.settings.forceLowerCase&&(e=e.toLowerCase()),e},T.filterRules=function(){function e(e){return!!T.isRuleActive(e)}T.rules=T.filter(T.rules,e),T.pageLoadRules=T.filter(T.pageLoadRules,e)},T.ruleInScope=function(e,n){function i(e,t){function n(e){return t.match(e)}var i=e.include,r=e.exclude;if(i&&a(i,t))return!0;if(r){if(T.isString(r)&&r===t)return!0;if(T.isArray(r)&&T.any(r,n))return!0;if(T.isRegex(r)&&n(r))return!0}return!1}function a(e,t){function n(e){return t.match(e)}return!(!T.isString(e)||e===t)||(!(!T.isArray(e)||T.any(e,n))||!(!T.isRegex(e)||n(e)))}n=n||t.location;var r=e.scope;if(!r)return!0;var s=r.URI,o=r.subdomains,c=r.domains,l=r.protocols,u=r.hashes;return(!s||!i(s,n.pathname+n.search))&&((!o||!i(o,n.hostname))&&((!c||!a(c,n.hostname))&&((!l||!a(l,n.protocol))&&(!u||!i(u,n.hash)))))},T.backgroundTasks=function(){new Date;T.setFormListeners(),T.setVideoListeners(),T.loadStoredSettings(),T.registerNewElementsForDynamicRules(),T.eventEmitterBackgroundTasks();new Date},T.registerNewElementsForDynamicRules=function(){function e(t,n){var i=e.cache[t];if(i)return n(i);T.cssQuery(t,function(i){e.cache[t]=i,n(i)})}e.cache={},T.each(T.dynamicRules,function(t){e(t.selector,function(e){T.each(e,function(e){var n="custom"===t.event?t.customEvent:t.event;T.$data(e,"dynamicRules.seen."+n)||(T.$data(e,"dynamicRules.seen."+n,!0),T.propertiesMatch(t.property,e)&&T.registerEvents(e,[n]))})})})},T.ensureCSSSelector=function(){t.querySelectorAll?T.hasSelector=!0:(T.loadingSizzle=!0,T.sizzleQueue=[],T.loadScript(T.basePath()+"selector.js",function(){if(T.Sizzle){var e=T.onEvent.pendingEvents;T.each(e,function(e){T.handleEvent(e)},this),T.onEvent=T.handleEvent,T.hasSelector=!0,delete T.loadingSizzle,T.each(T.sizzleQueue,function(e){T.cssQuery(e[0],e[1])}),delete T.sizzleQueue}else T.logError(new Error("Failed to load selector.js"))}))},T.errors=[],T.logError=function(e){T.errors.push(e),T.notify(e.name+" - "+e.message,5)},T.pageBottom=function(){T.initialized&&(T.pageBottomFired=!0,T.firePageLoadEvent("pagebottom"))},T.stagingLibraryOverride=function(){if("true"===T.readStoredSetting("stagingLibrary")){for(var e,n,i,a=t.getElementsByTagName("script"),r=/^(.*)satelliteLib-([a-f0-9]{40})\.js$/,s=/^(.*)satelliteLib-([a-f0-9]{40})-staging\.js$/,o=0,c=a.length;o');else{var u=t.createElement("script");u.src=l,t.head.appendChild(u)}return!0}}return!1},T.checkAsyncInclude=function(){e.satellite_asyncLoad&&T.notify('You may be using the async installation of Satellite. In-page HTML and the "pagebottom" event will not work. Please update your Satellite installation for these features.',5)},T.hasMultipleDomains=function(){return!!T.settings.domainList&&T.settings.domainList.length>1},T.handleOverrides=function(){if(k)for(var e in k)k.hasOwnProperty(e)&&(T.data[e]=k[e])},T.privacyManagerParams=function(){var e={};T.extend(e,T.settings.privacyManagement);var t=[];for(var n in T.tools)if(T.tools.hasOwnProperty(n)){var i=T.tools[n],a=i.settings;if(!a)continue;"sc"===a.engine&&t.push(i)}var r=T.filter(T.map(t,function(e){return e.getTrackingServer()}),function(e){return null!=e});e.adobeAnalyticsTrackingServers=r;for(var s=["bannerText","headline","introductoryText","customCSS"],o=0;o0){var t=e[0];if(T.$data(t,"elementexists.seen"))return;T.$data(t,"elementexists.seen",!0),T.onEvent({type:"elementexists",target:t})}})})},T.availableEventEmitters.push(s),o.prototype={backgroundTasks:function(){var e=this.eventHandler;T.each(this.rules,function(t){T.cssQuery(t.selector||"video",function(t){T.each(t,function(t){T.$data(t,"videoplayed.tracked")||(T.addEventHandler(t,"timeupdate",T.throttle(e,100)),T.$data(t,"videoplayed.tracked",!0))})})})},evalRule:function(e,t){var n=t.event,i=e.seekable,a=i.start(0),r=i.end(0),s=e.currentTime,o=t.event.match(/^videoplayed\(([0-9]+)([s%])\)$/);if(o){var c=o[2],l=Number(o[1]),u="%"===c?function(){return l<=100*(s-a)/(r-a)}:function(){return l<=s-a};!T.$data(e,n)&&u()&&(T.$data(e,n,!0),T.onEvent({type:n,target:e}))}},onUpdateTime:function(e){var t=this.rules,n=e.target;if(n.seekable&&0!==n.seekable.length)for(var i=0,a=t.length;ii+a||n+t=0;e--)this.checkInView(this.elements[e])},processRules:function(e,t,n){var i=this.rules;n&&(i=T.filter(this.rules,function(e){return e.inviewDelay==n})),T.each(i,function(n,i){var a=n.inviewDelay?"viewed_"+n.inviewDelay:"viewed",r="inview_timeout_id_"+i;T.$data(e,a)||T.matchesCss(n.selector,e)&&t(n,a,r)})}},T.availableEventEmitters.push(c),l.prototype={obue:!1,initialize:function(){this.attachCloseListeners()},obuePrevUnload:function(){},obuePrevBeforeUnload:function(){},newObueListener:function(){this.obue||(this.obue=!0,this.triggerBeacons())},attachCloseListeners:function(){this.prevUnload=e.onunload,this.prevBeforeUnload=e.onbeforeunload,e.onunload=T.bind(function(t){this.prevUnload&&setTimeout(T.bind(function(){this.prevUnload.call(e,t)},this),1),this.newObueListener()},this),e.onbeforeunload=T.bind(function(t){this.prevBeforeUnload&&setTimeout(T.bind(function(){this.prevBeforeUnload.call(e,t)},this),1),this.newObueListener()},this)},triggerBeacons:function(){T.fireEvent("leave",t)}},T.availableEventEmitters.push(l),u.prototype={backgroundTasks:function(){var e=this;T.each(this.rules,function(t){var n=t[1],i=t[0];T.cssQuery(n,function(t){T.each(t,function(t){e.trackElement(t,i)})})},this)},trackElement:function(e,t){var n=this,i=T.$data(e,"hover.delays");i?T.contains(i,t)||i.push(t):(T.addEventHandler(e,"mouseover",function(t){n.onMouseOver(t,e)}),T.addEventHandler(e,"mouseout",function(t){n.onMouseOut(t,e)}),T.$data(e,"hover.delays",[t]))},onMouseOver:function(e,t){var n=e.target||e.srcElement,i=e.relatedTarget||e.fromElement;(t===n||T.containsElement(t,n))&&!T.containsElement(t,i)&&this.onMouseEnter(t)},onMouseEnter:function(e){var t=T.$data(e,"hover.delays"),n=T.map(t,function(t){return setTimeout(function(){T.onEvent({type:"hover("+t+")",target:e})},t)});T.$data(e,"hover.delayTimers",n)},onMouseOut:function(e,t){var n=e.target||e.srcElement,i=e.relatedTarget||e.toElement;(t===n||T.containsElement(t,n))&&!T.containsElement(t,i)&&this.onMouseLeave(t)},onMouseLeave:function(e){var t=T.$data(e,"hover.delayTimers");t&&T.each(t,function(e){clearTimeout(e)})}},T.availableEventEmitters.push(u),g.prototype={initialize:function(){if(this.FB=this.FB||e.FB,this.FB&&this.FB.Event&&this.FB.Event.subscribe)return this.bind(),!0},bind:function(){this.FB.Event.subscribe("edge.create",function(){T.notify("tracking a facebook like",1),T.onEvent({type:"facebook.like",target:t})}),this.FB.Event.subscribe("edge.remove",function(){T.notify("tracking a facebook unlike",1),T.onEvent({type:"facebook.unlike",target:t})}),this.FB.Event.subscribe("message.send",function(){T.notify("tracking a facebook share",1),T.onEvent({type:"facebook.send",target:t})})}},T.availableEventEmitters.push(g),d.prototype={initialize:function(){var e=this.twttr;e&&"function"==typeof e.ready&&e.ready(T.bind(this.bind,this))},bind:function(){this.twttr.events.bind("tweet",function(e){e&&(T.notify("tracking a tweet button",1),T.onEvent({type:"twitter.tweet",target:t}))})}},T.availableEventEmitters.push(d),f.prototype={initialize:function(){this.setupHistoryAPI(),this.setupHashChange()},fireIfURIChanged:function(){var e=T.URL();this.lastURL!==e&&(this.fireEvent(),this.lastURL=e)},fireEvent:function(){T.updateQueryParams(),T.onEvent({type:"locationchange",target:t})},setupSPASupport:function(){this.setupHistoryAPI(),this.setupHashChange()},setupHistoryAPI:function(){var t=e.history;t&&(t.pushState&&(this.originalPushState=t.pushState,t.pushState=this._pushState),t.replaceState&&(this.originalReplaceState=t.replaceState,t.replaceState=this._replaceState)),T.addEventHandler(e,"popstate",this._onPopState)},pushState:function(){var e=this.originalPushState.apply(history,arguments);return this.onPushState(),e},replaceState:function(){var e=this.originalReplaceState.apply(history,arguments);return this.onReplaceState(),e},setupHashChange:function(){T.addEventHandler(e,"hashchange",this._onHashChange)},onReplaceState:function(){setTimeout(this._fireIfURIChanged,0)},onPushState:function(){setTimeout(this._fireIfURIChanged,0)},onPopState:function(){setTimeout(this._fireIfURIChanged,0)},onHashChange:function(){setTimeout(this._fireIfURIChanged,0)},uninitialize:function(){this.cleanUpHistoryAPI(),this.cleanUpHashChange()},cleanUpHistoryAPI:function(){history.pushState===this._pushState&&(history.pushState=this.originalPushState),history.replaceState===this._replaceState&&(history.replaceState=this.originalReplaceState),T.removeEventHandler(e,"popstate",this._onPopState)},cleanUpHashChange:function(){T.removeEventHandler(e,"hashchange",this._onHashChange)}},T.availableEventEmitters.push(f),T.ecommerce={addItem:function(){var e=[].slice.call(arguments);T.onEvent({type:"ecommerce.additem",target:e})},addTrans:function(){var e=[].slice.call(arguments);T.data.saleData.sale={orderId:e[0],revenue:e[2]},T.onEvent({type:"ecommerce.addtrans",target:e})},trackTrans:function(){T.onEvent({type:"ecommerce.tracktrans",target:[]})}},T.visibility={isHidden:function(){var e=this.getHiddenProperty();return!!e&&t[e]},isVisible:function(){return!this.isHidden()},getHiddenProperty:function(){var e=["webkit","moz","ms","o"];if("hidden"in t)return"hidden";for(var n=0;n0&&this.setNonHumanDetectionDelay(1e3*parseInt(this.settings.nonHumanDetectionDelay))):this.notify("NHDM is not available.")},getAnalyticsTool:function(){if(this.settings.integratesWith)return T.tools[this.settings.integratesWith]},flushQueueWhenReady:function(){this.enableTracking&&this.tabEverVisible&&T.poll(T.bind(function(){if(this.isReadyToTrack())return this.flushQueue(),!0},this),100,20)},isReadyToTrack:function(){return this.tabEverVisible&&this.dataProvider.isReady()},$setVars:function(e,t,n){for(var i in n){var a=n[i];"function"==typeof a&&(a=a()),this.settings[i]=a}this.notify("Set variables done",2),this.prepareContextData()},$setEnableTracking:function(e,t,n){this.notify("Will"+(n?"":" not")+" track time on page",1),this.enableTracking!=n&&(this.addRemovePageLeaveEvent(n),this.addRemoveHumanDetectionChangeEvent(n),this.enableTracking=n)},$sendFirstBeacon:function(){this.sendViewBeacon()},setEnableNonHumanDetection:function(e){e?T.nonhumandetection.register(this):T.nonhumandetection.unregister(this)},setNonHumanDetectionDelay:function(e){T.nonhumandetection.register(this,e)},addRemovePageLeaveEvent:function(e){this.notify((e?"Attach onto":"Detach from")+" page leave event",1),T[0==e?"unbindEvent":"bindEvent"]("leave",this.onPageLeave)},addRemoveHumanDetectionChangeEvent:function(e){this.notify((e?"Attach onto":"Detach from")+" human detection change event",1),T[0==e?"unbindEvent":"bindEvent"]("humandetection.change",this.onHumanDetectionChange)},sendViewBeacon:function(){this.notify("Tracked page view.",1),this.sendBeaconWith()},sendDurationBeacon:function(){if(T.timetracking&&"function"==typeof T.timetracking.timeOnPage&&null!=T.timetracking.timeOnPage()){this.notify("Tracked close",1),this.sendBeaconWith({timeOnPage:Math.round(T.timetracking.timeOnPage()/1e3),duration:"D",timer:"timer"});var e;for(e=0;e0&&(t.events=r.join(",")),T.getVisitorId()&&(t.visitor=T.getVisitorId()),t},onSCodeLoaded:function(e){this.initialized=!0,this.initializing=!1;var t=["Adobe Analytics: loaded",e?" (manual)":"","."];T.notify(t.join(""),1),T.fireEvent(this.id+".load",this.getS()),e||(this.flushQueueExceptTrackLink(),this.sendBeacon()),this.flushQueue()},getAccount:function(t){return e.s_account?e.s_account:t&&this.settings.accountByHost&&this.settings.accountByHost[t]||this.settings.account},getTrackingServer:function(){var t=this,n=t.getS();if(n){if(n.ssl&&n.trackingServerSecure)return n.trackingServerSecure;if(n.trackingServer)return n.trackingServer}var i,a=t.getAccount(e.location.hostname);if(!a)return null;var r,s,o="",c=n&&n.dc;return(r=(i=a).indexOf(","))>=0&&(i=i.gb(0,r)),i=i.replace(/[^A-Za-z0-9]/g,""),o||(o="2o7.net"),c=c?(""+c).toLowerCase():"d1","2o7.net"==o&&("d1"==c?c="112":"d2"==c&&(c="122"),s=""),r=i+"."+c+"."+s+o},sendBeacon:function(){var t=this.getS(e[this.settings.renameS||"s"]);t?this.settings.customInit&&!1===this.settings.customInit(t)?T.notify("Adobe Analytics: custom init suppressed beacon",1):(this.settings.executeCustomPageCodeFirst&&this.applyVarBindingsOnTracker(t,this.varBindings),this.executeCustomSetupFuns(t),t.t(),this.clearVarBindings(),this.clearCustomSetup(),T.notify("Adobe Analytics: tracked page view",1)):T.notify("Adobe Analytics: page code not loaded",1)},pollForSC:function(){T.poll(T.bind(function(){if("function"==typeof e.s_gi)return this.onSCodeLoaded(!0),!0},this))},flushQueueExceptTrackLink:function(){if(this.pending){for(var e=[],t=0;t0&&u.push("events"),o.products&&u.push("products"),u=this.mergeTrackLinkVars(o.linkTrackVars,u),s=this.mergeTrackLinkVars(o.linkTrackEvents,s),o.linkTrackVars=this.getCustomLinkVarsList(u);var g=T.map(s,function(e){return e.split(":")[0]});o.linkTrackEvents=this.getCustomLinkVarsList(g),o.tl(!0,i||"o",a),T.notify(["Adobe Analytics: tracked link ","using: linkTrackVars=",T.stringify(o.linkTrackVars),"; linkTrackEvents=",T.stringify(o.linkTrackEvents)].join(""),1),o.linkTrackVars=c,o.linkTrackEvents=l}else T.notify("Adobe Analytics: page code not loaded",1)},mergeTrackLinkVars:function(e,t){return e&&(t=e.split(",").concat(t)),t},getCustomLinkVarsList:function(e){var t=T.indexOf(e,"None");return t>-1&&e.length>1&&e.splice(t,1),e.join(",")},definedVarNames:function(e){e=e||this.varBindings;var t=[];for(var n in e)e.hasOwnProperty(n)&&/^(eVar[0-9]+)|(prop[0-9]+)|(hier[0-9]+)|campaign|purchaseID|channel|server|state|zip|pageType$/.test(n)&&t.push(n);return t},$trackPageView:function(e,t,n){var i=n&&n.setVars,a=n&&n.addEvent||[],r=this.getS(null,{setVars:i,addEvent:a});r?(r.linkTrackVars="",r.linkTrackEvents="",this.executeCustomSetupFuns(r),n&&n.customSetup&&n.customSetup.call(e,t,r),r.t(),this.clearVarBindings(),this.clearCustomSetup(),T.notify("Adobe Analytics: tracked page view",1)):T.notify("Adobe Analytics: page code not loaded",1)},$postTransaction:function(t,n,i){var a=T.data.transaction=e[i],r=this.varBindings,s=this.settings.fieldVarMapping;if(T.each(a.items,function(e){this.products.push(e)},this),r.products=T.map(this.products,function(e){var t=[];if(s&&s.item)for(var n in s.item)if(s.item.hasOwnProperty(n)){var i=s.item[n];t.push(i+"="+e[n]),"event"===i.substring(0,5)&&this.events.push(i)}var a=["",e.product,e.quantity,e.unitPrice*e.quantity];return t.length>0&&a.push(t.join("|")),a.join(";")},this).join(","),s&&s.transaction){var o=[];for(var c in s.transaction)if(s.transaction.hasOwnProperty(c)){i=s.transaction[c];o.push(i+"="+a[c]),"event"===i.substring(0,5)&&this.events.push(i)}r.products.length>0&&(r.products+=","),r.products+=";;;;"+o.join("|")}},$addEvent:function(){for(var e=2,t=arguments.length;e0&&a&&r.shift().call(e,t,s);var c=n.shift();if(c){var l=T.data.host,u=o.scriptURL(c.src);l&&(u=T.basePath()+u),a=c,T.loadScript(u,i)}}try{n=n.slice(0);var a,r=this.asyncScriptCallbackQueue,s=t.target||t.srcElement,o=this}catch(c){console.error("scripts is",T.stringify(n))}i()},$loadBlockingScript:function(e,t,n){var i=n.scripts;n.loadOn;T.bind(function(){T.each(i,function(n){this.loadBlockingScript(e,t,n)},this)},this)()},loadBlockingScript:function(e,t,n){var i=this.scriptURL(n.src),a=T.data.host,r=t.target||t.srcElement;a&&(i=T.basePath()+i),this.argsForBlockingScripts.push([e,t,r]),T.loadScriptSync(i)},pushAsyncScript:function(e){this.asyncScriptCallbackQueue.push(e)},pushBlockingScript:function(e){var t=this.argsForBlockingScripts.shift(),n=t[0];e.apply(n,t.slice(1))},$writeHTML:T.escapeHtmlParams(function(e,n){if(!T.domReadyFired&&t.write)if("pagebottom"===n.type||"pagetop"===n.type)for(var i=2,a=arguments.length;i1){T.stringify(e.slice(1));t+=" with parameters "+T.stringify(e.slice(1))}t+=".",T.notify(t,1)}}),T.availableTools.ga_universal=S,T.inherit(_,T.BaseTool),T.extend(_.prototype,{name:"GA",initialize:function(){var t=this.settings,n=e._gaq,i=t.initCommands||[],a=t.customInit;if(n||(_gaq=[]),this.isSuppressed())T.notify("GA: page code not loaded(suppressed).",1);else{if(!n&&!_.scriptLoaded){var r=T.isHttps(),s=(r?"https://ssl":"http://www")+".google-analytics.com/ga.js";t.url&&(s=r?t.url.https:t.url.http),T.loadScript(s),_.scriptLoaded=!0,T.notify("GA: page code loaded.",1)}t.domain;var o=t.trackerName,c=A.allowLinker(),l=T.replace(t.account,location);T.settings.domainList;_gaq.push([this.cmd("setAccount"),l]),c&&_gaq.push([this.cmd("setAllowLinker"),c]),_gaq.push([this.cmd("setDomainName"),A.cookieDomain()]),T.each(i,function(e){var t=[this.cmd(e[0])].concat(T.preprocessArguments(e.slice(1),location,null,this.forceLowerCase));_gaq.push(t)},this),a&&(this.suppressInitialPageView=!1===a(_gaq,o)),t.pageName&&this.$overrideInitialPageView(null,null,t.pageName)}this.initialized=!0,T.fireEvent(this.id+".configure",_gaq,o)},isSuppressed:function(){return this._cancelToolInit||!1===this.settings.initTool},tracker:function(){return this.settings.trackerName},cmd:function(e){var t=this.tracker();return t?t+"._"+e:"_"+e},$overrideInitialPageView:function(e,t,n){this.urlOverride=n},trackInitialPageView:function(){if(!this.isSuppressed()&&!this.suppressInitialPageView)if(this.urlOverride){var e=T.preprocessArguments([this.urlOverride],location,null,this.forceLowerCase);this.$missing$("trackPageview",null,null,e)}else this.$missing$("trackPageview")},endPLPhase:function(e){e===this.settings.loadOn&&(T.notify("GA: Initializing at "+e,1),this.initialize(),this.flushQueue(),this.trackInitialPageView())},call:function(e,t,n,i){if(!this._cancelToolInit){this.settings;var a=this.tracker(),r=this.cmd(e);i=i?[r].concat(i):[r];_gaq.push(i),a?T.notify("GA: sent command "+e+" to tracker "+a+(i.length>1?" with parameters ["+i.slice(1).join(", ")+"]":"")+".",1):T.notify("GA: sent command "+e+(i.length>1?" with parameters ["+i.slice(1).join(", ")+"]":"")+".",1)}},$missing$:function(e,t,n,i){this.call(e,t,n,i)},$postTransaction:function(t,n,i){var a=T.data.customVars.transaction=e[i];this.call("addTrans",t,n,[a.orderID,a.affiliation,a.total,a.tax,a.shipping,a.city,a.state,a.country]),T.each(a.items,function(e){this.call("addItem",t,n,[e.orderID,e.sku,e.product,e.category,e.unitPrice,e.quantity])},this),this.call("trackTrans",t,n)},delayLink:function(e,t){var n=this;if(A.allowLinker()&&e.hostname.match(this.settings.linkerDomains)&&!T.isSubdomainOf(e.hostname,location.hostname)){T.preventDefault(t);var i=T.settings.linkDelay||100;setTimeout(function(){n.call("link",e,t,[e.href])},i)}},popupLink:function(t,n){if(e._gat){T.preventDefault(n);var i=this.settings.account,a=e._gat._createTracker(i)._getLinkerUrl(t.href);e.open(a)}},$link:function(e,t){"_blank"===e.getAttribute("target")?this.popupLink(e,t):this.delayLink(e,t)},$trackEvent:function(e,t){var n=Array.prototype.slice.call(arguments,2);if(n.length>=4&&null!=n[3]){var i=parseInt(n[3],10);T.isNaN(i)&&(i=1),n[3]=i}this.call("trackEvent",e,t,n)}}),T.availableTools.ga=_,_satellite.init({tools:{f6d05ed4b220e0331d37e005699a152eca756f66:{engine:"aem",name:"Data Layer",data_layer_root:"digitalData"},"687b699a760f29b6853e871f17d9cb83":{engine:"sc",loadOn:"pagebottom",account:"prisacomelpaiscom,prisacomglobal",euCookie:!1,sCodeURL:"577c3689ea990d22d8d98c00c4aa568bec64a426/s-code-contents-2683f0e5ad075024cc6e17885e97204cfcaa8be6.js",renameS:"DTM.s",initVars:{charSet:"UTF-8",server:"%server%",currencyCode:"EUR",visitorNamespace:"prisacom",trackingServer:"prisacom.sc.omtrdc.net",trackingServerSecure:"prisacom.sc.omtrdc.net",pageName:"%pageName%",channel:"%primaryCategory%",trackInlineStats:!0,trackDownloadLinks:!0,linkDownloadFileTypes:"avi,doc,docx,exe,mov,mp3,mpg,pdf,ppt,pptx,wav,wma,wmv,xls,xlsx,zip",trackExternalLinks:!0,linkInternalFilters:"elpais.com,javascript",linkLeaveQueryString:!1,dynamicVariablePrefix:"D=",prop1:"%subCategory1%",prop2:"%subCategory2%",prop3:"%pageType%",prop5:"D=g",prop6:"D=r",prop11:"%language%",prop14:"%geoRegion%",prop16:"%onsiteSearchTerm%",prop17:"%sysEnv%",prop18:"%org%",prop19:"%publisher%",prop20:"%domain%",prop30:"%businessUnit%",prop31:"%thematic%",prop34:"%profileID%",prop44:"%creationDate%",prop45:"%pageTitle%",prop61:"%edition%"},skipSetAccount:!0,customInit:function(){if("undefined"!=typeof e.redefinicion_variables_om)for(var t in e.redefinicion_variables_om)e.DTM.s[t]=e.redefinicion_variables_om[t];return e.DTM.tools.omniture.loaded=!0,e.setTimeout(function(){!1!==e.DTM.tools.omniture.trackPV()&&e.DTM.notify("PV tracked in tool (lib)")},700),!1}},d9dd0f01cb1e3fee8b45888f1e434d31c389cc07:{engine:"visitor_id",loadOn:"pagetop",name:"VisitorID",mcOrgId:"2387401053DB208C0A490D4C@AdobeOrg",autoRequest:!0,initVars:{trackingServer:"prisacom.sc.omtrdc.net",trackingServerSecure:"prisacom.sc.omtrdc.net"}}},pageLoadRules:[{name:"DTM",trigger:[{command:"loadBlockingScript",arguments:[{sequential:!0,scripts:[{src:"satellite-5b16c30764746d22d1002c6a.js"},{src:"satellite-58a2ee1364746d118700998d.js"}]}]}],event:"pagetop"}],rules:[],directCallRules:[],settings:{trackInternalLinks:!0,libraryName:"satelliteLib-28ad3885d20336165372ce7de5caf99dd332388c",isStaging:!1,allowGATTcalls:!1,downloadExtensions:/\.(?:doc|docx|eps|jpg|png|svg|xls|ppt|pptx|pdf|xlsx|tab|csv|zip|txt|vsd|vxd|xml|js|css|rar|exe|wma|mov|avi|wmv|mp3|wav|m4v)($|\&|\?)/i,notifications:!1,utilVisible:!1,domainList:["elpais.com"],scriptDir:"577c3689ea990d22d8d98c00c4aa568bec64a426/scripts/",tagTimeout:3e3},data:{URI:t.location.pathname+t.location.search,browser:{},cartItems:[],revenue:"",host:{http:"ep01.epimg.net/js/gdt",https:"ep01.epimg.net/js/gdt"}},dataElements:{adblocker:{contextHub:function(){try{return digitalData.page.pageInfo.adblocker}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},articleID:{contextHub:function(){try{return digitalData.page.pageInfo.articleID}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},author:{contextHub:function(){try{return digitalData.page.pageInfo.author}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},businessUnit:{contextHub:function(){try{return digitalData.page.pageInfo.businessUnit}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},campaign:{contextHub:function(){try{return digitalData.page.pageInfo.campaign}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},canonicalURL:{contextHub:function(){try{return digitalData.page.pageInfo.canonicalURL}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},chartbeat:{customJS:function(){var t={};try{t=e.DTM.tools.chartbeat.getDL()}catch(n){t={}}return t},storeLength:"pageview"},comscore:{customJS:function(){var t={};try{t=e.DTM.tools.comscore.getDL()}catch(n){t={}}return t},storeLength:"pageview"},country:{contextHub:function(){try{return digitalData.user.country}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},creationDate:{contextHub:function(){try{return digitalData.page.pageInfo.creationDate}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},destinationURL:{contextHub:function(){try{return digitalData.page.pageInfo.destinationURL}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},domain:{contextHub:function(){try{return digitalData.page.pageInfo.domain}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},edition:{contextHub:function(){try{return digitalData.page.pageInfo.edition}catch(e){T.notify(e.name+" - "+e.message,4)}},"default":"espa\xf1a",storeLength:"pageview"},elpais:{customJS:function(){var t={};try{t=e.DTM.tools.elpais.getDL()}catch(n){t={}}return t},storeLength:"pageview"},encoded:{contextHub:function(){try{return digitalData.page.pageInfo.encoded}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},event:{contextHub:function(){try{return digitalData.event}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},facebook:{customJS:function(){var t={};try{t=e.DTM.tools.facebook.getDL()}catch(n){t={}}return t},storeLength:"pageview"},geoRegion:{contextHub:function(){try{return digitalData.page.pageInfo.geoRegion}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},krux:{customJS:function(){var t={};try{t=e.DTM.tools.krux.getDL()}catch(n){t={}}return t},storeLength:"pageview"},language:{contextHub:function(){try{return digitalData.page.pageInfo.language}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},netquest:{customJS:function(){var t={};try{t=e.DTM.tools.netquest.getDL()}catch(n){t={}}return t},storeLength:"pageview"},omniture:{customJS:function(){var t={};try{t=e.DTM.tools.omniture.getDL()}catch(n){t={}}return t},storeLength:"pageview"},onsiteSearch:{contextHub:function(){try{return digitalData.page.pageInfo.onsiteSearch}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},onsiteSearchResults:{contextHub:function(){try{return digitalData.page.pageInfo.onsiteSearchResults}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},onsiteSearchTerm:{contextHub:function(){try{return digitalData.page.pageInfo.onsiteSearchTerm}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},org:{contextHub:function(){try{return digitalData.page.pageInfo.org}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},pageID:{contextHub:function(){try{return digitalData.page.pageInfo.pageID}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},pageName:{contextHub:function(){try{return digitalData.page.pageInfo.pageName}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},pageTitle:{contextHub:function(){try{return digitalData.page.pageInfo.pageTitle}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},pageType:{contextHub:function(){try{return digitalData.page.category.pageType}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},platform:{contextHub:function(){try{return digitalData.page.pageInfo.platform}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},primaryCategory:{contextHub:function(){try{return digitalData.page.category.primaryCategory}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},profileID:{contextHub:function(){try{return digitalData.user.profileID}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},publisher:{contextHub:function(){try{return digitalData.page.pageInfo.publisher}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},referringURL:{contextHub:function(){try{return digitalData.page.pageInfo.referringURL}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},registeredUser:{contextHub:function(){try{return digitalData.user.registeredUser}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},server:{contextHub:function(){try{return digitalData.page.pageInfo.server}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},siteID:{contextHub:function(){try{return digitalData.page.pageInfo.siteID}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},ssl:{contextHub:function(){try{return digitalData.page.pageInfo.ssl}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},subCategory1:{contextHub:function(){try{return digitalData.page.category.subCategory1}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},subCategory2:{contextHub:function(){try{return digitalData.page.category.subCategory2}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},sysEnv:{contextHub:function(){try{return digitalData.page.pageInfo.sysEnv}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},tags:{contextHub:function(){try{return digitalData.page.pageInfo.tags}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},thematic:{contextHub:function(){try{return digitalData.page.pageInfo.thematic}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},urlParams:{contextHub:function(){try{return digitalData.page.pageInfo.urlParams}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"},userName:{contextHub:function(){try{return digitalData.user.userName}catch(e){T.notify(e.name+" - "+e.message,4)}},storeLength:"pageview"}},appVersion:"7QN",buildDate:"2018-09-24 08:36:36 UTC",publishDate:"2018-09-24 08:36:35 UTC"})}(window,document); window['_cbv_strategies'] = window['_cbv_strategies'] || []; window['_cbv_strategies'].push(PNCHVideoStrategy); function PNCHVideoStrategy(player) { this.player_ = player; this.ready_ = false; this.currentAdPosition_ = undefined; this.videoPlayed_ = false; this.viewStartTime_ = new Date().getTime(); this.videoStartTime_ = undefined; this.subscribeEvents_(); }; PNCHVideoStrategy.ContentType = { AD: 'ad', CONTENT: 'ct' }; PNCHVideoStrategy.AdPosition = { PREROLL: 'a1', MIDROLL: 'a2', POSTROLL: 'a3', OVERLAY: 'a4', SPECIAL: 'a5' }; PNCHVideoStrategy.VideoState = { UNPLAYED: 's1', PLAYED: 's2', STOPPED: 's3', COMPLETED: 's4' }; PNCHVideoStrategy.prototype.subscribeEvents_ = function() { if (this.player_.readyState > 2) { this.ready_ = true; } if (this.player_.currentTime > 0 && !this.player_.paused && !this.player_.ended) { this.onVideoPlay_(); } this.player_.addEventListener('canplay', this.bind_(this.onPlaybackReady_, this)); this.player_.addEventListener('playing', this.bind_(this.onVideoPlay_, this)); }; PNCHVideoStrategy.prototype.bind_ = function(fn, context) { return function(){ fn.call(context); }; }; PNCHVideoStrategy.prototype.onPlaybackReady_ = function() { this.ready_ = true; }; PNCHVideoStrategy.prototype.onVideoPlay_ = function() { this.videoStartTime_ = new Date().getTime(); this.videoPlayed_ = true; }; PNCHVideoStrategy.prototype.isReady = function() { return this.ready_; }; PNCHVideoStrategy.prototype.getTitle = function() { return (this.player_.attributes['title'] && this.player_.attributes['title'].value) || ''; }; PNCHVideoStrategy.prototype.getVideoPath = function() { if(typeof this.player_['idMedia'] != "undefined") var item = this.player_['idMedia']; else var item = this.player_['currentSrc']; return item || ''; }; PNCHVideoStrategy.prototype.getContentType = function() { return PNCHVideoStrategy.ContentType.CONTENT; }; PNCHVideoStrategy.prototype.getAdPosition = function() { return ''; }; PNCHVideoStrategy.prototype.getTotalDuration = function() { var d = this.player_['duration']; return this.getTimeInSeconds_(d); }; PNCHVideoStrategy.prototype.getState = function() { if (!this.videoPlayed_) { return PNCHVideoStrategy.VideoState.UNPLAYED; } if (this.player_.ended) { return PNCHVideoStrategy.VideoState.COMPLETED; } if (this.player_.paused) { return PNCHVideoStrategy.VideoState.STOPPED; } return PNCHVideoStrategy.VideoState.PLAYED; }; PNCHVideoStrategy.prototype.timeElapsed_ = function(timestamp) { if (timestamp === undefined) { return 0; } var t = new Date().getTime(); return t - timestamp; }; PNCHVideoStrategy.prototype.onEmbedCodeChanged_ = function() { this.currentAdPosition_ = undefined; this.adStartTime_ = undefined; }; PNCHVideoStrategy.prototype.getCurrentPlayTime = function() { var pt = this.player_['currentTime']; return this.getTimeInSeconds_(pt); }; PNCHVideoStrategy.prototype.getBitrate = function() { return -1; }; PNCHVideoStrategy.prototype.getThumbnailPath = function() { return (this.player_.attributes['poster'] && this.player_.attributes['poster'].value) || ''; }; PNCHVideoStrategy.prototype.getPlayerType = function() {}; PNCHVideoStrategy.prototype.getViewStartTime = function() { if (isNaN(this.viewStartTime_)) { return 0; } return this.timeElapsed_(this.viewStartTime_); }; PNCHVideoStrategy.prototype.getViewPlayTime = function() { if (this.videoPlayed_) { return this.timeElapsed_(this.viewStartTime_); } return -1; }; PNCHVideoStrategy.prototype.getViewAdPlayTime = function() { return -1; }; PNCHVideoStrategy.prototype.getTimeInSeconds_ = function(t) { return ((t === -1 || isNaN(t)) ? -1 : t * 1000); }; PNCHVideoStrategy.verify = function(player) { return player instanceof HTMLElement && player.nodeName === 'VIDEO' && typeof player["idMedia"] != "undefined"; }; window.DTM = window.DTM || {}; window.DTM.config = window.DTM.config || {}; window.DTM.version = "ep-4.11"; window.DTM.initialized = true; /** * DTM init * 1.- Create Data Layer. * 2.- Tools initiation. * 3.- Track PV * 4.- Events listeners. **/ window.DTM.init = function(){ window.DTM.timeInit = (new Date().getTime()); this.notify("Version <" + this.version + "> fired " + (_satellite.settings.isStaging ? "(staging)" : ""), true); this.notify("Page <" + window.location.href + ">"); window.DTM.dataLayer.init(); window.DTM.tools.init(); _satellite.pageBottom(); window.DTM.trackPV(); window.DTM.events.init(); } /** * Debug function **/ window.DTM.notify = function(message){ if(!_satellite.settings.notifications) return; if(typeof window.DTM.timeInit == "undefined") return; try{ var time = ((new Date().getTime()) - window.DTM.timeInit); message = "DTM: " + message; time = time / 1000; time = time.toFixed(2); console.info(message + " (" + time + "s)"); }catch(e){ console.info("Error DTM.notify"); } } /** * DataLayer generation **/ window.DTM.dataLayer = { digitalData: {}, regExp : { blogs : /http.?:\/\/([^\/]+)\/([^\/]+)\/(.*)/i, diario: /http.?:\/\/([^\/]*)\/diario\/(\d+)\/(\d+)\/(\d+)\/([^\/]*)\/?/i, elecciones : /http.?:\/\/([^\/]*)\/elecciones\/(\d{4})\/([^\/]*)\/.*/i, eleccionesHome : /http.?:\/\/([^\/]*)\/elecciones\/(.*?).html/i, eleccionesPortadas: /http.?:\/\/([^\/]*)\/elecciones\/(\d{4})\//i, especiales: /http.?:\/\/[^\/]*\/([^\/]*)\/(\d{4})\/([^\/]*)\//i, especialesPortadas: /http.?:\/\/([^\/]*)\/([^\/]*)\/([^\/]*)\//i, moviles: /(http.?:\/\/[^\/]*)\/m\/(.*)/i, nivel1: /^http.?:\/\/[^\/]*\/([^\/]+)/i, nivel2: /^http.?:\/\/[^\/]*\/([^\/]+)\/(.*)/i, nivel3: /^http.?:\/\/[^\/]*\/([^\/]+)\/\d+\/(.*)/i, noticia: /http.?:\/\/([^\/]*)\/([^\/]*)\/(\d+)\/(\d+)\/(\d+)\/([^\/]*)\/(.*)\.html/i, portada: /http.?:\/\/([^\/]*)\/?(.*)/i, portadilla: /http.?:\/\/([^\/]*)\/([^\/]*)\/(.*)/i, seccion: /http.?:\/\/([^\.]*)\./i, seccionVirtual: /http.?:\/\/([^\/]*).elpais.com\/seccion\/([^\/]*)/i, sorteos : /([^\/]*)\/?/, tag: /([^\/]+)\/([^\/]+)\/?.*/i, tagRamas: /^([^\/]+)\/([^\/]+)\/.*/i, result_re: undefined, result_re2: undefined, result_re3: undefined, result_re4: undefined, result_re5: undefined, result_re6: undefined, result_re7: undefined, result_re8: undefined, result_re9: undefined, result_reSo: undefined }, vars: { adblockerChecked: -1, userInfoChecked: false, trackingCodes: ['id_externo_display', 'id_externo_sem', 'id_externo_nwl', 'id_externo_promo', 'id_externo_rsoc','id_externo_ref', 'id_externo_portada', 'id_externo_noti', 'sdi', 'sse', 'sma', 'prm', 'sap', 'ssm', 'afl', 'agr', 'int', 'noti', 'idexterno'], }, init : function(){ this.initVars(); this.multidistribution.init(); //Si hay Data Layer en página, tiene prioridad if(typeof window.DTM.pageDataLayer != "undefined") this.pageDL(); //Si no hacemos el autotrack else this.generateDL(); //Creación del dataLayer this.digitalData = { page: { pageInfo: { adblocker: "0", articleID: this.vars.articleID, author: this.vars.author != 0 ? this.vars.author : this.arrayAuthors(), businessUnit: "noticias", campaign: "", canonicalURL: this.vars.canonicalURL == "" ? this.getCanonical() : this.vars.canonicalURL, creationDate: this.vars.creationDate, destinationURL: this.vars.destinationURL, domain: this.vars.domain, edition: this.vars.edition, encoded: this.vars.encoded, geoRegion: "españa", language: this.vars.language, onsiteSearch: "", onsiteSearchTerm: "", onsiteSearchResults: "", org: "prisa", pageID: document.location.href, pageName: this.vars.pageName, pageTitle: this.vars.pageTitle, platform: this.vars.platform, publisher: "el pais", referringURL: this.vars.referringURL, server: this.vars.server, siteID: this.vars.siteID, ssl: (document.location.protocol == 'https:') ? "1" : "0", sysEnv: this.vars.sysEnv, tags: this.vars.tags.length != 0 ? this.vars.tags : this.arrayTags(), thematic: this.vars.thematic, urlParams: this.getQueryParam() }, category: { pageType: this.vars.pageType, primaryCategory: this.vars.seccion, subCategory1: this.vars.subseccion, subCategory2: this.vars.subsubseccion } }, user: { profileID: "", registeredUser: "", userName: "", country: "" }, event: [] }; window.digitalData = this.digitalData; this.adblocker(); this.internalSearch(); this.encoded(); this.getUserInfo(); digitalData.page.pageInfo.campaign = this.getCampaign(); window.DTM.notify("Data Layer generated"); }, initVars: function(){ this.vars.adblocker = false; this.vars.articleID = ""; this.vars.author = []; this.vars.canonicalURL = ""; this.vars.creationDate = ""; this.vars.domain = "elpais.com"; this.vars.direccion = document.location.href.replace(/[\?#].*?$/g, ""); this.vars.destinationURL = document.location.href; this.vars.edition= (typeof(window.PEPedition) != "undefined") ? window.PEPedition.toLowerCase() : "españa"; this.vars.encoded = "0"; this.vars.hier1_omniture = ""; this.vars.kruxEnabled = false; this.vars.language = document.documentElement.lang ? document.documentElement.lang : "es"; this.vars.pageName = "elpaiscom" + document.location.href.replace(/[\?#].*?$/g, "").replace(/http.?:\/\/[^\/]*/, ""); this.vars.pageTitle = (document.getElementsByTagName('title')[0]) ? document.getElementsByTagName('title')[0].innerHTML.replace(/'|"|\|/g, "").toLowerCase() : ""; this.vars.pageType = ""; this.vars.platform = this.multidistribution.platforms.WEB; this.vars.referringURL = document.referrer; this.vars.search = "0"; this.vars.search_keyword = ""; this.vars.search_results = ""; this.vars.seccion = "channel"; this.vars.server = window.location.host; this.vars.siteID = "elpaiscom"; this.vars.subseccion = "seccion"; this.vars.subsubseccion = ""; this.vars.sysEnv = "web"; this.vars.thematic = "informacion"; this.vars.timeInit = new Date().getTime(); this.vars.search_keyword_dictionary = ""; this.vars.seccion_omniture = "seccion"; this.vars.subseccion_omniture = "subseccion"; this.vars.tags = []; this.vars.tituloarticulo = false; this.vars.verarticulo = false; this.vars.wp = { nivel : "", seccion : "", subseccion : "", tipo : "" }; }, pageDL: function(){ if(typeof window.DTM.pageDataLayer == "undefined") return; this.vars.seccion = (typeof DTM.pageDataLayer.primaryCategory != "undefined") ? DTM.pageDataLayer.primaryCategory : "desconocido"; this.vars.subseccion = (typeof DTM.pageDataLayer.subCategory1 != "undefined") ? DTM.pageDataLayer.subCategory1 : ""; this.vars.subsubseccion = (typeof DTM.pageDataLayer.subCategory2 != "undefined") ? DTM.pageDataLayer.subCategory2 : ""; this.vars.pageType = (typeof DTM.pageDataLayer.pageType != "undefined") ? DTM.pageDataLayer.pageType : this.vars.pageType; this.vars.language = (typeof DTM.pageDataLayer.language != "undefined") ? DTM.pageDataLayer.language : this.vars.language; this.vars.sysEnv = (typeof DTM.pageDataLayer.sysEnv != "undefined") ? DTM.pageDataLayer.sysEnv : this.vars.sysEnv; this.vars.thematic = (typeof DTM.pageDataLayer.thematic != "undefined") ? DTM.pageDataLayer.thematic : this.vars.thematic; this.vars.destinationURL = (typeof DTM.pageDataLayer.destinationURL != "undefined") ? DTM.pageDataLayer.destinationURL : this.vars.destinationURL; this.vars.edition = (typeof DTM.pageDataLayer.edition != "undefined") ? DTM.pageDataLayer.edition : this.vars.edition; this.vars.creationDate = (typeof DTM.pageDataLayer.creationDate != "undefined") ? DTM.pageDataLayer.creationDate : this.vars.creationDate; this.vars.pageTitle = (typeof DTM.pageDataLayer.pageTitle != "undefined") ? DTM.pageDataLayer.pageTitle : this.vars.pageTitle; this.vars.referringURL = (typeof DTM.pageDataLayer.referringURL != "undefined") ? DTM.pageDataLayer.referringURL : this.vars.referringURL; this.vars.siteID = (typeof DTM.pageDataLayer.siteID != "undefined" && DTM.pageDataLayer.siteID != "") ? (this.vars.siteID + "/" + DTM.pageDataLayer.siteID) : this.vars.siteID; this.vars.pageName = (typeof DTM.pageDataLayer.pageName != "undefined") ? DTM.pageDataLayer.pageName : (this.vars.siteID + this.vars.destinationURL.replace(/[\?#].*?$/g, "").replace(/http.?:\/\/[^\/]*/, "")); this.vars.tags = (typeof DTM.pageDataLayer.tags == "object") ? DTM.pageDataLayer.tags : []; this.vars.author = (typeof DTM.pageDataLayer.author == "object") ? DTM.pageDataLayer.author : []; this.vars.pageID = document.location.href; this.vars.encoded = (typeof DTM.pageDataLayer.encoded != "undefined") ? DTM.pageDataLayer.encoded : "0"; if(this.vars.pageType == "articulo" || this.vars.pageType == "fotogaleria"){ this.vars.articleID = window.DTM.utils.encoder.encode(this.vars.destinationURL.replace(/[\?#].*?$/g, "")); this.vars.tituloarticulo = true; this.vars.verarticulo = true; window.DTM.events.vars.readArticleEnabled = true; } }, generateDL: function(){ //Obtenemos la sección a la que pertenece la página this.regExp.result_re4 = this.regExp.seccion.exec(this.vars.direccion); if (this.regExp.result_re4) this.vars.seccion_omniture = this.regExp.result_re4[1]; if (this.vars.seccion_omniture == 'brasil') this.vars.domain = "brasil.elpais.com"; //Tratamos por seccion switch (this.vars.seccion_omniture) { //Secciones especiales case "blogs": this.blogs(); break; case "cartelera": this.cartelera(); break; case "chinawatch": this.chinawatch(); break; case "eskup": this.eskup(); break; case "estudiantes": this.estudiantes(); break; case "resultados": this.resultados(); break; case "juegos": this.juegos(); break; case "motor": this.motor(); break; case "programacion-tv": this.programaciontv(); break; case "servicios": this.servicios(); break; case "smoda": this.smoda(); break; case "suscripciones": this.suscripciones(); break; //Resto de secciones default: this.regExp.result_re = this.regExp.noticia.exec(this.vars.direccion); //Es un artículo if(this.regExp.result_re){ this.articulo(); }else{ //Secciones virtuales this.regExp.result_re5 = this.regExp.seccionVirtual.exec(this.vars.direccion); if(this.regExp.result_re5) { this.vars.pageType = "portada"; if(this.regExp.result_re5[1] == "brasil") { this.vars.seccion = this.regExp.result_re5[2]; this.vars.subseccion = this.regExp.result_re5[2] + ">home"; }else{ this.vars.seccion = this.regExp.result_re5[1]; this.vars.subseccion = this.regExp.result_re5[1] + ">" + this.regExp.result_re5[2] + ">home"; } }else{ //Especiales if(this.vars.direccion.indexOf("//elpais.com/especiales/") > -1 || this.vars.direccion.indexOf("//elpais.com/promociones/") > -1 || this.vars.direccion.indexOf("elpais.com/publi-especial/") > -1 || this.vars.direccion.indexOf("elpais.com/concursos/") > -1 || this.vars.direccion.indexOf("//www.elpais.com/especial") > -1 || this.vars.direccion.indexOf("//elpais.com/suscripciones/especiales") > -1 || this.vars.direccion.indexOf("//cat.elpais.com/especials/") > -1 || this.vars.direccion.indexOf("//brasil.elpais.com/especiais/") > -1 || this.vars.direccion.indexOf("//verne.elpais.com/especial/") > -1){ this.regExp.result_re5 = this.regExp.especiales.exec(this.vars.direccion); this.especiales(); //Diario }else{ this.regExp.result_re6 = this.regExp.diario.exec(this.vars.direccion); if(this.regExp.result_re6){ this.diario(); //Portadillas }else{ this.regExp.result_re2 = this.regExp.portadilla.exec(this.vars.direccion); if(this.regExp.result_re2) { this.portadillas(); //Portada }else{ this.regExp.result_re3 = this.regExp.portada.exec(this.vars.direccion); if(this.regExp.result_re3) this.regExp.result_re3[2] = this.regExp.result_re3[2].replace(/\?.*/, ""); if(this.regExp.result_re3 && (this.regExp.result_re3[2].indexOf("index.html") == 0 || this.regExp.result_re3[2] == "")) { this.portada(); }else{ //Portadillas cincodias sin la barra final cincodias.elpais.com/smartlife if(this.regExp.result_re3[1] == "cincodias.elpais.com" && this.regExp.result_re3[2] != ""){ this.vars.pageType = "portada"; this.vars.seccion = "cincodias"; this.vars.subseccion = "cincodias>" + this.regExp.result_re3[2] + ">home"; }else{ this.vars.seccion = "desconocido"; this.vars.pageType = ""; this.vars.subseccion = "desconocido" + ">" + "desconocido"; } } } if (this.vars.seccion == "elpais") this.vars.seccion = this.vars.seccion_omniture; } } } } } if(this.vars.direccion.indexOf("//retina.elpais.com") > -1 && this.vars.pageName.indexOf("elpaiscom/retina") == -1) this.vars.pageName = this.vars.pageName.replace("elpaiscom", "elpaiscom/retina"); if(this.vars.direccion.indexOf("//cincodias.elpais.com") > -1 && this.vars.pageName.indexOf("elpaiscom/cincodias") == -1) this.vars.pageName = this.vars.pageName.replace("elpaiscom", "elpaiscom/cincodias"); if(this.vars.seccion == "deportes") this.vars.thematic = "deportes"; if(this.vars.platform == this.multidistribution.platforms.AMPSTORIES) this.vars.pageType = "stories"; if(this.vars.platform == this.multidistribution.platforms.PWA) this.vars.sysEnv = "pwa"; }, articulo: function(){ this.vars.seccion = this.regExp.result_re[2]; this.vars.seccion_omniture = this.regExp.result_re[2]; this.vars.subseccion_omniture = this.regExp.result_re[6]; this.vars.tituloarticulo = true; this.vars.creationDate = this.regExp.result_re[3] + "/" + this.regExp.result_re[4] + "/" + this.regExp.result_re[5]; //Albumes y videos tratamos distinto if (this.vars.subseccion_omniture.indexOf("album") > -1 || this.vars.subseccion_omniture == "fotorrelato" || this.vars.subseccion_omniture == "videos" || this.vars.subseccion_omniture == "media") { var generica = (this.vars.subseccion_omniture == "videos") ? "videos" : (this.vars.subseccion_omniture == "media" ? "media" : "fotografia"); this.vars.pageType = (this.vars.subseccion_omniture == "videos" || this.vars.subseccion_omniture == "media") ? "articulo" : "fotogaleria"; if(this.vars.subseccion_omniture == "media"){ this.vars.verarticulo = true; window.DTM.events.vars.readArticleEnabled = true; } if(typeof(window.subseccion_publi) != "undefined" && window.subseccion_publi != "") { if(this.vars.seccion_omniture == "elpais") { if(window.subseccion_publi.indexOf("|") == -1) { this.vars.seccion = window.subseccion_publi; this.vars.subseccion = this.vars.seccion + ">" + generica; }else{ var ps = subseccion_publi.split("|"); this.vars.seccion = ps[0]; this.vars.subseccion = ps[0] + ">" + ps[1] + ">" + generica; } }else{ this.vars.seccion = this.vars.seccion_omniture; if(subseccion_publi == "smartlife" || subseccion_publi == "tpymes"){ this.vars.subseccion = this.vars.seccion_omniture + ">" + (subseccion_publi == "tpymes" ? "territorio_pyme" : subseccion_publi); this.vars.subsubseccion = this.vars.subseccion + ">" + generica; }else{ this.vars.subseccion = this.vars.seccion_omniture + ">" + generica; } } }else{ this.vars.seccion = (this.vars.seccion_omniture == "elpais") ? generica : this.vars.seccion_omniture; this.vars.subseccion = generica; } //Articulos corrientes }else{ this.vars.pageType = "articulo"; //blogs if(typeof(window.PEPtipologia) != "undefined" && window.PEPtipologia == "blogs") { this.vars.seccion = "blogs"; this.vars.subseccion = "blogs>" + this.vars.subseccion_omniture; //resto } else { if(this.vars.seccion_omniture == "elpais" || this.vars.seccion_omniture == "brasil") { this.vars.seccion_omniture = this.vars.subseccion_omniture; this.vars.subseccion_omniture = ""; this.vars.subseccion = this.vars.seccion_omniture; }else{ if(this.vars.direccion.indexOf("cincodias.elpais.com") > -1) { switch(this.vars.subseccion_omniture) { case "smartphones": case "tablets": case "smarttv": case "gadgets": case "pymes": case "motor": case "lifestyle": this.vars.subsubseccion = this.vars.seccion_omniture + ">smartlife>" + this.vars.subseccion_omniture; this.vars.subseccion_omniture = "smartlife"; break; case "autonomos": case "pyme": case "emprendedores": case "franquicias": case "guias_pymes": case "financiacion": this.vars.subsubseccion = this.vars.seccion_omniture + ">territorio_pyme>" + this.vars.subseccion_omniture; this.vars.subseccion_omniture = "territorio_pyme"; break; default: } } this.vars.subseccion = this.vars.seccion_omniture + ">" + this.vars.subseccion_omniture; } } this.vars.verarticulo = true; window.DTM.events.vars.readArticleEnabled = true; if (this.vars.seccion == "elpais" || this.vars.seccion == "brasil") this.vars.seccion = this.vars.seccion_omniture; } //Id del articulo this.vars.articleID = this.regExp.result_re[2] + "_" + this.regExp.result_re[3] + this.regExp.result_re[4] + this.regExp.result_re[5] + "_" + this.regExp.result_re[6] + "_" + this.regExp.result_re[7]; window.DTM.events.vars.trackLinks = "1"; }, blogs: function(){ this.vars.seccion = "blogs"; this.vars.seccion_omniture = "blogs"; this.vars.pageName = this.vars.pageName.replace("elpaiscom", "elpaiscom/blogs"); this.regExp.result_re = this.regExp.blogs.exec(this.vars.direccion); if(this.regExp.result_re){ switch (this.regExp.result_re[2]) { case "la-voz-de-inaki": this.vars.subseccion_omniture = "la voz de iñaki"; break; default: this.vars.subseccion_omniture = this.regExp.result_re[2].replace(/-/, " "); } this.vars.pageType = "contenido generado por usuarios"; }else{ this.vars.subseccion_omniture = "desconocido"; this.vars.pageType = ""; } this.vars.subseccion = this.vars.seccion_omniture + ">" + this.vars.subseccion_omniture; document.write('