(function(){if(typeof window.QSI==='undefined'){window.QSI={};} var tempQSIConfig={"hostedJSLocation":"https://siteintercept.qualtrics.com/dxjsmodule/","baseURL":"https://siteintercept.qualtrics.com","zoneId":"ZN_824BpwRuzg5MXB3"};if(typeof window.QSI.config!=='undefined'&&typeof window.QSI.config==='object'){for(var attrname in tempQSIConfig){window.QSI.config[attrname]=tempQSIConfig[attrname];}}else{window.QSI.config=tempQSIConfig;} window.QSI.shouldStripQueryParamsInQLoc=false;})();try{!function(e){function t(t){for(var n,o,i=t[0],a=t[1],s=0,u=[];st;){var n=decodeURIComponent(e).split("|");n.splice(0,1),e=n.join("|"),e=encodeURIComponent(e)}return e},get:function(){var e=this.historyStorage.getHistorySessionData();return e||(e=[]),e=this.limitSize(e),decodeURIComponent(e)},logCurrentURL:function(){var e=window.location.href,t=1*new Date;this.logSite(e,t)},getReferrer:function(){return document.referrer},logSearch:function(){var e,t,n=this.getReferrer();if(n.search(/(google.com)|(bing.com)|(yahoo.com)/)>=0){var r="";n.search(/(google.com)|(bing.com)/)>=0?(e=/q=(.*?)\&/,(t=n.match(e))&&t.length&&t[1]&&(r=t[1])):n.search(/yahoo.com/)>=0&&(e=/p=(.*?)\&/,(t=n.match(e))&&t.length&&t[1]&&(r=t[1])),r=decodeURIComponent(r),QSI.profile.set("History","SearchTerm",r)}},logReferrer:function(){var e=this.getReferrer();e&&(QSI.util.build("a",{href:e}).hostname!==document.location.host&&QSI.profile.set("History","SiteReferrer",e),QSI.profile.set("History","PageReferrer",e))},logIntercept:function(e,t){t&&this.logActionSet(t)},logActionSet:function(e){if(e.search("AS_")>=0){var t=e,n=1*new Date;QSI.profile.set("ActionSetHistory",t,n),QSI.profile.set("ActionSetHistory",t,n,1)}},logSurvey:function(e,t){QSI.profile.set("QualtricsSurveyHistory",e,t,1)},getSiteReferrer:function(){return QSI.profile.get("History","SiteReferrer")},getPageReferrer:function(){return QSI.profile.get("History","PageReferrer")},getSearch:function(){var e=QSI.profile.get("History","SearchTerm");return e||(e=""),e},getTimeOnSite:function(){var e=this.focusTime;return e+this.blurTime+"|"+e},getFocusTimeFromBrowserStorage:function(){var e=QSI.profile.get("History","FocusTime");return e||(e=0),e},getBlurTimeFromBrowserStorage:function(){var e=QSI.profile.get("History","BlurTime");return e||(e=0),e},getActionSetHistory:function(e,t){var n=QSI.profile.get("ActionSetHistory",e,t);return n||(n=0),n},getPageCount:function(){var e,t,n=this.historyStorage.getHistorySessionData(),r=0,o=[];if(n){var i=(n=decodeURIComponent(n)).split("|");for(t=i.length,e=0;e0?QSI.PendingQueue.push(e.bind(this,t)):e.bind(this,t)(),n}catch(e){QSI.dbg.e(e)}},unload:function(){try{if(QSI.PendingQueue||(QSI.PendingQueue=[]),QSI.LoadingState&&QSI.LoadingState.length>0)return void QSI.PendingQueue.push(QSI.API.unload);if(this.unloading=!0,QSI.reg&&(QSI.util.forOwn(QSI.reg,function(e,t){QSI.reg[t].remove()}),QSI.util.removeObservers()),QSI.debug&&(QSI.util.remove(QSI.util.$("QSI_Debug")),QSI.debuggerHasDisplayed=!1),QSI.styleElements)for(var e=QSI.styleElements,t=0;t0)return void QSI.PendingQueue.push(QSI.API.run);QSI.InterceptsRan||void 0===QSI.reg||QSI.RunIntercepts(null,!0)}catch(e){QSI.dbg.e(e)}},Events:{increment:function(e){try{QSI.EventTracker.track(e)}catch(e){QSI.dbg.e(e)}},count:function(e){try{return QSI.EventTracker.get(e)}catch(e){QSI.dbg.e(e)}},push:function(e){try{QSI.EventTracker.track(e)}catch(e){QSI.dbg.e(e)}}}})},function(e,t){QSI.ContactFrequency={contactFrequencyRequestTimeout:1e4,contactFrequencyCheckResults:{},contactFrequencyCheckStates:{CAN_CONTACT:"CAN_CONTACT",DO_NOT_CONTACT:"DO_NOT_CONTACT",NOT_CHECKED:"NOT_CHECKED"},checkContactFrequencyRules:function(e,t){var n=QSI.Orchestrator.Deferred(),r={};return QSI.util.forOwn(e,function(e,n){if(this.contactFrequencyCheckResults[n]={status:this.contactFrequencyCheckStates.NOT_CHECKED,brandId:null,surveyId:null},null!==e.Targeting.Decision.ActionSetID){var o=e.Intercept;if(!QSI.util.shouldPreventRepeatedDisplay(n,o.DisplayOptions)&&this.shouldCheckContactFrequency(o)){var i=this.getIQDirectorySettings(o);if(i){var a=this.getTargetSurveyId(o,e.Targeting);a&&(i.surveyId=a,this.contactFrequencyCheckResults[n].surveyId=a),this.contactFrequencyCheckResults[n].brandId=t,i.brandId=t,r[n]=i,this.contactFrequencyCheckResults[n].status=this.contactFrequencyCheckStates.DO_NOT_CONTACT}else this.contactFrequencyCheckResults[n].status=this.contactFrequencyCheckStates.DO_NOT_CONTACT}}}.bind(this)),0!==Object.keys(r).length?this.sendContactFrequencyRequest(r,n):n.resolve(),n.promise()},shouldCheckContactFrequency:function(e){return e.DisplayOptions&&e.DisplayOptions.useContactFrequencyRules},getIQDirectorySettings:function(e){if(!e.DisplayOptions)return null;var t,n=e.DisplayOptions;if(QSI.global.featureFlags["DX.ContactFrequencyV2"]?QSI.config&&QSI.config.externalReference&&(t=QSI.config.externalReference):t=this.resolveContactFrequencyExternalReference(n.contactFrequencyRefLocator,n.contactFrequencyRefExpression),!t)return QSI.dbg.e("Could not retrieve external reference ID for Contact Frequency Check"),null;if(!("string"==typeof t||t instanceof String))return QSI.dbg.e("External reference ID must be a string for Contact Frequency Check"),null;var r=n.contactFrequencyDirectoryID;if(!r)return QSI.dbg.e("Missing directoryId for Contact Frequency Check"),null;var o=n.contactFrequencyUserID;return o?{extRef:t,directoryId:r,userId:o}:(QSI.dbg.e("Missing User Id for Contact Frequency Check"),null)},getTargetSurveyId:function(e,t){if(!t.Decision||!t.Decision.ActionSetID)return null;var n=t.Decision.ActionSetID;return e.ActionSets&&e.ActionSets[n]&&e.ActionSets[n].Target&&"Survey"===e.ActionSets[n].Target.Type?e.ActionSets[n].Target.PrimaryElement:null},resolveContactFrequencyExternalReference:function(e,t){if(!t)return QSI.dbg.e("No reference expression used for contact frequency check"),null;switch(e){case"JavaScript":return QSI.EmbeddedData.getJavaScriptValue(t.expression);case"Cookie":return QSI.cookie.get(t.expression);default:return QSI.dbg.e("Reference locator used for contact frequency check is unsupported:"+e),null}},sendContactFrequencyRequest:function(e,t){var n="https://"+QSI.global.brandDC+"/dx-iqd-proxy/check-frequency-rules";return QSI.LatencyLog.startComponentTimer(QSI.LatencyLog.components.CONTACT_FREQUENCY),void QSI.util.sendHttpRequest({type:"POST",url:n,header:{"Content-type":"application/json"},data:JSON.stringify(e),successCallback:function(e){try{var n;if(e.response&&(n=JSON.parse(e.response)),"object"!=typeof n)throw new Error("ContactFrequency check came back with invalid response: "+results);QSI.util.forOwn(n,function(e,t){null!==e?!0===e.passesFrequencyRules&&(this.contactFrequencyCheckResults[t].status=this.contactFrequencyCheckStates.CAN_CONTACT,this.contactFrequencyCheckResults[t].contactId=e.contactId):QSI.dbg.e("ContactFrequency check for intercept:"+t+" errored; defaulting to no show")}.bind(this))}catch(e){QSI.dbg.e(e)}finally{QSI.LatencyLog.endComponentTimer(QSI.LatencyLog.components.CONTACT_FREQUENCY),t.resolve()}}.bind(this),errorCallback:function(e){var r="Call to ContactFrequency endpoint: "+n+" failed.";e.status&&(r=r+" Status:"+e.status);e.response&&(r=r+" Response:"+e.response);QSI.dbg.e(r),QSI.LatencyLog.endComponentTimer(QSI.LatencyLog.components.CONTACT_FREQUENCY),t.resolve()}.bind(this),timeout:this.contactFrequencyRequestTimeout,timeoutCallback:function(){QSI.dbg.e("ContactFrequency check POST request to:"+n+" timed out"),QSI.LatencyLog.endComponentTimer(QSI.LatencyLog.components.CONTACT_FREQUENCY),t.resolve()}})},recordContactFrequencyRequest:function(e){var t="https://"+QSI.global.brandDC+"/dx-iqd-proxy/record-contact";return void QSI.util.sendHttpRequest({type:"POST",url:t,header:{"Content-type":"application/json"},data:JSON.stringify(e),errorCallback:function(e){var n="Call to ContactFrequency endpoint: "+t+" failed.";e.status&&(n=n+" Status:"+e.status);e.response&&(n=n+" Response:"+e.response);QSI.dbg.e(n)}.bind(this),timeout:this.contactFrequencyRequestTimeout,timeoutCallback:function(){QSI.dbg.e("ContactFrequency record POST request to:"+t+" timed out")}})}}},function(e,t){QSI.AssetManager={promiseFetch:function(e,t,n){var r=QSI.Orchestrator.Deferred(),o=new XMLHttpRequest;return o.open(e,t,!0),o.withCredentials=!0,"POST"===e&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.onreadystatechange=function(){4===o.readyState&&(200===o.status?r.resolve(o.responseText):r.reject(o.responseText))},o.send(n),r.promise()},generateDefinitionRequestURL:function(e,t,n,r){var o=QSI.baseURL+"Asset.php?",i=[];if(t=t||n.version,i.push("Module="+e),i.push("Version="+t),null!=r&&i.push("Q_InterceptID="+r),null===n.Q_NOCACHE&&i.push("Q_NOCACHE"),QSI.CORSOrigin&&i.push("Q_ORIGIN="+QSI.CORSOrigin),void 0!==n.Q_CLIENTVERSION&&null!==n.Q_CLIENTVERSION&&i.push("Q_CLIENTVERSION="+n.Q_CLIENTVERSION),void 0!==n.Q_CLIENTTYPE&&null!==n.Q_CLIENTTYPE){var a="Q_CLIENTTYPE="+n.Q_CLIENTTYPE;i.push(a)}return o+=i.join("&")},loadDefinition:function(e,t){var n=QSI.Orchestrator.Deferred(),r=new XMLHttpRequest;return r.open("GET",e,!0),r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status)try{var e=JSON.parse(r.responseText);e.Error?n.reject(e):(t(e),n.resolve(r.responseText))}catch(e){n.reject(r.responseText)}else n.reject(r.responseText)},r.send(),n.promise()},promiseLoadIntercept:function(e,t,n,r){var o=t.InterceptID,i=QSI.AssetManager.generateDefinitionRequestURL(o,t.InterceptRevision,n);return r.startComponentTimer("AssetDefinition-"+o),QSI.AssetManager.loadDefinition(i,function(t){r.endComponentTimer("AssetDefinition-"+o),QSI.Request[e].Intercepts[o].Intercept=t.InterceptDefinition})},promiseLoadCreative:function(e,t,n,r){var o=t.Decision.Creative.ID;if("CR_NoCreative"!==o){var i=QSI.AssetManager.generateDefinitionRequestURL(o,t.Decision.Creative.Revision,n,t.InterceptID);return r.startComponentTimer("AssetDefinition-"+o),QSI.AssetManager.loadDefinition(i,function(n){r.endComponentTimer("AssetDefinition-"+o),QSI.util.isLegacyCreative(n.CreativeDefinition.Type)&&(n.CreativeDefinition=QSI.AssetManager.sortCreativeDefinition(n.CreativeDefinition)),QSI.Request[e].Intercepts[t.InterceptID].Creative=n.CreativeDefinition})}return QSI.Request[e].Intercepts[t.InterceptID].Creative=null,QSI.Orchestrator.Deferred().resolve(null)},promiseLoadPopUnderTarget:function(e,t,n){var r=QSI.AssetManager.generateDefinitionRequestURL(t.Decision.PopUnderTarget.ID,t.Decision.PopUnderTarget.Revision,n,t.InterceptID);return QSI.AssetManager.loadDefinition(r,function(n){QSI.Request[e].Intercepts[t.InterceptID].PopUnderTarget=n.CreativeDefinition})},promiseLoadScript:function(e,t,n,r){var o,i=e+":"+QSI.global.clientVersion;if(-1!==n.global.alreadyFetchedJSModules.indexOf(i))return r.markComponentAlreadyFetched("JSModule-"+e),(o=QSI.Orchestrator.Deferred()).resolve(),o.promise();o=QSI.Orchestrator.Deferred();var a=document.createElement("script");a.src=QSI.global.hostedJSLocation+e+"Module.js?";var s=[];return void 0!==QSI.Orchestrator&&void 0!==QSI.Orchestrator.getClientVersionQueryString&&s.push(QSI.Orchestrator.getClientVersionQueryString()),(-1!==window.location.href.indexOf("Q_DEBUG")||QSI.config.debug)&&s.push("Q_DEBUG=true"),a.src+=s.join("&"),a.defer=!0,a.addEventListener("load",function(){try{!0===QSI.wrongModuleVersionRequested&&(o.reject(),QSI.dbg.e("Script: "+e+" failed to load because an unavailable version ("+t+") was requested.")),n.global.alreadyFetchedJSModules.push(i),r.endComponentTimer("JSModule-"+e),o.resolve()}catch(e){"undefined"!=typeof QSI&&QSI.dbg&&QSI.dbg.e&&QSI.dbg.e(e)}},!1),a.addEventListener("error",function(){try{o.reject(),QSI.dbg.e("Script: "+e+" failed to load.")}catch(e){"undefined"!=typeof QSI&&QSI.dbg&&QSI.dbg.e&&QSI.dbg.e(e)}}),r.startComponentTimer("JSModule-"+e),document.body.appendChild(a),o.promise()},sortCreativeDefinition:function(e){if(e&&e.Options&&e.Options.elements&&e.Options.elements.Elements){var t=e.Options.elements.Elements;t=QSI.util.stableSort(t,function(e,t){return Number(e.style.zIndex)Number(t.style.zIndex)?1:0});for(var n=0;nNumber(t.position.left)?1:0}),t=QSI.util.stableSort(t,function(e,t){return Number(e.position.top)Number(t.position.top)?1:0}),e.Options.elements.Elements=t,e}return e}}},function(e,t,n){"use strict";n.r(t);n(3),n(4),n(5),n(6),n(7),n(8);var r=n(1),o=function(){return function(){var e=this;this.trackElements=function(){if(0==e.loaded){e.loadCounts();var t=window.QSI,n=t.dbg,o=t.global.eventTrackers;Object.keys(o).forEach(function(t){var n=o[t];e.trackElement(n,t)}),Object(r.d)(window,"beforeunload",function(){try{e.storeCounts()}catch(e){void 0!==window.QSI&&n&&n.e&&n.e(e)}}),e.loaded=!0}},this.trackElement=function(t,n){var o=window.QSI.dbg,i=Object(r.a)(t);i&&Object(r.d)(i,"click",function(){try{e.track(n)}catch(e){void 0!==window.QSI&&o&&o.e&&o.e(e)}})},this.track=function(t){e.clicked=!0,e.counts[t]?e.counts[t]++:e.counts[t]=1},this.storeCounts=function(){if(!0===e.clicked){var t=window.QSI.cookie,n=JSON.stringify(e.counts);t.set(e.cookieName,n)}},this.loadCounts=function(){var t=window.QSI.cookie.get(e.cookieName);t&&(e.counts=JSON.parse(t))},this.get=function(t){return e.counts[t]?e.counts[t]:0},this.incrementEventList=function(){if("_qsie"in window&&Object(r.b)(window._qsie))for(var t=0,n=window._qsie.length;t0&&(e.Modules.ScreenCapture=n),i.a.isDebug&&(e.DebugInfo=JSON.stringify(s)),delete e.Modules.DependencyResolver}},e.prototype.handleTargetingResponse=function(e,t){var r=this,o=window.QSI,a=o.AssetManager,s=o.API,c=o.EventTracker,u=o.history;try{var l;if("SampleRejected"===t)return;try{l=JSON.parse(t)}catch(e){return void this.debugLog.e("Failed to parse JSON of targeting response: "+t)}if(l.Error)return void this.debugLog.e(l.Message);this.setGlobalVars(l);var d=l.Modules;u.logVisit(),!i.a.Request[e.id].hasDependencies&&i.a.Request[e.id].hasBeenResolved||(c.trackElements(),c.incrementEventList(),window._qsie=s.Events);var g=this.isBrowserSupported();if(d.Core&&g)a.promiseLoadScript("Core",d.Core,i.a,this.latencyLog).then(function(){try{var t=window.QSI.ClientSideTargeting;i.a.global.featureFlags["DUX.ClientSideTargetingM1"]&&l.ClientSideIntercepts&&l.ClientSideIntercepts.length>0?(t.setEnabled(!0),r.doCSTargetingEvaluation(l,i.a.Request[e.id],i.a.global.clientVersion)):l.Intercepts&&l.Intercepts.forEach(function(t){t&&(t.Error?r.debugLog.log(t.Message):(i.a.Request[e.id].Intercepts[t.InterceptID]={},i.a.Request[e.id].Intercepts[t.InterceptID].Targeting=t))}),!l.Dependencies||i.a.global.featureFlags["DUX.ClientSideTargetingM1"]&&l.ClientSideIntercepts&&l.ClientSideIntercepts.length>0?(n.e(12).then(n.bind(null,45)).then(function(e){(0,e.addPopunderEmbeddedDataHandler)(e.updatePopunderEDCallback)}),i.a.config.externalReference&&i.a.global.featureFlags["DX.ContactFrequencyV3"]&&(i.a.isDebug||t.isEnabled())?(e.Q_XMD_DEBUG=!0,r.handleXMDDebug(e,l)):r.loadModules(e,l)):r.handleDependencyResolver(e,l)}catch(e){r.debugLog.e(e)}},function(){});else this.doneLoading(e)}catch(e){this.debugLog.e(e)}},e.prototype.handleDependencyResolver=function(e,t){var n=this,r=window.QSI.AssetManager,o=this.generateTargetingURL(e);o+="&t="+(new Date).getTime(),o+="&Q_VSI="+encodeURIComponent(JSON.stringify(t.RequestData.validIntercepts)),o+="&Q_DPR=true",this.latencyLog.startComponentTimer(a.components.DPR_TARGETING);var s="";for(var c in t.Dependencies)Object.prototype.hasOwnProperty.call(t.Dependencies,c)&&("SiteCatalyst"===c&&(QSI["Resolve"+c].rootName=i.a.adobeVar),s+=QSI["Resolve"+c].prepare(t.Dependencies[c]));s+="&"+this.getTargetingPostData(),r.promiseFetch("POST",o,s).then(function(){this.latencyLog.endComponentTimer(a.components.DPR_TARGETING)}).then(this.handleTargetingResponse.bind(this,e),function(t){n.debugLog.e(t.Message),e.deferred&&e.deferred.reject()})},e.prototype.handleXMDDebug=function(e,t){var n=this,r=window.QSI.AssetManager,o={};t.Intercepts.forEach(function(e){if(e.Decision&&e.Decision.ActionSetID){var t=e.InterceptID,n=e.Decision.ActionSetID;o[t]=n}});var i=this.generateTargetingURL(e),s="";s+=this.getTargetingPostData(),s+="&ContactFrequencyDebugIntercepts="+JSON.stringify(o);var c=""+a.components.XMD_DEBUG_TARGETING+this.xmdRetryCount;this.latencyLog.startComponentTimer(c),r.promiseFetch("POST",i,s).then(function(r){n.latencyLog.endComponentTimer(c),n.handleXMDDebugResponse(e,t,o,r)})},e.prototype.hasXMDCacheFailure=function(e){for(var t=0;t0?r.latencyLog.send():r.latencyLog.sampledSend(i.a.global.latencySamplePercentage)),r.setGlobalIncludes(e,t);var o=i.a.Request[e.id].displayInterceptType,a=i.a.global.featureFlags["DUX.ClientSideTargetingM1"]&&t.ClientSideIntercepts&&t.ClientSideIntercepts.length>0;("manual"!==o&&!i.a.Request[e.id].zoneManualDisplay||i.a.Request[e.id].hasDependencies&&!a)&&n(e.id,!1),r.doneLoading(e),e.deferred&&e.deferred.resolve()})},e.prototype.isBrowserSupported=function(){return!("Chrome"===i.a.Browser.name&&i.a.Browser.version<=20)&&(!("Firefox"===i.a.Browser.name&&i.a.Browser.version<=59)&&!("Internet Explorer"===i.a.Browser.name&&i.a.Browser.version<=10))},e.prototype.setGlobalIncludes=function(e,t){if(i.a.isDebug&&t.DebugInfo){i.a.Request[e.id].Debug={debugInfo:JSON.parse(t.DebugInfo),version:t.RequestData.bVersion};var n={version:t.RequestData.bVersion,debugInfo:JSON.parse(t.DebugInfo)};i.a.debugConfig=n}i.a.version=t.RequestData.bVersion,i.a.InterceptsRan=!1,i.a.Request[e.id].hasDependencies=t.RequestData.hasDependencies,i.a.Request[e.id].hasBeenResolved=t.RequestData.hasBeenResolved,i.a.Request[e.id].displayInterceptType=t.RequestData.displayInterceptType,i.a.Request[e.id].zoneManualDisplay=t.RequestData.zoneManualDisplay},e.prototype.setGlobalVars=function(e){i.a.Browser={name:e.RequestData.browser,version:e.RequestData.browserVersion,isMobile:e.RequestData.isMobile,isBrowserSupported:e.RequestData.isBrowserSupported},i.a.CORSOrigin=e.RequestData.CORSOrigin,i.a.OS={name:e.RequestData.osName,version:e.RequestData.osVersion},i.a.global.brandID=e.RequestData.brandID,i.a.global.brandDC=e.RequestData.brandDC,i.a.global.graphicPath="https://"+i.a.global.brandDC+"/WRQualtricsSiteIntercept/Graphic.php?IM=",i.a.global.imagePath=i.a.global.baseURL+"/WRQualtricsShared/Graphics/",i.a.global.maxCookieSize=e.RequestData.maxCookieSize,i.a.global.featureFlags=e.FeatureFlags,i.a.global.screenCaptureServiceBaseURL=e.RequestData.screenCaptureServiceBaseURL,i.a.global.eventTrackers=e.RequestData.eventTrackers,i.a.adobeVar=e.RequestData.adobeSCVariable,i.a.id=e.RequestData.ID,i.a.reqID[e.RequestData.ID]=!0,i.a.CookieDomain=e.RequestData.cookieDomain,i.a.historyStorageType=e.RequestData.historyStorageType,i.a.historyStorageSize=e.RequestData.historyStorageSize,i.a.currentURL=window.location.href.split("?")[0],function(){var e=document.createElement("div");e.className="scrollbar-measure",e.style.width="100px",e.style.height="100px",e.style.overflow="scroll",e.style.position="absolute",e.style.top="-99999px",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;i.a.scrollbarWidth=t,document.body.removeChild(e)}()},e.prototype.parseQueryString=function(e){var t={};if(e&&-1!==e.indexOf("?"))for(var n=e.split("?",2)[1].split("&"),r=0;r1?n:r.createArrayFromArguments(c([n],o)),--a||s.resolve(t)}};if(i>1)for(var l=0;l