(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=[];s<i.length;s++)o=i[s],r[o]&&u.push(r[o][0]),r[o]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(c&&c(t);u.length;)u.shift()()}var n={},r={2:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var i=new Promise(function(t,o){n=r[e]=[t,o]});t.push(n[2]=i);var a,s=document.createElement("script");s.charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.src=function(e){return o.p+""+({}[e]||e)+"."+{0:"b516993f8c697ecc15e7",1:"e9e02892655887e0c39e",3:"d85d17c242c25fb6fdec",4:"9a5a4eae9eb9ca54d54e",5:"c4c7f6bb91d2798d2562",6:"1e8e0d168eadf28899bd",7:"d2ad41acb6d5490e1ec0",8:"336c2297fa4933392786",9:"7349a608498d54370f7b",10:"24321715ce90338b734f",11:"7761a951f01b9e719a9e",12:"27791e99bcc8b8bb612b",13:"0c7d797784a749551b9f"}[e]+".chunk.js?Q_CLIENTVERSION=1.35.0&Q_CLIENTTYPE=web"}(e);var c=new Error;a=function(t){s.onerror=s.onload=null,clearTimeout(u);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",c.type=o,c.request=i,n[1](c)}r[e]=void 0}};var u=setTimeout(function(){a({type:"timeout",target:s})},12e4);s.onerror=s.onload=a,document.head.appendChild(s)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var i=window["WAFQualtricsWebpackJsonP-cloud-1.35.0"]=window["WAFQualtricsWebpackJsonP-cloud-1.35.0"]||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var c=a;o(o.s=2)}([function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var o=function(){var e,t=window.QSI,o=window.QSI=r(r({},t),{reg:t.reg||{},ed:t.ed||{},reqID:t.reqID||{},overrides:t.overrides||{},shouldStripQueryParamsInQLoc:!!t.shouldStripQueryParamsInQLoc,config:r({zoneId:"",brandId:""},t.config),global:r(r({currentZIndex:2e9,intercepts:{},eventTrackers:[],featureFlags:{},enableJSSanitization:!1,latencySamplePercentage:.02,alreadyFetchedJSModules:[],maxCookieSize:null},t.global),{isHostedJS:function(){return!1},clientType:"web",clientVersion:"1.35.0",hostedJSLocation:t.config.hostedJSLocation||t.config.clientBaseURL,legacyId:t.config.interceptId||t.config.zoneId||t.config.targetingId||t.global.ID}),isFullDbgInitialized:!1,baseURL:"",LoadingState:t.LoadingState||[],PendingQueue:t.PendingQueue||[],debugConfig:t.debugConfig||{},getBaseURLFromConfigAndOverrides:function(){var e="";if(o.overrides.baseURL)e=o.overrides.baseURL;else if(o.config.baseURL)e=o.config.baseURL;else if(e="siteintercept.qualtrics.com",o.config.brandId){if(!o.config.zoneId)throw"You must specify a zoneId";e=o.config.zoneId.replace("_","").toLowerCase()+"-"+o.config.brandId.toLowerCase()+"."+e}return 0===e.indexOf("https://")?e=e.substring(8):0===e.indexOf("http://")?e=e.substring(7):0===e.indexOf("//")&&(e=e.substring(2)),"https://"+e},initFullDbg:function(){o.isFullDbgInitialized=!0},getClientVersionQueryString:function(){var e={Q_CLIENTVERSION:o.global.clientVersion||"unknown",Q_CLIENTTYPE:o.global.clientType||"unknown"};return void 0!==o.clientTypeVariant&&(e.Q_CLIENTTYPE+=o.clientTypeVariant),o.generateQueryString(e)},generateQueryString:function(e){var t=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=n;e[n]&&(r+="="+encodeURIComponent(e[n])),t.push(r)}return t.join("&")}});if(!o.global.legacyId)throw"You must specify a zoneId or zoneId and interceptId";return o.global.baseURL=o.getBaseURLFromConfigAndOverrides(),o.global.isHostedJS()&&(o.global.enableJSSanitization=o.config.enableJSSanitization||!0),o.baseURL=o.baseURL||o.overrides.siBaseURL||o.global.baseURL+"/WRSiteInterceptEngine/",e=o.global.hostedJSLocation,n.p=e,o}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"e",function(){return i}),n.d(t,"d",function(){return a}),n.d(t,"c",function(){return s}),n.d(t,"b",function(){return c});var r=[],o=function(e){var t=e;return"string"==typeof e&&(t=document.getElementById(e)),t},i=function(e,t){var n;13!==e.which&&32!==e.which||(e.preventDefault(),(n=document.querySelector('button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))&&n.focus(),t())},a=function(e,t,n,o){void 0===o&&(o=!1),r=r||[],e&&(r.push({elementToObserve:e,eventName:t,eventHandler:n,preventRemove:o||!1}),e.addEventListener(t,n,!1))},s=function(e){return"string"==typeof e},c=function(e){return"object"==typeof e&&e instanceof Array}},function(e,t,n){e.exports=n(9)},function(e,t){QSI.history&&!window.QTest||(QSI.historyStorage={historySessionName:"QSI_HistorySession",get useCookie(){return"sessionStorage"!==QSI.historyStorageType},get limit(){return this.useCookie?2e3:1e4},getHistorySessionData:function(){return this.useCookie?QSI.cookie.get(this.historySessionName):sessionStorage.getItem(this.historySessionName)},eraseHistorySessionData:function(){this.useCookie?QSI.cookie.erase(this.historySessionName):sessionStorage.removeItem(this.historySessionName)},setHistorySessionData:function(e){this.useCookie?QSI.cookie.set(this.historySessionName,e,0):sessionStorage.setItem(this.historySessionName,e)}},QSI.history={historyStorage:QSI.historyStorage,logVisit:function(){this.logCurrentURL(),this.logSearch(),this.startFocusTracking(),this.logReferrer()},startFocusTracking:function(){if(!this.started)try{this.started=!0,this.focusTime=this.getFocusTimeFromBrowserStorage(),this.blurTime=this.getBlurTimeFromBrowserStorage();var e=this;setInterval(function(){try{e.focused?e.focusTime+=1:e.blurTime+=1}catch(e){"undefined"!=typeof QSI&&QSI.dbg&&QSI.dbg.e&&QSI.dbg.e(e)}},1e3);var t,n=function(){try{e.focused=!0}catch(e){"undefined"!=typeof QSI&&QSI.dbg&&QSI.dbg.e&&QSI.dbg.e(e)}};n(),QSI.util.observe(window,"focus",n),QSI.util.observe(window,"blur",function(){try{e.focused=!1}catch(e){"undefined"!=typeof QSI&&QSI.dbg&&QSI.dbg.e&&QSI.dbg.e(e)}}),t=QSI.Browser.isMobile?"pagehide":"unload",QSI.util.observe(window,t,function(){try{QSI.profile.set("History","BlurTime",e.blurTime),QSI.profile.set("History","FocusTime",e.focusTime)}catch(e){"undefined"!=typeof QSI&&QSI.dbg&&QSI.dbg.e&&QSI.dbg.e(e)}})}catch(e){QSI.dbg.e(e)}},logSite:function(e,t){var n,r=this.historyStorage.getHistorySessionData();if(r){var o=(r=decodeURIComponent(r)).split("|");n=o[o.length-1].split("~")[0],r+="|"}else r="",n="";e!==n&&(r+=e+"~"+t,this.writeHistory(r))},writeHistory:function(e,t){if(null!=t&&t<=0)this.historyStorage.eraseHistorySessionData();else{t=t||QSI.historyStorageSize||QSI.global.maxCookieSize||this.historyStorage.limit;var n=encodeURIComponent(e),r=this.limitSize(n,t);try{this.historyStorage.setHistorySessionData(r)}catch(n){e=decodeURIComponent(r),this.writeHistory(e,t-500)}}},limitSize:function(e,t){if(!e.length)return e;for(t=t||this.historyStorage.limit;e.length>t;){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;e<t;e++)o.push(i[e].split("~")[0]);var a={};for(t=o.length,e=0;e<t;e++)a[o[e]]||(r++,a[o[e]]=!0)}return{unique:r,total:o.length}}})},function(e,t){QSI.profile||(QSI.profile={namespace:"QSI_",set:function(e,t,n,r){if(void 0===e||void 0===t||void 0===n)throw new Error("To few arguments");try{var o=this.getStorage(r),i=this.namespace+e,a=o.getItem(i);(a=a?JSON.parse(a):{})[t]=n,a=JSON.stringify(a),o.setItem(i,a)}catch(e){QSI.dbg.e("error setting profile item"),QSI.dbg.e(e)}},get:function(e,t,n){var r=this.getStorage(n),o=this.namespace+e,i=r.getItem(o);return i?(i=JSON.parse(i),t?i[t]?i[t]:null:i):null},erase:function(e,t,n){var r=this.getStorage(n),o=this.namespace+e;if(t){var i=JSON.parse(r.getItem(o));delete i[t],i=JSON.stringify(i),r.setItem(o,i)}else r.removeItem(o)},getStorage:function(e){if(this.hasSessionStorage())return e?localStorage:sessionStorage;if(QSI.UserDataStorage){var t=QSI.UserDataStorage;return e?t.isPermanent(!0):t.isPermanent(!1),t}return QSI.CookieStorage},hasSessionStorage:function(){var e="qualtricssessionstoragetestkey",t=window.sessionStorage;try{return t.setItem(e,e),t.removeItem(e),!0}catch(e){return!1}}})},function(e,t){void 0===QSI.util&&(QSI.util={$:function(e){return"string"==typeof e&&(e=document.getElementById(e)),e},forOwn:function(e,t){if(e&&e instanceof Object&&this.isFunction(t))for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)},build:function(e,t,n){var r=document.createElement(e);if(t){var o=this;QSI.util.forOwn(t,function(e,n){switch(n){case"style":o.setStyle(r,t[n]);break;case"className":r.className=t[n];break;case"id":r.id=t[n];break;default:r.setAttribute(n,t[n])}})}if(n)if(QSI.util.isString(n))"style"===e&&r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(String(n)));else if(QSI.util.isArray(n))for(var i=0,a=n.length;i<a;i++){var s=n[i];"string"==typeof s||"number"==typeof s?r.appendChild(document.createTextNode(String(s))):s&&s.nodeType&&r.appendChild(s)}return r},setStyle:function(e,t){QSI.util.forOwn(t,function(n,r){try{e.style[r]=t[r]}catch(e){QSI.dbg.e(e)}})},isString:function(e){return"string"==typeof e},isArray:function(e){return"object"==typeof e&&e instanceof Array},getQueryParam:function(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null===n?"":n[1]},observe:function(e,t,n,r){this.obs=this.obs||[],e&&(this.obs.push({el:e,e:t,f:n,preventRemove:r||!1}),e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+this.capFirst(t)]&&(e["on"+this.capFirst(t)]=n))},stopObserving:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+this.capFirst(t)]&&(e["on"+this.capFirst(t)]=null)},removeObservers:function(){var e=this;this.each(this.obs||[],function(t){t.preventRemove||e.stopObserving(t.el,t.e,t.f)})},remove:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},isFunction:function(e){return"function"==typeof e||!1},capFirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},each:function(e,t){var n=e.length;if(n)for(var r=0;r<n;r++)t(e[r],r)}})},function(e,t){QSI.API&&!window.QTest||(QSI.API={load:function(){function e(e){try{if(QSI.reg||this.unloading)return void e.reject();void 0===window.QSI&&(window.QSI={}),void 0===QSI.reg&&(QSI.reg={}),void 0===QSI.ed&&(QSI.ed={}),void 0===QSI.reqID&&(QSI.reqID={}),void 0===QSI.Request&&(QSI.Request={}),void 0===QSI.styleElements&&(QSI.styleElements=[]),QSI.util.forOwn(QSI.reqID,function(t,n){var r={loadingFromAPI:!0};r.id=n,"Editing"===QSI.version&&(r.version="0"),void 0!==QSI.global.clientVersion&&null!==QSI.global.clientVersion&&(r.Q_CLIENTVERSION=QSI.global.clientVersion),void 0!==QSI.global.clientType&&null!==QSI.global.clientType&&(r.Q_CLIENTTYPE=QSI.global.clientType,void 0!==QSI.clientTypeVariant&&(r.Q_CLIENTTYPE+=QSI.clientTypeVariant)),0===n.search(/ZN/)?r.ZoneID=n:r.InterceptID=n,QSI.isDebug&&(r.Q_DEBUG=null),r.deferred=e,QSI.Orchestrator.load(r)})}catch(e){QSI.dbg.e(e)}}try{var t=QSI.Orchestrator.Deferred(),n=t.promise();return QSI.PendingQueue||(QSI.PendingQueue=[]),QSI.LoadingState&&QSI.LoadingState.length>0?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;t<e.length;t++)QSI.util.remove(e[t]);QSI.reg=void 0,QSI.Request=void 0,QSI.styleElements=void 0,this.unloading=!1}catch(e){QSI.dbg.e(e)}},run:function(){try{if(QSI.PendingQueue||(QSI.PendingQueue=[]),QSI.LoadingState&&QSI.LoadingState.length>0)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:Number(e.style.zIndex)>Number(t.style.zIndex)?1:0});for(var n=0;n<t.length;n++)t[n].style&&t[n].style.zIndex&&(t[n].style.zIndex=QSI.global.currentZIndex++);return t=QSI.util.stableSort(t,function(e,t){return Number(e.position.left)<Number(t.position.left)?-1:Number(e.position.left)>Number(t.position.left)?1:0}),t=QSI.util.stableSort(t,function(e,t){return Number(e.position.top)<Number(t.position.top)?-1: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;t<n;t++){var o=window._qsie[t];Object(r.c)(o)&&e.track(o)}},this.counts={},this.cookieName="QSI_CT",this.loaded=!1,this.clicked=!1}}(),i=n(0),a=function(){function e(t){var n=this;this.metricName=e.metricName,this.components=e.components,this.overallLatencyStartTime=null,this.overallLatency=null,this.componentStartTimes={},this.componentLatencies={},this.isDuplicateScriptExecution=!1,this.setRequestId=function(e){n.requestId=e},this.startTimer=function(){n.latencyStartTime=Date.now()},this.endTimer=function(){null!==n.latencyStartTime?n.overallLatency=Date.now()-n.latencyStartTime:n.debugLog.e("Tried to log overall end time without a start time.")},this.startComponentTimer=function(e){n.componentStartTimes[e]=Date.now()},this.endComponentTimer=function(e){var t=n.componentStartTimes[e];void 0!==t?n.componentLatencies[e]=Date.now()-t:n.debugLog.e("Tried to log a component end time without a component start time. Component name: "+e)},this.markComponentAlreadyFetched=function(t){n.componentLatencies[t]||(n.componentLatencies[t]=e.alreadyFetchedMarker)},this.markDuplicateScriptExecution=function(){n.isDuplicateScriptExecution=!0},this.send=function(){try{if(null===n.overallLatency)return void n.debugLog.e("Incomplete Latency Data Provided");var t=i.a.baseURL+"Ajax.php?action=LatencyLog&"+i.a.getClientVersionQueryString(),r=[];for(var o in i.a.Request)Object.prototype.hasOwnProperty.call(i.a.Request,o)&&o!==n.requestId&&r.push(o);var a={MetricName:e.metricName,Latency:n.overallLatency,ComponentLatencies:n.componentLatencies,AdditionalData:{RequestID:n.requestId,ClientURL:i.a.currentURL,UserAgent:navigator.userAgent,BrandID:i.a.global.brandID,BrandDC:i.a.global.brandDC,OtherRequestIDsExecuted:r,IsDuplicateScriptExecution:n.isDuplicateScriptExecution}};QSI.util.sendHttpRequest({type:"POST",url:t,header:{"Content-type":"application/x-www-form-urlencoded"},includeCookies:!1,data:QSI.util.buildQueryString({LoggingData:JSON.stringify(a)})})}catch(e){n.debugLog.e(e)}},this.sampledSend=function(e){try{Math.random()<=e/100==!0&&n.send()}catch(e){n.debugLog.e(e)}},this.debugLog=t}return e.metricName="si.SILatency",e.alreadyFetchedMarker="ALREADY_FETCHED",e.components={CORE_MODULE:"coreModuleRequest",TARGETING:"targetingRequest",DPR_TARGETING:"dprTargetingRequest",XMD_DEBUG_TARGETING:"xmdDebugTargetingRequest",ASSETS_AND_MODULES:"allAssetDefinitionsAndJSModules",CONTACT_FREQUENCY:"contactFrequencyCheck"},e}(),s={OTHER_INTERCEPT_PASSED:"OTHER_INTERCEPT_PASSED",MISSING:"MISSING",PENDING:"PENDING"},c=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},u=function(){function e(){var e=this;this.init=function(t,r){if(e.latencyLog=t,e.debugLog=r,e.setupJFEMessageEventHandlerForIOSOptimization(),window.QSI.windows={},window.addEventListener("message",e.addWindowHandlersPostMessageListener),e.latencyLog.startTimer(),i.a.global.legacyId){i.a.Request||(i.a.Request={}),i.a.debugConfig=i.a.debugConfig||{};var o=i.a.global.legacyId,a={id:o};e.latencyLog.setRequestId(o),~Object.keys(i.a.Request).indexOf(o)&&t.markDuplicateScriptExecution(),0===o.indexOf("ZN")?a.ZoneID=o:a.InterceptID=o;var s=void 0;if(i.a.global.isHostedJS())(void 0!==(s=e.parseQueryString(window.location.href)).Q_DEBUG||i.a.config.debug)&&(a.Q_DEBUG=null,e.debugLog.enableFullDebug()),(i.a.config.editing||"0"===i.a.global.version)&&(a.version="0");else{var c=void 0;if(document.currentScript)c=document.currentScript.src;else try{var u=document.querySelectorAll("script"),l=[];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(l[d]=u[d]);var g=i.a.global.baseURL;0===g.indexOf("https://")?g=g.substring(8):0===g.indexOf("http://")?g=g.substring(7):0===g.indexOf("//")&&(g=g.substring(2)),c=l.filter(function(e){return(-1!==e.src.indexOf(g+"/WRSiteInterceptEngine/?")||-1!==e.src.indexOf(g+"/SIE/?"))&&(-1===e.src.indexOf("Q_Impress")&&-1===e.src.indexOf("Q_Redirect")&&-1===e.src.indexOf("Q_Click")&&-1===e.src.indexOf("Q_DPR"))})[0].src}catch(t){e.debugLog.e("An error occurred while loading the intercept. "+t)}void 0!==(s=e.parseQueryString(c)).Q_NOCACHE&&(a.Q_NOCACHE=null),void 0!==s.Q_BOOKMARKLET&&(a.Q_BOOKMARKLET=null,a.Q_DEBUG=null,e.debugLog.enableFullDebug()),void 0!==s.Q_DEBUG&&(a.Q_DEBUG=null,e.debugLog.enableFullDebug()),void 0!==s.Q_VERSION&&(a.version=s.Q_VERSION)}return void 0!==i.a.global.clientVersion&&null!==i.a.global.clientVersion&&(a.Q_CLIENTVERSION=i.a.global.clientVersion),void 0!==i.a.global.clientType&&null!==i.a.global.clientType&&(a.Q_CLIENTTYPE=i.a.global.clientType,void 0!==i.a.clientTypeVariant&&(a.Q_CLIENTTYPE+=i.a.clientTypeVariant)),-1!==window.location.search.indexOf("Q_WAF_PREVIEWER")?Promise.all([n.e(11),n.e(9)]).then(n.bind(null,44)).then(function(e){new(0,e.LivePreviewer)}).catch(function(t){e.debugLog.e("An error occurred while loading the live previewer. "+t)}):(e.load(a),Promise.resolve(null))}if(!i.a.Request){i.a.Request={};for(var p=document.querySelectorAll("[data-siteinterceptscript]"),f=0;f<p.length;f++){var h=p[f];i.a.isDebug=i.a.isDebug||h.hasAttribute("data-qdebug")||-1!==window.location.href.indexOf("Q_DEBUG"),i.a.isDebug&&e.debugLog.enableFullDebug();var I={};return h.hasAttribute("data-interceptid")&&(I.InterceptID=h.getAttribute("data-interceptid"),I.id=I.InterceptID),h.hasAttribute("data-zoneid")&&(I.ZoneID=h.getAttribute("data-zoneid"),I.id=I.ZoneID),h.hasAttribute("data-qnocache")&&(I.Q_NOCACHE=null),h.hasAttribute("data-qbookmarklet")&&(I.Q_BOOKMARKLET=null),i.a.isDebug&&(I.Q_DEBUG=null),h.hasAttribute("data-version")&&(I.version=h.getAttribute("data-version")),e.load(I),Promise.resolve(null)}}},this.generateQueryString=i.a.generateQueryString,this.getClientVersionQueryString=i.a.getClientVersionQueryString,this.Deferred=function(){var t={},n="pending",r=[],o=[],i=[],a=[],s=e,c={state:function(){return n},then:function(e,t){return this.done(e).fail(t),this},done:function(e){if("pending"===n&&e)i.push(e);else if("resolved"===n)try{e.apply(this,r)}catch(e){s.debugLog.e(e)}return this},fail:function(e){if("pending"===n&&e)a.push(e);else if("rejected"===n)try{e.apply(this,o)}catch(e){s.debugLog.e(e)}return this},promise:function(){return c}};return e.forOwn(c,function(e,n){t[n]=c[n]}),t.resolve=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"pending"===n&&(n="resolved",r=e,s.each(i,function(t){try{t.apply(s,e)}catch(e){s.debugLog.e(e)}}))},t.reject=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"pending"===n&&(n="rejected",o=e,s.each(a,function(t){try{t.apply(s,e)}catch(e){s.debugLog.e(e)}}))},t}}return e.prototype.addWindowHandlersPostMessageListener=function(e){if("string"==typeof e.data&&-1!=e.data.indexOf("QSI_popunderwatcher_addWindowHandler")){var t=e.data.split("|"),n=t[1],r=t[2],o=e.source;try{JSON.parse(window.sessionStorage.getItem("QSI_OptInIDsAndWindowNames"))[n]!==r||window.QSI.windows[r]||(window.QSI.windows[r]=o)}catch(e){this.debugLog.e(e)}}},e.prototype.load=function(e){var t=this,n=window.QSI.AssetManager;i.a.LoadingState.push(!0);var r=this.generateTargetingURL(e);this.xmdRetryCooldown=2e3,this.xmdRetryCount=0,this.xmdRetryLimit=3,this.latencyLog.startComponentTimer(a.components.TARGETING);var o=this.getTargetingPostData(),s=n.promiseFetch("POST",r,o);i.a.Request[e.id]={Intercepts:{},Params:e},s.then(function(){t.latencyLog.endComponentTimer(a.components.TARGETING)}).then(this.handleTargetingResponse.bind(this,e),function(n){t.debugLog.e(n.Message),e.deferred&&e.deferred.reject()})},e.prototype.getTargetingPostData=function(){var e;return e=i.a.shouldStripQueryParamsInQLoc?"Q_LOC="+encodeURIComponent(window.location.href.split("?")[0]):"Q_LOC="+encodeURIComponent(window.location.href),void 0!==i.a.config.externalReference&&(e+="&extRef="+i.a.config.externalReference),e},e.prototype.generateTargetingURL=function(e){var t=i.a.baseURL+"Targeting.php?",n=[];e.InterceptID&&n.push("Q_InterceptID="+e.InterceptID),e.ZoneID&&n.push("Q_ZoneID="+e.ZoneID),e.Q_XMD_DEBUG?n.push("Q_XMD_DEBUG"):(null===e.Q_DEBUG&&(n.push("Q_DEBUG"),i.a.isDebug=!0),null===e.Q_BOOKMARKLET&&n.push("Q_BOOKMARKLET")),null===e.Q_NOCACHE&&n.push("Q_NOCACHE"),void 0!==e.version&&null!==e.version&&n.push("Version="+e.version);var r=i.a.profile.get("QualtricsSurveyHistory","",1);if(r){var o=encodeURIComponent(Object.keys(r).toString());n.push("Q_QualtricsSurveyTaken="+o)}return void 0!==e.Q_CLIENTVERSION&&null!==e.Q_CLIENTVERSION&&n.push("Q_CLIENTVERSION="+e.Q_CLIENTVERSION),void 0!==e.Q_CLIENTTYPE&&null!==e.Q_CLIENTTYPE&&n.push("Q_CLIENTTYPE="+e.Q_CLIENTTYPE),t+n.join("&")},e.prototype.isMessageEventOriginAllowed=function(e){if(i.a.reg)for(var t in i.a.reg)if(Object.prototype.hasOwnProperty.call(i.a.reg,t)&&i.a.reg[t]&&i.a.reg[t].options){var n=i.a.reg[t].options;if(n.targetURLOrigin===e)return!0;if(n.target&&n.target.OriginalURLOrigin===e)return!0}return!1},e.prototype.doCSTargetingEvaluation=function(e,t,n){var r,o=this;if(function(e){e.EMBEDDED_TARGET="EmbeddedTarget"}(r||(r={})),Array.isArray(e.ClientSideIntercepts)){var a=window.QSI.ClientSideTargeting;e.Intercepts=[];var s={Intercepts:{},Type:i.a.config.editing?"Editing":"Published"};e.ClientSideIntercepts.forEach(function(c){if(c)if(c.Error)o.debugLog.log(c.Message);else{var u=a.evaluateIntercept(c,i.a.isDebug),l=u.interceptEntry,d=u.interceptDebugInfo;s.Intercepts[c.InterceptID]=d,l&&(t.Intercepts[c.InterceptID]={},t.Intercepts[c.InterceptID].Targeting=l,e.Intercepts.push(l),l.Decision.Creative&&(l.Decision.Creative.Type&&(e.Modules[l.Decision.Creative.Type]=n),l.Decision.PopUnderTarget&&(e.Modules.PopUnder=n)),l.Decision.Target&&l.Decision.Target.DisplayType===r.EMBEDDED_TARGET&&(e.Modules.EmbeddedTarget=n))}}),e.Intercepts.length>0&&(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;t<e.Intercepts.length;t++){var n=e.Intercepts[t];if(n.Decision&&n.Decision.ContactFrequencyInfo){var r=n.Decision.ContactFrequencyInfo.FailureMode,o=!!s[r]&&r!==s.OTHER_INTERCEPT_PASSED;if(o)return o}}return!1},e.prototype.handleXMDDebugResponse=function(e,t,n,r){var o,a,s=this;try{o=JSON.parse(r)}catch(e){return void this.debugLog.e("Failed to parse JSON of Q_XMD_DEBUG targeting response: "+r)}if(i.a.isDebug)try{a=JSON.parse(t.DebugInfo)}catch(e){return void this.debugLog.e("Failed to parse debugInfo JSON of Q_DEBUG targeting response: "+t)}this.hasXMDCacheFailure(o)&&this.xmdRetryCount<this.xmdRetryLimit?setTimeout(function(){s.xmdRetryCooldown=2*s.xmdRetryCooldown,s.xmdRetryCount++,a&&(o.DebugInfo=t.DebugInfo);var n={};t.Intercepts.forEach(function(e){n[e.InterceptID]=e}),o.Intercepts.forEach(function(e){e.Decision&&(e.Decision.ActionSetID=n[e.InterceptID].Decision.ActionSetID)}),s.handleXMDDebug(e,o)},this.xmdRetryCooldown):(i.a.isDebug&&(o.Intercepts.forEach(function(e){if(e){var t=e.InterceptID;Object.prototype.hasOwnProperty.call(a.Intercepts,t)&&Object.prototype.hasOwnProperty.call(n,t)&&(e.Error?(s.debugLog.log(e.Message),a.Intercepts[t].contactFrequencyPassed=!1):a.Intercepts[t].contactFrequencyPassed=!!e.Decision.ActionSetID)}}),o.DebugInfo=JSON.stringify(a),o.Modules.Debug=i.a.global.clientVersion),o.Intercepts.forEach(function(n){if(n)if(n.Error)s.debugLog.log(n.Message);else{var r=t.Intercepts.find(function(e){return n.InterceptID===e.InterceptID});r&&(n.ContactID=r.ContactID||n.ContactID,n.DirectoryID=r.DirectoryID||n.DirectoryID,n.SurveyID=r.SurveyID||n.SurveyID,n.DistributionID=r.DistributionID||n.DistributionID),i.a.Request[e.id].Intercepts[n.InterceptID]={},i.a.Request[e.id].Intercepts[n.InterceptID].Targeting=n}}),this.loadModules(e,o))},e.prototype.loadModules=function(e,t){var r=this,o=window.QSI,s=o.AssetManager,c=o.ContactFrequency,u=[],l=t.Modules;for(var d in this.latencyLog.startComponentTimer(a.components.ASSETS_AND_MODULES),n.e(1).then(n.bind(null,43)),l)if(Object.prototype.hasOwnProperty.call(l,d)){if("ScreenCapture"===d){this.setupScreenCaptureListener(l[d]);continue}if("ClientLog"===d)continue;if("DependencyResolver"===d)continue;if(("HTTPRedirect"===d||"LatencyLog"===d)&&i.a.global.isHostedJS()){this.debugLog.c("Module type '"+d+"' is not supported when using Site Intercept Hosted JS");continue}if("EmbeddedFeedback"===d)continue;var g=s.promiseLoadScript(d,l[d],i.a,this.latencyLog);u.push(g)}for(var p=0;p<t.Intercepts.length;p++){var f=t.Intercepts[p];if(f&&!f.Error&&null!==f.Decision.ActionSetID){var h=s.promiseLoadIntercept(e.id,f,e,this.latencyLog),I=s.promiseLoadCreative(e.id,f,e,this.latencyLog);if(u.push(h,I),f.Decision.PopUnderTarget&&f.Decision.PopUnderTarget.ID&&"Target"!==f.Decision.PopUnderTarget.ID){var S=s.promiseLoadPopUnderTarget(e.id,f,e);u.push(S)}}}this.when.apply(this,u).then(function(){try{if(r.latencyLog.endComponentTimer(a.components.ASSETS_AND_MODULES),i.a.global.featureFlags["DX.ContactFrequencyV3"]||!i.a.global.featureFlags["DX.ContactFrequencyV2"]&&!i.a.global.featureFlags["DX.ContactFrequency"])r.prepareIntercepts(e,t);else c.checkContactFrequencyRules(i.a.Request[e.id].Intercepts,i.a.global.brandID).then(function(){r.prepareIntercepts(e,t)})}catch(e){r.debugLog.e(e)}},function(t){var n="";"string"==typeof t?n=t:t&&"string"==typeof t.Message&&(n=t),r.debugLog.e("An error occurred while loading the intercept. "+n),e.deferred&&e.deferred.reject()})},e.prototype.setInterceptDisplayOptionCallback=function(e,t){var n=window.QSI.util;switch(e){case"":case"onfocus":n.waitForFocus().then(t);break;case"onload":t();break;case"onexit":n.waitForExitIntent().then(t);break;default:return}},e.prototype.prepareIntercepts=function(e,t){var r=this;return n.e(1).then(n.bind(null,43)).then(function(){var n=window.QSI.RunIntercepts;!0!==e.loadingFromAPI&&(r.latencyLog.endTimer(),r.xmdRetryCount>0?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;r<n.length;r++){var o=n[r].split("=",2);"Q_LOC"===o[0]&&-1!==o[1].indexOf("Q_DEBUG")&&(t.Q_DEBUG=!0),o[0]&&(t[o[0]]=decodeURIComponent(o[1]))}return t},e.prototype.replaceAll=function(e,t,n){return t=t.replace(/([.*+?^${}()|[\]\\=!:/])/g,"\\$1"),e.replace(new RegExp(t,"g"),n)},e.prototype.when=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this,o=c([e],t),i=o.length,a=i,s=1===a?e:this.Deferred(),u=function(e,t){return function(n){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];t[e]=arguments.length>1?n:r.createArrayFromArguments(c([n],o)),--a||s.resolve(t)}};if(i>1)for(var l=0;l<i;l++)o[l]&&o[l].promise?o[l].promise().done(u(l,o)).fail(s.reject):a--;return a<1&&s.resolve(o),s.promise()},e.prototype.createArrayFromArguments=function(e){return e?Array.prototype.slice.call(e):[]},e.prototype.isFunction=function(e){return"function"==typeof e||!1},e.prototype.forOwn=function(e,t){if(e&&e instanceof Object&&this.isFunction(t))for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)},e.prototype.each=function(e,t){var n=e.length;if(n)for(var r=0;r<n;r++)t(e[r],r)},e.prototype.doneLoading=function(e){if(i.a.LoadingState.pop(),0===i.a.LoadingState.length){if(!0!==e.loadingFromAPI){var t=document.createEvent("Event");t.initEvent("qsi_js_loaded",!0,!0),window.dispatchEvent(t)}for(var n=i.a.PendingQueue.length,r=0;r<n;r++){i.a.PendingQueue.shift()()}}},e.prototype.setupJFEMessageEventHandlerForIOSOptimization=function(){var e=this;if(!i.a.JFEListenerRegistered){i.a.JFEListenerRegistered=!0;return window.addEventListener("message",function(t){try{if(!e.isMessageEventOriginAllowed(t.origin))return;(function(e){var t=null;if("string"==typeof e)try{t=JSON.parse(e)}catch(e){return!1}return null!==t&&"JFE"===t.from&&"SI"===t.to&&"JFELoaded"===t.event&&"iOS"===i.a.OS.name})(t.data)&&(n=t.source,r=t.origin,n.postMessage({event:"addIOSSIWorkaround",from:"SI",to:"JFE"},r))}catch(t){e.debugLog.e(t)}var n,r})}},e.prototype.setupScreenCaptureListener=function(e){var t=this;if(!i.a.screenCaptureListenerRegistered)return i.a.screenCaptureListenerRegistered=!0,window.addEventListener("message",function(n){try{if(!t.isMessageEventOriginAllowed(n.origin))return;var r=window.QSI,o=r.AssetManager,a=r.util.getOriginInterceptOfMessage(n.source);if(!a)return;var s=n.data;if("string"==typeof s)try{s=JSON.parse(s)}catch(e){return}if(!s||"JFE"!==s.from||"SI"!==s.to)return;if(i.a.screenCaptureHandlers||(i.a.screenCaptureHandlers={}),"canScreenCapture"===s.event){void 0===i.a.screenCaptureModulePromise&&(i.a.screenCaptureModulePromise=o.promiseLoadScript("ScreenCapture",e,i.a,t.latencyLog));return void n.source.postMessage(JSON.stringify({event:"canScreenCapture",from:"SI",to:"JFE",canScreenCapture:!0}),n.origin)}void 0!==i.a.screenCaptureModulePromise&&i.a.screenCaptureModulePromise.then(function(){var e=window.QSI.ScreenCaptureHandler;switch(i.a.screenCaptureHandlers[s.sessionId]||(i.a.screenCaptureHandlers[s.sessionId]=new e(a,n.source,s.sessionId,s.translations,n.origin)),s.event){case"startScreenCapture":i.a.screenCaptureHandlers[s.sessionId].captureScreen(s.questionId);break;case"editScreenCapture":i.a.screenCaptureHandlers[s.sessionId].editAnnotations(s.questionId);break;case"removeScreenCapture":i.a.screenCaptureHandlers[s.sessionId].removeScreenCapture(s.questionId);break;case"sessionFinished":i.a.screenCaptureHandlers[s.sessionId].removeAllScreenCaptures();break;default:return}})}catch(e){t.debugLog.e(e)}})},e}(),l=function(){return function(){var e=this;this.isFullDbgInitialized=-1!==window.location.href.indexOf("Q_DEBUG"),this.safeConsole=function(t,n){if(e.isFullDbgInitialized)try{console[t](n)}catch(e){}},this.enableFullDebug=function(){e.isFullDbgInitialized=!0},this.disableFullDebug=function(){e.isFullDbgInitialized=!1},this.log=function(e,t,n){var r=window.QSI,o=r.ClientLog,i=r.global;o&&(i.featureFlags.isClientLoggingEnabled?o.send(e,t,n):o.sampledSend(e,t,n,.02))},this.c=function(t){e.safeConsole("log",t),e.log(t)},this.d=function(t){e.safeConsole("dir",t),e.log(t)},this.t=function(t){e.safeConsole("trace",t),e.log(t)},this.e=function(t){e.safeConsole("log",t&&t.message||"error"),e.safeConsole("error",t),e.log(t)}}}(),d=function(){function e(){}return e.prototype.send=function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="error");try{var r=window.QSI,o=r.baseURL+"Ajax.php?action=ClientLog&"+(0,r.getClientVersionQueryString)(),i=window.QSI.reqID,a="";for(var s in i)i[s]&&(a+=s+" ");t&&e.stack&&(e=e.stack);var c=navigator.userAgent,u={LevelName:n,Message:"requestId: "+a+"\n currentURL: "+window.QSI.currentURL+"\n userAgent: "+c+"\n message: "+e};QSI.util.sendHttpRequest({type:"POST",url:o,header:{"Content-type":"application/x-www-form-urlencoded"},includeCookies:!1,data:QSI.util.buildQueryString(u)})}catch(e){window.QSI.isDebug&&console.log(e)}},e.prototype.sampledSend=function(e,t,n,r){Math.random()<=r/100&&this.send(e,t,n)},e}(),g=function(){function e(){var e=this;this.cookieSize=0,document.cookie.split(";").forEach(function(t){var n=t.indexOf("QSI");~n&&(e.cookieSize+=t.length-n)})}return e.prototype.set=function(e,t,n,r,o){void 0===o&&(o={});var a=i.a.global.maxCookieSize,s=this.get(e),c=this.getCookieSize();s&&(c-=(e+"="+s).length);var u="";if(n){var l=new Date;l.setTime(l.getTime()+864e5*n),u="; expires="+l.toUTCString()}var d="";r?d="domain="+r:i.a.CookieDomain&&(d="domain="+i.a.CookieDomain);var g=e+"="+t,p=c+g.length;if(!(o.force||null!==a&&p<=a||null===a))throw new Error("Cannot exceed the specified maximum cookie size");o.erase?this.cookieSize=c:this.cookieSize=p;var f=""+g+u+"; path=/; "+d;"https:"===location.protocol&&(f+="; secure"),document.cookie=f},e.prototype.get=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){var o=n[r],i=o.indexOf(t);if(~i)return o.substring(i+t.length,o.length)}return null},e.prototype.erase=function(e,t){this.set(e,"",-1,t,{force:!0,erase:!0})},e.prototype.getCookieSize=function(){return this.cookieSize},e.prototype.areCookiesEnabled=function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}},e}(),p=function(){function e(){this.storageCache={},this.cookieName="QSI_DATA",this.refreshFromCookie()}return e.prototype.refreshFromCookie=function(){try{var e=window.QSI.cookie.get(this.cookieName);e&&(this.storageCache=JSON.parse(e))}catch(e){this.storageCache={}}},e.prototype.setToCookie=function(){try{window.QSI.cookie.set(this.cookieName,JSON.stringify(this.storageCache))}catch(e){}},e.prototype.setItem=function(e,t){this.storageCache[e]=t,this.setToCookie()},e.prototype.getItem=function(e){return this.storageCache[e]||null},e.prototype.removeItem=function(e){delete this.storageCache[e],this.setToCookie()},e.prototype.reload=function(){this.refreshFromCookie()},e.prototype.clear=function(){this.storageCache={},this.setToCookie()},e}(),f=new l,h=new a(f);(window.QSI.ClientLog=new d,window.QSI.dbg=f,window.QSI.LatencyLog=h,window.QSI.EventTracker=new o,window.QSI.cookie=new g,window.QSI.CookieStorage=new p,window.QSI.Orchestrator=new u,"function"!=typeof window.Promise)?window.QSI.AssetManager.promiseLoadScript("Polyfills",i.a.global.clientVersion,i.a,h).then(function(){window.QSI.Orchestrator.init(h,f)}):window.QSI.Orchestrator.init(h,f)}]);}catch(e){if(typeof QSI!=='undefined'&&QSI.dbg&&QSI.dbg.e){QSI.dbg.e(e);}}