(function(){function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i||n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}return n})()({1:[function(n,t,i){"use strict";function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function r(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function f(n,t,i){return t&&r(n.prototype,t),i&&r(n,i),n}Object.defineProperty(i,"__esModule",{value:!0});i["default"]=void 0;var e=function(){function n(){u(this,n)}return f(n,null,[{key:"getCookieExpiresString",value:function(n){var t=new Date,i=new Date(t.getTime()+n);return"expires=".concat(i.toGMTString(),";")}},{key:"bake",value:function(t,i){document.cookie="smartbanner_exited=1; ".concat(t?n.getCookieExpiresString(t):""," path=").concat(i)}},{key:"unbake",value:function(){document.cookie="smartbanner_exited=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}},{key:"baked",get:function(){var n=document.cookie.replace(/(?:(?:^|.*;\s*)smartbanner_exited\s*=\s*([^;]*).*$)|^.*$/,"$1");return n==="1"}}]),n}();i["default"]=e},{}],2:[function(n,t,i){(function(n){"use strict";function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function t(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function u(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}Object.defineProperty(i,"__esModule",{value:!0});i["default"]=void 0;var f=function(){function t(){r(this,t)}return u(t,null,[{key:"platform",value:function(){return/iPhone|iPad|iPod/i.test(window.navigator.userAgent)?"ios":/Android/i.test(window.navigator.userAgent)?"android":void 0}},{key:"userAgentMatchesRegex",value:function(n){return new RegExp(n).test(window.navigator.userAgent)}},{key:"jQueryMobilePage",value:function(){return typeof n.$!="undefined"&&n.$.mobile!=="undefined"&&document.querySelector(".ui-page")!==null}},{key:"wrapperElement",value:function(){var n=t.jQueryMobilePage()?".ui-page":"html";return document.querySelectorAll(n)}}]),t}();i["default"]=f}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],3:[function(n){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}var i=r(n("./smartbanner.js")),t;window.addEventListener("load",function(){t=new i["default"];t.apiEnabled?window.smartbanner=t:t.publish()})},{"./smartbanner.js":5}],4:[function(n,t,i){"use strict";function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function r(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function f(n,t,i){return t&&r(n.prototype,t),i&&r(n,i),n}function e(n){return n.indexOf("smartbanner:")!==-1&&n.split(":")[1].length>0}function o(n){var t=n.split("-");return t.map(function(n,i){i>0&&(t[i]=n.charAt(0).toUpperCase()+n.substring(1))}),t.join("")}Object.defineProperty(i,"__esModule",{value:!0});i["default"]=void 0;var s=function(){function n(){u(this,n)}return f(n,[{key:"parse",value:function(){var t=document.getElementsByTagName("meta"),n={};return Array.apply(null,t).forEach(function(t){var i=null,r=t.getAttribute("name"),u=t.getAttribute("content");r&&u&&e(r)&&u.length>0&&(i=r.split(":")[1],i.indexOf("-")!==-1&&(i=o(i)),n[i]=u)}),n}}]),n}();i["default"]=s},{}],5:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function a(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function v(n,t,i){return t&&o(n.prototype,t),i&&o(n,i),n}function w(n,t){t.exit();n.preventDefault()}function b(n,t){t.clickout()}function s(n){this.positioningDisabled||h(n.data.height)}function k(n){var i=document.querySelector(".js_smartbanner__exit"),t;if(i.addEventListener("click",function(t){return w(t,n)}),t=document.querySelector(".js_smartbanner__button"),t.addEventListener("click",function(t){return b(t,n)}),r["default"].jQueryMobilePage())$(document).on("pagebeforeshow",n,s)}function d(){r["default"].jQueryMobilePage()&&$(document).off("pagebeforeshow",s)}function h(n){for(var f,e,o=r["default"].wrapperElement(),i=0,s=o.length,t;i<s;i++)if(t=o[i],r["default"].jQueryMobilePage()){if(t.getAttribute(u.originalTop))continue;f=parseFloat(getComputedStyle(t).top);t.setAttribute(u.originalTop,isNaN(f)?0:f);t.style.top=n+"px"}else{if(t.getAttribute(u.originalMarginTop))continue;e=parseFloat(getComputedStyle(t).marginTop);t.setAttribute(u.originalMarginTop,isNaN(e)?0:e);t.style.marginTop=n+"px"}}function g(){for(var i=r["default"].wrapperElement(),t=0,f=i.length,n;t<f;t++)n=i[t],r["default"].jQueryMobilePage()&&n.getAttribute(u.originalTop)?n.style.top=n.getAttribute(u.originalTop)+"px":n.getAttribute(u.originalMarginTop)&&(n.style.marginTop=n.getAttribute(u.originalMarginTop)+"px")}var c;Object.defineProperty(i,"__esModule",{value:!0});i["default"]=void 0;var l=f(n("./optionparser.js")),r=f(n("./detector.js")),e=f(n("./bakery.js"));var y="android,ios",p="Close",u={originalTop:"data-smartbanner-original-top",originalMarginTop:"data-smartbanner-original-margin-top"};c=function(){function n(){var t,i;a(this,n);t=new l["default"];this.options=t.parse();this.platform=r["default"].platform();i=new Event("smartbanner.init");document.dispatchEvent(i)}return v(n,[{key:"publish",value:function(){var n,t;if(Object.keys(this.options).length===0)throw new Error("No options detected. Please consult documentation.");if(e["default"].baked||this.userAgentExcluded||!(this.platformEnabled||this.userAgentIncluded))return!1;n=document.createElement("div");document.querySelector("body").prepend(n);n.outerHTML=this.html;t=new Event("smartbanner.view");document.dispatchEvent(t);this.positioningDisabled||h(this.height);k(this)}},{key:"exit",value:function(){var n,t;d();this.positioningDisabled||g();n=document.querySelector(".js_smartbanner");document.querySelector("body").removeChild(n);t=new Event("smartbanner.exit");document.dispatchEvent(t);e["default"].bake(this.hideTtl,this.hidePath)}},{key:"clickout",value:function(){var n=new Event("smartbanner.clickout");document.dispatchEvent(n)}},{key:"originalTop",get:function(){var n=r["default"].wrapperElement()[0];return parseFloat(n.getAttribute(u.originalTop))}},{key:"originalTopMargin",get:function(){var n=r["default"].wrapperElement()[0];return parseFloat(n.getAttribute(u.originalMarginTop))}},{key:"priceSuffix",get:function(){return this.platform==="ios"?this.options.priceSuffixApple:this.platform==="android"?this.options.priceSuffixGoogle:""}},{key:"icon",get:function(){return this.platform==="android"?this.options.iconGoogle:this.options.iconApple}},{key:"buttonUrl",get:function(){return this.platform==="android"?this.options.buttonUrlGoogle:this.platform==="ios"?this.options.buttonUrlApple:"#"}},{key:"closeLabel",get:function(){return this.options.closeLabel!==undefined?this.options.closeLabel:p}},{key:"html",get:function(){var n=this.options.customDesignModifier?this.options.customDesignModifier:this.platform;return'<div class="smartbanner smartbanner--'.concat(n,' js_smartbanner">\n      <a href="javascript:void();" class="smartbanner__exit js_smartbanner__exit" aria-label="').concat(this.closeLabel,'"><\/a>\n      <div class="smartbanner__icon" style="background-image: url(').concat(this.icon,');"><\/div>\n      <div class="smartbanner__info">\n        <div>\n          <div class="smartbanner__info__title">').concat(this.options.title,'<\/div>\n          <div class="smartbanner__info__author">').concat(this.options.author,'<\/div>\n          <div class="smartbanner__info__price">').concat(this.options.price).concat(this.priceSuffix,'<\/div>\n        <\/div>\n      <\/div>\n      <a href="').concat(this.buttonUrl,'" target="_blank" class="smartbanner__button js_smartbanner__button" rel="noopener" aria-label="').concat(this.options.button,'"><span class="smartbanner__button__label">').concat(this.options.button,"<\/span><\/a>\n    <\/div>")}},{key:"height",get:function(){try{return document.querySelector(".js_smartbanner").offsetHeight}catch(n){return 0}}},{key:"platformEnabled",get:function(){var n=this.options.enabledPlatforms||y;return n&&n.replace(/\s+/g,"").split(",").indexOf(this.platform)!==-1}},{key:"positioningDisabled",get:function(){return this.options.disablePositioning==="true"}},{key:"apiEnabled",get:function(){return this.options.api==="true"}},{key:"userAgentExcluded",get:function(){return this.options.excludeUserAgentRegex?r["default"].userAgentMatchesRegex(this.options.excludeUserAgentRegex):!1}},{key:"userAgentIncluded",get:function(){return this.options.includeUserAgentRegex?r["default"].userAgentMatchesRegex(this.options.includeUserAgentRegex):!1}},{key:"hideTtl",get:function(){return this.options.hideTtl?parseInt(this.options.hideTtl):!1}},{key:"hidePath",get:function(){return this.options.hidePath?this.options.hidePath:"/"}}]),n}();i["default"]=c},{"./bakery.js":1,"./detector.js":2,"./optionparser.js":4}]},{},[3]);$(document).ready(function(){var n=objectCookie.getCookie("TrackedBPNumber");document.addEventListener("smartbanner.clickout",function(){dataLayer.length>0&&dataLayer.push({event:"eventTracking",category:"SmartBanner-category-open-app",action:"SmartBanner-action-open-app",label:"SmartBanner-label-open-app-"+(n.length===10&&$.isNumeric(n)?n:"guest")})});document.addEventListener("smartbanner.exit",function(){dataLayer.length>0&&dataLayer.push({event:"eventTracking",category:"SmartBanner-category-close",action:"SmartBanner-action-close",label:"SmartBanner-label-close-"+(n.length===10&&$.isNumeric(n)?n:"guest")})})})