(function( blueConic, undefined ) {var p='http://plugins.blueconic.net/';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 ARTICLE="article",PRODUCT="product",EVENT_SHOPPING_CART="shoppingcart",EVENT_ORDER="order",InteractionTypeImpl=InteractionType.extend({init:function(t,e){this.blueConicClient=t,this.context=e,this.profile=this.context.getProfile();var i=this.context.getParameters();this.storeId=i.storeId&&i.storeId[0]||null,this.metadata=i.metadata&&i.metadata[0]||null,this.requiredOptionSet=i.requiredOptionSet&&"true"===i.requiredOptionSet[0],this.type="connection_content_collector"===this.context.getInteractionTypeId()?ARTICLE:PRODUCT,this._initProductProperties(i)},_initProductProperties:function(t){this.type===PRODUCT&&(t.lastCartUpdateProperty&&t.lastCartUpdateProperty[0]&&(this.lastCartUpdateProperty=t.lastCartUpdateProperty[0]),t.nrProductsInCartProperty&&t.nrProductsInCartProperty[0]&&(this.nrProductsInCartProperty=t.nrProductsInCartProperty[0]),this._subscribeToShoppingEvents())},_subscribeToShoppingEvents:function(){this.blueConicClient.event.subscribe(EVENT_SHOPPING_CART,this,this._handleShoppingEvent),this.blueConicClient.event.subscribe(EVENT_ORDER,this,this._handleShoppingEvent)},_updateShoppingcartItems:function(t){this.blueConicClient.recommendation.createEvent({storeId:this.storeId,action:EVENT_SHOPPING_CART,itemId:t,profileId:this.profile.getId()}),this.nrProductsInCartProperty&&this._storeItemsInShoppingCart(t),this.lastCartUpdateProperty&&this._storeCurrentDateAsLastCartUpdate(),(this.nrProductsInCartProperty||this.lastCartUpdateProperty)&&this.blueConicClient.profile.updateProfile()},_storeItemsInShoppingCart:function(t){this.profile.setValue(this.nrProductsInCartProperty,t.length)},_storeCurrentDateAsLastCartUpdate:function(){this.profile.setValue(this.lastCartUpdateProperty,this.blueConicClient.getCurrentDate().getTime())},_updateBoughtItems:function(t){this.blueConicClient.recommendation.createEvent({storeId:this.storeId,action:EVENT_ORDER,itemId:t,profileId:this.profile.getId()})},_handleShoppingEvent:function(t,e){if(e&&e.productIds&&(!e.storeId||e.storeId===this.storeId)){var i=this.blueConicClient.util.array.ensureArray(e.productIds);t===EVENT_SHOPPING_CART?this._updateShoppingcartItems(i):t===EVENT_ORDER&&(this._updateBoughtItems(i),this._updateShoppingcartItems([]))}},_isValidItem:function(t,e,i){if(!t.itemId)return this.blueConicClient.util.log("Item will not be scraped due to missing item ID"),!1;if(!t.name)return this.blueConicClient.util.log("Item will not be scraped due to missing name"),!1;if(!t.url)return this.blueConicClient.util.log("Item will not be scraped due to missing URL"),!1;if(!/^https?:\/\//.test(t.url))return this.blueConicClient.util.log("Item will not be scraped due to invalid URL: "+t.url),!1;if(t.pageType!==this.type)return this.blueConicClient.util.log("Item will not be scraped due to incorrect type: "+t.pageType+" !== "+this.type),!1;if(this.type===ARTICLE&&!t.publicationDate)return this.blueConicClient.util.log("Item will not be scraped due to missing publication date"),!1;if(this.requiredOptionSet)for(var r=["id","url","name","type","publicationDate"],n=0;n<i.length;n++)if(i[n].required&&-1===r.indexOf(i[n].fieldId)){var o=e.getFieldValue(i[n]);if(null==o||0===o.length)return this.blueConicClient.util.log("Item will not be scraped due to missing value for required field: "+i[n].fieldId),!1}return!0},onLoad:function(){if(this.storeId){var t=this.metadata?this.blueConicClient.json.parse(this.metadata):null,e=new window.BlueConicMetaDataService(this.jQuery,t,this.type,document.location.href);e.blueConicClient=this.blueConicClient;var i=e.getItemData(t);if(this._isValidItem(i,e,t)){var r=this._makeMetaDataHash(e,t);this._handleView(i.itemId,i.url,r,e)}this._check404Page(i.itemId,i.url||window.location.protocol+"//"+window.location.host+window.location.pathname)}},_handleView:function(t,e,i,r){this.referrer=document.referrer;var n=this.referrer.replace(/http[s]?:\/\/(.*?)(:|\?|\/|$).*/,"$1"),o=window.location.hostname,s={storeId:this.storeId,action:"view",itemId:t,url:e,profileId:this.profile.getId(),isEntrypage:n!==o,hash:i},a=r.getLastModifiedInMs();a&&(s.lastmodified=a),this.blueConicClient.recommendation.createEvent(s)},_makeMetaDataHash:function(t,e){var i=t.getMetaDataValues(e);return this.md5(this.blueConicClient.json.stringify(i))},_check404Page:function(t,e){if(t){var i=[];document.querySelector("title")&&i.push(document.querySelector("title").textContent),document.querySelector('meta[property="description"]')&&i.push(document.querySelector('meta[property="description"]').getAttribute("content")),document.querySelector('meta[property="og:title"]')&&i.push(document.querySelector('meta[property="og:title"]').getAttribute("content")),document.querySelector("h1")&&i.push(document.querySelector("h1").textContent);for(var r=["not found","404","niet gevonden","sorry","probleem"],n=!1,o=this.storeId,s=0;s<i.length;s++){var a=i[s];if(a)for(var l=0;l<r.length;l++){var u=r[l]||"";if(-1!==a.toLowerCase().indexOf(u)){n=!0;break}}}if(n&&t){var handle404=function(){this.blueConicClient.recommendation.createEvent({itemId:t,url:t,storeId:o,lastmodified:(new Date).getTime()})},d=new XMLHttpRequest;d.onreadystatechange=function(){4===d.readyState&&404===d.status&&handle404.bind(this)},d.open("HEAD",e,!0),d.send()}}}});var a = [];var i='connection_content_collector';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/3.3.0/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/3.3.0/frontend/src/lib/md5.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/3.3.0/frontend/src/node_modules/@blueconic/frontend-metadataservice/metaDataService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/3.3.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"dlpf",BLUECONIC_EVENT_PREFIX:":",init:function(t,e){this.blueConicClient=t,this.context=e||null,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.objectName=this.parameters.objectname?this.parameters.objectname[0]:this.parameters.objectname,this._goals=[];var a=e.getGoals().reduce((function(t,e){return t[e.getId()]=!0,t}),{});if(this.parameters.goalParameters)for(var i=0;i<this.parameters.goalParameters.length;i++){var n=t.json.parse(this.parameters.goalParameters[i]);n.active&&a[n.id]&&this._goals.push(n)}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 t=this,e=0;"true"!==(this.parameters.createDatalayer?this.parameters.createDatalayer[0]:this.parameters.createDatalayer)||window[this.objectName]||(window[this.objectName]={}),function dataLayerReady(){if(t._bcDatalayerUtil.getDataLayer())t._handleGoals();else{if(e>20)return;e++,window.setTimeout(dataLayerReady,250)}}.call(this)},_handleGoals:function(){for(var t=0;t<this._goals.length;t++){var e=this._goals[t],a=e.parameters.segment?e.parameters.segment[0]:null;this._bcDatalayerUtil.visitorInSegment(a)&&("export"===e.type&&this._handleExportGoal(e.parameters,e.id),"import"===e.type&&this._handleImportGoal(e.parameters))}},_handleImportGoal:function(t){this._bcDatalayerUtil.getDataLayer()&&this._bcDatalayerUtil.doImport(t)},_handleExportGoal:function(t,e){this._bcDatalayerUtil.doExport(t,e)},getPreloadProperties:function(){for(var t=[this.connectionContext.SENT_TO_SYSTEM_PROPERTY,this.connectionContext.SENT_TO_CONNECTION_PROPERTY,this.connectionContext.RECEIVED_FROM_SYSTEM_PROPERTY,this.connectionContext.RECEIVED_FROM_CONNECTION_PROPERTY],e=0;e<this._goals.length;e++){var a=this._goals[e];if("export"===a.type){t.push(this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId()+"_"+a.id),t.push(this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId()+"_"+a.id);for(var i=this.blueConicClient.json.parse(a.parameters.exportMapping),n=0;n<i.length;n++)"property"===i[n].from.dataType&&i[n].from.values.length>0&&t.push(i[n].from.values[0].id)}else for(var o=this.blueConicClient.json.parse(a.parameters.importMapping),r=0;r<o.length;r++)o[r].to.values.length>0&&t.push(o[r].to.values[0].id)}return t}});var a = [];var i='connection_datalayer';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/2.2.5/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/2.2.5/frontend/src/node_modules/@blueconic/datalayer_lib/datalayer_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/2.2.5/frontend/src/lib/jsonpath.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/2.2.5/frontend/src/lib/md5.min.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.2.5/'}]);})();(function(){ var PUSH_FREQUENCY_TYPES={ONLY:"only",PLC:"plc"},InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"tlpf",STANDARD_EVENTS:["ViewContent","Search","AddToCart","AddToWishlist","InitiateCheckout","AddPaymentInfo","Purchase","Lead","CompleteRegistration"],MIGRATED_SEGMENT_ID:"migrated-segment",SENT_TO_SYSTEM_PROPERTY:"sent_to_system",SENT_TO_CONNECTION_PROPERTY:"sent_to_connection",init:function(e,t){this.blueConicClient=e,this.context=t,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this._migrate(),this.pixelId=this.parameters.pixelId[0],this.goals=this._parseGoals(),this.segments=this.blueConicClient.getSegments()},getPreloadProperties:function(){var e=this._getFrontendGoals(this.parameters).reduce((function(e,t){var n=JSON.parse(t.parameters.exportMapping[0]).filter((function(e){return"property"===e.from.dataType&&e.from.values&&e.from.values.length>0})).map((function(e){return e.from.values[0].id}));return e.concat(n)}),[]).concat(this.goals.reduce((function(e,t){return e.push(t.context.LAST_PUSH_PROPERTY),e.push(t.context.VARIABLE_STATE_PUSH_PROPERTY),e}),[]));return e.push(this.SENT_TO_CONNECTION_PROPERTY),e.push(this.SENT_TO_SYSTEM_PROPERTY),e},onLoad:function(){if(0!==this.goals.length&&this.pixelId){this._addVariablesToGoals(),this._createFacebookScript(),window.fbq("init",this.pixelId);for(var e=0;e<this.goals.length;e++)this._handleGoal(this.goals[e].goal,this.goals[e].context)}},_addVariablesToGoals:function(){this.goals.forEach((function(e){var t=[];e.goal.exportMapping.forEach((function(n){if(e.goal.pushFrequency===PUSH_FREQUENCY_TYPES.ONLY){var i=n.from;this.bcConnectionUtil.getVariableValue(i,e.context)&&(i.key=n.to.values[0].id,t.push(i))}})),e.context.variables=t}))},_parseGoals:function(){var e=this._getFrontendGoals(this.parameters);if(0===e.length||!this.pixelId)return[];for(var t=[],n=0;n<e.length;n++)if(this._shouldGoalExecute(e[n])){var i=this._parseGoal(e[n]);t.push({goal:i,context:this._createGoalContext(i)})}return t},_getFrontendGoals:function(e){return e.frontendGoals.map(JSON.parse)},_createFacebookScript:function(){var e,t,n,i,r,a;e=window,t=document,n="script",e.fbq||(i=e.fbq=function(){i.callMethod?i.callMethod.apply(i,arguments):i.queue.push(arguments)},e._fbq||(e._fbq=i),i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],(r=t.createElement(n)).async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",(a=t.getElementsByTagName(n)[0]).parentNode.insertBefore(r,a))},_parseGoal:function(e){var t=e.parameters;return t.exportMapping=JSON.parse(this._getValue("exportMapping",t)),t.pushFrequency=this._getValue("pushFrequency",t),t.exportSegment=this._getValue("exportSegment",t),t.eventName=this._getValue("eventName",t),t.events=[],t.triggerEvent&&t.events.push(t.triggerEvent),t.pushFrequency===PUSH_FREQUENCY_TYPES.PLC&&t.events.push(this.blueConicClient.event.onProfilePermissionChange),t},_getValue:function(e,t){return t[e]&&t[e][0]||null},_getValues:function(e,t){return t[e]?t[e]:[]},_handleGoal:function(e,t){if(!1!==this._validSegment(e.exportSegment)){var n=this;e.events.forEach((function(i){n.blueConicClient.event.subscribe(i,n,(function(){setTimeout((function(){n.profile.loadValues(n.preloadProperties,n,(function(){n._pushGoalData(e,t)}))}),200)}))})),this.bcConnectionUtil.doPush(t)&&this._pushGoalData(e,t)}},_pushGoalData:function(e,t){for(var n={},i=!1,r=0;r<e.exportMapping.length;r++){var a=e.exportMapping[r];if(a.from){var s=this.bcConnectionUtil.getVariableValue(a.from,t,!0).filter((function(e){return null!==e&&e!==undefined}));s&&s.length>0&&(n[a.to.values[0].id]=1===s.length?s[0]:s,i=!0)}}if(i){var o=e.eventName||"BlueConic";this._isStandardEvent(o)?window.fbq("track",o,n):window.fbq("trackCustom",o,n),this.bcConnectionUtil.setSyncProperties(this.context,this.profile,[this.SENT_TO_SYSTEM_PROPERTY,this.SENT_TO_CONNECTION_PROPERTY])}},_validSegment:function(e){if(e===this.MIGRATED_SEGMENT_ID)return!0;for(var t=0;t<this.segments.length;t++)if(this.segments[t].id===e)return!0;return!1},_createGoalContext:function(e){return{LAST_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),VARIABLE_STATE_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId(),push_frequency:e.pushFrequency||null,profile:this.profile,variables:[]}},_shouldGoalExecute:function(e){return this.context.getGoals().some((function(t){return t.getId()===e.id}))},_isStandardEvent:function(e){for(var t=0;t<this.STANDARD_EVENTS.length;t++)if(e===this.STANDARD_EVENTS[t])return!0;return!1},_migrate:function(){(this.parameters.version&&this.parameters.version[0]?parseInt(this.parameters.version[0]):1)<3&&this._migrateToV3()},_migrateToV3:function(){var e=this.parameters.eventName,t=this.parameters.push_frequency,n=JSON.parse(this.parameters.variables).map((function(e){return{from:{typeId:e.type,values:[{id:e.property}]},to:{typeId:"text",dataType:"text",values:[{id:e.key}]}}}));this.parameters.frontendGoals=[],this.parameters.frontendGoals.push(JSON.stringify({id:"migrated-goal-"+Math.round(1e3*Math.random()),active:!0,type:"export-pixel",parameters:{exportMapping:[JSON.stringify(n)],eventName:e,triggerEvent:null,pushFrequency:t,exportSegment:[this.MIGRATED_SEGMENT_ID]}}))}});var a = [];var i='connection_facebook_ads';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/4.5.0/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/4.5.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"tlpf",SCRIPT_URL:"https://snap.licdn.com/li.lms-analytics/insight.min.js",init:function(a,b){this.blueConicClient=a,this.context=b,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.pixelId=this._getValue("pixelId",this.parameters),this.segments=this.blueConicClient.getSegments(),this.goals=this._parseGoals()},onLoad:function(){0!==this.goals.length&&this.pixelId&&this.goals.forEach(function(a){this._handleGoal(a.goal,a.context)},this)},_parseGoals:function(){var a=this._getFrontendGoals(this.parameters);if(0===a.length||!this.pixelId)return[];for(var b,c=[],d=0;d<a.length;d++)b=this._parseGoal(a[d]),c.push({goal:b,context:this._createGoalContext(b)});return c},_getFrontendGoals:function(a){return a.frontendGoals.map(JSON.parse)},_parseGoal:function(a){var b=a.parameters;return b.pushFrequency=this._getValue("pushFrequency",b),b.exportSegment=this._getValue("exportSegment",b),b},_getValue:function(a,b){return b[a]?b[a][0]||null:null},_handleGoal:function(a,b){!1===this._validSegment(a.exportSegment)||this.bcConnectionUtil.doPush(b)&&this._pushGoalData()},_pushGoalData:function(){this.pixelId&&(window._linkedin_data_partner_id=this.pixelId,this.blueConicClient.util.loadScript(this.SCRIPT_URL,this,function(){this.bcConnectionUtil.setSyncProperties(this.context,this.profile,["sent_to_system","sent_to_connection"])}))},_validSegment:function(a){for(var b=0;b<this.segments.length;b++)if(this.segments[b].id===a)return!0;return!1},_createGoalContext:function(a){return{LAST_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),push_frequency:a.pushFrequency||null,profile:this.profile}}});var a = [];var i='connection_linkedin_insight_tag';a.push({url: '/plugins/connection_linkedin_insight_tag/js/connection_lib/connection_lib.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/connection_linkedin_insight_tag/ts_a7fe2a1f97cd4c6b4cfdf59df68dbb45/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({PF_PROPERTY_PREFIX:"tlpf",EMAIL:"em",init:function(a,b){this.blueConicClient=a,this.context=b,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.pixelId=this._getValue("pixelId",this.parameters),this.segments=this.blueConicClient.getSegments(),this.goals=this._parseGoals()},onLoad:function(){0!==this.goals.length&&this.pixelId&&this._handleGoal(this.goals[0].goal,this.goals[0].context)},_parseGoals:function(){var a=this._getFrontendGoals(this.parameters);if(0===a.length||!this.pixelId)return[];for(var b,c=[],d=0;d<a.length;d++)b=this._parseGoal(a[d]),c.push({goal:b,context:this._createGoalContext(b)});return c},_getFrontendGoals:function(a){return a.frontendGoals.map(JSON.parse)},_createTwitterScript:function(){!function(g,d,e,f,a,b){g.twq||(f=g.twq=function(){f.exe?f.exe.apply(f,arguments):f.queue.push(arguments)},f.version="1.1",f.queue=[],a=d.createElement(e),a.async=!0,a.src="//static.ads-twitter.com/uwt.js",b=d.getElementsByTagName(e)[0],b.parentNode.insertBefore(a,b))}(window,document,"script")},_parseGoal:function(a){var b=a.parameters;return b.pushFrequency=this._getValue("pushFrequency",b),b.exportSegment=this._getValue("exportSegment",b),b},_getValue:function(a,b){return b[a]?b[a][0]||null:null},_handleGoal:function(a,b){!1===this._validSegment(a.exportSegment)||this.bcConnectionUtil.doPush(b)&&(this._createTwitterScript(),this._pushGoalData())},_pushGoalData:function(){this.pixelId&&(window.twq("init",this.pixelId),window.twq("track","PageView"),this.bcConnectionUtil.setSyncProperties(this.context,this.profile,["sent_to_system","sent_to_connection"]))},_validSegment:function(a){for(var b=0;b<this.segments.length;b++)if(this.segments[b].id===a)return!0;return!1},_createGoalContext:function(a){return{LAST_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"lt"+this.context.getInteractionId(),VARIABLE_STATE_PUSH_PROPERTY:this.PF_PROPERTY_PREFIX+"st"+this.context.getInteractionId(),push_frequency:a.pushFrequency||null,profile:this.profile}}});var a = [];var i='connection_twitter_ads';a.push({url: '/plugins/connection_twitter_ads/js/connection_lib/connection_lib.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/connection_twitter_ads/ts_7b6b807ab252be3153fb13f0ea63b9c5/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(e,t){this.blueConicClient=e,this.context=t||null,this.parameters=this.context.getParameters(),this.profile=e.profile.getProfile(),this.isInEditMode=e.isInEditMode(),this._createdElements=[],this.parameters&&this.parameters.content&&(this._fragment=this._createFragment(this.parameters.content))},_createFragment:function(e){var t=document.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("div"),i=0;i<n.length;i++)n[i].getAttribute("data-bc-external")&&(n[i].innerHTML="");return t},onLoad:function(){if(this.element=this.context.getDOMElement(),this.element){window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery;var e=this.element.cloneNode(!0),t=this;this.loadInteraction((function(n,i){if(n)return console.error("[BC] Content interaction couldn't be loaded because of the following error(s)",n),void(t.isInEditMode||(console.error("[BC] The element will be restored to it's previous content"),t._createdElements.forEach((function(e){e.remove()})),t.element.replaceWith?t.element.replaceWith(e):t.element.innerHTML=e.innerHTML));t._createdElements=i.createdElements,t.isInEditMode?t.blueConicClient.event.publish("contentinteractiontype.interactionLoaded",{interaction:t}):t.blueConicClient.createEvent("VIEW",t.context.getInteractionId())}))}},loadInteraction:function(e,t){var n="boolean"!=typeof(t=t||{}).loadContent||t.loadContent,i=window._bcp.interactionUtil,r=this.getValue("content");r||(r=this.element.innerHTML);var l=[];n&&l.push(i.createContentHandler({content:r,interactionId:this.context.getInteractionId(),bcEvent:this.blueConicClient.event,isInEditMode:this.isInEditMode,jQuery:this.jQuery})),l.push(i.createCssHandler({cssUrl:this.getValue("styling_css")}),i.createAdvancedHandler({blueConicClient:this.blueConicClient,interactionId:this.context.getInteractionId(),clickEventSelector:this.getValue("click_event_selector"),jQuery:this.jQuery}),i.createJavaScriptHandler({interactionId:this.context.getInteractionId(),javaScriptUrls:this.getValues("javascript_urls"),inlineJavaScript:this.getValue("javascript"),isInEditMode:this.isInEditMode})),i.runHandlers(this.element,l,e)},getPreloadProperties:function(){for(var e,t=this.context.getParameters().content+"",n=/data-bc-preload="([^"]*)"/g,i=[];null!==(e=n.exec(t));)for(var r=e[1].split(","),l=0;l<r.length;l++)i.push(r[l]);return i||[]},getContent:function(){return this.loadInlineStyling(),this._fragment?this._fragment.innerHTML:null},loadInlineStyling:function(){var e=this.getValue("styling_css_inline");e?(this._inlineStylingElement||(this._inlineStylingElement=document.createElement("style"),document.head.appendChild(this._inlineStylingElement),this._createdElements.push(this._inlineStylingElement)),this._inlineStylingElement.innerHTML=e):this._inlineStylingElement&&(this._inlineStylingElement.remove(),this._inlineStylingElement=null)},onMessageReceived:function(e){this.blueConicClient.event.publish("contentinteractiontype.messageReceived",e)},getValue:function(e){return this.parameters[e]&&this.parameters[e][0]?this.parameters[e][0]:null},getValues:function(e){return this.parameters[e]||[]}});var a = [];var i='contentinteractiontype';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.1/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.1/frontend/src/scripts/handlerUtil.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.1/frontend/src/scripts/handleCss.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.1/frontend/src/scripts/handleContent.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.1/frontend/src/scripts/handleJavaScript.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.1/frontend/src/scripts/handleAdvanced.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.1/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({html:{nl:{content:'<div class="bcCSContent">Plaats hier uw content</div>'},"default":{content:'<div class="bcCSContent">Place your content here</div>'}},init:function(a,b){this.blueConicClient=a,this.context=b?b:null,this.profile=a.profile.getProfile(),this.element=this.context.getDOMElement(),this.identifier='bc_'+this.context.getInteractionId(),this.parameters=this.context.getParameters(),this.currentInsertType=this.parameters.inserttype&&this.parameters.inserttype[0]?this.parameters.inserttype[0]:'replace','replacecontainer'!==this.currentInsertType||document.getElementById(this.identifier)||this._hidePosition();var c=this.parameters.content+'';this.htmlFragment=this.createElement(c),this.lastEvent=null,this._inlineCss=null},getPreloadProperties:function(){return this.htmlFragment?this._getPropertiesFromPlaceholders(this.htmlFragment.innerHTML):[]},getContent:function(){return this.htmlFragment?(this.element||(this.element=this.context.getDOMElement()),'replace'===this.currentInsertType)?(this.emptyElementsWithAttribute(this.htmlFragment,'div','data-bc-external'),this.htmlFragment.innerHTML):void 0:null},onUpdate:function(){this.currentInsertType!==this.context.getParameters().inserttype[0]&&document.location.reload()},onLoad:function(){this.currentInsertType&&this._placeContent()},_hidePosition:function(){this.styleIdentifier='bcCS'+this.context.getInteractionId();var a=this.context.getPosition()+' {opacity: 0 !important}',b=document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0],c=document.createElement('style');c.type='text/css',c.id=this.styleIdentifier,c.styleSheet?c.styleSheet.cssText=a:c.innerHTML=a,b.appendChild(c)},_showPosition:function(){this.jQuery('#'+this.styleIdentifier).remove()},_placeContent:function(){var a=this.element||this.context.getDOMElement();if(a){if(this.handleStyling(),this.blueConicClient.isInEditMode()||this.handleURLs(this.htmlFragment),'replace'===this.currentInsertType){this.assureVisibilty(a);var b=this.getContent();if(!b)return;this.blueConicClient.isInEditMode()||this.blueConicClient.createEvent('VIEW',this.context.getInteractionId());var c=a.nodeName?a.nodeName.toLowerCase():a.nodeName;if(-1===this.blueConicClient.util.array.indexOfArray(['area','base','br','col','command','embed','hr','img','input','keygen','link','meta','param','source','track','wbr'],c))this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?a.innerHTML!==b&&(a.innerHTML=b):this.jQuery(a).html(b);else if(a.parentNode){var d=a.parentNode.innerHTML,e=document.createElement('div');e.appendChild(a.cloneNode(!0));var f=e.innerHTML,g=d.replace(f,b);a.parentNode.innerHTML!==g&&(a.parentNode.innerHTML=g)}this.handleComplexObjects(a)}else if(this.htmlFragment){this.emptyElementsWithAttribute(this.htmlFragment,'div','data-bc-external');var h=this._setContent();h&&!this.blueConicClient.isInEditMode()&&this.blueConicClient.createEvent('VIEW',this.context.getInteractionId())}if(!this.blueConicClient.isInEditMode()){var i=this.parameters.clickselector&&this.parameters.clickselector[0]?this.parameters.clickselector[0]:'';if(i){this.jQuery('body').one('click',i,this.jQuery.proxy(function(a){this.lastEvent&&this.lastEvent.originalEvent===a.originalEvent||this._logClickEvent(a)},this));try{this.jQuery(i).one('click',this.jQuery.proxy(function(a){this.lastEvent=a,this._logClickEvent(a)},this))}catch(a){}}var j=!!this.parameters.forceclick&&('true'===this.parameters.forceclick[0]||!0===this.parameters.forceclick[0]);j&&this.blueConicClient.createEvent('CLICK',this.context.getInteractionId());var k=this.parameters.javascript&&this.parameters.javascript[0]?this.parameters.javascript[0]:'';if(k)try{k=k.replace(/(^|\W)blueConicVariantId(\W|$)/,'$1"'+this.context.getInteractionId()+'"$2'),this.jQuery('<script>'+k+'</script>').appendTo(this.jQuery('body'))}catch(a){console.error(a)}}}},_logClickEvent:function(a){if(!(a&&a.originalEvent&&a.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId())){var b=a&&a.target&&a.target.pathname&&a.target.hostname&&0===a.target.pathname.indexOf('/s/')&&-1!==a.target.hostname.indexOf('blueconic');b||(a.originalEvent&&(a.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent('CLICK',this.context.getInteractionId()))}},_setContent:function(){var a=this._getElementByPosition(this.context.getPosition());if(a){var b=a.parent().get(0),c=this.jQuery('[data-bc-id="'+this.identifier+'"],#'+this.identifier);if(0<c.length)return this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?!1:(c.replaceWith(this.htmlFragment.innerHTML),this.handleComplexObjects(b),'prepend'===this.currentInsertType?a.prev().attr('data-bc-id',this.identifier):'append'===this.currentInsertType&&a.next().attr('data-bc-id',this.identifier),!0);if('prepend'===this.currentInsertType){var d=a.prev();if(0<d.length&&d.attr('data-bc-id')===this.identifier)return!1;if(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode())a.get(0).parentNode.insertBefore(this.htmlFragment,a.get(0)),this.blueConicClient.functions.setEditableNode('#bc_'+this.context.getInteractionId(),{positionName:'prepend',lockPosition:!0,redrawPosition:!0});else{a.before(this.htmlFragment.innerHTML);var e=a.prev();e.attr('data-bc-id',this.identifier)}}if('append'===this.currentInsertType){var f=a.next();if(0<f.length&&f.attr('data-bc-id')===this.identifier)return!1;if(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode())a.get(0).parentNode.insertBefore(this.htmlFragment,a.get(0).nextSibling),this.blueConicClient.functions.setEditableNode('#bc_'+this.context.getInteractionId(),{positionName:'append',lockPosition:!0,redrawPosition:!0});else{a.after(this.htmlFragment.innerHTML);var g=a.next();g.attr('data-bc-id',this.identifier)}}return'replacecontainer'===this.currentInsertType&&(this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()?(a.get(0).parentNode.replaceChild(this.htmlFragment,a.get(0)),this.blueConicClient.functions.setEditableNode('#bc_'+this.context.getInteractionId(),{positionName:'replace container',lockPosition:!0,redrawPosition:!0})):a.replaceWith(this.htmlFragment.innerHTML),this._showPosition()),this.blueConicClient.isInEditMode()&&null===this.context.getInteractionId()&&setTimeout(function(){window.blueConicClient.fn.postMessage('onOpenEditMode',window.blueConicClient.positionHandlers[0])},500),this.handleComplexObjects(b),!0}},_getElementByPosition:function(a){var b=document.getElementById(a);return b=b?this.jQuery(b):this.jQuery(a),b},createElement:function(a){var b;if(!a)if(this.blueConicClient.isInEditMode()&&('prepend'===this.currentInsertType||'append'===this.currentInsertType)){var c='nl'===this.context.getLocale()?'nl':'default';a=this.html[c].content}else return null;try{b=document.createElement('div'),b.id=this.identifier,b.innerHTML=a}catch(a){return null}return b},handleURLs:function(a){var b=this.parameters.newwindow&&this.parameters.newwindow[0]&&'true'===this.parameters.newwindow[0];if(b)for(var c=a.getElementsByTagName('a'),d=0,e=c.length;d<e;d++){var f=c[d],g=f.getAttribute('target');g||f.setAttribute('target','_blank')}this.handlePlaceholders(a)},assureVisibilty:function(a){this.blueConicClient.isInEditMode&&this.blueConicClient.isInEditMode()&&(a.style.minWidth='10px',a.style.minHeight='10px')},handlePlaceholders:function(a){for(var b=this._getPropertiesFromPlaceholders(a.innerHTML),c=0;c<b.length;c++){var d=b[c],e=this.profile.getValue(d)||'',f=new RegExp('\\$\\{'+d+'\\}','g');a.innerHTML=a.innerHTML.replace(f,encodeURI(e))}},_getPropertiesFromPlaceholders:function(a){for(var b,c=/\$\{([a-zA-Z\-_0-9]+)\}/g,d=[];null!==(b=c.exec(a));)d.push(b[1]);for(var e=/data-bc-preload="([^"]*)"/g,f=[];null!==(b=e.exec(a));)for(var g=b[1].split(','),h=0;h<g.length;h++)f.push(g[h]);return d.concat(f)},emptyElementsWithAttribute:function(a,b,c){for(var d,e=this.getElementsWithAttribute(a,b,c),f=0,g=e.length;f<g;f++)d=e[f],d.innerHTML=''},getElementsWithAttribute:function(a,b,c){for(var d,e=[],f=a.getElementsByTagName(b),g=0,h=f.length;g<h;g++)d=f[g],d.getAttribute(c)&&e.push(d);return e},handleComplexObjects:function(a){for(var b=this.getElementsWithAttribute(a,'div','data-bc-pluginid'),c=0;c<b.length;c++){var d=b[c],e=d.getAttribute('data-bc-pluginid'),f=d.getAttribute('data-bc-config');if(f)try{var g=f.replace(/\n/g,'\\\\n').replace(/\r/g,'\\\\r').replace(/\t/g,'\\\\t');f=this.blueConicClient.json.parse(g)}catch(a){f=null}this.blueConicClient.event.publish('bcComplexObject',{plugin:e,config:f,node:d,interactionId:this.context.getInteractionId()}),this.blueConicClient.isInEditMode()||(d.removeAttribute('data-bc-pluginid'),d.removeAttribute('data-bc-config'))}},handleStyling:function(){var a=this.parameters.styling_css_inline&&this.parameters.styling_css_inline[0]?this.parameters.styling_css_inline[0]:'';if(a){var b=a.replace(/&#xd;/gi,'');this.inlineCss=this.jQuery('<style>'+b+'</style>'),this.inlineCss.appendTo(this.jQuery('body'))}},onMessageReceived:function(a){a.parameters&&(this.parameters=a.parameters),'updateStyling'===a.action&&(this.inlineCss&&this.inlineCss.remove(),this.handleStyling())}});var a = [];var i='contentinteractiontypespecial';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/contentinteractiontypespecial/ts_ac3f76a2feab05e9835ed410d1a415f5/'},{ id : 'boolean', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'boolean/1.0.1/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(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(e,t){this.blueConicClient=e,this.context=t},onLoad:function(){var e=this.blueConicClient,t=this.context.getParameters(),n=this.jQuery;if(t){var r=(t.clickcandidates||[]).map(JSON.parse).map(_updateSelectorCandidate),a=(t.contentcandidates||[]).map(JSON.parse).map(_updateSelectorCandidate),i={},o={},c={};r.forEach((function(e){candidateChecker(e,registerClickHandlers)})),a.forEach((function(e){candidateChecker(e,checkContentHandler)}))}function candidateChecker(t,n){var handler=function(){n(t);var r=o[t.interactionId],a=c[t.selecterarea];r||a||e.position.subscribe(t.selecterarea,null,handler)};e.position.subscribe(t.selecterarea,null,handler),n(t)}function registerClickHandlers(e){for(var t=getHandler(e),r=n(e.selecterarea),a=0,i=r.length;a<i;a++)r[a].addEventListener("click",t,{once:!0})}function checkContentHandler(e){isContentConversionMomentMet(e)&&getHandler(e)()}function isContentConversionMomentMet(e){if(o[e.interactionId])return!1;for(var t=n(e.selecterarea),r=0,a=t.length;r<a;r++)if(_textContains(t[r].textContent,e.words))return!0;return!1}function getHandler(t){return i[t.interactionId]||(i[t.interactionId]=function(i,l){var s=o[i],u=c[t.selecterarea];if(!s&&!u){var d=[];d=(d=l instanceof MouseEvent?r.filter((function(e){var t=!o[e.interactionId],r=n(e.selecterarea).is(event.target),a=n(e.selecterarea).find(event.target).length>0;return t&&(r||a)})):a.filter((function(e){return isContentConversionMomentMet(e)}))).filter((function(e){return e.interactionId!==t.interactionId})),c[t.selecterarea]=!0,c[t.interactionId]=!0,d.forEach((function(e){c[e.selecterarea]=!0,o[e.interactionId]=!0}));var f=d.map((function(e){return e.interactionId}));e.createEvent("CONVERSION",i,null,(function(){e.util.log("CONVERSION event registered. Interaction: ["+i+"]")}),{losingInteractions:f})}}.bind(null,t.interactionId)),i[t.interactionId]}function _textContains(e,t){if(!e||!Array.isArray(t))return!1;var n=t.filter((function(e){return Boolean(e)&&"pre_any"!==e})).map((function(e){return e.trim().toLowerCase()}));if(0===n.length)return!0;for(var r=e.toLowerCase(),a=0,i=n.length;a<i;a++)if(r.indexOf(n[a])>=0)return!0;return!1}function _updateSelectorCandidate(e){var t=e.selecterarea;return/^pre_any/.test(t)?t="html":/^pre_header/.test(t)?t="h1, h2, h3, h4, h5, h6":/^pre_/.test(t)&&(t=t.replace(/^pre_/,"")),e.selecterarea=t,e}}});var a = [];var i='conversionlistenerinteractiontype';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.1.9/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.9/'}]);})();(function(){ !function(){var t=null,e=null,i=null,n=null,o=null;window.InteractionTypeImpl=InteractionType.extend({init:function(t,e){this.blueConicClient=t,this.context=e,this.parameters=this.context.getParameters(),this.customCssElements=[],this.customJsElements=[],this.isInEditMode=this.blueConicClient.isInEditMode(),this._temporyLocation=null,this._contentElement=null,this._openedOnce=!1,this._resetTimeoutId=0,this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId())},onLoad:function(){t=window._bcp.notificationBar.Enums.FLOW_TYPE,e=window._bcp.notificationBar.Enums.POSITION,i=window._bcp.notificationBar.Enums.ENTER_ANIMATION,n=window._bcp.notificationBar.Enums.APPEAR_ON,o=window._bcp.notificationBar.Enums.CLOSE_POSITION,this.parseParameters(),this.isInEditMode&&(window._bcp.notificationBar.NotificationBar.prototype.close=function(){});var r=this;this.loadCustomContent(function(t){if(t)return r.blueConicClient.util.log(t.message);r.addBlueConicEventHandlers()})},parseParameters:function(){this.notificationBarHeight=parseInt(this.getParameter("height")),this.notificationBarHeight=isNaN(this.notificationBarHeight)?window._bcp.notificationBar.Constants.DEFAULT_HEIGHT:this.notificationBarHeight;var r=this.getParameter("location")||"top";this._position="top"===r?e.TOP:e.BOTTOM;var a=this.getParameter("close_position");if(this._closePosition="TOP_LEFT"===a?o.TOP_LEFT:"BOTTOM_RIGHT"===a?o.BOTTOM_RIGHT:o.TOP_RIGHT,this._closePadding=parseInt(this.getParameter("close_padding")),this._closePadding=isNaN(this._closePadding)?10:this._closePadding,void 0===document.body.style.animationName||!0===this.isInEditMode)this._enterAnimation=i.NONE;else switch(this.getParameter("effect")){case"slideIn":this._enterAnimation=i.SLIDE_IN;break;case"fadeIn":this._enterAnimation=i.FADE_IN;break;default:this._enterAnimation=i.NONE}var s=this.getParameters("selected_when");this._appearOnTriggers=[];for(var c=0;c<s.length;c++)switch(s[c]){case"triggerOn":this._appearOnTriggers.push(n.SCROLL_EVENT);break;case"scroll_depth":this._appearOnTriggers.push(n.SCROLL_DEPTH);break;case"click_selector":this._appearOnTriggers.push(n.ELEMENT_CLICKED);break;case"content_condition":this._appearOnTriggers.push(n.CONTENT_VISIBLE)}0===this._appearOnTriggers.length&&this._appearOnTriggers.push(n.PAGE_LOAD);var l=this.getParameter("location_type");this._type="scroll"===l?t.NON_STICKY:t.STICKY},addBlueConicEventHandlers:function(){this.blueConicClient.event.subscribe("closeoverlay",this,function(t,e){e instanceof Array&&e[0]===this.context.getInteractionId()&&this.notificationBar.close()}),this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,function(){this.notificationBar&&this.notificationBar.isVisible&&this.notificationBar.close()})},loadCustomContent:function(t){t||(t=function(){});var e=this;this.callbackChain([this.createContentElement.bind(this),this.loadComplexObjects.bind(this),this.removeTempLocation.bind(this),this.loadCss.bind(this),this.loadCustomCss.bind(this)],function(i){return i?t(i):(e.createNotificationBar(),e.setShowEventTrigger(),e.isInEditMode&&e.blueConicClient.event.publish("notificationBar.interactionLoaded",{interaction:e}),t())})},callbackChain:function(t,e,i){var n=this;i||(i=0);try{t[i](function(o){return o?e(o):i+1>=t.length?e(null):n.callbackChain(t,e,i+1)})}catch(t){return e(t)}},createContentElement:function(t){return this._temporyLocation=document.createElement("div"),this._temporyLocation.style.display="none",document.body.appendChild(this._temporyLocation),this._contentElement=document.createElement("div"),this._contentElement=this.jQuery("<div></div>").html(this.getContent())[0],this._temporyLocation.appendChild(this._contentElement),t()},removeTempLocation:function(t){return document.body.removeChild(this._temporyLocation),t()},loadComplexObjects:function(t){this.jQuery(this._contentElement).find("div[data-bc-external]").html("");for(var e=this.jQuery(this._contentElement).find("div[data-bc-pluginid]"),i=0;i<e.length;i++){var n=e.eq(i),o=n.attr("data-bc-pluginid"),r=n.attr("data-bc-config");if(r)try{for(var a=r.match(/: *"(\\"|[^"])*\n(\\"|[^"])*"/g)||[],s=r,c=0;c<a.length;c++)s=s.replace(a[c],a[c].replace(/\n/g,"\\n"));r=this.blueConicClient.json.parse(s)}catch(t){console.error("Error parsing the config of the complex object:",t),r=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:o,config:r,node:n[0],interactionId:this.context.getInteractionId()}),this.isInEditMode||(n.removeAttr("data-bc-pluginid"),n.removeAttr("data-bc-config"))}if(0===e.length)return t();var l=0,h=setInterval(function(){if(0===e.length)return clearInterval(h),clearTimeout(l),t();for(var i=e.length-1;i>=0;i--)e.eq(i).html()&&e.splice(i,1)},10);l=setTimeout(function(){return clearInterval(h),t({message:"Couldn't load the complex objects (timeout of 5000ms passed)."})},5e3)},loadCss:function(t){var e=document.createElement("link");e.setAttribute("type","text/css"),e.setAttribute("rel","stylesheet"),e.onload=function(){t()};var i=this.baseURL;e.onerror=function(e){return t({message:"Error occured loading the main css file ("+i+"frontend/src/css/notificationBar.css)",eventData:e})},this.jQuery("head").append(e),e.setAttribute("href",this.baseURL+"frontend/src/css/notificationBar.css")},loadCustomCss:function(t){var e=this,i=this.getParameter("styling_css"),n=this.getParameter("styling_css_inline");if(i){var o=document.createElement("link");o.setAttribute("type","text/css"),o.setAttribute("rel","stylesheet"),o.onload=function(){t()},o.onerror=function(n){return e.isInEditMode?(console.error("[BC] Loading the custom css failed for the following url: "+i),t()):t({message:"Loading the custom css failed for the following url: "+i,eventData:n})},this.customCssElements.push(this.jQuery(o)),this.jQuery("head").append(this.jQuery(o)),o.setAttribute("href",i)}if(n){n=n.replace(/&#xd;/gi,"");var r=this.jQuery("<style>"+n+"</style>");this.customCssElements.push(r),this.jQuery("head").append(r)}if("false"===this.getParameter("show_close")){var a=this.jQuery("<style>.bcpNotificationBarClose { display: none; }</style>");this.customCssElements.push(a),this.jQuery("head").append(a)}else if("true"===this.getParameter("custom_close")){var s=this.getParameter("close_icon"),c=this.getParameter("close_icon_hover"),l="";s&&(l+=".bcpNotificationBarCloseIcon {border-radius: 0;background-image: url("+s+");background-position: 0;background-size: contain;}.bcpNotificationBarCloseIcon:hover {background-position: 0;}"),c&&(l+=".bcpNotificationBarCloseIcon:hover {background-image: url("+c+");}");var h=this.jQuery("<style>"+l+"</style>");this.customCssElements.push(h),this.jQuery("head").append(h)}if(!i)return t()},resetCustomCss:function(){for(var t=0;t<this.customCssElements.length;t++){this.customCssElements[t].remove()}this.customCssElements=[]},setShowEventTrigger:function(){for(var t=this,e=0;e<this._appearOnTriggers.length;e++)switch(this._appearOnTriggers[e]){case n.PAGE_LOAD:this.triggerNotificationBar();break;case n.SCROLL_EVENT:this.jQuery(window).off("scroll.bcpNotificationBarTrigger").one("scroll.bcpNotificationBarTrigger",function(){t.triggerNotificationBar()});break;case n.SCROLL_DEPTH:this.jQuery(window).off("scroll.bcpNotificationBarTrigger").on("scroll.bcpNotificationBarTrigger",function(){t.jQuery(window).scrollTop()/(t.jQuery(document).height()-t.jQuery(window).height())*100>=parseInt(t.getParameter("scroll_depth"))&&(t.jQuery(window).off("scroll.bcpNotificationBarTrigger"),t.triggerNotificationBar())});break;case n.ELEMENT_CLICKED:this.jQuery(this.getParameter("click_selector")).off("click.bcpNotificationBarTrigger").on("click.bcpNotificationBarTrigger",function(){!1===t.notificationBar.isVisible&&t.triggerNotificationBar()});break;case n.CONTENT_VISIBLE:this._addTriggerOnContentHandler(t.getParameter("content_condition"))}},_addTriggerOnContentHandler:function(t){var e=this,i=null,n=null,o=function(){e.jQuery(t).length>0&&e.jQuery(t).html().length>0&&(e.triggerNotificationBar(),i&&i.disconnect(),n&&clearInterval(n))};window.MutationObserver?(i=new MutationObserver(o)).observe(document.body,{childList:!0,subtree:!0}):n=setInterval(o,1e3),o()},triggerNotificationBar:function(){var t=parseInt(this.getParameter("delay")),e=this;function i(){e.callbackChain([function(t){e._handleJavascript(function(i){return i&&!e.isInEditMode?t(i):(e._addInlineJavascript(),t())})},e.notificationBar.show.bind(e.notificationBar),function(t){return!1===e._openedOnce&&(e._addFrontEndBindings(),e._addClickEventLogger(),e.blueConicClient.createEvent("VIEW",e.context.getInteractionId()),e._openedOnce=!0),!0===e.isInEditMode&&setTimeout(function(){e.notificationBar.scrollIntoView()},1e3),t()}],function(t){t&&console.error(t)})}t&&!isNaN(t)&&!0!==this.isInEditMode||(t=0),0===t?i():setTimeout(i,1e3*t)},_addFrontEndBindings:function(){var t=this.jQuery(".bcpNotificationBarDontShowAgainLink"),e=this.jQuery(".bcpNotificationBarCloseButton"),i=this;(t.on("click",function(t){t.preventDefault(),i.blueConicClient.doNotShowAgain(i.context.getInteractionId()),i.notificationBar.close()}),e.on("click",function(){i.notificationBar.close()}),"true"===i.getParameter("hide_after_close"))&&this.jQuery(".bcpNotificationBarClose").on("click",function(){i.blueConicClient.doNotShowAgain(i.context.getInteractionId()),i.notificationBar.close()})},_addClickEventLogger:function(){var t=this.getParameter("click_event_selector");if(t){var e=this;this.jQuery(t).off("click.bcpNotificationBar").one("click.bcpNotificationBar",function(t){t&&t.target&&t.target.pathname&&t.target.hostname&&0===t.target.pathname.indexOf("/s/")&&-1!==t.target.hostname.indexOf("blueconic")||e.blueConicClient.createEvent("CLICK",e.context.getInteractionId())})}},_addInlineJavascript:function(){var t=this.getParameter("javascript");if(t&&!this.isInEditMode){t=t.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+this.context.getInteractionId()+'"$2');var e=this.jQuery("<script>"+t+"<\/script>");try{e.appendTo(this.jQuery("body"))}catch(t){console.error(t)}}},_handleJavascript:function(t){var e=this.getParameters("javascript_urls")||[],i=this;if(0===e.length)return t();{var n=null,o=0;function r(){if(++o===e.length)return i.isInEditMode?t():t(n)}function a(t){(n=n||{message:"[BC] Loading for the following javascript urls failed, notificationBar will not be shown.",urls:[]}).urls.push(t),r()}for(var s=0;s<e.length;s++){var c=e[s],l=document.createElement("script");l.setAttribute("src",c),l.onload=r,l.onerror=a.bind(null,c),document.head.appendChild(l)}}},onSave:function(){return this.notificationBar.getContentHTML()},onMessageReceived:function(t){this.blueConicClient.event.publish("notificationBar.messageReceived",t)},getContent:function(){var t=this.getParameter("content");if(!t){var e="nl"===this.context.getLocale()?"nl":"default";t=window._bcp.notificationBar.Constants.HTML[e].content}return t},createNotificationBar:function(){var t=window._bcp.notificationBar.NotificationBar;this.notificationBar=new t(this.blueConicClient,this.context,this.jQuery,this._contentElement,{closePosition:this._closePosition,closePadding:this._closePadding,flowType:this._type,position:this._position,animationType:this._enterAnimation,height:this.notificationBarHeight})},resetNotificationBar:function(){this.notificationBar.domModifier.reset(!1),this.jQuery(this.notificationBar._containerElement).remove(),this.resetCustomCss();var t=this;this.loadCustomCss(function(){t.createNotificationBar(),t.notificationBar.show(),!0===t.isInEditMode&&t.notificationBar.scrollIntoView()})},getParameter:function(t){return this.parameters[t]&&this.parameters[t][0]?this.parameters[t][0]:null},getParameters:function(t){return this.parameters[t]?this.parameters[t]:[]}})}();var a = [];var i='dialogue_notification_bar';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.23/frontend/src/scripts/enumsAndConstants.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.23/frontend/src/scripts/elementModifier.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.23/frontend/src/scripts/domModifier.js', sharing: 'none'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.2.23/frontend/src/scripts/notificationBar.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.2.23/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'image', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'image/1.0.2/'},{ id : 'number', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'number/1.0.2/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b,this.parameters=this.context.getParameters();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);var f=this.parameters.propertyRules&&this.parameters.propertyRules[0]?this.parameters.propertyRules[0]:null;if(f){f=a.json.parse(f),this.preLoadProperties=[];for(var g,h=0,i=0;i<f.length;i++)g=f[i],g.profileproperty&&g.decay&&g.nr&&(this.preLoadProperties.push(g.profileproperty+"_index"),g.decay>h&&(h=g.decay,this.property=g.profileproperty))}else{var j=this.parameters.property?this.parameters.property[0]:this.parameters.property;j&&(this.property=this.blueConicClient.json.parse(j)[0].profileproperty,this.preLoadProperties=[this.property+"_index"])}},getPreloadProperties:function(){return this.preLoadProperties},onLoad:function(){if(0<this.preLoadProperties.length){var a=this.context.getProfile(),b=this.parameters.engagement_rules?this.parameters.engagement_rules[0]:this.parameters.engagement_rules;if(!b)return;if(b=this.blueConicClient.json.parse(b),0===b.length)return;var c=this.parameters.interests?this.parameters.interests[0]:this.parameters.interests;c=c?this.blueConicClient.json.parse(c).values:[];var d=new this.BlueConicEngagement(this.blueConicClient,a,this.context.getInteractionId(),!0,c,this.jQuery,this.days,!0);if(d.applyEngagementRules(b),d.isChanged())d.save();else{for(var e,f=!1,g=0;g<this.preLoadProperties.length;g++)e=this.preLoadProperties[g],a.getValue(e)||(a.setValue(e,"0"),f=!0);f&&this.blueConicClient.profile.updateProfile()}}}});var a = [];var i='engagement_interest_ranking';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/6.3.1/js/engagement_service/engagementService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/6.3.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: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/6.4.2/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.2/'}]);})();(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(p, pf) + 'enrichProfileByVisitorBehavior/5.4.0/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + 'enrichProfileByVisitorBehavior/5.4.0/frontend/src/js/ruleService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'enrichProfileByVisitorBehavior/5.4.0/'}]);})();(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(p, pf) + 'enrichProfileWithVisitorInput/4.4.0/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + 'enrichProfileWithVisitorInput/4.4.0/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) + 'enrichProfileWithVisitorInput/4.4.0/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(t,e){this.blueConicClient=t,this.rules=[],this.timeouts=[];try{this.rules=this.blueConicClient.json.parse(e.getParameters().rules[0])}catch(t){}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 e=this.rules[t];"click"===e.type?this._setClickBindings(e,!0):this._createEvent(e)}},_resetTimeouts:function(){this.timeouts.forEach(function(t){clearTimeout(t)}),this.timeouts=[]},_createEvent:function(t){var e=t.area.selectedoption,i=!1;if("selector"===e&&t.area.selector?t.words&&this._contentMatchesWords(this._getContentForSelector(t),t.containsmatches,t.words)?i=!0:t.anyWord&&this._getContentForSelector(t)&&(i=!0):"variable"===e&&t.area.variable?t.words&&this._contentMatchesWords(this._getVariableValue(t.area.variable),t.containsmatches,t.words)?i=!0:t.anyWord&&this._getVariableValue(t.area.variable)&&(i=!0):"customjs"===e&&t.area.customjs&&(t.words&&this._contentMatchesWords(this._getCustomJsValue(t.area.customjs),t.containsmatches,t.words)?i=!0:t.anyWord&&this._getCustomJsValue(t.area.customjs)&&(i=!0)),i){var n=0;t.delay&&!isNaN(parseInt(t.delay))&&(n=parseInt(t.delay));var r=this.jQuery,s=setTimeout(r.proxy(function(){this.blueConicClient.createEvent(t.event.id)},this),n);this.timeouts.push(s)}},_setClickBindings:function(t,e){if(t.clickarea.selector){var i=this.jQuery,n=null;try{n=i(t.clickarea.selector)}catch(t){return void this.blueConicClient.util.log("Invalid click selector: "+t)}0===n.length?this.blueConicClient.position.subscribe(t.clickarea.selector,this,function(){this._setClickBindings(t,!1)}):n.off("click."+t.id).on("click."+t.id,{clickRule:t},this.jQuery.proxy(function(t){this.lastEvent=t;try{this._createEvent(t.data.clickRule)}catch(t){}},this)),e&&i(document).on("click",t.clickarea.selector,{clickRule:t},i.proxy(function(t){if(!this.lastEvent||this.lastEvent.originalEvent!==t.originalEvent)try{this._createEvent(t.data.clickRule)}catch(t){}},this))}},_contentMatchesWords:function(t,e,i){if(!t)return!1;for(var n=0;n<i.length;n++)if("contains"===e){if(-1!==t.indexOf(i[n].toLowerCase()))return!0}else if(t===i[n].toLowerCase())return!0;return!1},_getContentForSelector:function(rule){var selector=rule.area.selector,contentArea=null;if(-1!==selector.indexOf("jQuery("))contentArea=function(selector,jQuery){return eval("var jQuery = arguments[1]"),eval(selector)}(selector,this.jQuery);else try{contentArea=this.jQuery(selector)}catch(t){this.blueConicClient.util.log("Invalid content selector: "+t)}if(contentArea&&contentArea instanceof this.jQuery&&contentArea.length>0){var contentArr=[];return this.jQuery.each(contentArea,this.jQuery.proxy(function(t,e){var i=this.jQuery(e);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()))},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 e=t.replace("[",".").replace("]","").replace('""',"").split("."),i=window[e.shift()];e.length>0;)i=i[e.shift()];return i instanceof Array?i.join().toLowerCase():"object"==typeof i||"function"==typeof i?this.blueConicClient.json.stringify(i):i?(""+i).toLowerCase():null}catch(t){return null}},_getCustomJsValue:function(customjs){try{var value=function(customjs,jQuery,$){return eval("var jQuery = arguments[1]"),eval("var $ = arguments[2]"),eval(customjs)}(customjs,this.jQuery,this.jQuery);return value&&value instanceof Object&&(value=this._stringify(value)),value?(""+value).toLowerCase():null}catch(t){return null}},_stringify:function(t){try{return this.blueConicClient.json.stringify(t)}catch(t){var e=[];return JSON.stringify(obj,function(t,i){if("object"==typeof i&&null!==i){if(-1!==e.indexOf(i))return;e.push(i)}return i})}},_normalizeText:function(t){return t?this.jQuery.trim(t).replace(/\r\n+|\r+|\n+/gi,"").replace(/\s+/gi," "):t}});var a = [];var i='eventtrigger';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.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.7/'}]);})();(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(p, 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({languageLabels:{nl:{defaultValidation:"Vul een valide waarde in"},"default":{defaultValidation:"Please enter a valid value"}},_editorOpen:!1,init:function(e,t){this.blueConicClient=e,this.baseURL=this.blueConicClient.getBaseURL("forms");var i=this;this.blueConicClient.event.subscribe("bcComplexObject",this,(function(e,s){s&&"forms"===s.plugin&&s.config&&(s.config.attributionId=s.interactionId,s.config=this._migrateConfig(s.config),this._loadLibraries(s.config).done((function(){i._loadData(s,t)})))})),this.blueConicClient.isInEditMode()&&(this._sendMessage("forms.formLoaded"),this.blueConicClient.event.subscribe("forms.updateName",this,(function(e,t){var s=t.message.field;i.jQuery(".bcForm[data-bc-id='"+t.message.form+"']").find(".fieldHolder[data-bc-id='"+s.id+"'] .bcLabel").text(s.settings.label),i.jQuery(".bcForm[data-bc-id='"+t.message.form+"']").find(".fieldHolder[data-bc-id='"+s.id+"'] .buttonInput").attr("value",s.settings.label)})),this.blueConicClient.event.subscribe("forms.updateField",this,(function(e,s){i._updateField(s.message.form,s.message.field,t)})),this.blueConicClient.event.subscribe("forms.updateLabelLocation",this,(function(e,t){i._updateLabelLocation(t.message.form,t.message.show_labels_inline)})),this.blueConicClient.event.subscribe("forms.updateStyling",this,(function(e,t){i._updateStyling(t.message.styling)})),this.blueConicClient.event.subscribe("forms.addField",this,(function(e,t){i._addField(t.message.form,t.message.field,!0)})),this.blueConicClient.event.subscribe("forms.deleteField",this,(function(e,t){i.jQuery(".bcForm[data-bc-id='"+t.message.form+"']").find(".fieldHolder[data-bc-id='"+t.message.fieldId+"']").remove(),i._removeSelectedState()})),this.blueConicClient.event.subscribe("forms.updateConfig",this,(function(e,t){var s=i.jQuery(".bcForm[data-bc-id='"+t.message.id+"']").closest(".bccomplexobject");s.attr("data-bc-config",JSON.stringify(t.message));var n=t.message.actions.filter((function(e){return"setaddvalue"===e.type&&"set_if_empty"===e.operation&&e.property})).map((function(e){return e.property}));s.attr("data-bc-preload",n.join(","))})),this.blueConicClient.event.subscribe("forms.updateOrdering",this,(function(e,t){i._updateOrdering(t.message.form,t.message.ordering)})),this.blueConicClient.event.subscribe("editorOpened",this,(function(){this._editorOpen=!0;var e=this;this._loadLibraries().done((function(){e._addBindings(t)}))})),this.blueConicClient.event.subscribe("editorClosed",this,(function(){this._editorOpen=!1,i._removeSelectedState(),i._sendMessage("forms.closeConfigurator")})))},getPreloadProperties:function(){return[]},_migrateConfig:function(e){if((e=JSON.parse(JSON.stringify(e))).actions||!e.routing)return e;var t,i=e.routing;return"form_routing_inline"===i.type?t={type:"text",text:i.inline_message}:"form_routing_url"===i.type?t={type:"url",url:i.go_to_url}:"form_routing_close_lightbox"===i.type&&(t={type:"close"}),e.actions=t?[t]:[],e},_loadLibraries:function(e){var t,i,s=this.jQuery;if(window.BlueConicJQuery=s,this.blueConicClient.isInEditMode())t=this._getLoadScriptDeferred(this.baseURL+"frontend/src/lib/datepicker.min.js"),i=this._getLoadScriptDeferred(this.baseURL+"frontend/src/lib/jquery-ui.min.js");else for(var n=0;n<e.fields.length;n++)"DatePicker"===e.fields[n].fieldType&&(t=this._getLoadScriptDeferred(this.baseURL+"frontend/src/lib/datepicker.min.js"));return s.when(t,i)},_getLoadScriptDeferred:function(e){var t=this.jQuery.Deferred();return this.blueConicClient.util.loadScript(e,this,(function(){t.resolve()})),t},_updateOrdering:function(e,t){var i=(0,this.jQuery)(".bcForm[data-bc-id='"+e+"']"),s=null;t.forEach((function(e){var t=i.find(".fieldHolder[data-bc-id='"+e+"']");s?t.insertAfter(s):t.prependTo(i.find("fieldset")),s=t}))},_removeSelectedState:function(){(0,this.jQuery)(".fieldHolder").removeClass("bcSelected")},_updateStyling:function(e){var t=this.jQuery;this._stylingUrl&&t("link[href='"+this._stylingUrl+"']").remove(),this._inlineCss&&this._inlineCss.remove(),this._handleStyling(e)},_handleStyling:function(e){var t=this.jQuery;e&&e.css&&(this._stylingUrl=e.css,this.blueConicClient.util.loadCSS(this._stylingUrl)),e&&e.css_inline&&(this._inlineCss=t("<style>"+e.css_inline+"</style>"),this._inlineCss.appendTo(t("body")))},_selectField:function(e,t){if(this._removeSelectedState(),e.addClass("bcSelected"),!t){var i=e.closest(".bccomplexobject").attr("data-bc-config"),s=this._jsonEscape(i);this._sendMessage("forms.fieldSelected",{form:JSON.parse(s),field:e.attr("data-bc-id")})}},_jsonEscape:function(e){return e.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t")},_addBindings:function(e){var t=window.CKEDITOR;if(t){this.baseURL=this.blueConicClient.getBaseURL(e.getInteractionTypeId()),this.blueConicClient.util.loadCSS(this.baseURL+"frontend/src/css/formsinline.css");var i,s=this.jQuery,n=this;if(s(document).on("click",".bcForm .fieldHolder",(function(){n._editorOpen&&n._selectField(s(this))})),t.currentInstance)for(i in t.currentInstance.widgets.instances)if("bccomplexobject"===t.currentInstance.widgets.instances[i].name){var a=t.currentInstance.widgets.instances[i];"forms"===s(a.wrapper.$).find(".bccomplexobject").attr("data-bc-pluginid")&&(a.on("select",(function(e){s(e.sender.wrapper.$).removeClass("cke_widget_selected")})),a.on("deselect",(function(){n._removeSelectedState(),n._sendMessage("forms.closeConfigurator")})))}s(".bcForm fieldset").sortable({handle:".bcDragHandle",stop:function(e){var t=[];s(".fieldHolder",s(this)).each((function(){s(this).attr("data-bc-id")&&t.push(s(this).attr("data-bc-id"))})),n._sendMessage("forms.updateOrdering",{form:JSON.parse(s(this).closest(".bccomplexobject").attr("data-bc-config")),order:t});var i=s(e.toElement);i.attr("data-bc-config")||(i=i.closest(".fieldHolder")),n._selectField(i,!0)}})}},_sendMessage:function(e,t){this.blueConicClient.fn.postMessage&&this.blueConicClient.fn.postMessage(e,t)},_addField:function(e,t,i){var s=this.jQuery,n=this,a=s(this._getFieldsHTML(t));a.appendTo(s(".bcForm[data-bc-id='"+e+"'] fieldset")),this._selectField(a,!0),i&&setTimeout((function(){n._isElementInViewport(a.get(0))||a.get(0).scrollIntoView()}),100)},_isElementInViewport:function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},_updateField:function(e,t,i){var s=this.jQuery,n=this._getFieldsHTML(t,!0);s(".bcForm[data-bc-id='"+e+"']").find(".fieldHolder[data-bc-id='"+t.id+"']").html(n),this._addDatePickerHandleForField(t,i)},_updateLabelLocation:function(e,t){var i=this.jQuery;t?i(".bcForm[data-bc-id='"+e+"']").find("fieldset").addClass("inlineLabels"):i(".bcForm[data-bc-id='"+e+"']").find("fieldset").removeClass("inlineLabels")},_loadData:function(e,t){var i=this,s=this.jQuery,n=e.node;n.innerHTML="",this.baseURL=this.blueConicClient.getBaseURL(t.getInteractionTypeId());var a=s('<link type="text/css" href="'+this.baseURL+'frontend/src/css/default.uni-form.css" rel="stylesheet" />');a.on("load",(function(){i._handleStyling(e.config.styling),i._loadForm(n,e.config,t),i._editorOpen&&i._addBindings(t)})),s("head").append(a)},_loadForm:function(e,t,i){var s=this.jQuery;this._node=e;var n=s('<div class="bcForm" data-bc-external="true" data-bc-id="'+t.id+'"></div>');n.appendTo(s(e)),this._getForm(t).appendTo(n),this.blueConicClient.isInEditMode()?this._addDatePickerHandler(n,t,i):this._prefillForm(n,t,i)},_getForm:function(e){var t=this.jQuery;e.styling||(e.styling={});var i=t('<div id="'+e.id+'" class="uniForm" action="#"></div>'),s=t('<div class="formHolder"></div>');s.appendTo(i);var n=t("<fieldset />");e.styling.show_labels_inline&&n.addClass("inlineLabels"),n.appendTo(s);for(var a=e.fields,l=0;l<a.length;l++){var r=a[l];t(this._getFieldsHTML(r)).appendTo(n)}return i},_getFieldsHTML:function(e,t){var i='<% if(settings.description) { %><span class="formHint"><%= settings.description %></span><% } %>',s="<% if(settings.required) { %><em>*</em><% } %>",n="";switch(e.fieldType){case"PlainText":n='<div class="plaintext"><%= settings.text %></div>';break;case"SingleLineText":"small"===e.settings.fieldSize||e.settings.fieldSize;n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><input type="text" class="'+("small"===e.settings.fieldSize?"bcSmall":"large"===e.settings.fieldSize?"bcLarge":"bcMedium")+' textInput" placeholder="<%= settings.value %>" />'+i+"</div>";break;case"TextArea":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><textarea rows="'+("small"===e.settings.fieldSize?3:"large"===e.settings.fieldSize?10:5)+'" placeholder="<%= settings.value %>"></textarea>'+i+"</div>";break;case"Select":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><select class="selectInput"><% if (settings.values) for(var i=0; i < settings.values.length; i++) { %><option<% if(settings.values[i].defaultOn) { %> selected="selected"<% } %> value="<%= escape(settings.values[i].identifier || "") %>"><%= settings.values[i].name %></option><% } %></select>'+i+"</div>";break;case"CheckboxList":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><ul <% if(settings.repeatdirection === "horizontal") { %>class="horizontal"<% } %>><%  if (settings.values) for(var i=0; i < settings.values.length; i++) { %><li><input<% if(settings.values[i].defaultOn) { %> checked="checked"<% } %> type="checkbox" name="bcCList_<%= id %>" id="bcCList_<%= id %>_<%= i %>" value="<%= escape(settings.values[i].identifier || "") %>"/><label for="bcCList_<%= id %>_<%= i %>"><%= settings.values[i].name %></label></li><% } %></ul>'+i+"</div>";break;case"RadioButtonList":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><ul <% if(settings.repeatdirection === "horizontal") { %>class="horizontal"<% } %>><%  if (settings.values) for(var i=0; i < settings.values.length; i++) { %><li><input<% if(settings.values[i].defaultOn) { %> checked="checked"<% } %> type="radio" name="bcRadioList_<%= id %>" id="bcRadioList_<%= id %>_<%= i %>" value="<%= escape(settings.values[i].identifier || "") %>"/><label for="bcRadioList_<%= id %>_<%= i %>"><%= settings.values[i].name %></label></li><% } %></ul>'+i+"</div>";break;case"DatePicker":n='<div<% if (settings.className) {%> class="<%= settings.className %>"<% } %>><label>'+s+'<span class="bcLabel"><%= settings.label %></span></label><% if(settings.flat) { %><div class="datepicker"/><input type="hidden" class="hiddenInput"/><% } else { %><input type="text" class="textInput" placeholder="<%= settings.value %>" /><input type="hidden" class="hiddenInput"/><% } %>'+i+"</div>";break;case"Button":n='<div class="buttonHolder<% if (settings.className) {%> <%= settings.className %><% } %>"><input type="<% if (settings.submitForm === false) {%>button<% } else { %>submit<% } %>" class="buttonInput primaryAction" value="<%= settings.label %>"/></div>'}return this.blueConicClient.isInEditMode()&&(n+='<div class="bcDragHandle"><div class="bcInnerDragHandle"></div></div>'),t||(n='<div class="fieldHolder blueConic<%= fieldType %>" data-bc-id="<%= id %>">'+n+"</div>"),this._tmpl(n,e)},_prefillForm:function(e,t,i){for(var s=i.getProfile(),n=e.find(".fieldHolder"),a=[],l=0;l<t.fields.length;l++){var r=t.fields[l];r.settings.prefillproperty&&a.push(r.settings.prefillproperty)}0!==a.length?s.loadValues(a,this,(function(){this._addFormListeners(e,t,i);for(var a=0;a<t.fields.length;a++){var l=t.fields[a],r=this.jQuery(n[a]).find("input, textarea, select");if(l.settings.prefillproperty){var d=s.getValues(l.settings.prefillproperty);if(d.length>0)switch(l.fieldType){case"DatePicker":break;case"CheckboxList":case"Checkbox":case"RadioButtonList":case"RadioButton":for(var o=0;o<d.length;o++)r.filter('[value="'+d[o]+'"]').attr("checked","checked");break;default:r.val(d[0])}}}})):this._addFormListeners(e,t,i)},_formatDate:function(e){var t=e.getMonth()+1,i=e.getDate();return e.getYear()+1900+"-"+(t<10?"0":"")+t+"-"+(i<10?"0":"")+i},_addDatePickerHandler:function(e,t,i){for(var s=0;s<t.fields.length;s++){var n=t.fields[s];this._addDatePickerHandleForField(n,i)}},_getDateForTimestamp:function(e){if(!e)return null;var t=new Date(parseInt(e));return t&&t instanceof Date&&!isNaN(t)?t:null},_addDatePickerHandleForField:function(e,t){var i=this.jQuery;if("DatePicker"===e.fieldType){var s,n=i("div[data-bc-id='"+e.id+"']"),a=this.blueConicClient.profile.getProfile(),l="nl"===t.getLocale()?"NL":"EN",r=this._getDateForTimestamp(a.getValue(e.settings.prefillproperty));r?(s=r,i(".textInput",n).val(this._formatDate(s))):s=e.settings.pickerOffset?new Date(e.settings.pickerOffset):new Date,i("input.textInput, div.datepicker",n).DatePicker({flat:e.settings.flat,lang:l,calendars:e.settings.calendars,date:s,current:this._formatDate(s),onChange:i.proxy((function(e,t){var s=i("div[data-bc-id='"+this.id+"']");i("input.hiddenInput",s).val(t.getTime()),i("input.textInput",s).length>0&&(i("input.textInput",s).val(e),i("input.textInput",s).DatePickerHide())}),e)}),e.settings.flat||n.on("focus","input.textInput",(function(){i("input.textInput, div.datepicker",n).DatePickerShow()}))}},_submit:function(e,t,i){this._validateForm(e,t,i)&&(!1!==t.logConversion&&this.blueConicClient.createEvent("CONVERSION",t.attributionId),this._storeFormValues(e,t,i),this.blueConicClient.profile.updateProfile(this.jQuery.proxy((function(){this._handleActions(t.actions,t.attributionId,e,i)}),this)))},_handleActions:function(e,t,i,s){if(e){var n=new window._bcp.utils.AfterSubmitActionHandler(this.blueConicClient,s,this.jQuery,t);e.forEach((function(e){n.executeAction(e,i)}),this)}},_getField:function(e,t){var i=e.closest(".fieldHolder").attr("data-bc-id");if(i&&void 0!==i){for(var s,n=0;n<t.fields.length;n++){var a=t.fields[n];if(a&&a.id&&"undefined"!=typeof a.id&&a.id===i){s=a;break}}return s}},_addFormListeners:function(e,t,i){var s=this.jQuery,n=this;this._addDatePickerHandler(e,t,i),s('input[type="submit"]',e).click((function(a){a.preventDefault();var l=n._getField(s(this),t);l&&l.settings&&!1===l.settings.logClick||n.blueConicClient.createEvent("CLICK",t.attributionId),n._submit(e,t,i)})),s('input[type="button"]',e).click((function(){var a=n._getField(s(this),t);a&&(a.settings&&!1!==a.settings.logClick&&n.blueConicClient.createEvent("CLICK",t.attributionId),n._handleActions(a.settings.actions,t.attributionId,e,i))})),1===t.fields.length&&"RadioButtonList"===t.fields[0].fieldType&&s('input[type="radio"]',e).click(s.proxy((function(s){s.preventDefault(),this.blueConicClient.createEvent("CLICK",t.attributionId),this._submit(e,t,i)}),this))},_validateForm:function(e,t,i){var s=e.find(".fieldHolder");e.find("span.errormsg").remove(),s.removeClass("error");for(var n=!0,a=0;a<t.fields.length;a++){var l=t.fields[a],r=this.jQuery(s[a]),d=r.find("input, textarea, select"),o=!1;if(l.settings.required)switch(l.fieldType){case"CheckboxList":case"Checkbox":case"RadioButtonList":case"RadioButton":0===d.filter(":checked").length&&(o=!0);break;case"DatePicker":d.filter(".hiddenInput").val()||(o=!0);break;default:d.val().trim()||(o=!0)}var c=!1;if(!o&&l.settings.validation){var u=this.jQuery.trim(d.val());if(u)switch(l.settings.validation){case"email":u.match(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/)||(c=!0);break;case"number":u.match(/^\d+$/)||(c=!0);break;case"regexp":try{l.settings.validation_regexp&&!u.match(l.settings.validation_regexp)&&(c=!0)}catch(g){console.error(g)}}}if((o||c)&&(n=!1,r.addClass("error"),c||l.settings.validation_failed_msg)){var f="nl"===i.getLocale()?"nl":"default";r.before('<span class="errormsg">'+(l.settings.validation_failed_msg?l.settings.validation_failed_msg:this.languageLabels[f].defaultValidation)+"</span")}}return n},_storeFormValues:function(e,t,i){for(var s=i.getProfile(),n=0;n<t.fields.length;n++){var a,l=t.fields[n],r=this.jQuery(e).find("div[data-bc-id = '"+l.id+"']").find("input, textarea, select");if(l.settings.storeproperty)switch(l.fieldType){case"CheckboxList":case"Checkbox":case"RadioButtonList":case"RadioButton":for(var d=[],o=r.filter(":checked"),c=0;c<o.length;c++){var u=this.jQuery(o[c]).val();u=unescape(u),d.push(u)}if("set"===l.settings.overwriteValue)s.setValues(l.settings.storeproperty,d);else for(var f=0;f<d.length;f++)s.addValue(l.settings.storeproperty,d[f]);break;case"DatePicker":(a=r.filter(".hiddenInput").val())&&("set"===l.settings.overwriteValue?s.setValue(l.settings.storeproperty,a):s.addValue(l.settings.storeproperty,a));break;default:a=unescape(r.val()),"set"===l.settings.overwriteValue?s.setValue(l.settings.storeproperty,a):s.addValue(l.settings.storeproperty,a)}}},_tmpl:function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):this.cache[e]=this.cache[e]||tmpl(document.getElementById(e).innerHTML);return t?i(t):i}});var a = [];var i='forms';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.1.23/frontend/src/node_modules/@blueconic/actionhandlers-frontend/AfterSubmitActionHandler.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.23/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(t,e){if(this.blueConicClient=t,this.context=e||null,this.parameters=this.context.getParameters(),this._initPublishedEvents(),this.parameters){"true"!==this.parameters.hasOverlay[0]||this._isViewEventPublished()||(this._setViewEventPublished(!0),this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()));var i=this.parameters.positions;if(i)for(var n=0;n<i.length;n++){var s=i[n];this.blueConicClient.position.subscribe(s,this,this._handlePosition)}}},_initPublishedEvents:function(){window._bcp=window._bcp||{},window._bcp.publishedEvents=window._bcp.publishedEvents||{},window._bcp.publishedEvents.viewEvent=window._bcp.publishedEvents.viewEvent||{},window._bcp.publishedEvents.clickEvent=window._bcp.publishedEvents.clickEvent||{}},_handleClick:function(){this._isClickEventPublished()||(this._setClickEventPublished(!0),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId()))},_handlePosition:function(t){this._isViewEventPublished()||this.blueConicClient.isInEditMode()||(this._setViewEventPublished(!0),this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()));var e=this;try{var i="bcCtrl"+this.context.getInteractionId();if(this.jQuery(t+" a").off("click."+i).on("click."+i,(function(){e._handleClick()})),this.jQuery(document).off("click."+i).on("click."+i,t+" a",(function(){e._handleClick()})),this.jQuery(document).off("submit."+i).on("submit."+i,t+" form",(function(){e._handleClick()})),this.jQuery(t).find("iframe").length>0){window.focus();var n=!1,s=this.jQuery(this.jQuery(t).find("iframe"));s.off("mouseenter."+i).on("mouseenter."+i,(function(){n=!0})),s.off("mouseleave."+i).on("mouseleave."+i,(function(){n=!1})),document.querySelectorAll(window).removeEventListener("blur."+i).addEventListener("blur."+i,function(){n&&this._handleClick()}.bind(this))}}catch(o){}},onLoad:function(){if(this.parameters){var t=this.parameters.positions;if(t)for(var e=0;e<t.length;e++){var i=t[e];this.jQuery(i).length>0&&this._handlePosition(i)}}},_isViewEventPublished:function(){return Boolean(window._bcp.publishedEvents.viewEvent[this.context.getInteractionId()])},_setViewEventPublished:function(t){window._bcp.publishedEvents.viewEvent[this.context.getInteractionId()]=t},_isClickEventPublished:function(){return Boolean(window._bcp.publishedEvents.clickEvent[this.context.getInteractionId()])},_setClickEventPublished:function(t){window._bcp.publishedEvents.clickEvent[this.context.getInteractionId()]=t}});var a = [];var i='globallistener_controlgroup';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.1.0/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.1.0/'}]);})();(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 i(){if(e._bcDatalayerUtil.getDataLayer())e._handleGoals();else{if(t>20)return;t++,window.setTimeout(i,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(p, pf) + i + '/3.0.3/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/3.0.3/frontend/src/node_modules/@blueconic/datalayer_lib/datalayer_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/3.0.3/frontend/src/lib/jsonpath.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/3.0.3/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.3/'}]);})();(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({init:function(t,e){this.blueConicClient=t,this.context=e,this.parameters=this.context.getParameters(),this.isInEditMode=this.blueConicClient.isInEditMode(),this.fancyBoxLib="frontend/src/lib/fancybox/jquery.fancybox.pack.js";var n=this.context.getInteractionTypeId();this.baseURL=this.blueConicClient.getBaseURL(n);var i=this.parameters.content+"";this.htmlFragment=this.createElement(i),this.profile=t.profile.getProfile(),this.inlineCss=null,this._timestamp=null,this._observer=null,this._eventListenerFunction=null,this._lightboxTriggered=!1,this.blueConicClient._renderedInteractions=this.blueConicClient._renderedInteractions||[],this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){var t=this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId());this.blueConicClient._renderedInteractions.splice(t,1)}))},getPreloadProperties:function(){for(var t,e=this.context.getParameters().content+"",n=/data-bc-preload="([^"]*)"/g,i=[];null!==(t=n.exec(e));)for(var o=t[1].split(","),r=0;r<o.length;r++)i.push(o[r]);for(var a=this.htmlFragment?this._getPropertiesFromPlaceholders(this.htmlFragment.innerHTML):[],c=0;c<i.length;c++)a.push(i[c]);return a},onMessageReceived:function(t){this.blueConicClient.event.publish("lightbox.messageReceived",t)},onLoad:function(){window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery,window.bcFancyboxLoading?this.blueConicClient.event.subscribe("bcFancyboxLoaded",this,(function(){this.onLoad()})):this.blueConicClient._lightboxinteractiontypeFancybox?(this.jQuery.fancybox=this.blueConicClient._lightboxinteractiontypeFancybox,this._onLoadWithLibrary()):(window.bcFancyboxLoading=!0,this.blueConicClient.util.loadScript(this.baseURL+this.fancyBoxLib,this,(function(){this.blueConicClient._loadLightboxInteractionTypeFancyBox(window,document,this.jQuery),this.blueConicClient._lightboxinteractiontypeFancybox=this.jQuery.fancybox,delete this.blueConicClient._loadLightboxInteractionTypeFancyBox,this._onLoadWithLibrary(),window.bcFancyboxLoading=!1,this.blueConicClient.event.publish("bcFancyboxLoaded")})))},_onLoadWithLibrary:function(){if(this.isInEditMode)this.showLightbox();else{var t=this.parameters.selected_when||[],e=this.getParameter("click_selector");e&&-1!==this.blueConicClient.util.array.indexOfArray(t,"click_selector")&&this._addClickTriggerBindings(e);var n=this.getParameter("content_condition");n&&-1!==this.blueConicClient.util.array.indexOfArray(t,"content_condition")&&this._addContentPolling(n);var i=this.parameters.scroll_depth&&this.parameters.scroll_depth[0]&&!isNaN(this.parameters.scroll_depth[0])?parseInt(this.parameters.scroll_depth[0]):0;i&&-1!==this.blueConicClient.util.array.indexOfArray(t,"scroll_depth")&&this._addScrollBinding(i),0===t.length&&this.showLightbox(),this._addCloseEventHandler()}},_getScrollPercent:function(){return document.documentElement.scrollTop/(document.documentElement.scrollHeight-window.innerHeight)*100},_checkScrollCondition:function(t){this._getScrollPercent()>=t&&this.showLightbox()},_addScrollBinding:function(t){this._checkScrollCondition(t),document.addEventListener("scroll",function(){this._checkScrollCondition(t)}.bind(this))},_addClickTriggerBindings:function(t){try{var e=this.jQuery(t);e.length>0?e.off("click.lightboxinteractiontype").on("click.lightboxinteractiontype",this.jQuery.proxy((function(){this.showLightbox(!0)}),this)):this.blueConicClient.position.subscribe(t,this,this.jQuery.proxy(this._addClickTriggerBindings,this,t))}catch(n){}},_addContentPolling:function(t){this._checkContentCondition(t);var e=this,n=document.getElementsByTagName("body")[0];if(window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)this._observer=new MutationObserver((function(){e._observeContentChanges(t)})),this._observer.observe(n,{childList:!0,subtree:!0});else if(window.addEventListener)this._eventListenerFunction=function(){e._observeContentChanges(t)},n.addEventListener("DOMNodeInserted",this._eventListenerFunction,!1);else var i=setInterval((function(){e._lightboxTriggered?clearInterval(i):e._checkContentCondition(t)}),500)},_observeContentChanges:function(t){if(this._lightboxTriggered){this._observer?this._observer.disconnect():document.getElementsByTagName("body")[0].removeEventListener("DOMNodeInserted",this._eventListenerFunction,!1)}else{var e=this,n=(new Date).getTime();this._timestamp=n,setTimeout((function(){e._timestamp!==n||e._lightboxTriggered||e._checkContentCondition(t)}),250)}},_checkContentCondition:function(t){this.jQuery(t).length>0&&this.jQuery(t).html()&&this.jQuery(t).html().length>0&&this.showLightbox()},closeLightbox:function(){this.isInEditMode||this.jQuery.fancybox.close()},_addCloseEventHandler:function(){this.blueConicClient.event.subscribe("closeoverlay",this,(function(t,e){e instanceof Array&&e[0]===this.context.getInteractionId()&&this.closeLightbox()}))},showLightbox:function(t){if(-1===this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId())){this.parameters.selected_when;if(!this._lightboxTriggered||this.isInEditMode||t){this.blueConicClient._renderedInteractions.push(this.context.getInteractionId());var e=this.parameters.delay&&this.parameters.delay[0]&&!isNaN(this.parameters.delay[0])?1e3*parseInt(this.parameters.delay[0]):0;!this.isInEditMode&&e>0?window.setTimeout(this._showLightbox.bind(this),e):this._showLightbox()}}},getSettings:function(){var t=null,e=this.getParameter("width")||null,n=this.getParameter("height")||null,i="true"===this.getParameter("hide_after_close");this.htmlFragment&&(t=this.htmlFragment.innerHTML);var o=!(e||n),r=this.getParameter("show_close"),a=this.getParameter("alternative_close"),c={parent:"body",autoSize:o,autoCenter:!1,autoWidth:!e,autoHeight:!n,closeBtn:"false"!==r,width:e||"auto",height:n||"auto",keys:{close:"false"===a||this.isInEditMode?null:[27]},helpers:{overlay:{locked:!0,closeClick:"false"!==a&&!this.isInEditMode}}};this.getParameter("template")&&(c.padding=0),(t||this.isInEditMode)&&(c.content=" ",c.type="inline");var s=this,l=this.jQuery,h=this.getParameter("effect"),d=this.getParameter("effect_slide_direction")||"left";if(this.isInEditMode&&(h="noEffect"),h&&"noEffect"!==h&&("fadeIn"===h?l.fancybox.transitions.openEffect=function(){var t=l.fancybox._getPosition(!0);t.opacity=0,l.fancybox.wrap.css(t).show().animate({opacity:1},{duration:l.fancybox.current.openSpeed,complete:l.fancybox._afterZoomIn})}:"slideIn"===h&&(l.fancybox.transitions.openEffect=function(){var t,e=l.fancybox._getPosition(!0),n=window.innerHeight,i=window.innerWidth,o=document.querySelectorAll(".fancybox-wrap")[0].getBoundingClientRect(),r="top"===d||"bottom"===d?"top":"left";"top"===d||"bottom"===d?t=n-(n-o.height)/2:"left"!==d&&"right"!==d||(t=i-(i-o.width)/2),e[r]="top"===d||"left"===d?parseInt(e[r])-t+"px":parseInt(e[r])+t+"px";var a={},c="top"===d||"left"===d?"+":"-";a[r]=c+"="+t+"px",l.fancybox.wrap.css(e).show().animate(a,{duration:l.fancybox.current.openSpeed,complete:l.fancybox._afterZoomIn})}),l.fancybox.transitions.openEffect&&(c.openMethod="openEffect",c.openSpeed=1e3)),t)c.afterLoad=function(){s.emptyElementsWithAttribute(s.htmlFragment,"div","data-bc-external");try{l(".fancybox-inner").html(s.htmlFragment.innerHTML)}catch(n){console.error("[BC] Error occured when injecting the HTML in the DOM",n)}s.isInEditMode&&s.blueConicClient.event.publish("lightbox.interactionLoaded",{interaction:s});var t=document.querySelectorAll(".fancybox-inner");s.handleComplexElements(t[0]);var e=s.getParameter("javascript");if(e&&!s.blueConicClient.isInEditMode()){e=e.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+s.context.getInteractionId()+'"$2'),s._inlineJs=s.jQuery("<script>"+e+"<\/script>");try{s._inlineJs.appendTo(s.jQuery("body"))}catch(n){console.error(n)}}};else if(s.isInEditMode){c.afterLoad=function(){s.blueConicClient.event.publish("lightbox.interactionLoaded",{interaction:s})}}return this.isInEditMode?c.afterShow=function(){l(".fancybox-close").off("click.fb")}:i&&(c.afterShow=function(){Array.prototype.forEach.call(document.querySelectorAll(".fancybox-close"),(function(t){t.addEventListener("click",s.blueConicClient.doNotShowAgain(s.context.getInteractionId()))}))}),c.afterClose=function(){var t=s.blueConicClient.util.array.indexOfArray(s.blueConicClient._renderedInteractions,s.context.getInteractionId());s.blueConicClient._renderedInteractions.splice(t,1)},c},updateLightbox:function(){this.jQuery.fancybox.update()},getCurrentFancyBox:function(){return this.jQuery.fancybox.current},_showLightbox:function(){this._lightboxTriggered=!0;var t=this.getParameter("close_icon"),e=this.getParameter("close_icon_hover"),n=this,i=this.jQuery;function doLightBox(){if(!this.isInEditMode){this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()),!!this.parameters.forceclick&&("true"===this.parameters.forceclick[0]||!0===this.parameters.forceclick[0])&&this.blueConicClient.createEvent("CLICK",this.context.getInteractionId());var t=this.getParameter("click_event_selector");if(t){this.jQuery("body").one("click",t,function(t){this.lastClickEvent&&this.lastClickEvent.originalEvent===t.originalEvent||this._logClickEvent(t)}.bind(this));try{this.jQuery(t).one("click",function(t){this.lastClickEvent=t,this._logClickEvent(t)}.bind(this))}catch(i){}}}Array.prototype.forEach.call(document.querySelectorAll(".fancybox-wrap"),(function(t){t.parentNode.removeChild(t)})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-overlay"),(function(t){t.parentNode.removeChild(t)}));var e=function findHighestZIndex(t){var e,n=document.getElementsByTagName(t),i=0,o=0;for(o=0;o<n.length;o++)"auto"!==(e=document.defaultView.getComputedStyle(n[o],null).getPropertyValue("z-index"))&&parseInt(e)>i&&(i=parseInt(e));return i}("*");this.htmlFragment&&(this.emptyElementsWithAttribute(this.htmlFragment,"div","data-bc-external"),this.isInEditMode||this.handlePlaceholders(this.htmlFragment)),this.jQuery.fancybox(this.getSettings());var n=2147483647;e>8e3&&e+1030<n&&(Array.prototype.forEach.call(document.querySelectorAll(".fancybox-opened"),(function(t){t.style.zIndex=e+1030})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-wrap"),(function(t){t.style.zIndex=e+920})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-overlay"),(function(t){t.style.zIndex=e+910}))),e+1030>=n&&(Array.prototype.forEach.call(document.querySelectorAll(".fancybox-opened"),(function(t){t.style.zIndex=n})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-wrap"),(function(t){t.style.zIndex=2147483646})),Array.prototype.forEach.call(document.querySelectorAll(".fancybox-overlay"),(function(t){t.style.zIndex=2147483645}))),this.isInEditMode||this._setupFrontEndBindings()}this.handleStyling(t,e,(function(t){if(!t||(console.error(t),n.isInEditMode))n.handleJavascript().then((function(){doLightBox.call(n,i)}),(function(t){if(console.error("[BC] Loading Javascript urls for the lightbox failed:",t),n.isInEditMode)doLightBox.call(n,i);else{var e=n.blueConicClient.util.array.indexOfArray(n.blueConicClient._renderedInteractions,n.context.getInteractionId());n.blueConicClient._renderedInteractions.splice(e,1)}}));else{var e=n.blueConicClient.util.array.indexOfArray(n.blueConicClient._renderedInteractions,n.context.getInteractionId());n.blueConicClient._renderedInteractions.splice(e,1)}}))},_logClickEvent:function(t){t&&t.originalEvent&&t.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId()||(t&&t.target&&t.target.pathname&&t.target.hostname&&0===t.target.pathname.indexOf("/s/")&&-1!==t.target.hostname.indexOf("blueconic")||(t.originalEvent&&(t.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId())))},_setupFrontEndBindings:function(){var t=this.jQuery(".bcLightboxDontShowAgainLink"),e=this.jQuery(".bcLightboxCloseButton");t.length>0&&t.off("click.dontShowAgainLinks").on("click.dontShowAgainLinks",function(t){t.preventDefault(),this.blueConicClient.doNotShowAgain(this.context.getInteractionId()),this.closeLightbox()}.bind(this)),e.length>0&&e.off("click.closeButtons").on("click.closeButtons",function(){this.closeLightbox()}.bind(this))},handleComplexElements:function(t){for(var e=this.getElementsWithAttribute(t,"div","data-bc-pluginid"),n=0;n<e.length;n++){var i=e[n],o=i.getAttribute("data-bc-pluginid"),r=i.getAttribute("data-bc-config");if(r)try{var a=r.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t");r=this.blueConicClient.json.parse(a)}catch(c){r=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:o,config:r,node:i,interactionId:this.context.getInteractionId()}),this.isInEditMode||(i.removeAttribute("data-bc-pluginid"),i.removeAttribute("data-bc-config"))}},emptyElementsWithAttribute:function(t,e,n){for(var i=this.getElementsWithAttribute(t,e,n),o=0,r=i.length;o<r;o++){i[o].innerHTML=""}},getElementsWithAttribute:function(t,e,n){for(var i=[],o=t.getElementsByTagName(e),r=0,a=o.length;r<a;r++){var c=o[r];c.getAttribute(n)&&i.push(c)}return i},createElement:function(t){var e;if(!t)return null;try{(e=document.createElement("div")).innerHTML=t}catch(n){return null}return e},handlePlaceholders:function(t){for(var e=this._getPropertiesFromPlaceholders(t.innerHTML),n=0;n<e.length;n++){var i=e[n],o=this.profile.getValue(i)||"",r=new RegExp("\\$\\{"+i+"\\}","g");t.innerHTML=t.innerHTML.replace(r,encodeURI(o))}},_getPropertiesFromPlaceholders:function(t){for(var e,n=/\$\{([a-zA-Z\-_0-9]+)\}/g,i=[];e=n.exec(t);)i.push(e[1]);return i},getParameter:function(t){return this.parameters[t]&&this.parameters[t][0]?this.parameters[t][0]:null},getParameters:function(t){return this.parameters[t]||null},handleJavascript:function(){var t=this.jQuery,e=this.getParameters("javascript_urls"),n=[];if(e){this.javascriptUrls=e;for(var i=0;i<e.length;i++)n.push(this._getLoadScriptDeferred(e[i]))}return t.when.apply(t,n)},_getLoadScriptDeferred:function(t){var e=this.jQuery.Deferred(),n=document.createElement("script");return n.setAttribute("src",t),n.onload=function(){e.resolve()},n.onerror=function(){e.reject('Url "'+t+"\" couldn't be loaded")},document.head.appendChild(n),e},handleStyling:function(t,e,n){var i=this.getParameter("content"),o=[this.baseURL+"frontend/src/lib/fancybox/jquery.fancybox.css"];i&&-1!==i.indexOf("bcLightboxTemplate")||o.push(this.baseURL+"frontend/src/css/lightbox.css");var r=this.getParameter("styling_css");r&&(this.stylingUrl=r,o.push(r));var a="";"true"===this.getParameter("custom_close")&&t&&(a+=".fancybox-close {background-image: url('"+t+"');background-repeat: no-repeat;background-position: center center;background-size: contain;}",e&&(a+=".fancybox-close:hover {background-image: url('"+e+"');background-repeat: no-repeat;background-position: center center;background-size: contain;}"));var c=this.getParameter("close_position"),s=this.getParameter("close_padding");a+=this._getClosePositionStyling(c,s);var l=this.getParameter("styling_css_inline");return l&&(a+=l.replace(/&#xd;/gi,"")),a&&(this.inlineCss=this.jQuery("<style>"+a+"</style>"),this.inlineCss.appendTo(this.jQuery("body"))),this._loadCssUrls(o,n)},_loadCssUrls:function(t,e){var n=(t=t||[]).length,i=0,o=[];if(0===n)return e();function urlLoaded(){if(++i>=n)return o.length>0?e(o):e()}t.forEach((function(t){if(document.querySelector('link[href="'+t+'"]'))urlLoaded();else{var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e.onload=urlLoaded,e.onerror=function(t){o.push(t),urlLoaded()},document.head.appendChild(e)}}))},_getClosePositionStyling:function(t,e){if(!t)return"";null!==e&&"NaN"!==e||(e="-18");var n=".fancybox-close {";switch(t){case"TOP_LEFT":n+="top:"+e+"px; right: unset; bottom: unset; left:"+e+"px;";break;case"BOTTOM_RIGHT":n+="top: auto; right: "+e+"px; bottom: "+e+"px; left: unset;";break;default:n+="top: "+e+"px; right: "+e+"px; bottom: unset; left: unset;"}return n+"}"}});var a = [];var i='lightboxinteractiontype';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.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.3.1/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'image', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'image/1.0.2/'},{ id : 'number', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'number/1.0.2/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({EVENT_NAME:"adblock_detected",init:function(a,b){this.blueConicClient=a,this.context=b},getPreloadProperties:function(){var a=this.context.getParameters(),b=a.property?a.property[0]:a.property;return b?[b]:[]},onLoad:function(){var a=this,b=this.context.getProfile(),c=this.context.getParameters(),d=c.property?c.property[0]:c.property;d||(d=this.EVENT_NAME);var e=function(){"no"!==b.getValue(d)&&(b.setValue(d,"no"),a.blueConicClient.profile.updateProfile())},f=function(){"yes"!==b.getValue(d)&&(b.setValue(d,"yes"),a.blueConicClient.profile.updateProfile()),a.blueConicClient.createEvent(a.EVENT_NAME)};window.blockAdBlock?(window.blockAdBlock.on(!1,e),window.blockAdBlock.on(!0,f),window.blockAdBlock.check()):e()}});var a = [];var i='listener_adblock';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.0.16/lib/blockadblock.min.js', sharing: 'none'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.0.16/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({AMP_CLIENT_ID:"amp_client_id",init:function(t,e){this.blueConicClient=t,this.context=e},getPreloadProperties:function(){return[this.AMP_CLIENT_ID]},onLoad:function(){var t=this.context.getProfile(),e=this.blueConicClient.util.cookie.getCookie("_ga");e&&(t.setValue(this.AMP_CLIENT_ID,e),this.blueConicClient.profile.updateProfile())}});var a = [];var i='listener_amp';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},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(a,b){this.blueConicClient=a,this.context=b},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.0.12/'}]);})();(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 r=i.restrictions||{rules:[]};if(t.checkRestrictions(r.rules,r.operator||this.DEFAULT_RESTRICTION_OPERATOR)){this._checkScoreProperties(),this._subscribeSavePointsListener();var n=this.parameters.keywordsSources&&this.parameters.keywordsSources[0]?this.blueConicClient.json.parse(this.parameters.keywordsSources[0]):[];(n=n.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);var s=this.jQuery;return s.when(this._executer.loadLibraries(n)).then(s.proxy((function(){return this._executer.addBindings()}),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={TIME:(new Date).getTime(),days:this.days,data:e};this.blueConicClient.profile.getProfile().addValue(this.internalProperty,this.blueConicClient.json.stringify(t)),this.blueConicClient.profile.updateProfile()}}});var a = [];var i='listener_interest_ranker';a.push({url: 'http://code.jquery.com/jquery-1.11.2.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.3.13/frontend/src/js/Util.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.3.13/frontend/src/js/Executer.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.3.13/frontend/src/js/MetaKeywordRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.3.13/frontend/src/js/TextRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.3.13/frontend/src/js/UrlRanker.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.3.13/frontend/src/js/MetadataService.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.3.13/frontend/src/js/JavascriptRanker.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/1.3.13/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b},getPreloadProperties:function(){return['ip_address']},onLoad:function(){var a=this.context.getProfile(),b=a.getValue('ipAddress'),c=this.blueConicClient.getIPAddress();c!==b&&(a.setValue('ip_address',c),this.blueConicClient.profile.updateProfile())}});var a = [];var i='listener_ip_address';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/listener_ip_address/ts_02dbcaa258a21885238ee896ca3b52a4/'}]);})();(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.4/'}]);})();(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(e){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){void 0===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(e){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.1.14/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({LAST_VISIT_COOKIE_NAME:'last_visit_bc',NEW_VISIT_PROPERTY:'new_visit_bc',SESSION_TIMEOUT_MINUTES:30,init:function(a){this.blueConicClient=a,this.profile=a.profile.getProfile()},onPrepare:function(){var a=new Date().getTime(),b=this.blueConicClient.util.cookie.getCookie(this.LAST_VISIT_COOKIE_NAME);if(b&&!isNaN(parseInt(b))){var c=new Date(parseInt(b));c.setMinutes(c.getMinutes()+this.SESSION_TIMEOUT_MINUTES),a>c?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,a)},onLoad:function(){'true'===this.profile.getValue(this.NEW_VISIT_PROPERTY)&&this.blueConicClient.createEvent('new_visit')}});var a = [];var i='newvisitlistener';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/newvisitlistener/ts_9de4b69f00d63feb7382a95778295829/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({open:!1,data:{},nrOfTries:0,closeButtonWidth:10,borderWidth:1,BASE_CSS_ID_PREFIX:"bcBaseStyle_",INLINE_CSS_ID_PREFIX:"bcInlineStyle_",EXTERNAL_CSS_ID_PREFIX:"bcExternalStyle_",html:{nl:{content:"<p>Inhoud</p>"},"default":{content:"<p>Content</p>"}},init:function(e,t){this.blueConicClient=e,this.context=t,this.parameters=this.context.getParameters(),this._variantId=this.context.getInteractionId(),this._viewEventThrown=!1,this._manuallyClosed=!1,this.baseURL=this.blueConicClient.getBaseURL(this.context.getInteractionTypeId())+"frontend/src/",this.customCssUrls=[],this.customJsUrls=[],this.inlineCss=null,this.inlineJs=null,this._timestamp=null,this._observer=null,this._eventListenerFunction=null,this.isInEditMode=this.blueConicClient.isInEditMode(),this.clickTrigger=!1,this.blueConicClient._renderedInteractions=this.blueConicClient._renderedInteractions||[],this.blueConicClient.event.subscribe(this.blueConicClient.event.onUrlChange,this,(function(){if(this.open){this._getToasterNode().remove(),this._removeToasterStyling();var e=this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId());this.blueConicClient._renderedInteractions.splice(e,1),this.open=!1}}))},getPreloadProperties:function(){for(var e,t=this.context.getParameters().content+"",i=/data-bc-preload="([^"]*)"/g,s=[];null!==(e=i.exec(t));)for(var o=e[1].split(","),n=0;n<o.length;n++)s.push(o[n]);return s||[]},onMessageReceived:function(e){this.blueConicClient.event.publish("toaster.messageReceived",e)},onSave:function(){return this._getNodeWithinToaster(".bcToasterContent").html()},onLoad:function(e){"function"!=typeof e&&(e=function(){}),window.bc=window.bc||{},window.bc.jQuery=this.jQuery,window.bc.$=this.jQuery;var t=this,i=this.jQuery,s=this.getParameter("content"),o=s&&-1!==s.indexOf("bcToasterTemplate")?"_clean":"",n=this.getParameter("version"),r="";r=o||"3"!==n?"css/toaster"+o:"css/toaster_v3",r+=".css";var a=i('<link type="text/css" id="'+this.BASE_CSS_ID_PREFIX+this._variantId+'" href="'+this.baseURL+r+'" rel="stylesheet" />'),c=this.getParameter("template");this.template=c,a.on("load",(function(){t.handleStyling(t.getParameter("close_icon"),t.getParameter("close_icon_hover"),(function(i){if(i&&(console.error(i.message),!t.isInEditMode))return t._removeUrls(),e(i.message);t.handleJavascript((function(i){return i&&(console.error(i.message),!t.isInEditMode)?(t._removeUrls(),e(i.message)):(t.loadToaster(),e())}))}))})),i("head").append(a)},loadToaster:function(){var e=this.context.getParameters(),t=this.jQuery;if(!this._getToasterNode().hasClass("bcToasterOpen")){this._getToasterNode().length&&this._getToasterNode().remove();var i=this.getParameter("close_icon");i&&(this._closeIcon=i);var s=this.getParameter("close_icon_hover");s&&(this._closeIconHover=s);var o=this;if(this._addContent(e,t),this._getNodeWithinToaster(".bcClose").click((function(){o._manuallyClosed=!0,o._hideToaster()})),this.emptyElementsWithAttribute(this._getToasterNode().get(0),"div","data-bc-external"),this.handleComplexElements(this._getToasterNode().get(0)),this.positionDivs(),this.isInEditMode)o._showToaster();else{var n=[],r=0,a=this.getParameter("triggerWhen");a?(r=100,n.push(this._convertWhenSettingPreviousToasterVersion(a))):(n=e.selected_when&&0!==e.selected_when.length?e.selected_when:["onPageLoad"],r=e.scroll_depth&&e.scroll_depth[0]&&!isNaN(e.scroll_depth[0])?parseInt(e.scroll_depth[0]):0);for(var c=this.getParameter("click_selector"),h=this.getParameter("content_condition"),l=0;l<n.length;l++)switch(n[l]){case"click_selector":this._addClickTriggerBindings(c);break;case"content_condition":this._addContentPolling(h);break;case"scroll_depth":this._addScrollBinding(r);break;case"triggerOn":this._addScrollOn(o);break;default:o._checkDelayBeforeTrigger()}this._setupFrontEndBindings()}}},_setupFrontEndBindings:function(){var e=this.jQuery(".bcToasterDontShowAgainLink"),t=this.jQuery(".bcToasterCloseButton");e.length>0&&e.off("click.dontShowAgainLinks").on("click.dontShowAgainLinks",this.jQuery.proxy((function(e){e.preventDefault(),this.blueConicClient.doNotShowAgain(this.context.getInteractionId()),this._hideToaster()}),this)),t.length>0&&t.off("click.closeButtons").on("click.closeButtons",this.jQuery.proxy((function(){this._hideToaster()}),this)),this._addCloseEventHandler()},_convertWhenSettingPreviousToasterVersion:function(e){switch(e){case"scroll":return"triggerOn";case"reachedBottom":return"scroll_depth";default:return"onPageLoad"}},_addCloseEventHandler:function(){this.blueConicClient.event.subscribe("closeoverlay",this,(function(e,t){t instanceof Array&&t[0]===this.context.getInteractionId()&&this._hideToaster()}))},_addScrollOn:function(e){(0,this.jQuery)(window).scroll((function(){e._checkDelayBeforeTrigger()}))},_checkScrollCondition:function(e){this.jQuery(window).scrollTop()/(this.jQuery(document).height()-window.innerHeight)*100>=e&&this._checkDelayBeforeTrigger()},_addScrollBinding:function(e){this._checkScrollCondition(e),this.jQuery(window).scroll(this.jQuery.proxy((function(){this._checkScrollCondition(e)}),this))},_addClickTriggerBindings:function(e){try{var t=this.jQuery(e);this.clickTrigger=!0,t.length>0?t.off("click.toaster").on("click.toaster",this.jQuery.proxy((function(){this._getToasterNode().get(0)?this._checkDelayBeforeTrigger(!0):this.open||this._setupToasterBeforeToShow()}),this)):this.blueConicClient.position.subscribe(e,this,this.jQuery.proxy(this._addClickTriggerBindings,this,e))}catch(i){}},_setupToasterBeforeToShow:function(){this.handleStyling(this.getParameter("close_icon"),this.getParameter("close_icon_hover"),(function(){})),this.handleJavascript((function(){})),this._addContent(null,this.jQuery);var e=this;this._getNodeWithinToaster(".bcClose").click((function(){e._hideToaster()})),this.clickTrigger=!0,this._checkDelayBeforeTrigger()},_getNodeWithinToaster:function(e){return this.jQuery("#"+this._variantId+" "+e)},_getToasterNode:function(){return this.jQuery("#"+this._variantId)},_addContentPolling:function(e){this._checkContentCondition(e);var t=this,i=document.getElementsByTagName("body")[0];if(window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)this._observer=new MutationObserver((function(){t._observeContentChanges(e)})),this._observer.observe(i,{childList:!0,subtree:!0});else if(window.addEventListener)this._eventListenerFunction=function(){t._observeContentChanges(e)},i.addEventListener("DOMNodeInserted",this._eventListenerFunction,!1);else var s=setInterval((function(){t.open?clearInterval(s):t._checkContentCondition(e)}),500)},_observeContentChanges:function(e){if(this.open){this._observer?this._observer.disconnect():document.getElementsByTagName("body")[0].removeEventListener("DOMNodeInserted",this._eventListenerFunction,!1)}else{var t=this,i=(new Date).getTime();this._timestamp=i,setTimeout((function(){t._timestamp!==i||t.open||t._checkContentCondition(e)}),250)}},_checkContentCondition:function(e){this.jQuery(e).length>0&&this.jQuery(e).html()&&this.jQuery(e).html().length>0&&this._checkDelayBeforeTrigger()},_addContent:function(e,t){var i=this.getParameter("content");if(i&&-1!==i.indexOf("<body></body>")&&(i=""),!i){var s="nl"===this.context.getLocale()?"nl":"default";i=this.html[s].content}var o=t(i=this.template?'<div class="bcToaster" id="'+this._variantId+'" style="visibility:hidden;"><div class="bcCloseWrapper"><div class="bcClose"><div></div></div></div><div class="bcToasterContent bcTemplateContent">'+i+"</div></div>":'<div class="bcToaster" id="'+this._variantId+'" style="visibility:hidden;"><div class="bcCloseWrapper"><div class="bcClose"><div></div></div></div><div class="bcToasterContent">'+i+"</div></div>"),n=this.getParameter("close_icon");"true"===this.getParameter("custom_close")&&n?o.removeClass("bcDefaultClose"):o.addClass("bcDefaultClose");try{o.appendTo(t("body"))}catch(r){this.isInEditMode&&console.error("Error caught: "+r)}},handleComplexElements:function(e){for(var t=this.getElementsWithAttribute(e,"div","data-bc-pluginid"),i=0;i<t.length;i++){var s=t[i],o=s.getAttribute("data-bc-pluginid"),n=s.getAttribute("data-bc-config");if(n)try{var r=n.replace(/\n/g,"\\\\n").replace(/\r/g,"\\\\r").replace(/\t/g,"\\\\t");n=this.blueConicClient.json.parse(r)}catch(a){n=null}this.blueConicClient.event.publish("bcComplexObject",{plugin:o,config:n,node:s,interactionId:this.context.getInteractionId()}),this.isInEditMode||(s.removeAttribute("data-bc-pluginid"),s.removeAttribute("data-bc-config"))}},emptyElementsWithAttribute:function(e,t,i){for(var s=this.getElementsWithAttribute(e,t,i),o=0,n=s.length;o<n;o++){s[o].innerHTML=""}},getElementsWithAttribute:function(e,t,i){for(var s=[],o=e.getElementsByTagName(t),n=0,r=o.length;n<r;n++){var a=o[n];a.getAttribute(i)&&s.push(a)}return s},_positionFromPerpendicularEdge:function(){this.jQuery;var e=this.getParameter("location")||"right",t=this.getParameter("pixelsFrom")?this.getParameter("pixelsFrom"):"",i=this.getParameter("locationFrom")?this.getParameter("locationFrom"):"left_or_top";if(this.getParameter("locationFrom")||this.getParameter("version")||(i="right_or_bottom"),t||0===t){var s="left"===e||"right"===e?"left_or_top"===i?"top":"bottom":"left_or_top"===i?"left":"right";this._getToasterNode().css(s,t+"px"),this._getToasterNode().css(e,0)}else{var o=this._getNodeWithinToaster(".bcToasterContent").get(0).getBoundingClientRect();if("left"===e||"right"===e){var n=window.innerHeight||document.documentElement.clientHeight,r=o.height||o.bottom-o.top;this._getToasterNode().css("top",Math.max((n-r)/2,0)+"px"),this._getToasterNode().css("left"===e?"left":"right",0)}else{var a=window.innerWidth||document.documentElement.clientWidth,c=o.width||o.right-o.left;this._getToasterNode().css("left",Math.max((a-c)/2,0)+"px"),this._getToasterNode().css("top"===e?"top":"bottom",0)}}},positionDivs:function(){var e=this.jQuery,t=this.getParameter("location")||"right",i=this._getShowClose();this._positionFromPerpendicularEdge(),"left"===t?this._getToasterNode().removeClass("bcRight").removeClass("bcTop").removeClass("bcBottom").addClass("bcLeft"):"right"===t?this._getToasterNode().removeClass("bcLeft").removeClass("bcTop").removeClass("bcBottom").addClass("bcRight"):"top"===t?(this._getNodeWithinToaster(".bcToasterContent").after(e(".bcToaster .bcCloseWrapper")),this._getToasterNode().removeClass("bcRight").removeClass("bcBottom").removeClass("bcLeft").addClass("bcTop")):this._getToasterNode().removeClass("bcRight").removeClass("bcTop").removeClass("bcLeft").addClass("bcBottom"),i?this._getToasterNode().addClass("bcShowClose"):this._getToasterNode().removeClass("bcShowClose")},handleStyling:function(e,t,i){var s=this.jQuery,o="",n=[];if(this._getShowClose()?this._getToasterNode().addClass("bcShowClose"):this._getToasterNode().removeClass("bcShowClose"),"true"===this.getParameter("custom_close")&&e){this._getToasterNode().removeClass("bcDefaultClose"),o+=".bcToaster .bcClose > div { background-image: none;}";var r=".bcToaster .bcClose {background-image: url('"+e+"');background-repeat: no-repeat;background-color: transparent;",a=".bcToaster .bcClose:hover {background-image: url('"+t+"');";"3"===this.getParameter("version")?(o+=r+"background-position: center center;background-size: contain;}",t&&(o+=a+"}")):(o+=r+"}",t?o+=a+"background-position: 0px 0px;}":s(".bcToaster .bcClose:hover").css("background-position",""))}else this._getToasterNode().addClass("bcDefaultClose");var c=this.getParameter("close_position"),h=this.getParameter("close_padding");o+=this._addClosePositionStyling(c,h);var l=this.getParameter("styling_css");l&&(this.stylingUrl=l,this.customCssUrls.push(l),n.push(l));var d=this.getParameter("styling_css_inline");d&&(o+=d.replace(/&#xd;/gi,"")),o&&(this.inlineCss=s("<style id='"+this.INLINE_CSS_ID_PREFIX+this._variantId+"'>"+o+"</style>"),this.inlineCss.appendTo(s("head"))),this._loadCss(n,i)},_loadCss:function(e,t){var i=(e=e||[]).length,s=0,o=[];if(this.errorList=null,void 0===t&&(t=function(){}),0===i)return t();function urlLoaded(e){if(++s>=i)return o.length>0?t({message:"Error occured when loading the file "+e,error:o}):t()}e.forEach((function(e){if(document.querySelector('link[href="'+e+'"]'))urlLoaded();else{var t=document.createElement("link");t.setAttribute("href",e),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.onload=urlLoaded,t.onerror=function(t){o.push(t),urlLoaded(e)},document.head.appendChild(t)}}))},_loadJs:function(e,t){var i=(e=e||[]).length,s=0,o=[];if(this.errorList=null,void 0===t&&(t=function(){}),0===i)return t();function urlLoaded(e){if(++s>=i)return o.length>0?t({message:"Error occured when loading the file "+e,error:o}):t()}e.forEach((function(e){if(document.querySelector('script[src="'+e+'"]'))urlLoaded();else{var t=document.createElement("script");t.setAttribute("src",e),t.setAttribute("type","text/javascript"),t.onload=urlLoaded,t.onerror=function(t){o.push(t),urlLoaded(e)},document.head.appendChild(t)}}))},_removeUrls:function(){this.customCssUrls.forEach((function(e){e&&document.querySelector('link[href="'+e+'"]').remove()})),this.customJsUrls.forEach((function(e){e&&document.querySelector('script[src="'+e+'"]').remove()}))},handleJavascript:function(e){var t=this.getParameters("javascript_urls");this.customJsUrls=t,null===this.customJsUrls&&(this.customJsUrls=[]),this._loadJs(this.customJsUrls,e)},_getShowClose:function(){var e=!1,t=this.getParameter("show_close");return"true"===t||"false"===t||!0===t||!1===t?"true"===t||!0===t:(e=!!this.getParameter("close")&&"showClose"===this.getParameter("close"),this.getParameter("showClose")&&(e=!0),e)},_hideToaster:function(){if(!this.isInEditMode){var e=this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId());this.blueConicClient._renderedInteractions.splice(e,1);var t="true"===this.getParameter("hide_after_close"),i=(this.jQuery,this._getNodeWithinToaster(".bcToasterContent").get(0).getBoundingClientRect()),s=this.getParameter("location")||"right",o=this._getShowClose(),n="left"===s||"right"===s?i.width:i.height;this._setToasterEffect(!0,o,n),t&&this.blueConicClient.doNotShowAgain(this.context.getInteractionId()),window.setTimeout(function(){this._removeToasterStyling(),this._getToasterNode().removeClass("bcToasterOpen"),this.clickTrigger&&(this.open=!1)}.bind(this),501)}},_removeToasterStyling:function(){this._getBaseCssReference().remove(),this._getInlineCssReference().remove(),this._externalStylesheetReference&&this._externalStylesheetReference.remove()},_getBaseCssReference:function(){return this.jQuery("#"+this.BASE_CSS_ID_PREFIX+this._variantId)},_getInlineCssReference:function(){return this.jQuery("#"+this.INLINE_CSS_ID_PREFIX+this._variantId)},_checkDelayBeforeTrigger:function(e){var t=this.context.getParameters(),i=t.delay&&t.delay[0]&&!isNaN(t.delay[0])?1e3*parseInt(t.delay[0]):0;i>0?window.setTimeout(this.jQuery.proxy((function(){this._showToaster(e)}),this),i):this._showToaster(e)},_showToaster:function(e){var t=this,i=this.jQuery;if(!this._manuallyClosed||this.isInEditMode||e){if(0===this._getNodeWithinToaster(".bcToasterContent").width()&&!e){if(this.nrOfTries>10)return;return this.nrOfTries++,void setTimeout((function(){t._showToaster(e)}),500)}if(!this.open){if(-1!==this.blueConicClient.util.array.indexOfArray(this.blueConicClient._renderedInteractions,this.context.getInteractionId()))return;this.blueConicClient._renderedInteractions.push(this.context.getInteractionId()),this.isInEditMode||this._viewEventThrown||(this._viewEventThrown=!0,this.blueConicClient.createEvent("VIEW",this.context.getInteractionId()));var s=this._getShowClose();this.positionDivs(),this._getToasterNode().css("visibility","visible"),this._getToasterNode().css("display","block"),this._getToasterNode().addClass("bcToasterOpen"),i(window).resize(i.proxy((function(){this.positionDivs()}),this));var o=this.getParameter("click_event_selector");if(o){this.jQuery("body").one("click",o,this.jQuery.proxy((function(e){this.lastClickEvent&&this.lastClickEvent.originalEvent===e.originalEvent||this._logClickEvent(e)}),this));try{this.jQuery(o).one("click",this.jQuery.proxy((function(e){this.lastClickEvent=e,this._logClickEvent(e)}),this))}catch(a){}}this._setToasterEffect(!1,s);var n=t.getParameter("javascript");if(this.inlineJs=n,n&&!t.isInEditMode){n=n.replace(/(^|\W)blueConicVariantId(\W|$)/g,'$1"'+t.context.getInteractionId()+'"$2');var r=t.jQuery("<script>"+n+"<\/script>");try{r.appendTo(t.jQuery("body"))}catch(c){console.error(c)}}this.open=!0,this.isInEditMode&&this.blueConicClient.event.publish("toaster.interactionLoaded",{interaction:this})}}},_logClickEvent:function(e){e&&e.originalEvent&&e.originalEvent._blueConicLoggedClickEvent===this.context.getInteractionId()||(e&&e.target&&e.target.pathname&&e.target.hostname&&0===e.target.pathname.indexOf("/s/")&&-1!==e.target.hostname.indexOf("blueconic")||(e.originalEvent&&(e.originalEvent._blueConicLoggedClickEvent=this.context.getInteractionId()),this.blueConicClient.createEvent("CLICK",this.context.getInteractionId())))},_setToasterEffect:function(e,t,i){this.jQuery;var s={},o=this.getParameter("location")||"right",n=t?this.closeButtonWidth+this.borderWidth:this.borderWidth,r=this.getParameter("effect");r||this.getParameter("version")||(r="slideIn");var a=this.getParameter("effect_slide_direction")||"left";s[o]="-"+(i+n)+"px";var c=r+"_"+a===this._effect;this.isInEditMode&&c&&(r="noEffect");var h=this;if(r&&"noEffect"!==r)if("fadeIn"!==r||e)if("fadeIn"===r&&e)this._getToasterNode().fadeOut(500);else if("slideIn"!==r||e)"slideIn"===r&&e&&this._getToasterNode().animate(s,500,(function(){h._getToasterNode().css("display","none")}));else{s[o]="0px";var l=this._getNodeWithinToaster(".bcToasterContent").get(0).getBoundingClientRect(),d="left"===o||"right"===o?l.width:l.height;this._getToasterNode().css(o,"-"+(d+n)+"px"),this._getToasterNode().animate(s,500,(function(){h._getToasterNode().addClass("bcToasterOpen")}))}else this._getToasterNode().hide(),this._getToasterNode().fadeIn(500,(function(){h._getToasterNode().addClass("bcToasterOpen")}));else e&&this._getToasterNode().css("display","none")},_addClosePositionStyling:function(e,t){var i="3"===this.getParameter("version");if(!e||!i)return"";null!==t&&"NaN"!==t||(t="5");var s=".bcToaster .bcClose {";switch(e){case"TOP_LEFT":s+="top:"+t+"px; right: unset; bottom: unset; left:"+t+"px;";break;case"BOTTOM_RIGHT":s+="top: unset; right: "+t+"px; bottom: "+t+"px; left: unset;";break;default:s+="top: "+t+"px; right: "+t+"px; bottom: unset; left: unset;"}return s+"}"},getParameter:function(e){return this.parameters[e]&&this.parameters[e][0]?this.parameters[e][0]:null},getParameters:function(e){return this.parameters[e]||null}});var a = [];var i='toaster';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.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.0.2/'},{ id : 'html', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'html/1.0.10/'},{ id : 'image', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'image/1.0.2/'},{ id : 'number', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'number/1.0.2/'},{ id : 'string', baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + 'string/1.0.1/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({fallbackLabels:{article:{noStore:{nl:{name:"Titel van het artikel (Bron nog niet geselecteerd)",description:"Beschrijving van het artikel (Bron nog niet geselecteerd)"},"default":{name:"Title of the article (source not yet selected)",description:"Description of the article (source not yet selected)"}},noItems:{nl:{name:"Titel van het artikel (aanbevolen artikelen nog niet beschikbaar)",description:"Beschrijving van het artikel (aanbevolen artikelen nog niet beschikbaar)"},"default":{name:"Title of the article (recommended articles not yet available)",description:"Description of the article (recommended articles not yet available)"}}},product:{noStore:{nl:{name:"Titel van het product (Bron nog niet geselecteerd)",description:"Beschrijving van het product (Bron nog niet geselecteerd)"},"default":{name:"Title of the product (source not yet selected)",description:"Description of the product (source not yet selected)"}},noItems:{nl:{name:"Titel van het product (aanbevolen producten nog niet beschikbaar)",description:"Beschrijving van het product (aanbevolen producten nog niet beschikbaar)"},"default":{name:"Title of the product (recommended products not yet available)",description:"Description of the product (recommended products not yet available)"}}}},init:function(e,t){this.blueConicClient=e,this.profile=e.profile.getProfile(),this._templatesLoaded=[],this.baseURL=this.blueConicClient.getBaseURL(t.getInteractionTypeId()),this.context=t,this.locale=t.getLocale(),this.pluginId=t.getInteractionTypeId();var i=this;this.blueConicClient.event.subscribe("bcComplexObject",this,(function(e,t){t&&t.plugin===i.pluginId&&(t.config.interactionId=t.interactionId,this.blueConicClient.isInEditMode()||(t.config.id=(new Date).getTime()+Math.round(1e3*Math.random())),this.type="toolbar_content_recommendations"===t.plugin?"article":"product",i._setUniqueId(t.node,t.config.id),i._applyTemplate(t))})),this.blueConicClient.isInEditMode()&&this._subscribeEditModeEvents()},_subscribeEditModeEvents:function(){this.blueConicClient.event.subscribe("recommendations.updateTemplate",this,(function(e,t){if(t.message.pluginId===this.pluginId){var i=this._createTemplateObject(t.message.template);this._addTemplateToCache(i),this._applyTemplate({update:!0})}})),this.blueConicClient.event.subscribe("recommendations.updateConfig",this,(function(e,t){if(t.message.pluginId===this.pluginId){var i=this._migration(t.message.config);(i=i||{}).settings=i.settings||{};var n=this._getProperties(i);i["data-bc-template-id"]=i.settings.templateId||"";var a='[data-bc-pluginid="'+this.pluginId+'"][data-bc-config*="'+i.id+'"]';if(document.querySelector(a).setAttribute("data-bc-config",JSON.stringify(i)),n.length>0)document.querySelector(a).setAttribute("data-bc-preload",n.join(","));var r=document.querySelector(".bcComplexObject"+i.id);if(this.profile.loadValues(n,this,(function(){this._applyTemplate({config:i,node:r})})),window.CKEDITOR&&window.CKEDITOR.instances&&Object.keys(window.CKEDITOR.instances).length>0)window.CKEDITOR.instances[Object.keys(window.CKEDITOR.instances)[0]].fire("change")}})),this.blueConicClient.event.subscribe("editorClosed",this,(function(){this._sendMessage("recommendations.closeConfigurator")}))},_getProperties:function(e){return e&&e.rules?e.rules.reduce((function(e,t){return t&&t.metaDataFilters&&(e=e.concat(Array.prototype.map.call(Array.prototype.filter.call(t.metaDataFilters,(function(e){return e.property})),(function(e){return e.property})))),e}),[]):[]},_setUniqueId:function(e,t){if(e&&t){var i="bcComplexObject"+t;e.className=[e.className,i].join(" ")}},_applyTemplate:function(e){var t=this._migration(e.config);(t=t||{}).settings=t.settings||{};var i=t.settings.templateId;if(i){var n=".bcComplexObject"+t.id;document.querySelector(n).innerHTML="";var a=this;this._loadTemplate(i,(function(t){e.update||a._loadHTML(e,t)}))}},_getLabelObject:function(e){return"nl"===this.locale?this.fallbackLabels[this.type][e].nl:this.fallbackLabels[this.type][e]["default"]},_getFallbackData:function(e,t){for(var i=this._getLabelObject(e),n=[],a=0;a<t;a++)n.push({name:[i.name],description:[i.description],image:[this.baseURL+"frontend/src/node_modules/@blueconic/frontend-recommendations-rendering/images/fallback600x600.png?"]});return n},_initMetaDataService:function(e){var t=null;if(e){var i=this.context.getConnection(e);if(i){var n=i.getParameters().metadata;t=n?this.blueConicClient.json.parse(n):null}}this._metaDataService=new window.BlueConicMetaDataService(this.jQuery,t,this.type),this._metaDataService.blueConicClient=this.blueConicClient},_getItems:function(e){var t=this.jQuery;this._initMetaDataService(e.settings.connectionId||e["data-bc-connection-id"]);var i=t.Deferred(),n=this._getCount(e),a=this._getQueryStringParametersForRecommendations(e);return a.storeId?this.blueConicClient.recommendation.getRecommendations(a,function(e){var t=e.getItems();(t=t.slice(0,n))&&0!==t.length||!this.blueConicClient.isInEditMode()?i.resolve(t):i.resolve(this._getFallbackData("noItems",n))}.bind(this)):i.resolve(this._getFallbackData("noStore",n)),i},_loadHTML:function(e,t){if(t){var i=e.node,n=this._migration(e.config);this._handleStyling(n,t);var a=this._getWidthClass(i),r=document.createElement("div");return r.className=a,r.setAttribute("data-bc-external","true"),r.setAttribute("data-bc-id",n.id),this._getItems(n).then(function(e){return this._handleItems(e,n,t,r)}.bind(this))}},_handleItems:function(e,t,i,n){if(0!==e.length){var a=this._getDataObject(e,t.interactionId);this._renderTemplate(a,i,n);var r=this._addItemNodes(n,e,t);r&&r.appendChild(n),this.blueConicClient.isInEditMode()||this._bindClicks(n,e[0].recommendationId,t),this._addImageErrorHandler(n,t),this._addJavaScript(i);var s=document.querySelector(".bcComplexObject"+t.id);this._addOnResizeHandler(s,n)}else for(var o=document.querySelector(".bcComplexObject"+t.id);o.firstChild;)o.removeChild(n.firstChild)},_renderTemplate:function(e,t,i){if(e&&t&&window.Mustache){for(var n=t.getHtml().replace(/<img\s+src=(['"]{{image}}['"])/,"<img data-bc-src=$1"),a=window.Mustache.to_html(n,e);i.firstChild;)i.removeChild(i.firstChild);var r=document.createElement("div");r.innerHTML=a,i.appendChild(r),Array.prototype.forEach.call(i.querySelectorAll("img[data-bc-src]"),function(e){var t=e.getAttribute("data-bc-src"),i=e.getAttribute("width");isNaN(i)||null===i||(t+="&width="+i);var n=e.getAttribute("height");isNaN(n)||null===n||(t+="&height="+n),e.setAttribute("src",t),e.removeAttribute("data-bc-src")}.bind(this))}},_addItemNodes:function(e,t,i){var n=document.querySelector(".bcComplexObject"+i.id);if(n&&n.firstChild)for(;n.firstChild;)n.removeChild(n.firstChild);for(var a=0;a<t.length;a++)if(t[a].ID&&t[a].URL)for(var r=e.querySelectorAll('a[href^="'+t[a].URL+'"]'),s=0;s<r.length;s++)r[s].setAttribute("data-bc-item-id",t[a].ID);return n},_addJavaScript:function(e){var t=e.getJavaScript();if(t){var i=document.createElement("script");i.type="text/javascript",i.appendChild(document.createTextNode(t));var n=document.getElementsByTagName("head")[0]||document.documentElement;try{n.insertBefore(i,n.firstChild)}catch(a){console.error(a)}}},_addOnResizeHandler:function(e,t){var i=function(){if(e&&t){for(var i=t.getAttribute("class").split(" "),n=this._getWidthClass(e),a=[n],r="",s=0;s<i.length;s++)-1===i[s].search("^bcp.*Width$")?a.push(i[s]):r=i[s];r!==n&&(t.className=a.join(" "))}}.bind(this);window.addEventListener("resize",(function(){i()}))},_addImageErrorHandler:function(e,t){(t=t||{}).settings=t.settings||{};var i=t.settings.storeId;e.addEventListener("error",function(e){if("IMG"===e.target.tagName){var t=e.target,n=t.getAttribute("src");if(t.style.display="none",!n)return;var a=this.blueConicClient.getHostname();if(-1===n.indexOf(a+"/rest/contentStores/"+i+"/items/"))return;Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(this))return null;do{if(t.matches(e))return t;t=t.parentElement}while(null!==t);return null};var r=t.closest("a[data-bc-item-id]");if(0===r.length)return;var s=r.getAttribute("data-bc-item-id"),o=r.getAttribute("href");if(!s||!o)return;var l=encodeURIComponent(encodeURIComponent(s));if(-1===n.indexOf("/items/"+l+"/image"))return;this.blueConicClient.recommendation.createEvent({itemId:s,url:o,storeId:i,lastmodified:(new Date).getTime()})}}.bind(this),!0)},_getWidthClass:function(e){return e?e.clientWidth<=480?"bcpSmallWidth":e.clientWidth>=1024?"bcpMaxWidth":"bcpDefaultWidth":""},_getUrl:function(){var e=document.querySelector('meta[property="og:url"]'),t=document.querySelector('link[rel="canonical"]');return(e.getAttribute("content")||t.getAttribute("href")||window.location.protocol+"//"+window.location.host+window.location.pathname).split("?")[0]},_getQueryStringParametersForRecommendations:function(e){(e=e||{}).settings=e.settings||{};var t={},i=e.settings.storeId;if(!i)return t;t.storeId=i,"No profile present and will not be created."!==this.profile.getId()&&(t.profileId=this.profile.getId());var n=this._getSettings(e);n.debug&&(t.debug=n.debug),n.frequencyCap&&(t.frequencyCap=n.frequencyCap);var a=this._metaDataService.getItemId(document.location.toString());return a&&(t.itemId=a),t.request=this._getRules(e),t},_getSettings:function(e){var t=e.settings||{};return{debug:Boolean(t.debug),frequencyCap:!t.useFrequencyCap||isNaN(t.frequencyCap)||this.blueConicClient.isInEditMode()?null:t.frequencyCap}},_getRules:function(e){return e.rules=e.rules||[],e.rules.map((function(e){return{id:e.isFallback?"default":e.id,filters:this._getRuleFilters(e),boosts:this._getBoostFilters(e),count:e.isFallback?null:e.amount}}),this)},_getCount:function(e){return(e=e||{}).rules=e.rules||[],Array.prototype.filter.call(e.rules,(function(e){return!e.isFallback})).map((function(e){return e.amount||0})).reduce((function(e,t){return e+t}),0)},_getRuleFilters:function(e){var t=[];if(Array.isArray(e.filters)){var i=e.filters.map((function(e){var t="SHOW"===e.filterType&&"IN_STOCK"!==e.id?"_ONLY":"";return e.id+t}));t=t.concat(i)}return Array.isArray(e.metaDataFilters)&&e.metaDataFilters.forEach((function(e){t=t.concat(this._handleFilterRules(e,this._metaDataService)||[])}),this),t},_getBoostFilters:function(e){return e.algorithms.map((function(e){return e.rampUp||delete e.rampUp,e}))},_handleFilterRules:function(e,t){var i=[];switch(e.operatorSetting){case"MUSTNOTBEEMPTY":i.push("hasproperty:"+e.metaDataField);break;case"MUSTBEEMPTY":i.push("!hasproperty:"+e.metaDataField);break;case"CONTAINS":case"DOESNOTCONTAIN":case"CONTAINSALL":case"DOESNOTCONTAINALL":var n=this._handleListRules(e,t);i=i.concat(n);break;case"AFTER":case"BEFORE":case"BETWEEN":var a=this._handleDateRules(e);i=i.concat(a)}return i},_handleListRules:function(e,t){var i=this._getValues(e,t,t.getMetaDataFields());if(0===i.length)return[];var n=[];switch(e.operatorSetting){case"CONTAINS":n=[e.metaDataField+':"'+i.join('","')+'"'];break;case"DOESNOTCONTAINALL":n=["!"+e.metaDataField+':"'+i.join('","')+'"'];break;case"DOESNOTCONTAIN":n=i.map((function(t){return"!"+e.metaDataField+':"'+t+'"'}));break;case"CONTAINSALL":n=i.map((function(t){return e.metaDataField+':"'+t+'"'}))}return n},_handleDateRules:function(e){if(!e.dateValue&&"BETWEEN"!==e.operatorSetting||!e.dateBetweenValue&&"BETWEEN"===e.operatorSetting)return[];var t=[];if("BETWEEN"!==e.operatorSetting){var i=new Date;switch(e.valueType){case"DAYS":"BEFORE"===e.operatorSetting?(i.setDate(i.getDate()-parseInt(e.dateValue)),t.push(e.metaDataField+"<="+i.toISOString())):(i.setDate(i.getDate()-parseInt(e.dateValue)),t.push(e.metaDataField+">="+i.toISOString()));break;case"HOURS":"BEFORE"===e.operatorSetting?(i.setHours(i.getHours()-parseInt(e.dateValue)),t.push(e.metaDataField+"<="+i.toISOString())):(i.setHours(i.getHours()-parseInt(e.dateValue)),t.push(e.metaDataField+">="+i.toISOString()));break;case"DATE":i=new Date(e.dateValue),t.push("BEFORE"===e.operatorSetting?e.metaDataField+"<="+i.toISOString():e.metaDataField+">="+i.toISOString())}}else{var n=e.dateBetweenValue.start,a=e.dateBetweenValue.end;t.push(e.metaDataField+">="+("string"==typeof n?n:n.toISOString())),t.push(e.metaDataField+"<="+("string"==typeof a?a:a.toISOString()))}return t},_getValues:function(e,t,i){if("values"===e.valueType&&e.values.length>0)return e.values;if("property"===e.valueType)return this.profile.getValues(e.property);if(!i)return t.getFieldValues({fieldId:e.metaDataField,type:"default"});for(var n=0;n<i.length;n++)if(i[n].fieldId===e.metaDataField)return t.getFieldValues(i[n]);return[]},_handleEvent:function(e,t,i,n,a,r,s,o,l){if(n){if(!i)return void(document.location.href=t);var c={storeId:n,action:e,itemId:i,url:t};if("No profile present and will not be created."!==this.profile.getId()&&(c.profileId=this.profile.getId()),s&&r&&(c.debug=!0,c.recommendationId=r),"click"===e){if(l&&l.originalEvent&&l.originalEvent._blueConicLoggedClickEvent===a)return;l&&l.originalEvent&&(l.originalEvent._blueConicLoggedClickEvent=a),this.blueConicClient.createEvent("CLICK",a)}this.blueConicClient.recommendation.createEvent(c,(function(){"click"===e&&(o&&"_blank"!==o?window.open(t,o):o&&"_blank"===o||(document.location.href=t))}))}},_bindClicks:function(e,t,i){(i=i||{}).settings=i.settings||{};var n=i.settings.storeId,a=i.settings.debug,r=i.interactionId,s=function(e,i){e.preventDefault();var s=i.getAttribute("href"),o=i.getAttribute("target");o&&"_blank"===o&&window.open(s,o),this._handleEvent("click",s,i.getAttribute("data-bc-item-id"),n,r,t,a,o,e)}.bind(this);Array.prototype.forEach.call(e.querySelectorAll("a[data-bc-item-id]"),function(e){e.addEventListener("click",(function(t){t.currentTarget.dataset.triggered||s(t,e)}))}.bind(this))},_getDataObject:function(e,t){var i=e.length;e=e.map((function(e,t){return e.isFirstItem=0===t,e.isLastItem=t===i-1,e.index=t,e.id&&!e.ID&&(e.ID=e.id),e.url&&!e.URL&&(e.URL=e.url),e.customProperties&&Object.keys(e.customProperties).forEach((function(t){e[t]=e.customProperties[t]})),e}));var n=null;t&&(n=this.blueConicClient.getInteractionNamesById(t)||{id:t});var a={},r=this._metaDataService.getMetaDataFields(),s=this._metaDataService.getItemType(r);return r&&s===this.type&&r.forEach((function(e){var t=e.fieldId;"url"!==t&&"id"!==t||(t=t.toUpperCase()),a[t]=this._metaDataService.getFieldValues(e)}),this),{interaction:n,current:a,recommendations:e}},_sendMessage:function(e,t){this.blueConicClient.fn.postMessage&&this.blueConicClient.fn.postMessage(e,t)},_handleStyling:function(e,t){(e=e||{}).settings=e.settings||{},e.settings.styling=e.settings.styling||{},this._appendTemplateCss(t,e.id),this._setCssUrl(e),this._appendCustomCss(e)},_appendTemplateCss:function(e,t){var i=this.jQuery,n="bcTemplateCss"+t,a=document.querySelector("."+n);a&&a.parentNode.removeChild(a);var r="";if(e&&e.getCss()){var s=i("<style>"+(r+=e.getCss())+"</style>");s.addClass(n),s.appendTo(i("head"))}},_appendCustomCss:function(e){(e=e||{}).settings=e.settings||{},e.settings.styling=e.settings.styling||{};var t=this.jQuery,i="bcCustomCss"+e.id,n=document.querySelector("."+i);if(n&&n.parentNode.removeChild(n),e.settings.styling.customCSS){var a=t("<style>"+e.settings.styling.customCSS+"</style>");a.addClass(i),a.appendTo(t("head"))}},_setCssUrl:function(e){if((e=e||{}).settings=e.settings||{},e.settings.styling=e.settings.styling||{},!this.blueConicClient.isInEditMode&&e.settings.styling.cssURL)this.blueConicClient.util.loadCSS(e.settings.styling.cssURL);else{var t="bcCssUrl"+e.id,i=document.querySelector("#"+t);if(i&&i.parentNode.removeChild(i),e.settings.styling.cssURL){var n=document.createElement("LINK");n.id=t,n.rel="stylesheet",n.type="text/css",n.href=e.settings.styling.cssURL,document.querySelector("head").appendChild(link)}}},_loadTemplate:function(e,t){if(!this.blueConicClient.isInEditMode)return this.blueConicClient.getTemplate(e,t);var i=this._getTemplateFromCache(e);if(i)return t(i);var n=this;this.blueConicClient.getTemplate(e,(function(e){return n._templatesLoaded.push(e),t(e)}))},_getTemplateFromCache:function(e){for(var t=0;t<this._templatesLoaded.length;t++)if(this._templatesLoaded[t].getId()===e)return this._templatesLoaded[t];return null},_addTemplateToCache:function(e){for(var t=e.getId(),i=0;i<this._templatesLoaded.length;i++)if(this._templatesLoaded[i].getId()===t)return void(this._templatesLoaded[i]=e);this._templatesLoaded.push(e)},_createTemplateObject:function(e){return{_css:(e.css||"").replace(/&#xd;/gi,""),_html:(e.html||"").replace(/&#xd;/gi,""),_id:e.id,_javascript:(e.javaScript||"").replace(/&#xd;/gi,""),_precompiledTemplate:e.precompiledTemplate,getHtml:function(){return this._html},getCss:function(){return this._css},getJavaScript:function(){return this._javascript},getId:function(){return this._id}}},_migration:function(e){if(!e||5===e.version)return e;var t=parseInt(e.version||1);return e.strategy&&e.strategy.boostLevels&&!Array.isArray(e.strategy.boostLevels)&&(e=this._migrateV1(e)),t<2&&(e=this._migrationV2(e)),t<3&&(e=this._migrationV3(e)),t<4&&(e=this._migrationV4(e)),t<5&&(e=this._migrationV5(e)),e},_migrateV1:function(e){var t=Object.keys(e.strategy.boostLevels).map((function(t){return{algorithm:t,value:e.strategy.boostLevels[t]}}));return e.strategy.boostLevels=t,e},_migrationV2:function(e){var t={id:(e=this._normalizeMigratedData(e)).id,interactionId:e.interactionId,version:2,settings:{useFrequencyCap:e.exceptions.useFrequencyCap,frequencyCap:e.exceptions.frequencyCap,templateId:e.styling.templateId,storeId:e.sources,connectionId:e["data-bc-connection-id"],debug:e.debug||!1,styling:{cssURL:e.styling.cssURLNode,customCSS:e.styling.customCSS}},rules:[{id:(new Date).getTime(),amount:e.styling.amount||4,algorithms:e.strategy.boostLevels.map((function(e){return e.algorithm=e.algorithm.replace(/_n$/,"").toUpperCase(),e.rampup&&(e.rampUp=e.rampup,delete e.rampup),"string"==typeof e.value&&(e.value=parseFloat(e.value.replace(",","."))),e})),filters:e.exceptions.filters.map((function(e){return{id:e.replace("instock","in_stock").replace("only","").toUpperCase(),filterType:-1!==e.indexOf("only")?"SHOW":"HIDE"}})),metaDataFilters:e.exceptions.filterRules}],"data-bc-connection-id":e["data-bc-connection-id"],"data-bc-template-id":e["data-bc-template-id"]};return e.exceptions.hideReadArticles&&(t.rules[0].filters.some((function(e){return e.id="VIEWED"}))||t.rules[0].filters.push({id:"VIEWED",filterType:"HIDE"}),delete e.exceptions.hideReadArticles),t},_migrationV3:function(e){if(e)return e.settings&&e.settings.storeId&&(e.sources=e.settings.storeId),e.rules&&(e.rules=e.rules.map((function(e){return e&&e.algorithms&&(e.algorithms=e.algorithms.map((function(e){return e&&"CATEGORY"===e.algorithm&&(e.algorithm="SAME_CATEGORY"),e}))),e}))),e},_migrationV4:function(e){if(e)return e.settings&&e.settings.connectionId&&(e["data-bc-connection-id"]=e.settings.connectionId),e},_migrationV5:function(e){return this._migrationV4(e)},_normalizeMigratedData:function(e){return(e=e||{}).styling=e.styling||{},e.strategy=e.strategy||{},e.strategy.boostLevels=e.strategy.boostLevels||[],e.exceptions=e.exceptions||{},e.exceptions.filters=e.exceptions.filters||[],e.exceptions.filterRules=e.exceptions.filterRules||[],e}});var a = [];var i='toolbar_content_recommendations';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/2.3.2/frontend/src/node_modules/@blueconic/jquery-x-jquerymigrate/load_jQuery3_5_X_jQueryMigrate.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/2.3.2/frontend/src/node_modules/@blueconic/frontend-recommendations-rendering/lib/mustache-2.2.1.min.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/2.3.2/frontend/src/node_modules/@blueconic/frontend-metadataservice/metaDataService.js', sharing: 'local'});blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(ps, pf) + i + '/2.3.2/'}]);})();(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 i(){if(window[e.objectName])e._handleGoals();else{if(t>20)return;t++,window.setTimeout(i,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 t=function(t,i){return e[t]||i},i=[],n=t("dimensions");(n&&n[0]?JSON.parse(n[0]):[]).forEach(function(e){var t={id:e.id,from:{type:"pm"===e.type?"permission":e.type,property:e.property,segments:e.segments,fieldLabel:"text"===e.type?e.text:void 0,fieldId:e.text},to:{type:"text",fieldLabel:"Dimension "+e.index,fieldId:"dimension"+e.index},mergeRule:"set"};i.push(t)});var s=t("profileproperties"),r={exportSegment:[""],exportMapping:[this.blueConicClient.json.stringify(i)],properties_out:Array.isArray(s)?s:[s],segments:[],push_frequency:t("push_frequency")||[""],triggerEvent:t("triggerEvent")||[""],eventname:[this.DEFAULT_EVENT_NAME],push_interactions:["true"],passOnEvents:["false"],saved:["true"]};return{trackerName:[t("custom_tracker")||this.DEFAULT_TRACKER_NAME],goalParameters:[JSON.stringify({id:"1",type:"export",name:"Export data into Universal Analytics",active:!0,parameters:r})]}}});var a = [];var i='uaconnection';a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.3.2/frontend/src/node_modules/@blueconic/connection_lib/connection_lib.js', sharing: 'local'});a.push({url: blueConic.fn.getBCHostnameAwarePluginsRepositoryUrl(p, pf) + i + '/1.3.2/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.2/'}]);})();(function(){ var InteractionTypeImpl=InteractionType.extend({init:function(a,b){this.blueConicClient=a,this.context=b,this.profile=this.context.getProfile(),this.parameters=this.context.getParameters(),this.visits_property=this.parameters.visits_property?this.parameters.visits_property[0]:null,this.nr_visits=this.parameters.nr_visits&&!isNaN(this.parameters.nr_visits)?parseInt(this.parameters.nr_visits):10,this.nr_visits_property=this.parameters.nr_visits_property?this.parameters.nr_visits_property[0]:null,this.nr_days=this.parameters.nr_days&&!isNaN(this.parameters.nr_days)?parseInt(this.parameters.nr_days):30},getPreloadProperties:function(){return[this.visits_property,'_'+this.visits_property]},onLoad:function(){if(this.visits_property){var a=this.profile.getValue('_'+this.visits_property);a||(a=0);var b=new Date(parseInt(a));b.setMinutes(b.getMinutes()+30);var c=this.blueConicClient.getCurrentDate();if(c>b){var d=this.profile.getValues(this.visits_property);if(d.push(c.getTime()),d.length<=this.nr_visits?this.profile.addValue(this.visits_property,c.getTime()+''):(d.sort(function(c,a){return a-c}),d=d.slice(0,this.nr_visits),this.profile.setValues(this.visits_property,d)),this.profile.setValue('_'+this.visits_property,c.getTime()),this.nr_visits_property){var e=this.blueConicClient.getCurrentDate().setDate(c.getDate()-this.nr_days),f=c.getTime()-e,g=d.filter(function(a){return c.getTime()-new Date(parseInt(a)).getTime()<f}).length;this.profile.setValue(this.nr_visits_property,g)}}this.blueConicClient.profile.updateProfile()}}});var a = [];var i='visitlistener';blueConic.fn.registerInteractionType(i, InteractionTypeImpl, a, [{ id : i, baseUrl : blueConic.fn.getBCHostnameAwareLocalPluginsUrl() + '/plugins/visitlistener/ts_9f9bf68d9ad36e7970b5afc9c26c54e3/'}]);})();})(blueConicClient);