(function( blueConic, undefined ) {var ps='https://plugins.blueconic.net/';var pf='/gallery/';(function(){var a=false,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.BCClass=function(){};BCClass.extend=function(g){var f=this.prototype;a=true;var e=new this();a=false;for(var d in g){e[d]=typeof g[d]=="function"&&typeof f[d]=="function"&&b.test(g[d])?(function(h,i){return function(){var k=this._super;this._super=f[h];var j=i.apply(this,arguments);this._super=k;return j}})(d,g[d]):g[d]}function c(){if(!a&&this.init){this.init.apply(this,arguments)}}c.prototype=e;c.constructor=c;c.extend=arguments.callee;return c}})();var InteractionType=BCClass.extend({init:function(a){},getPreloadProperties:function(){return[]},getContent:function(){},onEvent:function(){},importLibraries:function(c){var e=[];var a=[];if(!c||c.length===0){return}for(var b=0;b<c.length;b++){var d=c[b];if(d&&d.sharing==="none"){e.push(d.url)}else{a.push(d.url)}}blueConic.fn.importLibraries.call(this,e);blueConic.fn.importAndCacheLibraries.call(this,a)}});(function(){ var InteractionTypeImpl=InteractionType.extend({DEFAULT_MAX_AGE:7776000000,MAX_ITEMS:100,SKIP_LIMITED:"limited",RESET_ROLLING:"rolling",RESET_CALENDAR:"calendar",init:function(a,b){this.blueConicClient=a,this.context=b,this.interactionId="cm"+this.context.getInteractionId(),this.historyProperty="_cm_"+this.interactionId,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.preLoadProperties=[this.historyProperty],this.excludeRules=[];try{this.excludeRules=this.blueConicClient.json.parse(this.parameters.excludeRules[0])}catch(a){}if(0<this.excludeRules.length){var c=this.excludeRules.filter(function(a){return"expression"===a.area.selectedoption&&-1!==a.area.expression.indexOf("getValue")});this.preLoadProperties=this.preLoadProperties.concat(c.map(function(a){return this._getPropertyIdsFromExpression(a.area.expression)},this))}this.includeRules=[];try{this.includeRules=this.blueConicClient.json.parse(this.parameters.includeRules[0])}catch(a){}if(0<this.includeRules.length){var d=this.includeRules.filter(function(a){return"expression"===a.area.selectedoption&&-1!==a.area.expression.indexOf("getValue")});this.preLoadProperties=this.preLoadProperties.concat(d.map(function(a){return this._getPropertyIdsFromExpression(a.area.expression)},this))}this.freeRules=[];try{this.freeRules=this.blueConicClient.json.parse(this.parameters.freeRules[0])}catch(a){}0<this.freeRules.length&&(this.freeRules=this.freeRules.filter(function(a){return!!a.property}),this.preLoadProperties=this.preLoadProperties.concat(this.freeRules.map(function(a){return a.property.id}))),this.expireAt=parseInt(this.parameters.expireAt[0]),isNaN(this.expireAt)&&(this.expireAt=10),this.resetAfter=this.parameters.resetAfter[0],this.uniqueOnly="true"===this.parameters.uniqueOnly[0],this.onceOnly=!!(this.parameters.onceOnly&&"true"===this.parameters.onceOnly[0]),this.now=this.blueConicClient.getCurrentDate(),this.maxAge=this._getMaxAge(),this.delayMetering=!!(this.parameters.delayMetering&&"true"===this.parameters.delayMetering[0]),this.eventSubscribed=!1,this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){this.onLoad()})},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(this.delayMetering&&!this.eventSubscribed)return this.eventSubscribed=!0,void this.blueConicClient.event.subscribe("cm_start_metering",this,function(){this.onLoad()});var a=this._visitorQualifies();if(a){var b={};try{var c=this.profile.getValue(this.historyProperty);c&&(b=this.blueConicClient.json.parse(this.profile.getValue(this.historyProperty)))}catch(a){}this.history=new this.History(b,this.maxAge,this.now);var d=this._getCurrentView();if(d){var e=!d.isSkippedView||d.isSkippedView&&!!d.skippedFor;e?(this._addViewToHistory(d),!d.isSkippedView&&this._writeExtraProfileProperties(d),this.blueConicClient.profile.updateProfile(this,function(){this._throwEvents(d)})):this._throwEvents(d)}}},_throwEvents:function(a){var b=this._getCurrentViews(a);(a.isHistoricallyAllowedView||a.isHistoricallyAllowedFreeView)&&this.blueConicClient.createEvent("cm_already_viewed"),a.isFreeView?(this.blueConicClient.createEvent("cm_free_view"),(this.onceOnly&&!a.isHistoricallyAllowedFreeView||!this.onceOnly)&&(this.freeViewTracker.consumedFreeCount===this.freeViewTracker.totalFree?this.blueConicClient.createEvent("cm_last_free_view"):this.blueConicClient.createEvent("cm_free_view_"+this.freeViewTracker.consumedFreeCount))):((this.onceOnly&&!a.isHistoricallyAllowedView&&!a.isSkippedView||!this.onceOnly)&&(1===b?this.blueConicClient.createEvent("cm_firstview"):b===this.expireAt-1?this.blueConicClient.createEvent("cm_lastview"):b<this.expireAt&&this.blueConicClient.createEvent("cm_view_"+b)),b>=this.expireAt&&this.blueConicClient.createEvent("cm_exceeded"),a.isSkippedView&&this.blueConicClient.createEvent("cm_excluded"));var c=this.parameters.bottomFrom&&this.parameters.bottomFrom[0]?parseInt(this.parameters.bottomFrom[0]):null,d=this.parameters.bottomTo&&this.parameters.bottomTo[0]?parseInt(this.parameters.bottomTo[0]):null,e=this.parameters.middleFrom&&this.parameters.middleFrom[0]?parseInt(this.parameters.middleFrom[0]):null,f=this.parameters.middleTo&&this.parameters.middleTo[0]?parseInt(this.parameters.middleTo[0]):null,g=this.parameters.topFrom&&this.parameters.topFrom[0]?parseInt(this.parameters.topFrom[0]):null,h=this.parameters.topTo&&this.parameters.topTo[0]?parseInt(this.parameters.topTo[0]):null;c&&d&&b>=c&&b<=d&&this.blueConicClient.createEvent("cm_bottom"),e&&f&&b>=e&&b<=f&&this.blueConicClient.createEvent("cm_middle"),g&&h&&b>=g&&b<=h&&this.blueConicClient.createEvent("cm_top")},_addViewToHistory:function(a){this._getCurrentViews(a)>=this.expireAt&&!a.isFreeView||(a.isFreeView?this.history.free.push({u:a.url,ff:a.freeFor,ts:a.timestamp}):a.isSkippedView?this.history.skipped.push({u:a.url,sf:a.skippedFor,ts:a.timestamp}):(this.history.included.push({u:a.url,v:a.includeValue,ts:a.timestamp}),a.isAddedToHistory=!0),this.history.included.length>this.MAX_ITEMS&&(this.history.included.sort(function(c,a){var b=c.ts,d=a.ts;return b<d?-1:b>d?1:0}),this.history.included.shift()),this.profile.setValue(this.historyProperty,this.blueConicClient.json.stringify(this.history)))},_writeExtraProfileProperties:function(a){var b=this._getCurrentViews(a),c=this.parameters.expireAtProperty&&this.parameters.expireAtProperty[0]?this.parameters.expireAtProperty[0]:null,d=this.parameters.numViewsProperty&&this.parameters.numViewsProperty[0]?this.parameters.numViewsProperty[0]:null,e=this.parameters.numViewsLeftProperty&&this.parameters.numViewsLeftProperty[0]?this.parameters.numViewsLeftProperty[0]:null,f=this.parameters.numFreeViewsProperty&&this.parameters.numFreeViewsProperty[0]?this.parameters.numFreeViewsProperty[0]:null,g=this.parameters.numFreeViewsLeftProperty&&this.parameters.numFreeViewsLeftProperty[0]?this.parameters.numFreeViewsLeftProperty[0]:null;if(c&&"null"!==c&&this.profile.setValue(c,this.expireAt),d&&"null"!==d&&this.profile.setValue(d,b<=this.expireAt?b:this.expireAt),e&&"null"!==e&&this.profile.setValue(e,b<this.expireAt?this.expireAt-b:0),a.isFreeView&&(f&&"null"!==f&&this.profile.setValue(f,this.freeViewTracker.consumedFreeCount),g&&"null"!==g)){var h=this.freeViewTracker.totalFree-this.freeViewTracker.consumedFreeCount;this.profile.setValue(g,0<h?h:0)}},_getCurrentView:function(){var a=(this.jQuery("meta[property=\"og:url\"]").attr("content")||document.location.href).toLowerCase(),b=document.referrer.toLowerCase(),c=new this.PageView(a,b,this.now);return c.isHistoricallyAllowedView=this._isHistoricallyAllowed(a),c.includeValue=this._getIncludeValue(c),0<c.includeValue?(c.isSkippedView=this._isPageViewSkipped(c),this._getCurrentViews(c)>=this.expireAt&&this._setPageViewFree(c),c):null},_getIncludeValue:function(a){for(var b,c=0;c<this.includeRules.length;c++)if(b=this.includeRules[c],this._isRuleApplicable(b,a))return b.views;return 0},_isPageViewSkipped:function(a){var b=new this.SkippedViewTracker(this),c=this;return this.excludeRules.filter(function(b){return c._isRuleApplicable(b,a)}).some(function(d){if(d.skip.selectedoption!==c.SKIP_LIMITED)return!0;return!(b.skipped[d.id]=b.skipped[d.id]?b.skipped[d.id]+1:1,!(b.skipped[d.id]<=d.skip.views))&&(a.skippedFor=d.id,!0)})},_setPageViewFree:function(a){var b=this;this.freeViewTracker=new this.FreeViewTracker(this),a.isHistoricallyAllowedFreeView=this._isHistoricallyAllowedFree(a.url),this.freeRules.filter(function(c){return b._isRuleApplicable(c,a)}).forEach(function(c){b.freeViewTracker.totalFree+=c.views,a.isFreeView||(a.isHistoricallyAllowedFreeView?(a.freeFor=c.id,a.isFreeView=!0):(b.freeViewTracker.free[c.id]=b.freeViewTracker.free[c.id]?b.freeViewTracker.free[c.id]+1:1,b.freeViewTracker.free[c.id]<=c.views&&(a.freeFor=c.id,a.isFreeView=!0,b.freeViewTracker.consumedFreeCount++)))})},_isRuleApplicable:function(a,b){var c=a.area.selectedoption;if("url"===c||"referrer"===c){var d="url"===c?b.url:b.referrer;if(a.anyWord||this._URLMatchesWords(d,a.containsmatches,a.words))return!0}else if("selector"===c){var e=this._getContent(a.area.selector,!0);if(e&&a.anyWord)return!0;if(a.area.selector&&a.words&&this._contentMatchesWords(e,a.containsmatches,a.words))return!0}else if("variable"===c){var f=this._getVariableValue(a.area.variable);if(f&&a.anyWord)return!0;if(f&&this._contentMatchesWords(f,a.containsmatches,a.words))return!0}else if("expression"===c){var g=this._getContent(a.area.expression,!1);if(g&&a.anyWord)return!0;if(g&&this._contentMatchesWords(g,a.containsmatches,a.words))return!0}else if("property"===c){var h=this.profile.getValues(a.property.id);if(0<h.length&&a.anyWord)return!0;var i=this;return h.some(function(b){return!!(a.words&&i._contentMatchesWords(b,a.containsmatches,a.words))||!!(a.dateTime&&!isNaN(parseInt(b))&&i.now.getTime()-parseInt(b)<=i.maxAge)})}return!1},_isHistoricallyAllowed:function(a){if(!this.uniqueOnly)return!1;var b=this.history.included.filter(function(b){return b.u===a});return 0<b.length},_isHistoricallyAllowedFree:function(a){if(!this.uniqueOnly)return!1;var b=this.history.free.filter(function(b){return b.u===a});return 0<b.length},_getCurrentViews:function(a){for(var b,c=0,d=[],e=0;e<this.history.included.length;e++)(b=this.history.included[e],!(this.uniqueOnly&&-1!==this.blueConicClient.util.array.indexOfArray(d,b.u)))&&(d.push(b.u),c+=b.v);var f=this._isHistoricallyAllowed(a.url)||a.isAddedToHistory;return f||a.isSkippedView||c!==this.expireAt-1||(c+=a.includeValue),c},_visitorQualifies:function(){var a=[];try{a=this.blueConicClient.json.parse(this.parameters.segments)}catch(a){}if(0===a.length)return!0;var b=this.blueConicClient.getSegments();if(0===b.length)return!1;for(var c,d=0;d<b.length;d++){c=b[d];for(var e,f=0;f<a.length;f++)if(e=a[f],c.id===e.id)return!0}return!1},_getMaxAge:function(){if(this.resetAfter===this.RESET_ROLLING){var a=this.parameters.resetRolling&&!isNaN(parseInt(this.parameters.resetRolling[0]))?parseInt(1e3*(60*(60*(24*this.parameters.resetRolling[0])))):this.DEFAULT_MAX_AGE;return a}return this.resetAfter===this.RESET_CALENDAR?this.now.getTime()-new Date(this.now.getFullYear(),this.now.getMonth(),1).getTime():this.DEFAULT_MAX_AGE},_contentMatchesWords:function(a,b,c){if(!a||"string"!=typeof a)return!1;a=a.toLowerCase();for(var d=0;d<c.length;d++){if("contains"===b&&-1!==a.indexOf(c[d].toLowerCase()))return!0;if("not_contains"===b){if(-1===a.indexOf(c[d].toLowerCase()))return!0;}else if(a===c[d].toLowerCase())return!0}return!1},_URLMatchesWords:function(a,b,c){for(var d=0;d<c.length;d++)if("contains"===b||"not_contains"===b){var e=this._escapeRegularExpressionCharacters(c[d]);try{var f=new RegExp(e,"i"),g=f.test(a);if(g&&"contains"===b||!g&&"not_contains"===b)return!0}catch(a){}}else if(a===c[d])return!0;return!1},_getContent:function(expression,isCssSelector){var content=null;isCssSelector||-1===expression.indexOf("return ")||(expression="(function(jQuery) {"+expression+"}(jQuery))");try{content=isCssSelector&&-1===expression.indexOf("jQuery(")?this.jQuery(expression):function(selector,jQuery,profile){return eval("var jQuery = arguments[1]"),eval("var blueConicProfile = arguments[2]"),eval(selector)}(expression,this.jQuery,this.profile)}catch(a){}if(content&&content instanceof this.jQuery){if(0<content.length){var contentArr=[];return this.jQuery.each(content,this.jQuery.proxy(function(a,b){var c=this.jQuery(b);c.attr("content")?contentArr.push(this._normalizeText(c.attr("content"))):contentArr.push(this._normalizeText(c.text()))},this)),contentArr.join().toLowerCase()}}else if(null!==content&&"undefined"!=typeof content)return"object"==typeof content||"function"==typeof value?JSON.stringify(content).toLowerCase():content.toLowerCase()},_getVariableValue:function(a){for(var b=a.replace("[",".").replace("]","").replace("\"\"",""),c=b.split("."),d=window[c.shift()];0<c.length;){if(!d)return null;d=d[c.shift()]}return d instanceof Array?d.join().toLowerCase():"object"==typeof d||"function"==typeof d?null:(""+d).toLowerCase()},_escapeRegularExpressionCharacters:function(a){return a=a.replace(/[\\?.{}+]/g,function(a){return"\\"+a}),a=a.replace(/\*/g,".*"),a},_normalizeText:function(a){return a?this.jQuery.trim(a).replace(/\r\n+|\r+|\n+/gi,"").replace(/\s+/gi," "):a},_getPropertyIdsFromExpression:function(a){for(var b,c=RegExp(/getValues?\(["']([^"']+)["']\)/,"g"),d=[];null!==(b=c.exec(a));)d.push(b[1]);return d},PageView:function(a,b,c){this.url=a,this.timestamp=c.getTime(),this.referrer=b,this.includeValue=0,this.isSkippedView=!1,this.skippedFor=null,this.isFreeView=!1,this.isHistoricallyAllowedView=!1,this.isAddedToHistory=!1},SkippedViewTracker:function(a){this.skipped={};for(var b,c=[],d=0;d<a.history.skipped.length;d++)b=a.history.skipped[d],a.uniqueOnly&&-1!==a.blueConicClient.util.array.indexOfArray(c,b.u)||(this.skipped[b.sf]=this.skipped[b.sf]?this.skipped[b.sf]+1:1),c.push(b.u)},FreeViewTracker:function(a){this.free={},this.consumedFreeCount=0,this.totalFree=0;for(var b,c=[],d=0;d<a.history.free.length;d++)b=a.history.free[d],a.uniqueOnly&&-1!==a.blueConicClient.util.array.indexOfArray(c,b.u)||(this.free[b.ff]=this.free[b.ff]?this.free[b.ff]+1:1,this.consumedFreeCount++),c.push(b.u)},History:function(a,b,c){function d(a){for(var d=a.length;d--;){var e=a[d];c.getTime()-e.ts>b&&a.splice(d,1)}return a}this.included=a.included?d(a.included):[],this.skipped=a.skipped?d(a.skipped):[],this.free=a.free?d(a.free):[]}});var a = [];var i='contentmeter';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/contentmeter/ts_0e69746438ac0d7e955432554da32dc3/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b?b:null,this.profile=this.context.getProfile(),this.targetingParameters=[]},getPreloadProperties:function(){return this._getProfilePropertiesFromParameters()},onLoad:function(){if(this.targetingParameters&&0<this.targetingParameters.length){this._updateLocalStorage(),this.blueConicClient.event.subscribe(this.blueConicClient.event.onSegmentChange,this,this._updateLocalStorage);var a=0,b=function(){if(!window.bcDFPCallback){if(40<a)return;a++,window.setTimeout(b,250)}else window.bcDFPCallback(this._getTargetingParameters())};b.call(this)}},_updateLocalStorage:function(){if("undefined"!=typeof window.Storage)try{window.localStorage.setItem("bcDFPTargetingParams",this.blueConicClient.json.stringify(this._getTargetingParameters()))}catch(a){}},_getTargetingParameters:function(){for(var a=[],b=0;b<this.targetingParameters.length;b++){var c=this.targetingParameters[b],d=c.key,e=this._getParamValue(c);d&&e&&a.push({key:d,value:e})}return a},_getParamValue:function(a){if((!a.type||"text"===a.type)&&a.text)return a.text;if("property"===a.type&&a.property)return this.profile.getValues(a.property);if("segments"===a.type&&0<this.blueConicClient.getSegments().length){var b=[],c=this.blueConicClient.getSegments();if(a.segments&&0<a.segments.length)for(var d,e=0;e<c.length;e++){d=c[e];for(var f,g=0;g<a.segments.length;g++)f=a.segments[g],(d.id&&d.id===f.segmentId||d.name===f.segmentName)&&b.push(f.aamCode||f.dcmCode||f.smCode||d.name)}else for(var h=0;h<c.length;h++)b.push(c[h].name);return b}},_getProfilePropertiesFromParameters:function(){var a=[],b=this.context.getParameters(),c=b.targeting_parameters?b.targeting_parameters[0]:b.targeting_parameters;if(!c)return a;this.targetingParameters=this.blueConicClient.json.parse(c);for(var d,e=0;e<this.targetingParameters.length;e++)d=this.targetingParameters[e],"property"===d.type&&d.property&&a.push(d.property);return a}});var a = [];var i='dfpconnection_to';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.6/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters();var r=new Date(2017,8,1,0,0,0,0),s=this.blueConicClient.getCurrentDate().getTime()-r.getTime();this.days=Math.floor(s/864e5);var i=this.parameters.propertyRules&&this.parameters.propertyRules[0]?this.parameters.propertyRules[0]:null;if(i){i=e.json.parse(i),this.preLoadProperties=[];for(var a=0,p=0;p<i.length;p++){var n=i[p];n.profileproperty&&n.decay&&n.nr&&(this.preLoadProperties.push(n.profileproperty+"_index"),n.decay>a&&(a=n.decay,this.property=n.profileproperty))}}else{var o=this.parameters.property?this.parameters.property[0]:this.parameters.property;o&&(this.property=this.blueConicClient.json.parse(o)[0].profileproperty,this.preLoadProperties=[this.property+"_index"])}},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(this.preLoadProperties.length>0){var e=this.context.getProfile(),t=this.parameters.engagement_rules?this.parameters.engagement_rules[0]:this.parameters.engagement_rules;if(!t)return;if(0===(t=this.blueConicClient.json.parse(t)).length)return;var r=this.parameters.interests?this.parameters.interests[0]:this.parameters.interests;r=r?this.blueConicClient.json.parse(r).values:[];var s=new this.BlueConicEngagement(this.blueConicClient,e,this.context.getInteractionId(),!0,r,this.jQuery,this.days,!0);if(s.applyEngagementRules(t),s.isChanged())s.save();else{for(var i=!1,a=0;a<this.preLoadProperties.length;a++){var p=this.preLoadProperties[a];e.getValue(p)||(e.setValue(p,"0"),i=!0)}i&&this.blueConicClient.profile.updateProfile()}}}});var a = [];var i='engagement_interest_ranking';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.4.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.4.1/frontend/src/node_modules/@blueconic/engagement-service/engagementService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.4.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,r){this.blueConicClient=e,this.interaction=r,this.parameters=this.interaction.getParameters();var t=this.parameters.propertyRules&&this.parameters.propertyRules[0]?this.parameters.propertyRules[0]:null;if(t){t=e.json.parse(t),this.preLoadProperties=[];for(var i=0,s=0;s<t.length;s++){var p=t[s];p.profileproperty&&p.decay&&(this.preLoadProperties.push(p.profileproperty),p.decay>i&&(i=p.decay,this.property=p.profileproperty))}}else{var a=this.parameters.property?this.parameters.property[0]:this.parameters.property;a&&(this.property=this.blueConicClient.json.parse(a)[0].profileproperty,this.preLoadProperties=[this.property])}},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(this.preLoadProperties.length>0){var e=this.interaction.getProfile(),r=this.parameters.engagement_rules?this.parameters.engagement_rules[0]:this.parameters.engagement_rules;if(!r)return;if(0===(r=this.blueConicClient.json.parse(r)).length)return;var t=new this.BlueConicEngagement(this.blueConicClient,e,this.property,!1,"",this.jQuery);if(t.applyEngagementRules(r),t.isChanged())t.save();else{for(var i=!1,s=0;s<this.preLoadProperties.length;s++){var p=this.preLoadProperties[s];e.getValue(p)||(e.setValue(p,"0"),i=!0)}i&&this.blueConicClient.profile.updateProfile()}}}});var a = [];var i='engagement_score';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.5.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.5.1/frontend/src/node_modules/@blueconic/engagement-service/engagementService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.5.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,r){this.blueConicClient=e,this.context=r},getPreloadProperties:function(){return this.preloadProperties=[],this.context&&(this.preloadProperties=this.getProfilePropertiesFromParameters(this.context.getParameters())),this.preloadProperties},onLoad:function(){var e=this.context.getProfile(),r=this.context.getParameters(),t=this.jQuery,i=r.listener_rules?r.listener_rules[0]:r.listener_rules;if(i){i=this.blueConicClient.json.parse(i);var s=new this.RuleService(this.blueConicClient,e,t);s.applyRules(i),s.save()}},getProfilePropertiesFromParameters:function(e){var r=[],t=e.listener_rules?e.listener_rules[0]:e.listener_rules;if(!t)return r;t=this.blueConicClient.json.parse(t);for(var i=0;i<t.rules.length;i++){var s=t.rules[i];!s.profileproperty||"set_if_empty"!==s.addset&&"merge"!==s.addset||r.push(s.profileproperty[0].profileproperty)}return r}});var a = [];var i='enrichprofilebyvisitorbehavior';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.2/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.2/frontend/src/js/ruleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.2/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,r){this.blueConicClient=e,this.context=r,this.parameters=this.context.getParameters(),this.rules=this._migrate(this.parameters.version||1)},getPreloadProperties:function(){return this.preloadProperties=[],this.context&&(this.preloadProperties=this.getProfilePropertiesFromParameters()),this.preloadProperties},onLoad:function(){if(this.rules){var e=this.context.getProfile();new window.FormRuleService(this.blueConicClient,e,this.jQuery).applyRules(this.rules)}},getProfilePropertiesFromParameters:function(){if(this.rules){for(var e=[],r=0;r<this.rules.length;r++){var t=this.rules[r];t.profileProperty&&"set_if_empty"===t.addset&&e.push(t.profileProperty)}return e}},_migrate:function(e){var r=this.parameters.form_listener_rules?this.parameters.form_listener_rules[0]:this.parameters.form_listener_rules;return r=this.blueConicClient.json.parse(r),1===e&&(e=2,r=this._migrateToVersion2(r)),r},_migrateToVersion2:function(e){if(!e)return e;e=e.rules||e;for(var r=0;r<e.length;r++){e[r].id=e[r].id||e[r].identifier,delete e[r].identifier,e[r].profileproperty&&!e[r].profileProperty&&(e[r].profileProperty=e[r].profileproperty[0]&&e[r].profileproperty[0].profileproperty||"",delete e[r].profileproperty);var t=this._migrateConverterMappingsToVersion2(e[r]);t&&(e[r].converter.mappings=t)}return e},_migrateConverterMappingsToVersion2:function(e){if(e&&e.converter&&e.converter.mappings){for(var r=[],t=0;t<e.converter.mappings.length;t++){var i=e.converter.mappings[t];i&&i.original&&i.converted?r.push(i):r.push({id:i.identifier||i.id,original:i.o,converted:i.c})}return r}}});var a = [];var i='enrichprofilewithvisitorinput';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.4.3/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.4.3/frontend/src/node_modules/@blueconic/frontend-form-rule-service/formRuleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.4.3/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(t,n){this.blueConicClient=t,this.rules=[],this.timeouts=[];try{this.rules=this.blueConicClient.json.parse(n.getParameters().rules[0])}catch(i){}this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){this._unsubscribePositionListeners(),this._resetTimeouts(),this.onLoad()})),this._positionListeners=[]},onLoad:function(){for(var t=0;t<this.rules.length;t++){var n=this.rules[t];"click"===n.type?this._setClickBindings(n,!0):this._createEvent(n)}},_resetTimeouts:function(){this.timeouts.forEach((function(t){clearTimeout(t)})),this.timeouts=[]},_createEvent:function(t){var n=t.area.selectedoption,i=!1;if("selector"===n&&t.area.selector?(t.words&&this._contentMatchesWords(this._getContentForSelector(t),t.containsmatches,t.words)||t.anyWord&&this._getContentForSelector(t))&&(i=!0):"variable"===n&&t.area.variable?(t.words&&this._contentMatchesWords(this._getVariableValue(t.area.variable),t.containsmatches,t.words)||t.anyWord&&this._getVariableValue(t.area.variable))&&(i=!0):"customjs"===n&&t.area.customjs&&(t.words&&this._contentMatchesWords(this._getCustomJsValue(t.area.customjs),t.containsmatches,t.words)||t.anyWord&&this._getCustomJsValue(t.area.customjs))&&(i=!0),i){var s=0;t.delay&&!isNaN(parseInt(t.delay))&&(s=parseInt(t.delay));var r=setTimeout(function(){this.blueConicClient.createEvent(t.event.id)}.bind(this),s);this.timeouts.push(r)}},_setClickBindings:function(t,n){if(t.clickarea.selector){var i=this.jQuery,s=null;try{s=i(t.clickarea.selector)}catch(r){return void this.blueConicClient.util.log("Invalid click selector: "+r)}0===s.length?this.blueConicClient.position.subscribe(t.clickarea.selector,this,(function(){this._setClickBindings(t,!1)})):s.off("click."+t.id).on("click."+t.id,{clickRule:t},function(t){this.lastEvent=t;try{this._createEvent(t.data.clickRule)}catch(r){}}.bind(this)),n&&i(document).on("click",t.clickarea.selector,{clickRule:t},function(t){if(!this.lastEvent||this.lastEvent.originalEvent!==t.originalEvent)try{this._createEvent(t.data.clickRule)}catch(r){}}.bind(this))}},_contentMatchesWords:function(t,n,i){if(!t)return!1;for(var s=0;s<i.length;s++)if("contains"===n){if(-1!==t.indexOf(i[s].toLowerCase()))return!0}else if(t===i[s].toLowerCase())return!0;return!1},_getContentForSelector:function(rule){var selector=rule.area.selector,contentAreas=null;if(-1!==selector.indexOf("jQuery("))contentAreas=function(selector,jQuery){return eval("var jQuery = arguments[1]"),eval(selector)}(selector,this.jQuery);else try{contentAreas=this.jQuery(selector)}catch(e){this.blueConicClient.util.log("Invalid content selector: "+e)}if(contentAreas&&contentAreas instanceof this.jQuery&&contentAreas.length>0){var contentArr=[];return this.jQuery.each(contentAreas,function(t,n){var i=this.jQuery(n);i.attr("content")?contentArr.push(this._normalizeText(i.attr("content"))):i.attr("src")?contentArr.push(this._normalizeText(i.attr("src"))):contentArr.push(this._normalizeText(i.text()))}.bind(this)),contentArr.join().toLowerCase()}if("content"===rule.type){var subscription=this.blueConicClient.position.subscribe(selector,this,(function(){this._createEvent(rule)}));this._positionListeners.push(subscription)}},_unsubscribePositionListeners:function(){this._positionListeners&&this._positionListeners.forEach((function(t){this.blueConicClient.position.unsubscribe(t)})),this._positionListeners=[]},_getVariableValue:function(t){try{for(var n=t.split("."),i=window[n.shift()];n.length>0;)i=i[n.shift()];return i instanceof Array?i.join().toLowerCase():"object"==typeof i||"function"==typeof i?this.blueConicClient.json.stringify(i):i?(""+i).toLowerCase():null}catch(s){return null}},_getCustomJsValue:function(customjs){try{var value=function(customjs,jQuery){return eval("var jQuery = arguments[1]"),eval("var $ = arguments[1]"),eval(customjs)}(customjs,this.jQuery);return value&&value instanceof Object&&(value=this._stringify(value)),value?(""+value).toLowerCase():null}catch(e){return null}},_stringify:function(t){try{return this.blueConicClient.json.stringify(t)}catch(i){var n=[];return JSON.stringify(obj,(function(t,i){if("object"==typeof i&&null!==i){if(-1!==n.indexOf(i))return;n.push(i)}return i}))}},_normalizeText:function(t){return t?t.replace(/^\s+|\s+$/g,"").replace(/\r\n+|\r+|\n+/gi,"").replace(/\s+/gi," "):t}});var a = [];var i='eventtrigger';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b,this.parameters=this.context.getParameters()},_ouibounce:function(){var a=this,b="sensitivity",c="delay";this.ouibounce({aggressive:!0,timer:0,sensitivity:this.parameters[b]?parseInt(this.parameters[b][0]):20,delay:this.parameters[c]?parseInt(this.parameters[c][0]):0,callback:function(){window.blueConicClient&&window.blueConicClient.exitIntentThrown||a.blueConicClient.createEvent("exitintent"),window.blueConicClient&&(window.blueConicClient.exitIntentThrown=!0)}})},onLoad:function(){this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){window.blueConicClient&&window.blueConicClient.exitIntentThrown&&(window.blueConicClient.exitIntentThrown=!1,this._ouibounce())}),this._ouibounce()}});var a = [];var i='exitintent';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.5/js/ouibounce.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.5/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"gtmpf",BLUECONIC_EVENT_PREFIX:"GTM:",init:function(e,t){this.blueConicClient=e,this.context=t||null,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.parameters=this.migrate(this.parameters),this.objectName=this.parameters.objectname&&this.parameters.objectname.length>0&&this.parameters.objectname[0]?this.parameters.objectname[0]:"dataLayer",this._goals=[];var i=t.getGoals().reduce((function(e,t){return e[t.getId()]=!0,e}),{});if(this.parameters.goalParameters)for(var n=0;n<this.parameters.goalParameters.length;n++){var a=e.json.parse(this.parameters.goalParameters[n]);a.active&&i[a.id]&&this._goals.push(a)}this.connectionContext={LAST_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),VARIABLE_STATE_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId(),profile:this.profile,variables:[],SENT_TO_SYSTEM_PROPERTY:"sent_to_system",SENT_TO_CONNECTION_PROPERTY:"sent_to_connection",RECEIVED_FROM_SYSTEM_PROPERTY:"received_from_system",RECEIVED_FROM_CONNECTION_PROPERTY:"received_from_connection"}},initDataLayerUtil:function(){this.bcConnectionUtil.md5Lib=this.md5,this._bcDatalayerUtil=new this.BlueConicDataLayerUtil(this.objectName,this.blueConicClient,this.bcConnectionUtil,this.context,this.connectionContext,this.profile),this._bcDatalayerUtil.LAST_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),this._bcDatalayerUtil.VARIABLE_STATE_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId()},onLoad:function(){this.initDataLayerUtil();var e=this,t=0;(function gtmReady(){if(e._bcDatalayerUtil.getDataLayer())e._handleGoals();else{if(t>20)return;t++,window.setTimeout(gtmReady,250)}}).call(this)},_handleGoals:function(){for(var e=0;e<this._goals.length;e++){var t=this._goals[e],i=t.parameters.segment?t.parameters.segment[0]:null;this._bcDatalayerUtil.visitorInSegment(i)&&("export"===t.type&&this._handleExportGoal(t.parameters,t.id),"import"===t.type&&this._handleImportGoal(t.parameters))}},_handleImportGoal:function(e){var t=this._bcDatalayerUtil.getDataLayer();if(t){this._bcDatalayerUtil.doImport(e),this._publishEvents();var i=this,n=t.length;window.setInterval((function(){t=i._bcDatalayerUtil.getDataLayer(),n!==t.length&&(i._publishEvents(n),n=t.length)}),1e3)}},_publishEvents:function(e){for(var t=this._bcDatalayerUtil.getDataLayer(),i=e=e||0;i<t.length;i++){var n=t[i].event;n&&this.blueConicClient.event.publish(this.BLUECONIC_EVENT_PREFIX+n,[t[i]])}},_handleExportGoal:function(e,t){this._bcDatalayerUtil.doExport(e,t);var i=Array.isArray(e.push_interactions)&&"true"===e.push_interactions[0],n=Array.isArray(e.passOnEvents)&&"true"===e.passOnEvents[0];!window[this.objectName]||window[this.objectName].push?(i&&this.blueConicClient.event.subscribe("VIEW",this,this._pushInteractionView),n&&this._subscribeToPassOnEvents()):console.warn("window."+this.objectName+" does not have a push function: is the correct Object Name entered?")},getPreloadProperties:function(){for(var e=[this.connectionContext.SENT_TO_SYSTEM_PROPERTY,this.connectionContext.SENT_TO_CONNECTION_PROPERTY,this.connectionContext.RECEIVED_FROM_SYSTEM_PROPERTY,this.connectionContext.RECEIVED_FROM_CONNECTION_PROPERTY],t=0;t<this._goals.length;t++){var i=this._goals[t];if("export"===i.type){e.push(this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId()+"_"+i.id),e.push(this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId()+"_"+i.id);for(var n=this.blueConicClient.json.parse(i.parameters.exportMapping),a=0;a<n.length;a++)"property"===n[a].from.dataType&&n[a].from.values.length>0&&e.push(n[a].from.values[0].id)}else for(var r=this.blueConicClient.json.parse(i.parameters.importMapping),s=0;s<r.length;s++)r[s].to.values.length>0&&e.push(r[s].to.values[0].id)}return e},_pushInteractionView:function(e,t){var i=this.blueConicClient.getInteractionNamesById(t);if(null!==i){var n=i.variantName?i.name+" / "+i.variantName:i.name;window[this.objectName].push({event:"bcInteractionView",name:n})}},_subscribeToPassOnEvents:function(){var e,t=[["inactivity","Inactivity"],["exitintent","Exit Intent"],["cm_firstview","Content Meter View 1"],["cm_exceeded","Content Meter Exceeded"],["cm_lastview","Content Meter Last View"],["cm_excluded","Content Meter Excluded View"],["cm_bottom","Content Meter Bottom Range"],["cm_middle","Content Meter Middle Range"],["cm_top","Content Meter Top Range"],["cm_already_viewed","Content Meter Already Viewed"],["cm_free_view","Content Meter Free View"],["cm_last_free_view","Content Meter Last Free View"]];for(e=2;e<10;e++)t.push(["cm_view_"+e,"Content Meter View "+e]);for(e=1;e<10;e++)t.push(["cm_free_view_"+e,"Content Meter Free View "+e]);var i=this;t.forEach((function(e){i.blueConicClient.event.subscribe(e[0],i,(function(){window[this.objectName].push({event:"bcEvent",bcEventName:e[1]})}))}))},migrate:function(e){var t=parseInt(e.version||"2");return!e.usecases&&!e.variables||e.goalParameters||(t=1),t<2&&(e=this._migrateToV2(e),t=2),t<3&&(e=this._migrateToV3(e)),e},_migrateToV2:function(e){var t={objectname:e.objectname},i=[];if(-1!==e.usecases.indexOf("uc2")){var n={id:1,name:"Import",active:!0,type:"import"},a=[];if(e.importVariables&&e.importVariables.length>0)for(var r=this.blueConicClient.json.parse(e.importVariables[0]),s=0;s<r.length;s++)a.push({from:{fieldId:r[s].fieldLabel},to:{type:"property",property:r[s].property},restriction:r[s].restriction,mergeRule:r[s].mergeRule});n.parameters={importMapping:[this.blueConicClient.json.stringify(a)]},i.push(this.blueConicClient.json.stringify(n))}if(-1!==e.usecases.indexOf("uc1")){var o={id:2,name:"Export",active:!0,type:"export"},l=[];if(e.variables&&e.variables.length>0)for(var c=this.blueConicClient.json.parse(e.variables[0]),h=0;h<c.length;h++)l.push({to:{fieldId:c[h].key},from:{type:"pm"===c[h].type?"permission":c[h].type,property:c[h].property,segments:c[h].segments,fieldId:c[h].text}});o.parameters={exportMapping:[this.blueConicClient.json.stringify(l)],eventname:e.eventname,push_frequency:e.push_frequency,push_interactions:e.push_interactions,passOnEvents:e.passOnEvents,triggerEvent:e.triggerEvent},i.push(this.blueConicClient.json.stringify(o))}return t.goalParameters=i,t},_migrateToV3:function(e){return e.goalParameters=(e.goalParameters||[]).map(JSON.parse).map((function(e){if("export"===e.type){var t=e.parameters.eventname?e.parameters.eventname[0]:null;e.parameters.eventname=[t||"BlueConic"]}return JSON.stringify(e)})),e}});var a = [];var i='gtmconnection';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/node_modules/@blueconic/datalayer_lib/datalayer_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/node_modules/@blueconic/datalayer_lib/lib/jsonpathplus.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.0.4/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({_timeout:null,_timestamp:null,_interval:200,init:function(t,e){this.blueConicClient=t,this.context=e||null},onLoad:function(){var t=this;this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(e,i){this._setTimestamp(),clearTimeout(t._timeoutID),t._timeoutID=setTimeout((function(){t._checkTimeout()}),t._interval)})),this._setTimestamp();var e,i=this.context.getParameters(),n="true"===i.clicks[0],o="true"===i.inputs[0];if(e=!i.scrolling||"true"===i.scrolling[0],this._timeout=i.timeout[0],this._timeout?isNaN(parseInt(this._timeout))||(this._timeout=1e3*parseInt(this._timeout)):this._timeout=6e4,n||o||e){if(n&&document.addEventListener("click",(function(){t._setTimestamp()})),o){var c=document.querySelectorAll("input"),s=document.querySelectorAll("textarea"),u=document.querySelectorAll("select");Array.prototype.forEach.call(c,(function(e){e.addEventListener("keyup",(function(){t._setTimestamp()}))})),Array.prototype.forEach.call(c,(function(e){e.addEventListener("change",(function(){t._setTimestamp()}))})),Array.prototype.forEach.call(s,(function(e){e.addEventListener("keyup",(function(){t._setTimestamp()}))})),Array.prototype.forEach.call(u,(function(e){e.addEventListener("change",(function(){t._setTimestamp()}))}))}e&&window.addEventListener("scroll",(function(){t._setTimestamp()})),this._timeoutID=setTimeout((function(){t._checkTimeout()}),t._interval)}},_handleInactivity:function(){this.blueConicClient.createEvent("inactivity")},_checkTimeout:function(){var t=(new Date).getTime(),e=this;t-this._timestamp>this._timeout?this._handleInactivity():e._timeoutID=setTimeout((function(){e._checkTimeout()}),e._interval)},_setTimestamp:function(){this._timestamp=(new Date).getTime()}});var a = [];var i='inactivitylistener';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({EVENT_NAME:"adblock_detected",init:function(e,t){this.blueConicClient=e,this.context=t},getPreloadProperties:function(){var e=this.context.getParameters(),t=e.property?e.property[0]:e.property;return t?[t]:[]},onLoad:function(){var e=this,t=this.context.getProfile(),n=this.context.getParameters(),o=n.property?n.property[0]:n.property;o||(o=this.EVENT_NAME);var adBlockNotDetected=function(){"no"!==t.getValue(o)&&(t.setValue(o,"no"),e.blueConicClient.profile.updateProfile())},r=window.navigator.userAgent;/MSIE|Trident/.test(r)?adBlockNotDetected():justDetectAdblock.detectAnyAdblocker().then((function(n){n?("yes"!==t.getValue(o)&&(t.setValue(o,"yes"),e.blueConicClient.profile.updateProfile()),e.blueConicClient.createEvent(e.EVENT_NAME)):adBlockNotDetected()}))}});var a = [];var i='listener_adblock';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.1/frontend/src/lib/just-detect-adblock.min.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t},getPreloadProperties:function(){var e=this.context.getParameters(),t=e.responseProperty?e.responseProperty[0]:e.responseProperty;return t?(this.campaignIdentifierProperty=t,[t]):(this.campaignIdentifierProperty="responded_to_campaigns",["responded_to_campaigns"])},onLoad:function(){var e=this.context.getProfile(),t=this.context.getParameters(),r=this.blueConicClient,n=!1,i=!1,o=t.config?t.config[0]:t.config;if(o){for(var a=this.blueConicClient.json.parse(o),c=0;c<a.length;c++){var p=a[c],l=this.getParameterByName(p.parameter);l&&p.profileProperty&&(e.addValue(p.profileProperty,l),n=!0,p.isCampaignIdentifier&&!i&&(this._bindHandlers(l),i=!0))}n&&r.profile.updateProfile()}},_bindHandlers:function(e){var t=this,r=this.context.getProfile(),n=this.blueConicClient,i=document.querySelectorAll("a");Array.prototype.forEach.call(i,(function(i){i.addEventListener("click",(function(){r.addValue(t.campaignIdentifierProperty,e),n.profile.updateProfile()}))}));i=document.querySelectorAll("form");Array.prototype.forEach.call(i,(function(i){i.addEventListener("submit",(function(){r.addValue(t.campaignIdentifierProperty,e),n.profile.updateProfile()}))}))},getParameterByName:function(e){if(!e)return"";e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&#]"+e+"=([^&#]*)").exec(this.getLocationHref());return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},getLocationHref:function(){return window.location.href}});var a = [];var i='listener_campaign_tracker';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PARAMETERS:{ENGAGEMENT_PROPERTY:"engagementProperty",ENGAGEMENT_SCORE_PROPERTY:"engagementScoreProperty",DECAY:"decay",ENGAGEMENT_ON_CHANNEL:"engagementOnChannel"},DEFAULTS:{ENGAGEMENT:"engagement",ENGAGEMENT_SCORE:"engagement_score",VISITS:"visits",CLICKCOUNT:"clickcount"},SCORES:{LOW:"low",MEDIUM:"medium",HIGH:"high"},DEFAULT_DECAY:50,init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=t.getParameters(),this._channelId=e.getChannelId();var i="true"===this.getParameterValue(this.PARAMETERS.ENGAGEMENT_ON_CHANNEL)&&this._channelId;this.properties={engagement:this.getParameterValue(this.PARAMETERS.ENGAGEMENT_PROPERTY,this.DEFAULTS.ENGAGEMENT),engagementScore:this.getParameterValue(this.PARAMETERS.ENGAGEMENT_SCORE_PROPERTY,this.DEFAULTS.ENGAGEMENT_SCORE),engagementObject:"_"+this.getParameterValue(this.PARAMETERS.ENGAGEMENT_PROPERTY,this.DEFAULTS.ENGAGEMENT),visits:this.DEFAULTS.VISITS+(i?"_"+this._channelId:""),clickcount:this.DEFAULTS.CLICKCOUNT+(i?"_"+this._channelId:"")};var r=new Date(2015,0,1,0,0,0,0),n=(new Date).getTime()-r.getTime();this.days=Math.floor(n/864e5),this.weekNr=Math.floor(this.days/7),this.decay=parseInt(this.getParameterValue(this.PARAMETERS.DECAY))||this.DEFAULT_DECAY},getPreloadProperties:function(){return[this.properties.engagementObject,this.properties.visits,this.properties.clickcount]},onLoad:function(){var e=this.context.getProfile(),t=e.getValue(this.properties.clickcount)?parseInt(e.getValue(this.properties.clickcount)):0,i=e.getValue(this.properties.visits)?parseInt(e.getValue(this.properties.visits)):0,r=e.getValues(this.properties.engagementObject).map(function(e){return this.blueConicClient.json.parse(e)||{}}.bind(this)),n=this._clearInvalidValues(r,i),s=n.cleanedValues,a=this._sumInternalValues(s),h=this._addCurrentWeek(a,t,i),o=this._getCalculated(a,i,t),c=this._calculateScore(o);isNaN(c)||((h||s.length>1||n.removedValues)&&e.setValue(this.properties.engagementObject,JSON.stringify(a)),this._setEngagement(e,c))},getParameterValue:function(e,t){return this.parameters&&this.parameters[e]&&this.parameters[e][0]?this.parameters[e][0]:t},_clearInvalidValues:function(e,t){var i=!1;return e.forEach(function(e){var r=Object.keys(e).filter(function(e){return-1!==e.indexOf("v")}).map(function(e){return parseInt(e.substring(1))});r.sort(function(e,t){return t-e}),r.forEach(function(r){(i||e["v"+r]>t||e["v"+r]<0)&&(delete e["v"+r],delete e["c"+r],i=!0)})},this),{removedValues:i,cleanedValues:e}},_sumInternalValues:function(e){var t={};return e.forEach(function(e){Object.keys(e).forEach(function(i){t[i]=(t[i]||0)+e[i]})}),t},_setEngagement:function(e,t){var i=this.context.getParameters(),r=parseInt(i.lowTreshold?i.lowTreshold[0]:i.lowTreshold),n=parseInt(i.highTreshold?i.highTreshold[0]:i.highTreshold),s=this.SCORES.MEDIUM;t<r?s=this.SCORES.LOW:t>n&&(s=this.SCORES.HIGH),e.setValue(this.properties.engagementScore,t),e.setValue(this.properties.engagement,s),this.blueConicClient.profile.updateProfile()},_addCurrentWeek:function(e,t,i){var r=!1;return e["v"+this.weekNr]||(e["v"+this.weekNr]=i,r=!0),e["c"+this.weekNr]||(e["c"+this.weekNr]=t,r=!0),r},_calculateScore:function(e){for(var t=0,i=0;i<e.length;i++){var r=this._getWeight(i+1,this.decay),n=e[i];t+=(n.clickCount+5*n.visits)*r}return t=Math.floor(t)},_getWeight:function(e,t){return e<=.1*t?1:e<=.2*t?.8:e<=.4*t?.5:e<=t?.3:.1},_getCalculated:function(e,t,i){for(var r=[],n=this.weekNr;n>0;n--){var s=0;e["v"+n]&&(t-=s=Math.max(t-e["v"+n],0));var a=0;e["c"+n]&&(i-=a=Math.max(i-e["c"+n],0)),r.push({week:n,visits:s,clickCount:a})}return r}});var a = [];var i='listener_engagement';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(n,t){this.blueConicClient=n,this.context=t},getPreloadProperties:function(){return[]},onLoad:function(){}});var a = [];var i='listener_geolocation';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters(),this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId()),this.internalProperty="_"+this.context.getInteractionId(),this.BEHAVIOR={PAGEVIEW:"PAGEVIEW",SCROLL:"PAGESCROLL",CLICK:"CLICK",EVENT:"EVENT",FORM:"FORMSUBMIT"},this.SAVE_POINTS_EVENT="engagementRanker.savePoints",this.DEFAULT_RESTRICTION_OPERATOR="AND"},onLoad:function(){window._bcp.engagementRanker.$=this.jQuery,0!==this.preLoadProperties.length&&this._execute()},getPreloadProperties:function(){this.preLoadProperties=[];var e=this.parameters.storeInInterests&&this.parameters.storeInInterests[0]?this.blueConicClient.json.parse(this.parameters.storeInInterests[0]):[];return this.preLoadProperties=e.filter((function(e){return e.property})).map((function(e){return e.property+"_index"})),this.preLoadProperties},_execute:function(){var e=window._bcp.engagementRanker.util,t=window._bcp.engagementRanker.metadataService,i=e.getParameters(this.parameters);this._initExecuter(i);var n=i.restrictions||{rules:[]};if(t.checkRestrictions(n.rules,n.operator||this.DEFAULT_RESTRICTION_OPERATOR)){this._checkScoreProperties(),this._subscribeSavePointsListener();var r=this.parameters.keywordsSources&&this.parameters.keywordsSources[0]?this.blueConicClient.json.parse(this.parameters.keywordsSources[0]):[];return(r=r.filter((function(t){return e.getHandler(t.id)||console.log("Could not find handler for",t.id),t.selected&&e.getHandler(t.id)}))).forEach((function(e){this._executer.addToRulesMap(e)}),this),this.jQuery.when(this._executer.loadLibraries(r)).then(function(){return this._executer.addBindings()}.bind(this),(function(e){console.log("Failed to load libraries")}))}},_initExecuter:function(e,t){this._executer=new window._bcp.engagementRanker.Executer(this.blueConicClient,this.context,e,this.jQuery,this.baseURL,{postponeTimeout:this.postponeTimeout})},_subscribeSavePointsListener:function(){this.blueConicClient.event.subscribe(this.SAVE_POINTS_EVENT,this,(function(e,t){(t=t||e).internalProperty===this.internalProperty&&this._savePoints(t.changes)}))},_checkScoreProperties:function(){var e=this.blueConicClient.profile.getProfile(),t=!1;this.preLoadProperties.filter((function(t){return 0===e.getValues(t).length})).forEach((function(i){t=!0,e.setValue(i,"0")})),t&&this.blueConicClient.profile.updateProfile()},_savePoints:function(e){if(e&&e.length>0){var t=window._bcp.engagementRanker.util,i={TIME:(new Date).getTime(),days:t.getDays(this.blueConicClient.getCurrentDate()),data:e};this.blueConicClient.profile.getProfile().addValue(this.internalProperty,this.blueConicClient.json.stringify(i)),this.blueConicClient.profile.updateProfile()}}});var a = [];var i='listener_interest_ranker';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.5/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.5/frontend/src/js/Util.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.5/frontend/src/js/Executer.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.5/frontend/src/js/MetaKeywordRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.5/frontend/src/js/TextRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.5/frontend/src/js/UrlRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.5/frontend/src/js/MetadataService.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.5/frontend/src/js/JavascriptRanker.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.4.5/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a;var c=b.getParameters();if(c.selector&&c.selector[0]&&(this.selector=c.selector[0]),c.urlRestriction&&c.urlRestriction[0])try{this.urlRestriction=new RegExp(c.urlRestriction[0])}catch(b){a.util.log('[ERROR] '+b.message)}this._playFired={},0<document.querySelectorAll(this.selector).length?this._positionFound():this.blueConicClient.position.subscribe(this.selector,this,this._positionFound)},_onEnded:function(a){var b=a.target.getAttribute('src');this._playFired[b]&&(this.urlRestriction&&!this.urlRestriction.test(b)||this.blueConicClient.createEvent('media:ended',[b]))},_onPlaying:function(a){var b=a.target.getAttribute('src');b&&(this._playFired[b]||this.urlRestriction&&!this.urlRestriction.test(b)||(this.blueConicClient.event.publish('media:play',[b]),this._playFired[b]=!0))},_positionFound:function(){for(var a=document.querySelectorAll(this.selector),b=!1,c=0;c<a.length;c++)if('IFRAME'===a[c].tagName){var d=a[c];d.contentDocument&&d.contentDocument.children&&0<d.contentDocument.children.length?this._bindMediaEvents(d.contentDocument.children[0]):(d.addEventListener('load',this._positionFound.bind(this)),b=!0)}else this._bindMediaEvents(a[c]);b||this.blueConicClient.position.subscribe(this.selector,this,this._positionFound)},_bindMediaEvents:function(a){a&&!a.getAttribute('data-blueconic-media-listener')&&(a.addEventListener('ended',this._onEnded.bind(this),!0),a.addEventListener('playing',this._onPlaying.bind(this),!0),a.setAttribute('data-blueconic-media-listener',!0))}});var a = [];var i='listener_media';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_media/ts_e329a33ddc26c56b5c079b99f5890872/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b;var c=new Date(2017,8,1,0,0,0,0),d=this.blueConicClient.getCurrentDate().getTime(),e=d-c.getTime();this.days=Math.floor(e/86400000)},getPreloadProperties:function(){return[]},onLoad:function(){var a=this.context.getProfile(),b=this.context.getParameters(),c=b.property?b.property[0]:b.property;if(c){var d=this.blueConicClient.json.parse(c)[0].profileproperty,e=this.blueConicClient.getCurrentDate(),f=this._getTimeFrame(e.getHours(),b.locale[0]),g={TIME:new Date().getTime(),data:[]};g.data.push({n:f,p:1,d:this.days}),a.addValue("_hl_"+d,this.blueConicClient.json.stringify(g)),this.blueConicClient.profile.updateProfile()}},_getTimeFrame:function(a,b){return this._getHour(a,b)+" - "+this._getHour(a+1,b)},_getHour:function(a,b){if("en-us"===b){var c=12<=a?"PM":"AM";return a%=12,a=0===a?12:a,a+" "+c}return a=10>a?"0"+a:a,a+":00"}});var a = [];var i='listener_preferred_hour';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.6/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b;var c=new Date(2012,0,1,0,0,0,0),d=new Date,e=d.getTime()-c.getTime();this.days=Math.floor(e/86400000)},getPreloadProperties:function(){return[]},onLoad:function(){var a=this.context.getParameters(),b=a.config?a.config[0]:a.config;if(b){var c=this.blueConicClient.json.parse(b),d=document.location.href;(0<=d.indexOf("#")||0<=d.indexOf("?"))&&(d=d.substring(0,d.indexOf("#"))||d.substring(0,d.indexOf("?")));var e,f=d.split("/"),g=!1;for(e=0;e<c.length;e++){var h=c[e],i=f[e+3];h.checked&&h.profileProperty&&!g&&(this._storeEngagement(h.profileProperty,this._getValue(i)),i&&30<i.length&&h.checked&&(g=!0))}this.blueConicClient.profile.updateProfile()}},_getValue:function(a){return a?30<a.length?null:(0<=a.indexOf(".")&&(a=a.substring(0,a.indexOf("."))),isNaN(a)&&"index"!==a&&0!==a.indexOf("index.")?a:null):null},_storeEngagement:function(a,b){if(b){var c=this.context.getProfile(),d={TIME:new Date().getTime()};d[b]={},d[b]["p"+this.days]=1,c.addValue("_"+a,this.blueConicClient.json.stringify(d))}}});var a = [];var i='listener_url_structure';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.20/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({blueConicClient:null,context:null,_profile:null,_userLanguage:null,_systemLanguage:null,_language:null,_referrer:null,_hostName:null,_currentUrl:null,_domain:null,ORIGIN_TYPES:{WEB:"web",MOBILE_WEB:"mobile_web",CONNECTION:"connection",MOBILE:"mobile_app"},CONSTANTS:{THIRTY_MINUTES_IN_MS:18e5,UNKNOWN:""},PROFILE_PROPERTIES:{CLICKCOUNT:"clickcount",VISITS:"visits",VISITCLICKS:"visitclicks",LASTVISITDATE:"lastvisitdate",VISITEDSITES:"visitedsites",VISITEDDOMAIN:"visiteddomain",ENTRYPAGE:"entrypage",REFERRERHOST:"referrerhost",REFERRERHOSTS:"referrerhosts",HOSTENTRYPAGE:"hostentrypage",HOSTAVERAGETIME:"hostaveragetime",LASTREFERRERAVERAGE:"lastreferreraverage",AVERAGETIME:"averagetime",TOTALVISITTIME:"totalvisittime",RESOLUTION:"resolution",CURRENTRESOLUTION:"currentresolution",CURRENTSCREENWIDTH:"currentscreenwidth",CURRENTSCREENHEIGHT:"currentscreenheight",ORIGIN_TYPE:"origin_type",ORIGIN_SOURCE:"origin_source",ORIGIN_DETAIL:"origin_detail",DEVICETYPE:"devicetype",RECEIVED_FROM_SYSTEM:"received_from_system",RECEIVED_FROM_CONNECTION:"received_from_connection",MOBILE_APP_ID:"mobile_app_id",MOBILE_APP_NAMEVERSION:"mobile_app_nameversion",LANGUAGE:"language",KEYWORDS:"keywords",CURRENTKEYWORDS:"currentkeywords",CURRENT_UTM_SOURCE:"current_utm_source",CURRENT_UTM_MEDIUM:"current_utm_medium",CURRENT_UTM_TERM:"current_utm_term",CURRENT_UTM_CONTENT:"current_utm_content",CURRENT_UTM_CAMPAIGN:"current_utm_campaign",UTM_SOURCE:"utm_source",UTM_MEDIUM:"utm_medium",UTM_TERM:"utm_term",UTM_CONTENT:"utm_content",UTM_CAMPAIGN:"utm_campaign"},PROFILE_PROPERTIES_FOR_CHANNEL:{},init:function(e,t){this.blueConicClient=e,this.context=t,this._profile=e.profile.getProfile(),this._channelId=e.getChannelId(),this._referrer=document.referrer,this._hostName=window.location.hostname,this._currentUrl=window.location.href,this._domain=document.domain,this._userLanguage=window.navigator.userLanguage,this._systemLanguage=navigator.systemLanguage,this._language=window.navigator.language,this.PROFILE_PROPERTIES_FOR_CHANNEL={CLICKCOUNT:this.PROFILE_PROPERTIES.CLICKCOUNT+"_"+this._channelId,VISITS:this.PROFILE_PROPERTIES.VISITS+"_"+this._channelId,VISITCLICKS:this.PROFILE_PROPERTIES.VISITCLICKS+"_"+this._channelId,LASTVISITDATE:this.PROFILE_PROPERTIES.LASTVISITDATE+"_"+this._channelId}},onPrepare:function(){this._profile&&(this._setLanguageProperties(),this._setResolutionProperties(),this._setReferrerProperties(),this._setCampaignProperties())},onLoad:function(){this._profile&&(this._setReferrerHostOnLoad(),this._setVisitProperties(),this._setOriginProperties(),this.blueConicClient.profile.updateProfile())},getPreloadProperties:function(){return[this.PROFILE_PROPERTIES.CLICKCOUNT,this.PROFILE_PROPERTIES.VISITS,this.PROFILE_PROPERTIES.VISITCLICKS,this.PROFILE_PROPERTIES.LASTVISITDATE,this.PROFILE_PROPERTIES.VISITEDSITES,this.PROFILE_PROPERTIES.ENTRYPAGE,this.PROFILE_PROPERTIES.HOSTENTRYPAGE,this.PROFILE_PROPERTIES.HOSTAVERAGETIME,this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE,this.PROFILE_PROPERTIES.AVERAGETIME,this.PROFILE_PROPERTIES.TOTALVISITTIME,this.PROFILE_PROPERTIES.RESOLUTION,this.PROFILE_PROPERTIES.DEVICETYPE,this.PROFILE_PROPERTIES.ORIGIN_TYPE,this.PROFILE_PROPERTIES.ORIGIN_SOURCE,this.PROFILE_PROPERTIES.ORIGIN_DETAIL,this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM,this.PROFILE_PROPERTIES.RECEIVED_FROM_CONNECTION,this.PROFILE_PROPERTIES.VISITEDDOMAIN,this.PROFILE_PROPERTIES.MOBILE_APP_ID,this.PROFILE_PROPERTIES.MOBILE_APP_NAMEVERSION,this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT,this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITS,this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITCLICKS,this.PROFILE_PROPERTIES_FOR_CHANNEL.LASTVISITDATE]},_setLanguageProperties:function(){var e=this._userLanguage||this._systemLanguage||this._language,t=this._normalizeLocale(e).split("-")[0];t&&this._profile.setValue(this.PROFILE_PROPERTIES.LANGUAGE,t)},_normalizeLocale:function(e){return e&&e.replace("_","-").toLowerCase()},_setResolutionProperties:function(){var e=screen.width,t=screen.height;this._profile.setValue(this.PROFILE_PROPERTIES.CURRENTSCREENWIDTH,e),this._profile.setValue(this.PROFILE_PROPERTIES.CURRENTSCREENHEIGHT,t);var i=e+"x"+t;this._profile.setValue(this.PROFILE_PROPERTIES.CURRENTRESOLUTION,i),this._profile.addValue(this.PROFILE_PROPERTIES.RESOLUTION,i)},_setReferrerProperties:function(){this._setReferrerKeywords(),this._setReferrerHost()},_setReferrerKeywords:function(){var e=this.HELPER.decodeReferrer(this._referrer)||[];e.length>0&&(this._addProfileValues(this.PROFILE_PROPERTIES.KEYWORDS,e),this._profile.setValues(this.PROFILE_PROPERTIES.CURRENTKEYWORDS,e))},_addProfileValues:function(e,t){(Array.isArray(t)?t:[t]).forEach((function(t){this._profile.addValue(e,t)}),this)},_setReferrerHost:function(){var e=this._getReferrerHost();e!==this._hostName&&(this._profile.setValue(this.PROFILE_PROPERTIES.ENTRYPAGE,this._currentUrl),e&&(this._profile.setValue(this.PROFILE_PROPERTIES.REFERRERHOST,e),this._profile.addValue(this.PROFILE_PROPERTIES.REFERRERHOSTS,e)))},_setReferrerHostOnLoad:function(){var e=this._getReferrerHost();e!==this._hostName&&this._setHostEntryPageProperty(),this._setHostTotalAndAverageTimeProperty(this._hostName,e)},_getReferrerHost:function(){return this._referrer.replace(/http[s]?:\/\/(.*?)(:|\?|\/|$).*/,"$1")},_setCampaignProperties:function(){[this.PROFILE_PROPERTIES.UTM_SOURCE,this.PROFILE_PROPERTIES.UTM_MEDIUM,this.PROFILE_PROPERTIES.UTM_TERM,this.PROFILE_PROPERTIES.UTM_CONTENT,this.PROFILE_PROPERTIES.UTM_CAMPAIGN].forEach((function(e){var t=this._removeHashPart(this.HELPER._getParameterByName(this._currentUrl,e));t&&(this._profile.setValue("current_"+e,t),this._profile.addValue(e,t))}),this)},_setHostEntryPageProperty:function(){this._profile.setValue(this.PROFILE_PROPERTIES.ENTRYPAGE,this._currentUrl);var e=this._getHostEntryPageMapping();e[this._hostName]={entrypage:this._currentUrl},this._profile.setValue(this.PROFILE_PROPERTIES.HOSTENTRYPAGE,JSON.stringify(e))},_getHostEntryPageMapping:function(){return this._safeJSONParse(this._profile.getValue(this.PROFILE_PROPERTIES.HOSTENTRYPAGE))},_safeJSONParse:function(e){try{var t=e.replace(/'/g,'"');return JSON.parse(t)||{}}catch(i){return{}}},_setHostTotalAndAverageTimeProperty:function(e,t){var i=this._safeJSONParse(this._profile.getValue(this.PROFILE_PROPERTIES.HOSTAVERAGETIME));i[e]||(i[e]=this._createNewVisitData());var s=this.blueConicClient.getCurrentDate().getTime(),E=this._profile.getValue(this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE),r=0,R=0,I=0;Object.keys(i).map((function(e){return e.toString()})).forEach((function(_){var n=i[_];this._isSessionExpired(n.enddate)?this._addVisit(n,n.enddate-n.startdate):_===e?n.enddate=s:_===t&&E!==t&&(n.enddate=s,this._profile.setValue(this.PROFILE_PROPERTIES.LASTREFERRERAVERAGE,t)),0!==n.averageTime&&(R++,r+=n.averageTime,I+=n.averageTime*n.visits)}),this),this._profile.setValue(this.PROFILE_PROPERTIES.HOSTAVERAGETIME,JSON.stringify(i)),this._profile.setValue(this.PROFILE_PROPERTIES.TOTALVISITTIME,I);var _=R>0?Math.round(r/R):0;this._profile.setValue(this.PROFILE_PROPERTIES.AVERAGETIME,_)},_addVisit:function(e,t){if(t>0){var i=e.averageTime*e.visits+t/1e3;e.visits++,e.averageTime=Math.round(i/e.visits)}var s=this.blueConicClient.getCurrentDate().getTime();e.startdate=s,e.enddate=s},_createNewVisitData:function(){var e=this.blueConicClient.getCurrentDate().getTime();return{startdate:e,enddate:e,averageTime:0,visits:0}},_setPropertyIfEmpty:function(e,t,i){"undefined"==typeof e[t]&&(e[t]=i)},_setVisitProperties:function(){this._addVisitedDomain(this._domain),this._increaseClickCount(),this._increaseVisits(this.PROFILE_PROPERTIES.VISITS,this.PROFILE_PROPERTIES.VISITCLICKS,this.PROFILE_PROPERTIES.LASTVISITDATE),this._channelId&&this._increaseVisits(this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITS,this.PROFILE_PROPERTIES_FOR_CHANNEL.VISITCLICKS,this.PROFILE_PROPERTIES_FOR_CHANNEL.LASTVISITDATE)},_increaseVisits:function(e,t,i){e=e||this.PROFILE_PROPERTIES.VISITS,t=t||this.PROFILE_PROPERTIES.VISITCLICKS,i=i||this.PROFILE_PROPERTIES.LASTVISITDATE,this._isNewSession(e,i)?(this._resetPageViewsCurrentSession(t),this._increaseSessionCount(e)):this._increasePageViewsCurrentSession(t),this._setLastVisitDate(i,this.blueConicClient.getCurrentDate().getTime())},_setLastVisitDate:function(e,t){e=e||this.PROFILE_PROPERTIES.LASTVISITDATE,this._profile.setValue(e,t)},_addVisitedDomain:function(e){this._hasVisitedDomain(e)||this._profile.addValue(this.PROFILE_PROPERTIES.VISITEDSITES,e)},_hasVisitedDomain:function(e){var t=this._profile.getValues(this.PROFILE_PROPERTIES.VISITEDSITES)||[];return t.length>0&&-1!==t.indexOf(e)},_increaseClickCount:function(){var e=this._getNumberProperty(this.PROFILE_PROPERTIES.CLICKCOUNT);if(this._profile.setValue(this.PROFILE_PROPERTIES.CLICKCOUNT,e+1),this._channelId){var t=this._getNumberProperty(this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT);this._profile.setValue(this.PROFILE_PROPERTIES_FOR_CHANNEL.CLICKCOUNT,t+1)}},_isNewSession:function(e,t){e=e||this.PROFILE_PROPERTIES.VISITS,t=t||this.PROFILE_PROPERTIES.LASTVISITDATE;var i=this._getNumberProperty(e),s=this._getNumberProperty(t)||0;return 0===i||this._isSessionExpired(s)},_isSessionExpired:function(e){return this.blueConicClient.getCurrentDate().getTime()>e+this.CONSTANTS.THIRTY_MINUTES_IN_MS},_resetPageViewsCurrentSession:function(e){e=e||this.PROFILE_PROPERTIES.VISITCLICKS,this._profile.setValue(e,1)},_increasePageViewsCurrentSession:function(e){e=e||this.PROFILE_PROPERTIES.VISITCLICKS;var t=this._getNumberProperty(e);this._profile.setValue(e,t+1)},_increaseSessionCount:function(e){e=e||this.PROFILE_PROPERTIES.VISITS;var t=this._getNumberProperty(e);this._profile.setValue(e,t+1)},_setOriginProperties:function(){var e=this._getOriginCount();e>1?this._mergeOriginProperties():0===e&&this._resolveOriginProperties()},_getOriginCount:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.ORIGIN_TYPE)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.ORIGIN_SOURCE)||[],i=this._profile.getValues(this.PROFILE_PROPERTIES.ORIGIN_DETAIL)||[];return Math.max(e.length,t.length,i.length)},_mergeOriginProperties:function(){this._mergePropertyToUnknown(this.PROFILE_PROPERTIES.ORIGIN_TYPE),this._mergePropertyToUnknown(this.PROFILE_PROPERTIES.ORIGIN_SOURCE),this._mergePropertyToUnknown(this.PROFILE_PROPERTIES.ORIGIN_DETAIL)},_mergePropertyToUnknown:function(e){var t=this._profile.getValues(e)||[];this._profile.setValue(e,1===t.length?t[0]:this.CONSTANTS.UNKNOWN)},_resolveOriginProperties:function(){this._isVisitorOriginFromWeb()?this._resolveOriginForWebVisitor():this._isVisitorOriginFromConnection()?this._resolveOriginForProfileComingFromConnection():this._isVisitorOriginFromMobileApp()&&this._resolveOriginForMobileAppVisitor()},_isVisitorOriginFromWeb:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID)||[];return 0===e.length&&0===t.length},_isVisitorOriginFromMobileApp:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID)||[],i=this._getNumberProperty(this.PROFILE_PROPERTIES.VISITS);return t.length>0&&0===e.length&&0===i},_isVisitorOriginFromConnection:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM),t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID),i=this._getNumberProperty(this.PROFILE_PROPERTIES.VISITS);return e&&e.length>0&&t&&0===t.length&&i<=0},_resolveOriginForWebVisitor:function(){var e="",t=this._profile.getValues(this.PROFILE_PROPERTIES.VISITEDSITES)||[],i=this._profile.getValue(this.PROFILE_PROPERTIES.DEVICETYPE)||"",s=this._profile.getValues(this.PROFILE_PROPERTIES.ENTRYPAGE)||[];i&&(e="PC"===i?this.ORIGIN_TYPES.WEB:this.ORIGIN_TYPES.MOBILE_WEB);var E=1===t.length?t[0]:this.CONSTANTS.UNKNOWN,r=1===s.length?s[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(e,E,r)},_resolveOriginForProfileComingFromConnection:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_SYSTEM)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.RECEIVED_FROM_CONNECTION)||[],i=1===e.length?e[0]:this.CONSTANTS.UNKNOWN,s=1===t.length?t[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(this.ORIGIN_TYPES.CONNECTION,i,s)},_resolveOriginForMobileAppVisitor:function(){var e=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_ID)||[],t=this._profile.getValues(this.PROFILE_PROPERTIES.MOBILE_APP_NAMEVERSION)||[],i=1===e.length?e[0]:this.CONSTANTS.UNKNOWN,s=1===t.length?t[0]:this.CONSTANTS.UNKNOWN;this._setOriginProfileProperties(this.ORIGIN_TYPES.MOBILE,i,s)},_setOriginProfileProperties:function(e,t,i){this._profile.setValue(this.PROFILE_PROPERTIES.ORIGIN_TYPE,e),this._profile.setValue(this.PROFILE_PROPERTIES.ORIGIN_SOURCE,t),this._profile.setValue(this.PROFILE_PROPERTIES.ORIGIN_DETAIL,i)},_removeHashPart:function(e){if(e){var t=e.indexOf("#");if(-1!==t)return e.substring(0,t)}return e},HELPER:{search_engines:[["google\\.","q"],["bing\\.","q"],["search\\.yahoo\\.","p"],["search\\.aol\\.","q"],["duckduckgo\\.","q"],["baidu\\.","wd"],["ask\\.com","q"],["search\\.lycos\\.","q"],["dogpile\\.com","q"]],substringToHash:function(e){if(e){var t=e.indexOf("#");if(-1!==t)return e.substring(0,t)}return e},decodeReferrer:function(e){for(var t=new RegExp(""),i=0;i<this.search_engines.length;i++){var s=this.search_engines[i];t.compile("^http(s?)://(www\\.)?"+s[0],"i");var E=e.match(t);if(E){var r;if(r=isNaN(s[1])?this._getParameterByName(e,s[1]):E[s[1]+1])return r=decodeURIComponent(r),s.length>2&&s[2]&&(r=decodeURIComponent(r)),r=(r=(r=r.replace(/'|"/g,"")).split(/[\s,+.]+/)).filter((function(e){return e}));break}}return null},_getParameterByName:function(e,t){if(!t)return"";t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&#]"+t+"=([^&#]*)").exec(e);return null===i?"":decodeURIComponent(i[1].replace(/\+/g," "))}},_getNumberProperty:function(e){var t=this._profile.getValue(e);if(!t)return 0;try{t=parseInt(t),isNaN(t)&&(t=0)}catch(i){t=0}return t}});var a = [];var i='listenerinteractiontype';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({LAST_VISIT_COOKIE_NAME:"last_visit_bc",NEW_VISIT_PROPERTY:"new_visit_bc",SESSION_TIMEOUT_MINUTES:30,init:function(e){this.blueConicClient=e,this.profile=e.profile.getProfile()},onPrepare:function(){var e=(new Date).getTime(),t=this.blueConicClient.util.cookie.getCookie(this.LAST_VISIT_COOKIE_NAME);if(t&&!isNaN(parseInt(t))){var i=new Date(parseInt(t));i.setMinutes(i.getMinutes()+this.SESSION_TIMEOUT_MINUTES),e>i?this.profile.setValue(this.NEW_VISIT_PROPERTY,"true"):this.profile.setValue(this.NEW_VISIT_PROPERTY,"false")}else this.profile.setValue(this.NEW_VISIT_PROPERTY,"true");this.blueConicClient.util.cookie.setCookie(this.LAST_VISIT_COOKIE_NAME,e)},onLoad:function(){"true"===this.profile.getValue(this.NEW_VISIT_PROPERTY)&&this.blueConicClient.createEvent("new_visit"),"true"==this.profile.getValue(this.NEW_VISIT_PROPERTY)&&(_contentURL=window.location.protocol+"//"+window.location.hostname+window.location.pathname,_title=window.document.querySelector("head > title").innerText,this.profile.timeline.createEvent("new_visit",new Date,{url:_contentURL,title:_title}))}});var a = [];var i='newvisitlistener_timeline';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/newvisitlistener_timeline/ts_2a14dbeac7c24095fd8da59d73de14ed/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({blueConicClient:null,context:null,profile:null,parameters:null,objectName:null,DEFAULT_TRACKER_NAME:"ga",DEFAULT_EVENT_NAME:"BlueConic",SENT_TO_SYSTEM_PROPERTY:"sent_to_system",SENT_TO_CONNECTION_PROPERTY:"sent_to_connection",PF_PROPERTY_PREFIX:"uapf",_LAST_PUSH_PROPERTY:null,_VARIABLE_STATE_PUSH_PROPERTY:null,_goalParams:null,_preloadProperties:null,_hasSynchronized:!1,_visitorSegmentIds:[],init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this._LAST_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),this._VARIABLE_STATE_PUSH_PROPERTY=this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId(),this.parameters=this._migrateParameters(this.parameters),this.objectName=this.parameters.trackerName&&this.parameters.trackerName[0]||this.DEFAULT_TRACKER_NAME,this._visitorSegmentIds=this._getVisitorSegmentIds(),this._goalParams=this._parseGoalParams(this.parameters.goalParameters),this._fillPreloadProperties()},_getVisitorSegmentIds:function(){return this.blueConicClient.getSegments().map((function(e){return e.id}))||[]},_parseGoalParams:function(e){return e.map((function(e){return e&&this.blueConicClient.json.parse(e)}),this).filter((function(e){return e&&e.active&&e.parameters})).map((function(e){return e.parameters.id=e.id,e.parameters.exportMapping=this._parseExportMapping(e.parameters.exportMapping),e.parameters}),this)},_parseExportMapping:function(e){return(e&&this.blueConicClient.json.parse(e[0])||[]).filter((function(e){return this._isValidExportMapping(e)}),this)},_isValidExportMapping:function(e){var t=e&&e.from&&e.to&&e.to.values&&e.to.values[0]&&e.to.values[0].id&&("property"!==e.from.typeId||e.from.values&&e.from.values[0]&&e.from.values[0].id);return Boolean(t)},_fillPreloadProperties:function(){this._preloadProperties=[this.SENT_TO_SYSTEM_PROPERTY,this.SENT_TO_CONNECTION_PROPERTY],this._goalParams.forEach((function(e){this._preloadProperties.push(this._LAST_PUSH_PROPERTY+"_"+e.id),this._preloadProperties.push(this._VARIABLE_STATE_PUSH_PROPERTY+"_"+e.id),e.exportMapping.forEach((function(e){var t=e.from&&"property"===e.from.typeId&&e.from.values&&e.from.values[0]&&e.from.values[0].id;t&&-1===this._preloadProperties.indexOf(t)&&this._preloadProperties.push(e.from.values[0].id)}),this)}),this)},getPreloadProperties:function(){return this._preloadProperties},onLoad:function(){this.bcConnectionUtil.md5Lib=window.md5;var e=this,t=0;(function tagReady(){if(window[e.objectName])e._handleGoals();else{if(t>20)return;t++,window.setTimeout(tagReady,250)}}).call(this)},_handleGoals:function(){this._goalParams.forEach((function(e){this._isSegmentValid(e.exportSegment)&&this._applyGoal(e)}),this)},_isSegmentValid:function(e){var t=!e||0===e.length,i=e&&e[0]&&-1!==this._visitorSegmentIds.indexOf(e[0]);return t||i},_applyGoal:function(e){var t=this._createConnectionContext(e);this._pushProfileValues(e,t),e.triggerEvent&&e.triggerEvent[0]&&this.blueConicClient.event.subscribe(e.triggerEvent[0],this,(function(){this._doPush(e,t)}));var i=this._getEventNameForGoal(e),n=this._getTrackerNameForGoal(e);e.push_interactions&&"true"===e.push_interactions[0]&&this._subscribeToInteractionViews(n,i),e.passOnEvents&&"true"===e.passOnEvents[0]&&this._subscribeToPassOnEvents(n,i)},_pushProfileValues:function(e,t){this.bcConnectionUtil.doPush(t)?this._doPush(e,t):"plc"===t.push_frequency&&this.blueConicClient.event.subscribe(this.blueConicClient.event.onProfilePermissionChange,this,(function(){this._doPush(e,t)}))},_doPush:function(e,t){var i=e.exportMapping;if(0===i.length)return!1;var n={nonInteraction:1,userId:this.profile.getId()},s=!1;if(i.forEach((function(e){var i=this.bcConnectionUtil.getVariableValue(e.from,t,!0);i&&(n[e.to.values[0].id]=i.join(","),s=!0)}),this),s){var r=this._getEventNameForGoal(e),o=this._getTrackerNameForGoal(e);this._pushUA(o,r,"Profile",n)}return s},_createConnectionContext:function(e){var t={LAST_PUSH_PROPERTY:this._LAST_PUSH_PROPERTY+"_"+e.id,VARIABLE_STATE_PUSH_PROPERTY:this._VARIABLE_STATE_PUSH_PROPERTY+"_"+e.id,profile:this.profile,push_frequency:e.push_frequency&&e.push_frequency[0]?e.push_frequency[0]:null,variables:i,SENT_TO_SYSTEM_PROPERTY:this.SENT_TO_SYSTEM_PROPERTY,SENT_TO_CONNECTION_PROPERTY:this.SENT_TO_CONNECTION_PROPERTY},i=[];return e.exportMapping.forEach((function(e){var n=e.from;this.bcConnectionUtil.getVariableValue(n,t)&&(n.key=e.to.values[0].id,i.push(n))})),t.variables=i,t},_getEventNameForGoal:function(e){return e.eventname&&e.eventname[0]||this.DEFAULT_EVENT_NAME},_getTrackerNameForGoal:function(e){return e.trackerName&&e.trackerName[0]?e.trackerName[0]+".":""},_subscribeToInteractionViews:function(e,t){this.blueConicClient.event.subscribe("VIEW",this,this._pushInteractionViews.bind(this,e,t))},_pushUA:function(e,t,i,n,s){window[this.objectName](e+"send","event",t,i,n,s),this._syncProperties()},_pushInteractionViews:function(e,t){this.blueConicClient.getInteractions().map((function(e){return e.variantName?e.name+" / "+e.variantName:e.name})).forEach((function(i){this._pushUA(e,t,"Interaction View",i,{nonInteraction:1,userId:this.profile.getId()})}),this)},_subscribeToPassOnEvents:function(e,t){this.blueConicClient.event.subscribe("inactivity",this,this.onEventPublished.bind(this,e,t,"Inactivity")),this.blueConicClient.event.subscribe("exitintent",this,this.onEventPublished.bind(this,e,t,"Exit Intent")),this.blueConicClient.event.subscribe("cm_firstview",this,this.onEventPublished.bind(this,e,t,"Content Meter View 1")),this.blueConicClient.event.subscribe("cm_exceeded",this,this.onEventPublished.bind(this,e,t,"Content Meter View Content Meter Exceeded"));for(var i=2;i<10;i++)this.blueConicClient.event.subscribe("cm_view_"+i,this,(function(i){var n=i.split("_")[2];this.onEventPublished(e,t,"Content Meter View "+n)}))},onEventPublished:function(e,t,i){var n={nonInteraction:1,userId:this.profile.getId()};this._pushUA(e,t,i,n)},_syncProperties:function(){this._hasSynchronized||(this.bcConnectionUtil.setSyncProperties(this.context,this.profile,[this.SENT_TO_SYSTEM_PROPERTY,this.SENT_TO_CONNECTION_PROPERTY]),this._hasSynchronized=!0)},_migrateParameters:function(e){return e.goalParameters?e:this._migrateToV2(e)},_migrateToV2:function(e){var getValue=function(t,i){return e[t]||i},t=[],i=getValue("dimensions");(i&&i[0]?JSON.parse(i[0]):[]).forEach((function(e){var i={id:e.id,from:{type:"pm"===e.type?"permission":e.type,property:e.property,segments:e.segments,fieldLabel:"text"===e.type?e.text:undefined,fieldId:e.text},to:{type:"text",fieldLabel:"Dimension "+e.index,fieldId:"dimension"+e.index},mergeRule:"set"};t.push(i)}));var n=getValue("profileproperties"),s={exportSegment:[""],exportMapping:[this.blueConicClient.json.stringify(t)],properties_out:Array.isArray(n)?n:[n],segments:[],push_frequency:getValue("push_frequency")||[""],triggerEvent:getValue("triggerEvent")||[""],eventname:[this.DEFAULT_EVENT_NAME],push_interactions:["true"],passOnEvents:["false"],saved:["true"]};return{trackerName:[getValue("custom_tracker")||this.DEFAULT_TRACKER_NAME],goalParameters:[JSON.stringify({id:"1",type:"export",name:"Export data into Universal Analytics",active:!0,parameters:s})]}}});var a = [];var i='uaconnection';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.4/'}]);})();})(blueConicClient);