!function(){"use strict";var e=e=>window.Enabler?window.Enabler.getUrl(e):e;const t={domUniqueId:0,eventPrefix:"",eventsFallbackAlias:{mouseenter:"mouseover",mouseleave:"mouseout"},cssStyle:{},cssStyleArray:[],rawCssStyle:"",cssPropsAlias:{fontFamily:"font-family",fontWeight:"font-weight",fontStyle:"font-style",fontSize:"font-size",lineHeight:"line-height"}};function i(){if(null!=t.IEVersion)return t.IEVersion;let e=-1;if("Microsoft Internet Explorer"===navigator.appName){const t=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1))}return t.IEVersion=e,e}function n(e,t){return e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}function s(e,t){n(e,t)||(e.className+=` ${t}`)}function r(e,t){if(n(e,t)){const i=new RegExp(`(\\s|^)${t}(\\s|$)`);e.className=e.className.replace(i," ")}}function a(e){return!0===e||"true"===e}function o(e){return window.bannerConfig.hqImages&&e.hqUrl&&e.source!==window.bannerConfig.watermark.source?e.hqUrl:e.localUrl?`${void 0!==window.bannerConfig.imgLocalPath?window.bannerConfig.imgLocalPath:"media/"}${e.localUrl}`:e.url&&e.url.includes("//")?e.url:e.url?window.bannerConfig.photosUrl+e.url:null}const l=/[\r\n%#()<>?\\[\\\]^`{|}]/g;function d(e,t){const i="repeat, no-repeat";switch(t){case"aspect":e.backgroundSize=`${window.bannerConfig.watermark.size}px, contain`;break;case"stretch":e.backgroundSize=`${window.bannerConfig.watermark.size}px, 100% 100%`,e.backgroundRepeat=i;break;case"mask":e.backgroundSize=`${window.bannerConfig.watermark.size}px, auto`,e.backgroundRepeat=i;break;case"crop":e.backgroundSize=`${window.bannerConfig.watermark.size}px,\n cover`,e.backgroundRepeat=i;break;default:e.backgroundSize=`${window.bannerConfig.watermark.size}px, ${e.backgroundSize||"cover"}`}}function p(e,t){for(const i in t)e.style[i]=t[i]}function c(e){return JSON.parse(JSON.stringify(e))}function h(e){return e&&0!==String(e).length?e.includes("://")||e.includes("mailto:")||e.includes("tel:")?e:"http://"+e:""}function u(e,t){const i=window.innerWidth/e,n=window.innerHeight/t;return{proportion:Math.min(i,n)}}class y{constructor(){window.assetsCache={},this.fontTypes={CUSTOM:"custom",BANNERSNACK:"bannersnack",CREATOPY:"creatopy",GOOGLE:"google"},this.loadedSlides={},this.imagesToLoad=[],this.fontsToLoad=[],this.gFontsToLoad=[],this.videosToLoad=[],this.audiosToLoad=[],this.getFontUrl=function(e){if(e.localUrl){let t=void 0!==window.bannerConfig.fontLocalPath?window.bannerConfig.fontLocalPath:"fonts/";return window.bannerConfig.embedUrl&&(t=window.bannerConfig.embedUrl+t),`${t}${e.localUrl}`}switch(e.fontFamily=this.unquoted(e.fontFamily),e.fontType){case this.fontTypes.BANNERSNACK:case this.fontTypes.CREATOPY:return e.fontUrl?e.fontUrl.includes("//")?e.fontUrl:`//${e.fontUrl}`:"";case this.fontTypes.CUSTOM:return e.fontUrl?`//${e.fontFaceUrl?e.fontUrl:`${e.fontUrl}.ttf`}`:"";case this.fontTypes.GOOGLE:{let t=`${e.fontFamily.split(" ").join("+")}:${parseInt(e.fontWeight)}`;return"italic"===e.fontStyle&&(t+="i"),t}default:return""}},this.loadGFonts=function(){const e=this,t=this.gFontsToLoad.concat();if(!t.length)return;const i=()=>Promise.all(t.map(((e,t)=>{const i=e.split(":")[0].replace(/\+/g," "),n=e.split(":")[1],s=`${n.indexOf("i")>-1?"italic":""} ${n?parseInt(n)||400:""} 1em "${i}"`;return window.document.fonts.load(s).then((e=>{if(e.length>=1)return!0;throw new Error(`Error loading font ${i}`)})).catch((e=>{console.error(e)})).finally((()=>{const t=this.gFontsToLoad.indexOf(e);t>-1&&this.gFontsToLoad.splice(t,1)}))}))).catch((e=>{console.error(e)})).finally((()=>{e.resolveIfAssetsLoaded()}));let n=`https://fonts.googleapis.com/css?family=${t.join("|")}`;this.bannerConfig.preview&&(n+="&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin,latin-ext,vietnamese");const s=window.document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.setAttribute("href",n),s.addEventListener("load",i),s.addEventListener("error",i),window.document.head.appendChild(s)},this.addFontToDOM=function(e){const t=this;let i,n,s,r="ttf";e.fontType||(e.fontType=this.fontTypes.GOOGLE);const a=this.getFontUrl(e);if(a&&!window.assetsCache[a]){e.fontType!==this.fontTypes.GOOGLE&&this.fontsToLoad.push(a);const o=(e,i,n,s)=>{const r=`${i} ${n?parseInt(n)||400:""} 1em "${s}"`;return window.document.fonts.load(r).then((e=>{if(e.length>=1)return!0;throw new Error(`Error loading font ${s}`)}),(e=>{throw new Error(e)})).catch((e=>{console.error(e)})).finally((()=>{const i=t.fontsToLoad.indexOf(e);i>-1&&t.fontsToLoad.splice(i,1),t.resolveIfAssetsLoaded()}))};switch(i=()=>{t.fontsToLoad.pop(),t.resolveIfAssetsLoaded()},e.fontType){case this.fontTypes.GOOGLE:this.gFontsToLoad.push(a);break;case this.fontTypes.BANNERSNACK:case this.fontTypes.CREATOPY:case this.fontTypes.CUSTOM:if(e.fontFamily){const t=`@font-face {\nfont-family: '${e.fontPrefix||""}${e.fontFamily.replace(/'/g,"\\'")}';\nfont-style: ${e.fontStyle};\nfont-weight: ${e.fontWeight};\nsrc: url(${a});\n}\n`;n=window.document.createElement("style"),n.appendChild(window.document.createTextNode(t)),n.addEventListener("load",(()=>{o(a,e.fontStyle,e.fontWeight,`${e.fontPrefix||""}${e.fontFamily.replace(/'/g,"\\'")}`)})),n.addEventListener("error",i),window.document.head.appendChild(n)}else this.relPreloadSupported()&&(r=a.substr(a.lastIndexOf(".")+1),s=window.document.createElement("link"),s.setAttribute("rel","preload"),s.setAttribute("type",`font/${r}`),s.setAttribute("as","font"),s.setAttribute("href",a),s.addEventListener("load",i),s.addEventListener("error",i),window.document.head.appendChild(s))}window.assetsCache[a]=!0}},this.unquoted=e=>"string"==typeof e?e.replace(/(^")|("$)/g,""):e,this.relPreloadSupported=()=>((e,t)=>{if(!e||!e.supports)return!1;try{return e.supports("preload")}catch(e){return!1}})(window.document.createElement("link").relList),this.getSlideId=e=>e.displayData?e.displayData.properties.bannersetElementId||e.displayData.properties.id:e.properties.bannersetElementId||e.properties.id,this.getSlideLoaded=function(e){const t=this.getSlideId(e);return!!this.loadedSlides[t]&&this.loadedSlides[t]},this.setSlideLoaded=function(e){const t=this.getSlideId(e);this.loadedSlides[t]=!0},this.resolveIfAssetsLoaded=function(e){const t=0===this.imagesToLoad.length&&0===this.videosToLoad.length&&0===this.audiosToLoad.length;(t&&0===this.fontsToLoad.length&&0===this.gFontsToLoad.length||t&&!0===e)&&(window.loadAssetsTimer&&clearTimeout(window.loadAssetsTimer),this.currentSlide?this.setSlideLoaded(this.currentSlide):this.setAllSlidesLoaded(),"function"==typeof this.callback&&this.callback())},this.preloadMedia=function(t,i,n,s,r="image"){var a;if(!t)throw new Error("No media url");const o=this;let l=t;if(n&&(l+=n),!i.visible)return!1;const d=window.bannerConfig.pdf;if(!window.assetsCache[l]||d){let n=new Image;"video"===r?(n=window.document.createElement("video"),this.videosToLoad.push(n),t=e(t)):"audio"===r?(n=new Audio,this.audiosToLoad.push(n)):this.imagesToLoad.push(n);const p=()=>{"video"===r?o.videosToLoad.pop():"audio"===r?o.audiosToLoad.pop():o.imagesToLoad.pop(),o.resolveIfAssetsLoaded()},c=()=>{d&&!["audio","video"].includes(r)?o.preloadResizedImageForPdf(t,n,i,window.bannerConfig.hqImages,p):p()},h=["audio","video"].includes(r)?"loadedmetadata":"load";n.addEventListener(h,c),n.addEventListener("error",(()=>{p(),n.removeEventListener(h,c),n.imageLoadedWithError=!0,this.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="})),this.bannerConfig.preview&&s&&!i.resourceKey&&!(null==(a=i.feed)?void 0:a.url)?this.setColorGroups(t,n,s):n.src=t,window.assetsCache[l]=n}},this.preloadElementAssets=function(e){if("group"===e.layerType&&e.elements.forEach((e=>{this.preloadElementAssets(e)})),"layer"===e.type){let t;switch(e.layerType){case"shape":e.properties.backgroundColor&&"image"===e.properties.backgroundColor.type&&(t=o(e.properties.backgroundColor),t&&this.preloadMedia(t,e.properties));break;case"image":this.bannerConfig.hqImages&&e.properties.hqUrl&&e.properties.source!==window.bannerConfig.watermark.source?t=e.properties.hqUrl:e.properties.localUrl?(t=`${void 0!==window.bannerConfig.imgLocalPath?window.bannerConfig.imgLocalPath:"media/"}${e.properties.localUrl}`,window.bannerConfig.embedUrl&&(t=this.bannerConfig.embedUrl+t)):t=e.properties.url&&(e.properties.url.includes("//")||e.properties.url.startsWith("data"))?e.properties.url:this.bannerConfig.photosUrl+e.properties.url,t&&this.preloadMedia(t,e.properties);break;case"svg":const{feed:i,localUrl:n,url:s,bannersetElementId:r,id:a,colorGroups:l}=e.properties,{download:d}=window.bannerConfig,p=null==i?void 0:i.url;p&&d&&!n?t=null:n?t=`${void 0!==window.bannerConfig.imgLocalPath?window.bannerConfig.imgLocalPath:"media/"}${e.properties.localUrl}`:p?t=s||null:s&&(t=s.includes("//")?s:`${window.bannerConfig.photosUrl}${s}`),t&&this.preloadMedia(t,e.properties,r||a,l);break;case"countdown":{const{config:t,visible:i}=e.properties;if(!i)break;if(t){const e=this;t.forEach((({children:t,style:i})=>{i&&i.fontFamily&&(i.fontFamily||(i.fontFamily="Open Sans"),e.addFontToDOM(i)),t&&t.forEach((t=>{const n=t.style;n&&(n.fontFamily?(!n.fontType||n.fontType===e.fontTypes.GOOGLE||n.fontUrl||n.localUrl)&&e.addFontToDOM(n):n.fontWeight&&(n.fontFamily=i.fontFamily,n.fontType=i.fontType,n.fontPrefix=i.fontPrefix||null,e.addFontToDOM(n)))}))}))}else this.addFontToDOM(e.properties);break}case"text":{let{config:t,visible:i}=e.properties;if(!i)break;if(t.type&&"slate"===t.type&&(t=t.nodes),t){const e=this,i=t=>{if(t.fontSettings){const i=t.fontSettings;e.addFontToDOM(i)}t.children&&t.children.forEach((e=>{i(e)}))};t.forEach((({children:t,style:n})=>{n&&n.fontFamily&&(n.fontFamily||(n.fontFamily="Open Sans"),e.addFontToDOM(n)),t&&t.forEach((e=>{i(e)}))}))}else this.addFontToDOM(e.properties);break}case"button":if(!e.properties.visible)break;e.properties.localUrl||this.addFontToDOM(e.properties.labelStyle);break;case"video":case"audio":e.properties.localUrl?(t=`${void 0!==window.bannerConfig.imgLocalPath?window.bannerConfig.imgLocalPath:"media/"}${e.properties.localUrl}`,window.bannerConfig.embedUrl&&(t=window.bannerConfig.embedUrl+t)):t=e.properties.url&&(e.properties.url.includes("//")||e.properties.url.startsWith("data"))?e.properties.url:this.bannerConfig.photosUrl+e.properties.url,t&&this.preloadMedia(t,e.properties,e.properties.bannersetElementId||e.properties.id,null,e.layerType)}}else if("slide"===e.type)for(let t=0;t"layer"===e.type));t=t.concat(i)}for(let e=0;e{const t=parseFloat(e,10);let i,n=e.match(/m?s/);switch(n&&(n=n[0]),n){case"s":i=1e3*t;break;case"ms":i=t;break;default:i=0}return i},b=e=>{e.id||(e.id="e_"+t.domUniqueId++)},f="running",g="paused",w={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",easeInCubic:"cubic-bezier(.55,.055,.675,.19)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInStrong:"cubic-bezier(.97,.09,.79,.21)",easeOutStrong:"cubic-bezier(.21,.79,.09,.97)",easeInOutStrong:"cubic-bezier(.78,.03,.24,.99)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"},v={},C=e=>!!v[e],S=(e,t)=>{if(v[e])return;let i,n,s=`@keyframes ${e} {`,r=`@-webkit-keyframes ${e} {`;for(let e=0;i=t[e];e++)n=O(i.percent,i.props,i.to),s+=n,r+=n;s+="}",r+="}";const a=s+r,o=document.createElement("style");o.type="text/css",o.styleSheet?o.styleSheet.cssText=a:o.innerHTML=a,document.getElementsByTagName("head")[0].appendChild(o),v[e]=!0},k=(e,t,i=!0)=>{e.offsetWidth,i&&(e.style.animation=t,e.style.webkitAnimation=t),e.style.animationPlayState=window.BS_PLAYING_STATE||f,e.style.webkitAnimationPlayState=window.BS_PLAYING_STATE||f},O=(e,t,i)=>{let n=(i?"to":e+"%")+" {";const s=Object.keys(t);let r;for(let e=0;r=s[e];e++)n+=`${a=r}:${o=t[r]};-webkit-${a}:${o};`;var a,o;return n+="}",n};var T=class{constructor(e,t){this.delay=t,this.remaining=t,this.callback=e,this.id=0,this.isPlaying=!1,this.resume()}pause(){this.isPlaying&&(window.clearTimeout(this.id),this.remaining-=Date.now()-this.start,this.isPlaying=!1)}resume(){this.isPlaying||this.remaining<0||(this.start=Date.now(),window.clearTimeout(this.id),this.id=window.setTimeout(this.callback,this.remaining),this.isPlaying=!0)}destroy(){window.clearTimeout(this.id),this.callback=null,this.remaining=null,this.start=null,this.isPlaying=!1}},A=Object.defineProperty,E=(e,t,i)=>(((e,t,i)=>{t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i),i);const $=class e{static pause(){for(const t in e.timers)e.timers.hasOwnProperty(t)&&e.timers[t].pause();e.setAnimationState(g)}static resume(){for(const t in e.timers)e.timers.hasOwnProperty(t)&&e.timers[t].resume();e.setAnimationState(f)}static init(){if(window.enablePauseAnimOnVisibilityChange){let t=function(){document.hidden?(clearTimeout(i),i=setTimeout((()=>{e.pause()}),50)):(clearTimeout(i),i=setTimeout((()=>{e.resume()}),50))},i=null;document.addEventListener("visibilitychange",t,!1)}}static setAnimationState(t){for(const i in e.animations)if(e.animations.hasOwnProperty(i)){const{element:n,delay:s,animation:r,startTime:a}=e.animations[i];if(n.style.animationPlayState=t,n.style.webkitAnimationPlayState=t,t===g){const e=m(s),t=new Date-a;if(e>0&&t=0&&e>0&&t{const i=I.timerIndex++;return I.timers[i]=new T(e,t),i},P=e=>{const t=I.timers[e];t&&(delete I.timers[e],t.destroy())},L=(e,t,i)=>{k(e,t,!i),b(e);const n=e.style.animationDelay,s=new Date;t||i?I.animations[e.id]={element:e,delay:n,animation:t,startTime:s}:delete I.animations[e.id]};var M="instant",D="alpha-words",B="blur-words",U="fadeAudio",F="shadowPop",R="blink",z="jello",N="bounce",_="vibrate",j="flicker",H="pulsate",W="shake",G="video",V="audio",X="gradientAnimation",Y="advanced",q=class{static clearAll(e){e&&e.firstChild&&L(e.firstChild,""),e.classList.contains("slide")&&e.querySelectorAll(".move, .rotate, .scale, .opacity, .blur").forEach((e=>{e.style.animation&&L(e,"")}))}static clearWordsTimeout(e,t){for(let e=0;e{if("Linear"===e.tween||"linear"===e.ease)return"linear";let t="ease";switch(e.ease){default:t+="Out";break;case"easeIn":t+="In";break;case"easeInOut":t+="InOut"}return t+=e.tween,w[t]||"linear"})(o):"linear"} ${y=o.delay+l,3,parseFloat(y.toFixed(3))}s ${n} ${p}`;switch(o.type){case"gradientAnimation":let t=a.querySelectorAll('[class="row"]');for(t=[].slice.call(t);t.length;){const e=t.pop();r||e.setAttribute("data-gradient-animation-finished",!1);let i=e.querySelectorAll('[class="word"]');if(i=[].slice.call(i),i.length>0)for(e.style.backgroundImage="none",e.style.backgroundSize="auto",e.style.backgroundClip="border-box",e.style.textFillColor="inherit",e.style.webkitBackgroundClip="border-box",e.style.webkitTextFillColor="inherit",e.style.animationName="";i.length;)i.pop().style.animationName="";L(e,d)}break;case"tracking":case"shadowPop":e&&L(e,d);break;case"advanced":L(a.firstChild,d),r&&(a.firstChild.style.animationPlayState="paused");break;default:L(a.firstChild&&1===a.firstChild.nodeType&&!a.classList.contains("word")?a.firstChild:a,d)}}var y;const m=Number(o.duration)+Number(o.delay)+l;x((()=>{o.onAnimationEnd&&o.onAnimationEnd()}),Math.max(1e3*m,0))}};class Q{apply(e){e.on=Q.prototype.on,e.off=Q.prototype.off,e.trigger=Q.prototype.trigger}on(e,t){void 0===this._listeners&&(this._listeners={});const i=this._listeners;let n,s;for(e=e.split(" "),s=0;n=e[s];s++)i[n]=i[n]||[],i[n].includes(t)||i[n].push(t)}off(e,t){if(void 0===this._listeners)return;const i=this._listeners[e];if(void 0!==i){const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}trigger(e,t){if(void 0===this._listeners)return;const i=this._listeners[e];if(void 0!==i){const n={};n.target=this,n.type=e,n.data=t;const s=i.length;for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:"clickTag",t=window.location.search.substring(1).split("".concat(e,"="));if(!t[1])return"";let i=t[1].replace(/&.+$/,"");try{i=decodeURIComponent(i)}catch(e){return""}return null==i.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,8}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)?"":i};var Z=e=>{const t="2x";let i=e.lastIndexOf(".");return e.lastIndexOf("/")>i?e+t:(-1===i&&(i=e.length),[e.slice(0,i),t,e.slice(i)].join(""))};const ee={MOVE:"move",ROTATE:"rotate",SCALE:"scale",OPACITY:"opacity",BLUR:"blur"},te="advanced";var ie="youtube";const ne={},se=e=>{const t=ne[e];t&&(window.clearTimeout(t),delete ne[e])},re=(e,t)=>{ne[e]?window.clearTimeout(t):ne[e]=t};var ae=Object.defineProperty,oe=Object.defineProperties,le=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,he=(e,t,i)=>t in e?ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,ue=(e,t)=>{for(var i in t||(t={}))pe.call(t,i)&&he(e,i,t[i]);if(de)for(var i of de(t))ce.call(t,i)&&he(e,i,t[i]);return e},ye=(e,t)=>oe(e,le(t));const me=["rain","fog","snow"];class be extends J{constructor(){super(),this.container=null,this.displayContainer=null,this.properties=null,this.displayData=null,this.buildTimeouts=[],this.onLoadSlide=null,this.onPlayMedia=null,this.onPauseMedia=null,this.onStopMedia=null,this.startTime=0,this.elapsedTime=0}init(e){return this.displayData=e,this.displayData.properties=be.parseProps(this.displayData.properties),this.trigger("init"),this}static parseProps(e){const t=["buildIn","buildOut","transition"];let i;for(let n=0;i=t[n];n++)if(e[i])switch(e[i].tween){case"Bounce":case"Elastic":"scale"!==e[i].type&&"slide"!==e[i].type||(e[i].type+=e[i].tween,"Elastic"===e[i].tween&&(e[i].ease="easeOut")),e[i].tween=""}return e}render(){}reset(){var e,t;let i,n;for(q.clearAll(this.container),i=0;n=this.buildTimeouts[i];i++)P(n);if(this.buildTimeouts=[],this.transform("none"),this.webkitTransform("translate3d(0,0,0)"),this.setStyle(this.container,"x,y,width,height","px"),this.container.style.opacity="1",this.container.style.display="",this.container.style.filter="",this.container.style["-webkit-filter"]="",this.container.style.animation="",this.container.style["-webkit-animation"]="",this.container.querySelector("div.text")&&(this.container.querySelector("div.text").style.animation=""),this.properties.blendMode&&(this.container.style.mixBlendMode=this.properties.blendMode),this.properties.outline&&this.properties.outline.useOutline){const{color:e,weight:t}=this.properties.outline;this.container.style["-webkit-text-stroke"]=`${t}px ${e}`}for(i=0;n=this.buildTimeouts[i];i++)P(n);if(this.buildTimeouts=[],null==(t=null==(e=this.displayContainer)?void 0:e.pause)||t.call(e),this.displayContainer){const e=void 0!==this.properties.opacity?this.properties.opacity:100;this.displayContainer.style.opacity=e/100}}createMainContainers(e,t,i,n){let s;this.properties&&this.properties.actions&&this.slide&&this.slide.banner.config.pdf&&(s=this.properties.actions.find((e=>"click"===e.event&&"gotoURL"===e.type&&e.url))),this.container=this.createElement("div",e),this.container.setAttribute("data-id",this.displayData.properties.id),this.effHelper=this.createElement("div","eff-helper"),s&&(this.actionContainer=this.createElement("a","action-container"),this.actionContainer.href=s.url,this.actionContainer.target=s.target||"_blank",this.actionContainer.style.cursor=s.useHandCursor?"":"auto"),this.displayContainer=this.createElement(i||"div",t,void 0,void 0,n),"element"===e&&(this.moveDiv=this.createElement("div",ee.MOVE),this.moveDiv.style.width="100%",this.moveDiv.style.height="100%",this.rotateDiv=this.createElement("div",ee.ROTATE),this.rotateDiv.style.width="100%",this.rotateDiv.style.height="100%",this.scaleDiv=this.createElement("div",ee.SCALE),this.scaleDiv.style.width="100%",this.scaleDiv.style.height="100%",this.opacityDiv=this.createElement("div",ee.OPACITY),this.opacityDiv.style.width="100%",this.opacityDiv.style.height="100%",this.blurDiv=this.createElement("div",ee.BLUR),this.blurDiv.style.width="100%",this.blurDiv.style.height="100%",this.moveDiv.appendChild(this.rotateDiv),this.rotateDiv.appendChild(this.scaleDiv),this.scaleDiv.appendChild(this.opacityDiv),this.opacityDiv.appendChild(this.blurDiv),this.blurDiv.appendChild(this.displayContainer),this.displayData&&this.displayData.layerType&&(this.container.dataset.layerType=this.displayData.layerType)),this.container.appendChild(this.effHelper),s?(this.effHelper.appendChild(this.actionContainer),"element"===e?this.actionContainer.appendChild(this.moveDiv):this.actionContainer.appendChild(this.displayContainer)):"element"===e?this.effHelper.appendChild(this.moveDiv):this.effHelper.appendChild(this.displayContainer)}applyActions(e,t,i=!1){var n,s;const r=this;if(!e||!t)return!1;if("none"===e.type)return!1;let a="";return((null==e?void 0:e.useHandCursor)||(K()||window.clickTag)&&(null==(s=null==(n=null==this?void 0:this.displayData)?void 0:n.properties)?void 0:s.useHandCursor))&&(a="pointer"),t.style.cursor=a,t.addEventListener(e.event,(function(t){if(t.clickFlag)return t.clickFlag=!1,!1;if(e.disabled)return!1;if(t.clickFlag=this,"gotoSlide"===e.type){const t=r.slide.getBuildOutTime();t&&(e.disabled=!0,x((()=>{e.disabled=!1}),t)),null===e.slideOrUrl&&(e.slideOrUrl="next");const{currentSlide:i}=r.slide.banner,n=!!e.slideOrUrl;switch(e.slideOrUrl){case"first":r.slide.banner.preload.assets(null,r.slide.getFirstSlide(),r.slide.banner.config),i.buildOut(r.slide.getFirstSlide(),n);break;case"last":r.slide.banner.preload.assets(null,r.slide.getLastSlide(),r.slide.banner.config),i.buildOut(r.slide.getLastSlide(),n);break;case"next":r.slide.banner.preload.assets(null,r.slide.getNextSlide(),r.slide.banner.config),i.buildOut(r.slide.getNextSlide(),n);break;case"prev":r.slide.banner.preload.assets(null,r.slide.getPrevSlide(),r.slide.banner.config),i.buildOut(r.slide.getPrevSlide(),n);break;default:r.slide.banner.preload.assets(null,i.getSlideByHashOrId(e.slideOrUrl),r.slide.banner.config),i.buildOut(i.getSlideByHashOrId(e.slideOrUrl),n)}}else{i&&t.preventDefault();let n=e.slideOrUrl||window.bannerURL,{target:s}=e;const a=String(n).indexOf("bsClickTAG");if(window.bsClickFunc){let t=n,i=null;return(String(n).indexOf("bsClickTAG")>=0||String(n).indexOf("clickTag")>=0)&&(t=window[n],i=n),t&&t.indexOf("bsClickTAG")>=0&&(t=null),window.bsClickFunc(t,e.target,i),!1}if(-1!==a||0===String(n).indexOf("clickTag")){const e=-1!==a?n.substr(a):n;n="function"==typeof window[e]?window[e]():window[e],n||-1===a||(n=K())}else if(r.hash||!window.bannerConfig.pdf){if(!n&&!1===window.goToURLWithoutBSURL)return!1;const e=K()||window.clickTag;e&&(n=void 0===window.clickTag&&e!==n&&-1===e.indexOf(n)&&-1===e.indexOf(encodeURIComponent(n))?e+encodeURIComponent(n):e,window.urlTarget&&(s=window.urlTarget))}n=h(n),window.bsOpenURL(n,s)}return!0})),!0}createElement(e,t,i,n,s){const r=s||window.document.createElement(e);return r.setAttribute("class",t),!1!==i&&(n||this.container)&&(n||this.container).appendChild(r),b(r),r}setStyle(e,t,i){i||(i="");const n={x:"left",y:"top",labelOffsetX:"margin-left",labelOffsetY:"margin-top",lineHeight:"line-height"};t=t.split(",");for(const s in t)if(t.hasOwnProperty(s)){const r=n[t[s]]||t[s],a=this.properties[t[s]];if("width"===r||"height"===r){const t=this.properties.scale||1;e.style[r]=a*t+i}else e.style[r]="left"===r||"right"===r?Math.round(a)+i:String(a).indexOf(i)>-1?a:a+i}return this}getContainer(){return this.container}show(){return this.container.style.display="",this}hide(){return this.container.style.display="none",this}hasClass(e,t){return!!e&&new RegExp(`(\\s|^)${t}(\\s|$)`).test(e.className)}showOverlay(){this.effHelper.style.display=""}removeClass(e,t){return this.hasClass(e,t)&&(e.className=e.className.replace(new RegExp(`(\\s|^)${t}(\\s|$)`)," ").replace(/^\s+|\s+$/g,"")),this}addClass(e,t){return e?(this.hasClass(e,t)||(e.className+=(e.className?" ":"")+t),this):this}toggleClass(e,t){return e?(this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t),this):this}applyBackground(e,t,n){const l=function(e){let t={};if(!e)return t;let n=e.type,s=e.scolor;switch("lgrad"!==n&&"rgrad"!==n||(e.gradColors&&e.gradColors.length?e.gradColors.length<2&&e.gradColors.length>0&&(s=e.gradColors[0].c,n="solid"):(n="solid",s="#fff")),a(e.useBorder)&&(t.border=`1px solid ${e.borderColor}`),t["background-image"]="",n){case"none":break;case"image":t=function(e,t){let i,n;const s=o(t);e["background-image"]=`url(${s})`,e["--retina-src"]=s;for(const s in t)switch(s){case"scaleMode":case"verticalAlign":case"horizontalAlign":switch(t.verticalAlign){case"top":i="0";break;case"middle":i="50%";break;case"bottom":i="100%"}switch(t.horizontalAlign){case"left":n="0";break;case"center":n="50%";break;case"right":n="100%"}e["background-position"]=`${n} ${i}`;break;case"contentOffsetX":"tile"===t.scaleMode&&(e["background-position-x"]=`${t[s]}%`);break;case"contentOffsetY":"tile"===t.scaleMode&&(e["background-position-y"]=`${t[s]}%`)}return e}(t,e=function(e){return e&&e.type&&"image"===e.type&&e.tile&&(e.scaleMode="tile",e.contentScale=100,e.contentOffsetX=50,e.contentOffsetY=50,delete e.tile),e}(e));break;case"solid":if(s&&s.includes("rgba")){const e=i();e>-1&&e<9&&(r=function(e){const t=e.replace(/[^\d,.]/g,"").split(",");return{r:t[0],g:t[1],b:t[2],a:t[3]}}(s),s=`#${(256+parseInt(r.r)).toString(16).substr(1)}${(256+parseInt(r.g)).toString(16).substr(1)}${(256+parseInt(r.b)).toString(16).substr(1)}`)}t["background-color"]=s;break;case"rgrad":case"lgrad":const n=e.gradColors,a=[];for(let e=0;e0){t["background-image"]=[];const i=`${d}-gradient(${p}, ${l})`;(e=t["background-image"]).push(`-webkit-${i}`),e.push(`-moz-${i}`),e.push(`-o-${i}`),e.push(`-ms-${i}`)}t.filter=`progid:DXImageTransform.Microsoft.gradient( startColorstr='${n[0].c}', endColorstr='${n[n.length-1].c}',GradientType=0 )`}var r;return t}(t);for(const i in l)switch(i){case"background-image":if("lgrad"===t.type||"rgrad"===t.type)for(let t=0;t1?window.bannerConfig.watermark.watermarkX2:window.bannerConfig.watermark.watermarkX1,l[i]=`url(${e}), ${l[i]}`}let n=l[i];if("background-image"===i){let e=window.assetsCache[t.url];e&&e.imageLoadedWithError&&t.backupUrl&&(n=`url(${t.backupUrl})`)}e.style[i]=n}break;case"background":for(let t=0;t1?window.bannerConfig.watermark.watermarkX2:window.bannerConfig.watermark.watermarkX1,e.style.setProperty(i,`url(${t}, url("${Z(l[i])}")`)}e.style.setProperty(i,`url("${Z(l[i])}")`)}break;default:e.style[i]=l[i]}t&&t.type&&"image"===t.type&&("userCrop"!==t.scaleMode&&function(e,t){if(!e||!t)return s(e,"background"),!1;const i=["background","background-crop","background-stretch","background-mask","background-aspect","background-tile"],n=`${i[0]}-${t.toLowerCase()}`;for(const t in i)r(e,i[t]);s(e,i[0]),s(e,n)}(e,t.scaleMode),function(e,t){let i=!1;const n=o(t);for(const e in t)switch(e){case"scaleMode":case"verticalAlign":case"horizontalAlign":case"contentScale":i=!0}if(i){e.style.backgroundSize="";let{originalWidth:i}=t;if(i)"tile"===t.scaleMode&&(e.style.backgroundSize=i?t.contentScale*i/100+"px":`${t.contentScale}%`,e.style.visibility="visible");else{const s=new Image;s.onload=function(){i!==s.width&&(i=s.width),"userCrop"!==t.scaleMode&&(e.style.backgroundSize=""),"tile"===t.scaleMode&&(e.style.backgroundSize=i?t.contentScale*i/100+"px":`${t.contentScale}%`,e.style.visibility="visible")},s.src=n}t.source===window.bannerConfig.watermark.source&&window.bannerConfig.watermark.show&&d(e.style,t.scaleMode)}}(e,t))}applyBoxShadow(e,t){p(e,function(e){if(!e)return null;const t={"-webkit-box-shadow":"","box-shadow":""};return a(e.useShadow)&&(t.boxShadow=`${e.hShadow}px ${e.vShadow}px ${e.blur}px ${e.spread}px ${e.color}`,t["-webkit-box-shadow"]=t.boxShadow,t["will-change"]="box-shadow"),t}(t))}applyFilters(e,t,i,n){p(e,function(e,t,i){const n={"-webkit-filter":"",filter:""};return e&&a(e.useAdjustColor)&&(n.filter+=`brightness(${(parseInt(e.brightness)+100)/100}) `,n.filter+=`contrast(${(parseInt(e.contrast)+100)/100}) `,n.filter+=`saturate(${(parseInt(e.saturate)+100)/100}) `,n.filter+=`hue-rotate(${e.hue}deg)`),t&&a(t.useBlur)&&(n.filter+=`blur(${t.pixels}px)`),i&&a(i.useShadow)&&(n.filter+=`drop-shadow(${i.hShadow}px ${i.vShadow}px ${i.blur}px ${i.color})`,n["will-change"]="filter"),n["-webkit-filter"]=n.filter,n}(t,i,n))}getFlipString(e){return e?`scale(${"both"===e||"horizontal"===e?"-1":"1"}, ${"both"===e||"vertical"===e?"-1":"1"})`:""}getBRadius(){var e,t,i,n;const{properties:s}=this,r=s.border||{};let a=0;return"rectangle"===s.type&&("number"==typeof r.radius?void 0!==r.radius?a=r.radius:void 0!==s.bradius&&(a=s.bradius):a={topLeft:(null==(e=null==r?void 0:r.radius)?void 0:e.topLeft)||0,topRight:(null==(t=null==r?void 0:r.radius)?void 0:t.topRight)||0,bottomLeft:(null==(i=null==r?void 0:r.radius)?void 0:i.bottomLeft)||0,bottomRight:(null==(n=null==r?void 0:r.radius)?void 0:n.bottomRight)||0}),a}getBorderString(e){const t=e||this.properties.border||{};return void 0===t.weight||0===t.weight||void 0===t.color?"":`${t.weight}px solid ${t.color}`}getAnimationEl(){return this.container}setBuildMidAnimation(){const e=this,t=this.getAnimationEl(),{properties:i}=this.displayData,{buildIn:n}=i,{buildMid:s}=i;let{buildOut:r}=i;const a=s.type===te;let o=r.type===te;const l=a?s.duration:s.delay+s.duration;function d(){e.isHover=!0,q.animate(t,s,"buildMid")}function p(){e.isHover=!1}function c(){e.isHover||e.reset()}const h=1!==e.slide.banner.properties.loopCount,u="none"===r.type,y=s.delay,m=s.duration;function b(){r&&!u&&(s.onAnimationEnd=function(){if(!e.advancedBuildOutNoAdvancedActions){const t=o?r.delay:0;x((()=>{e.setBuildOutAnimation()}),1e3*t)}})}if(!e.properties.showOnAllSlides){const t=e.slide.displayData.properties.duration,{stopSlide:i}=e.slide.displayData.properties,a="none"!==n.type?n.delay+n.duration:0,l=s&&"none"!==s.type?s.delay+s.duration:0,d=a+l+r.delay+r.duration;("instant"===r.type&&d>t||r&&!i&&a>t)&&(r=null,o=!1),h&&s&&"none"!==s.type&&a+l>t&&(s.duration=parseFloat((t-a-s.delay).toFixed(1)))}if("hover"!==s.startEnd){if(a){let i=t;s.onAnimationEnd=function(){let t=o?r.delay:0;x((()=>{!r||u||e.advancedBuildOutNoAdvancedActions||e.setBuildOutAnimation()}),1e3*t)},Object.values(ee).map((e=>{i=i.firstChild,s.advancedProperties[e].length&&q.animate(i,ye(ue({},s),{delay:0}),"buildMid",null,e,!1)}))}else q.animate(t,s,"buildMid");e.buildTimeouts.push(x((()=>{(!h||m!==s.duration)&&h||a||(s.delay=0,s.duration=0,b(),q.animate(t,s,"buildMid")),s.delay=y,s.duration=m}),1e3*l))}else e.isHover=!1,r&&!u&&(s.onAnimationEnd=null),x((()=>{s.delay=0,t.addEventListener("mouseenter",d),t.addEventListener("animationiteration",c),t.addEventListener("mouseleave",p),x((()=>{t.removeEventListener("mouseenter",d),t.removeEventListener("animationiteration",c),t.removeEventListener("mouseleave",p),(h&&m===s.duration||!h&&r&&!u)&&(s.delay=0,s.duration=0,b(),q.animate(t,s,"buildMid")),s.delay=y,s.duration=m}),1e3*s.duration)}),1e3*s.delay)}setBuildOutAnimation(){const e=this.getAnimationEl(),{properties:t}=this.displayData,{buildOut:i}=t,n=this,s=i.type===te,r=s?0:i.delay,a=s?i.duration:i.duration+i.delay;if(n.buildTimeouts.push(x((()=>{n.trigger("buildOutStart")}),1e3*r)),s){let t=e;Object.values(ee).map((e=>{t=t.firstChild,i.advancedProperties[e].length&&q.animate(t,ye(ue({},i),{delay:0}),"buildOut",null,e,!1)}))}else q.animate(e,i,"buildOut");n.buildTimeouts.push(x((()=>{n.trigger("buildOutEnd"),e.style.display="none"}),1e3*a))}playWidgetAnimation(e){const t=e.children;if(t)for(let e=0;ee||o&&!t&&c>e)&&(o=null,p=!1)}let f=!0;l&&(r.advancedProperties?Object.keys(r.advancedProperties):[]).forEach((e=>{r.advancedProperties[e].length&&(f=!1)}));let g=!0;d&&(a.advancedProperties?Object.keys(a.advancedProperties):[]).forEach((e=>{a.advancedProperties[e].length&&(g=!1)}));let w=!0;if(p&&(o.advancedProperties?Object.keys(o.advancedProperties):[]).forEach((e=>{o.advancedProperties[e].length&&(w=!1)})),this.advancedBuildInNoAdvancedActions=l&&f,this.advancedBuildMidNoAdvancedActions=d&&g,this.advancedBuildOutNoAdvancedActions=p&&w,d&&(u=a.delay,m=!0,t.advancedBuildInNoAdvancedActions&&(u+=c)),p?(y=o.delay,b=!0,t.advancedBuildInNoAdvancedActions&&(y+=c),t.advancedBuildMidNoAdvancedActions&&(y+=h,"none"===r.type&&(y+=c))):(t.advancedBuildInNoAdvancedActions&&(y+=c),t.advancedBuildMidNoAdvancedActions&&(y+=h,"none"===r.type&&(y+=c))),t.advancedBuildInNoAdvancedActions&&r.delay>0&&("instant"===r.type?(i.style.display="none",this.buildTimeouts.push(x((()=>{i.style.display=""}),1e3*(r.delay+e)))):(i.style.opacity="0",this.buildTimeouts.push(x((()=>{i.style.opacity="1"}),1e3*(r.delay+e))))),r&&"none"!==r.type&&!t.advancedBuildInNoAdvancedActions){if(0===r.alphaOffset&&(i.style.pointerEvents="none"),r.delay>0&&("instant"===r.type?(i.style.display="none",this.buildTimeouts.push(x((()=>{i.style.display=""}),1e3*(r.delay+e)))):(i.style.opacity="0",this.buildTimeouts.push(x((()=>{i.style.opacity="1"}),1e3*(r.delay+e))))),this.buildTimeouts.push(x((()=>{i.style.pointerEvents="auto",t.trigger("buildInStart")}),1e3*r.delay)),r.onAnimationEnd=()=>{a&&"none"!==a.type&&!t.advancedBuildMidNoAdvancedActions?x((()=>{t.setBuildMidAnimation()}),1e3*(d?u:0)):o&&"none"!==o.type&&!t.advancedBuildOutNoAdvancedActions&&x((()=>{t.setBuildOutAnimation()}),1e3*(p||t.advancedBuildMidNoAdvancedActions?y:0))},l){if(!f){let t=i;Object.values(ee).map((i=>{t=t.firstChild,r.advancedProperties[i].length&&(t.style.opacity="",q.animate(t,r,"buildIn",e,i))}))}}else q.animate(i,r,"buildIn",e);this.buildTimeouts.push(x((()=>{t.trigger("buildInEnd")}),1e3*(r.duration+r.delay+e)))}else a&&"none"!==a.type&&!t.advancedBuildMidNoAdvancedActions?(m&&(u+=e),!d&&l&&t.advancedBuildInNoAdvancedActions&&(u+=c),x((()=>{t.setBuildMidAnimation()}),1e3*u)):o&&"none"!==o.type&&!t.advancedBuildOutNoAdvancedActions&&(b&&(y+=e),x((()=>{t.setBuildOutAnimation()}),1e3*y))}transform(e,t){t||(t=this.container),t.style["-webkit-transform"]=e,t.style["-o-transform"]=e,t.style["-ms-transform"]=e,t.style["-moz-transform"]=e,t.style.transform=e}webkitTransform(e,t){t||(t=this.container),t.style["-webkit-transform"]=e}createActionProperties(e){const t=this.properties&&this.properties.actions&&this.properties.actions.filter((e=>!e.originalUrl)),i=e||t[0];if(!i)return!1;let n="";return"gotoURL"===i.type&&(n=i.url),{event:i.event,slideOrUrl:"gotoSlide"===i.type?i.slide:n,type:i.type,target:i.target,useHandCursor:i.useHandCursor}}applyExtraPropertiesForGradients(e){if(!this.properties.backgroundColor||"string"==typeof this.properties.backgroundColor)return;const t=this.properties.backgroundColor.type,i=this.properties.border?this.properties.border.weight:0;if("lgrad"===t||"rgrad"===t){const t=`-${i}px`,n=`calc(100% + ${2*i}px)`;p(e,{backgroundPosition:`${t} ${t}`,backgroundSize:`${n} ${n}`})}}getCropBackgroundPosition(e){const t=e.cropData.x,i=e.cropData.y,n=e.width,s=e.height,r=e.border?e.border.weight:0;let a=t-r,o=i-r;return"horizontal"!==e.flip&&"both"!==e.flip||(a=n-(t+e.cropData.width)-r),"vertical"!==e.flip&&"both"!==e.flip||(o=s-(i+e.cropData.height)-r),{x:a,y:o}}calcCurrentTime(){if(this.startTime){const e=((new Date).getTime()-this.startTime)/1e3;return this.elapsedTime+e}return this.elapsedTime}playMediaEvent(e,t,i){const{buildIn:n,buildOut:s,buildMid:{duration:r}}=i,a=n.duration+s.duration+r;this.startTime=(new Date).getTime();const o=this.calcCurrentTime(),l=t.displayData&&t.displayData.layerType===ie,d=i.buildIn.delay-o-t.currentTime;l?t.mediaState="play":t.dataset.mediaState="play",o-i.buildIn.delay0?(this.playMediaTimeout&&clearTimeout(this.playMediaTimeout),this.playMediaTimeout=setTimeout((()=>{l?t.player&&t.player.playVideo&&t.player.playVideo():t.play()}),1e3*d)):l?t.player&&t.player.playVideo&&t.player.playVideo():t.play())}pauseMediaEvent(e,t){if(this.startTime){const e=(new Date).getTime();this.elapsedTime+=(e-this.startTime)/1e3,this.startTime=0}const i=t.displayData&&t.displayData.layerType===ie;this.playMediaTimeout&&clearTimeout(this.playMediaTimeout),se(e),i?(t.mediaState="pause",t.player&&t.player.pauseVideo&&t.player.pauseVideo()):(t.dataset.mediaState="pause",t.pause())}stopMediaEvent(e,t,i){this.startTime=0,this.elapsedTime=0;const n=t.displayData&&t.displayData.layerType===ie;this.playMediaTimeout&&clearTimeout(this.playMediaTimeout),se(e),n?(t.mediaState="stop",t.player&&t.player.stopVideo&&t.player.stopVideo()):(t.dataset.mediaState="stop",t.pause(),t.currentTime=i.startTime||0)}detachMediaEvents(){this.onPlayMedia&&(window.embedCanvas.off("playMedia",this.onPlayMedia),this.onPlayMedia=null),this.onPauseMedia&&(window.embedCanvas.off("pauseMedia",this.onPauseMedia),this.onPauseMedia=null),this.onStopMedia&&(window.embedCanvas.off("stopMedia",this.onStopMedia),this.onStopMedia=null),this.playMediaTimeout&&clearTimeout(this.playMediaTimeout)}attachMediaEvents(e,t,i){var n;if(window.embedCanvas){if(this.onPlayMedia||this.onPauseMedia||this.onStopMedia)return;t.preload="metadata",this.onPlayMedia=()=>this.playMediaEvent(e,t,i),this.onPauseMedia=()=>this.pauseMediaEvent(e,t),this.onStopMedia=()=>this.stopMediaEvent(e,t,i),window.embedCanvas.on("playMedia",this.onPlayMedia),window.embedCanvas.on("pauseMedia",this.onPauseMedia),window.embedCanvas.on("stopMedia",this.onStopMedia),(null==(n=null==t?void 0:t.dataset)?void 0:n.mediaState)||(null==t?void 0:t.mediaState)||(this.startTime=(new Date).getTime())}}}var fe=be,ge="instant",we="fadeAudio",ve=Object.defineProperty,Ce=(e,t,i)=>(((e,t,i)=>{t in e?ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i),i),Se=class extends fe{constructor(){super(...arguments),Ce(this,"playWithDelayRegistered",!1),Ce(this,"shouldBePlaying",!1),Ce(this,"fadeOutInterval",null),Ce(this,"fadeInInterval",null)}playWithDelay(e){const{properties:t,displayContainer:i}=e,{buildIn:n}=t;return window.bannerConfig.hybridRender&&e.slide.banner.noAnimation||n.delay>=e.slide.displayData.properties.duration||"pause"===i.dataset.mediaState||"stop"===i.dataset.mediaState?null:setTimeout((()=>{"pause"!==i.dataset.mediaState&&"stop"!==i.dataset.mediaState&&(this.shouldBePlaying=!0,requestAnimationFrame((()=>{i.play().catch((e=>{}))})))}),n.delay?1e3*n.delay:0)}init(e){this.displayData=e,this.properties=e.properties;const{properties:t}=this,i=t.bannersetElementId||t.id;se(i);const{bannerConfig:n}=window;let s;this.audioReset=!1,this.properties.localUrl?(s=`${void 0!==n.imgLocalPath?n.imgLocalPath:"media/"}${this.properties.localUrl}`,n.embedUrl&&(s=n.embedUrl+s)):s=t.url&&-1!==t.url.indexOf("//")?t.url:n.photosUrl+t.url;const r=s+i,a=window.assetsCache[r];this.createMainContainers("element","bs-audio","audio",a),this.transformContainer=this.createElement("div","transform-container");const o=this.displayContainer;window.bannerConfig.hybridRender||(o.muted=!0,document.addEventListener("click",(()=>{o.muted&&(o.muted=!1,this.shouldBePlaying&&o.play().catch((()=>{})))}))),o.parentNode.appendChild(this.transformContainer),this.transformContainer.appendChild(o),o.currentTime=t.startTime;let l=t.volume/100;(l<0||l>1)&&(console.warn(`Volume value of ${l} is not in [0, 1] range. Setting it to 0.`),l=0);const{startTime:d,buildIn:p,buildOut:c,buildMid:{duration:h},soundOnHover:u,secondsBeforeSlide:y}=t,m=this.getLayerDuration(),{banner:{startSlide:b},isOverflowSlide:f}=this.slide;let g=0;if(b&&f&&y){if(o.currentTime=d-y,p.type===we){const e=Math.abs(y)/p.duration;e<1&&(g=l*e)}if(p.type===ge&&(l=t.volume/100),c.type===we){const e=p.duration+h+y;if(e<0){const t=1-Math.abs(e)/c.duration;t>0&&(l*=t)}}}this.onAudioTimeUpdate&&o.removeEventListener("timeupdate",this.onAudioTimeUpdate),this.onAudioTimeUpdate=(()=>{o.currentTime-d>=m&&!o.paused&&(o.pause(),this.shouldBePlaying=!1)}).bind(this),o.addEventListener("timeupdate",this.onAudioTimeUpdate);const w=1!==this.slide.banner.properties.loopCount;return w||(this.playWithDelayRegistered=!0,this.on("slideBuildInEnd",(()=>{re(i,this.playWithDelay(this))}))),o.volume=l,u&&(o.volume=0,o.dataset.soundOnHover="true",o.dataset.volume=l.toString()),this.initFadeEffects(),this.sourceContainer=this.createElement("source",""),this.sourceContainer.type=`audio/${t.format}`,this.sourceContainer.src=s,o.appendChild(this.sourceContainer),this.reset(),this.slide.banner.statsPresent&&this.slide.banner.stats.trackEvent(o,this),this.on("slideBuildOutEnd buildOutEnd",(()=>{o.pause(),this.shouldBePlaying=!1,se(i),w&&(o.currentTime=t.startTime)})),!w&&!this.audioReset||this.playWithDelayRegistered||this.on("slideBuildInEnd",(()=>{re(i,this.playWithDelay(this))})),u||this.attachMediaEvents(i,o,t),this.applyActions(this.createActionProperties(),this.displayContainer),fe.prototype.init.call(this,e)}reset(){var e,t,i,n;super.reset(this);const s=this.displayContainer,r=(null==(e=this.properties)?void 0:e.bannersetElementId)||(null==(t=this.properties)?void 0:t.id);(null==(i=null==s?void 0:s.dataset)?void 0:i.mediaState)&&delete s.dataset.mediaState,se(r),this.onAudioTimeUpdate&&(s.removeEventListener("timeupdate",this.onAudioTimeUpdate),this.onAudioTimeUpdate=null),s.currentTime=(null==(n=this.properties)?void 0:n.startTime)||0,s.pause(),this.shouldBePlaying=!1,this.audioReset=!0,this.initFadeEffects(),re(r,this.playWithDelay(this))}initFadeEffects(){const{buildIn:e,buildOut:t}=this.properties;t.type===we&&this.getFadeEffect(t.duration,"buildOut"),e.type!==we&&e.type!==ge||setTimeout((()=>{this.getFadeEffect(e.type===ge?0:e.duration,"buildIn")}),e.delay?1e3*e.delay:0)}getFadeEffect(e,t){const i=this.displayContainer,{startTime:n,volume:s,fadeInStart:r}=this.properties,a=this.getLayerDuration()-e,o=s/e/5/100;"buildOut"===t?(this.fadeOutInterval&&clearInterval(this.fadeOutInterval),this.fadeOutInterval=setInterval((()=>{0===e?i.volume=0:i.currentTime-n>=a&&i.volume>=o&&(i.volume-=o),i.volume=Math.max(i.volume,0)}),200)):(i.volume=r||0,this.fadeInInterval&&clearInterval(this.fadeInInterval),this.fadeInInterval=setInterval((()=>{i.currentTime-n>=a||(0===e?i.volume=s/100:i.currentTime-n=s/100&&i.currentTime-n{if(!e)return{};const t=`url("data:image/svg+xml;charset=UTF-8,${encodeURIComponent(e)}")`;return{maskImage:t,WebkitMaskImage:t,maskRepeat:"no-repeat",WebkitMaskRepeat:"no-repeat",maskPosition:"center",WebkitMaskPosition:"center",maskSize:"100% 100%",WebkitMaskSize:"100% 100%",maskOrigin:"content-box",WebkitMaskOrigin:"content-box",backdropFilter:"opacity(1)"}},Oe=Object.defineProperty,Te=class extends fe{constructor(){super(...arguments),((e,t,i)=>{((e,t,i)=>{t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i)})(this,"loopCount",0)}init(t){this.displayData=t;const i=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;this.videoReseted=!1,this.properties=t.properties;const n=this.properties.bannersetElementId||this.properties.id;se(n);const{properties:s}=this,{bannerConfig:r}=window;let a;s.localUrl?(a=`${void 0!==r.imgLocalPath?r.imgLocalPath:"media/"}${this.properties.localUrl}`,r.embedUrl&&(a=r.embedUrl+a),a=e(a)):a=s.url&&-1!==s.url.indexOf("//")?s.url:r.photosUrl+s.url;const o=a+s.bannersetElementId||s.id,l=window.assetsCache[o];this.createMainContainers("element",`bs-video video-${s.scaleMode}`,"video",l),this.transformContainer=this.createElement("div","transform-container");const d=this.displayContainer;d.parentNode.appendChild(this.transformContainer),s.maskImage?(this.maskContainer=this.createElement("div"),this.maskContainer.appendChild(this.displayContainer),this.transformContainer.appendChild(this.maskContainer)):this.transformContainer.appendChild(d),d.width=s.width,d.height=s.height,d.controls=s.controls,d.loop=s.loop,d.disablePictureInPicture=!0,d.controlsList="nodownload",d.currentTime=s.startTime,d.playsInline=!0,i&&(d.muted=!0,d.playsInline=!0,d.controls=!1),null===s.url&&null===s.localUrl&&(d.dataset.invalid=!0);let c=s.volume/100;(c<0||c>1)&&(console.warn(`Volume value of ${c} is not in [0, 1] range. Setting it to 0.`),c=0);const{banner:{startSlide:h},isOverflowSlide:u}=this.slide,{startTime:y,endTime:m,buildIn:b,buildOut:f,buildMid:{duration:g},secondsBeforeSlide:w}=s,v=m-y,C=!!h&&u&&!!w,S=b.duration+f.duration+g;C&&(d.currentTime=s.startTime-w%v),0===c&&d.setAttribute("muted",!0);let k=!1;const O=e=>window.bannerConfig.hybridRender&&e.slide.banner.noAnimation||b.delay>=e.slide.displayData.properties.duration||"pause"===d.dataset.mediaState||"stop"===d.dataset.mediaState?null:setTimeout((()=>{if("pause"!==d.dataset.mediaState&&"stop"!==d.dataset.mediaState)try{d.play().catch((()=>{}))}catch(e){}}),b.delay?1e3*b.delay:0),T="enabled"===s.autoplay,A=r.hybridRender||!r.video&&!r.printScreen&&T,E=1!==this.slide.banner.properties.loopCount;let $,I;switch(A?(this.onVideoTimeUpdate&&(d.removeEventListener("timeupdate",this.onVideoTimeUpdate),this.onVideoTimeUpdate=null),this.onVideoTimeUpdate=(()=>{this.loopCount*v+d.currentTime-y=m&&(this.loopCount+=1,d.currentTime=y):d.paused||(d.pause(),d.removeEventListener("timeupdate",this.onVideoTimeUpdate),this.onVideoTimeUpdate=null)}).bind(this),d.addEventListener("timeupdate",this.onVideoTimeUpdate),E||(k=!0,this.on("slideBuildInEnd",(()=>{re(n,O(this))})))):!r.hybridRender&&r.printScreen&&d.classList.add("hide-media-controls"),d.volume=c,s.soundOnHover&&(d.volume=0,d.dataset.soundOnHover="true",d.dataset.volume=c.toString()),this.sourceContainer=this.createElement("source",""),this.sourceContainer.type=`video/${s.format||"mp4"}`,this.sourceContainer.src=a,d.appendChild(this.sourceContainer),this.applyFilters(d,s.adjustColor,s.blur,s.dropShadow),s.verticalAlign){case"top":$="0";break;case"middle":$="50%";break;case"bottom":$="100%"}switch(s.horizontalAlign){case"left":I="0";break;case"center":I="50%";break;case"right":I="100%"}d.style.objectPosition=`${I} ${$}`,d.style.oObjectPosition=`${I} ${$}`,d.style.objectFit="cover";const x=this.getFlipString(s.flip);if("userCrop"===s.scaleMode&&s.cropData){const e=s.cropData.width,t=s.cropData.height,i=this.getCropBackgroundPosition(s);d.style.width=`${e}px`,d.style.height=`${t}px`,d.style.transform=`translate(${i.x}px, ${i.y}px)`}else s.maskImage&&(d.style.width="100%",d.style.height="100%");return this.transformContainer.style.height="100%",this.transformContainer.style.width="100%",this.transformContainer.style.overflow="hidden",this.transform(`translateZ(0) rotate(${s.rotation}deg) ${x}`,this.transformContainer),this.reset(),s.maskImage&&(this.transformContainer.style.opacity=this.displayContainer.style.opacity,this.displayContainer.style.removeProperty("opacity"),window.bannerConfig.pdf&&(this.maskContainer.style.border="1px solid transparent"),this.maskContainer.style.width="100%",this.maskContainer.style.height="100%",p(this.maskContainer,ke(s.maskImage))),this.slide.banner.statsPresent&&this.slide.banner.stats.trackEvent(d,this),this.on("slideBuildOutEnd buildOutEnd",(()=>{d.pause(),se(n),E&&(d.currentTime=s.startTime)})),A&&(E||this.videoReseted)&&!k&&this.on("slideBuildInEnd",(()=>{re(n,O(this))})),this.attachMediaEvents(n,d,s),this.applyActions(this.createActionProperties(),this.displayContainer),fe.prototype.init.call(this,t)}reset(){var e;const t=this.displayContainer;super.reset(this),se(this.properties.bannersetElementId||this.properties.id),this.onVideoTimeUpdate&&(t.removeEventListener("timeupdate",this.onVideoTimeUpdate),this.onVideoTimeUpdate=null),(null==(e=null==t?void 0:t.dataset)?void 0:e.mediaState)&&delete t.dataset.mediaState,this.loopCount=0,this.videoReseted=!0,null==t||t.pause()}};function Ae(e,t){const i=null==e?void 0:e[t];return(null==i?void 0:i.parent)&&(null==i?void 0:i.parent)!==t?[...Ae(e,null==i?void 0:i.parent),t]:i?[t]:[]}var Ee=Object.defineProperty;const $e=class e extends fe{constructor(){super(),this.banner=null,this.rendered=!1,this._buildOutTimeout=null,this.container=null,this.elements=[],this.LOOP_COUNT_FOREVER=0}remove(){this.displayContainer.innerHTML="";const e=this.container.getElementsByClassName("slide-hover");e.length>0&&this.container.removeChild(e[0])}init(t,i){if(this.displayData=t,this.isOverflowSlide)e.overflowSlide=this,this.container=i,this.displayContainer=i,this.resetElements();else{this.createMainContainers("slide","slide-inner"),i.appendChild(this.container);const{properties:e}=t;this.ah=t.ah,!this.ah&&e&&(this.ah=e.bannersetElementId||e.id),e.duration=parseFloat(e.duration),e.duration<.1&&(e.duration=.1),e.transition=e.transition||{type:"none",delay:0,duration:.1};const{transition:n}=e;this.parseTransition(n),this.applyBackground(this.displayContainer,e.backgroundColor),this.reset()}this.banner.statsPresent&&this.banner.stats.trackEvent(this.container,this);const n=t.elements.some((e=>null!==e.properties.blendMode&&"normal"!==e.properties.blendMode));return this.hasClass(this.container,"slide")&&n&&this.container.firstChild.addEventListener("animationend",(()=>{""!==this.container.firstChild.style.animation&&(this.container.firstChild.style.animation=""),this.container.style.perspective="none",this.container.style.webkitPerspective="none"})),super.init(t)}parseTransition(e){switch(e.duration=parseFloat(e.duration)||0,e.delay=parseFloat(e.delay)||0,e.type){case"slide":case"slideBounce":case"slideElastic":if(!parseInt(e.slideOffset))switch(e.direction){case"r2l":case"l2r":e.slideOffset=this.banner.getWidth();break;case"t2b":case"b2t":e.slideOffset=this.banner.getHeight()}break;case"flip":"cross"===e.crosstype&&(e.deg=180)}}isFirstSlide(){return 0===this.banner.slides.indexOf(this)}isLastSlide(){return this.banner.slides.indexOf(this)===this.banner.slides.length-1}reset(){q.clearAll(this.container);const e=this.displayContainer.style;e.zIndex=0,e.width="100%",e.height="100%",e.top="0",e.left="0",e.filter="",e["-webkit-filter"]="",e.animation="",e["-webkit-animation"]="",this.transform("none"),this.resetElements()}resetElements(){for(let e=0;e{var n,s,r;if(!e.properties.visible)return;if("group"===e.layerType)return this.traverseElements(e.elements,t),null;const{properties:{visible:a=!0,hiddenOnSlides:o=[]}={}}=e,l=null==(n=null==e?void 0:e.properties)?void 0:n.group,d=l?Ae(t,l):[],p=!t||!(null==d?void 0:d.length)||function(e,t){return!Object.entries(e).some((([e,i])=>!1===(null==i?void 0:i.visible)&&(null==t?void 0:t.includes(Number(e)))))}(t,d);a&&p&&!o.includes(null==(r=null==(s=this.banner.currentSlide)?void 0:s.properties)?void 0:r.id)&&(i=this.renderElement(e),i&&(this.elements=this.elements.filter((e=>(e.properties.bannersetElementId||e.properties.id)!==(i.properties.bannersetElementId||i.properties.id))),this.elements.push(i)))}))}render(){const e=this.displayData.elements,t=this.displayData.groups;if(this.traverseElements(e,t),this.onBuildInOutCb&&this.off("buildInStart buildInEnd buildOutStart buildOutEnd",this.onBuildInOutCb),this.onBuildInOutCb=(e=>{for(let t=0;t{let s;const{transition:r}=i.displayData.properties;return n=t.length?this.banner.slides[0]:this.banner.slides[i+1]}getPrevSlide(e){e||(e=this.banner.currentSlide);const{slides:t}=this.banner,i=t.indexOf(e);return i-1<0?this.banner.slides[this.banner.slides.length-1]:this.banner.slides[i-1]}getFirstSlide(){return this.banner.slides[0]}getLastSlide(){return this.banner.slides[this.banner.slides.length-1]}playSlideAnimation(e){P(this._buildOutTimeout);const t=this.getAnimationEl();let i;const n=this,{properties:s}=this.displayData,r=this.banner.lastSlide?this.banner.lastSlide.container:null,{loopCount:a}=this.banner.properties,{showOnlyOneSlide:o}=this.banner;let l,d=0;for(i=0;i{n.removeClass(n.container,"buildin"),n.trigger("buildInEnd")}),1e3*e.duration)):this.banner.noAnimation||this.trigger("buildInEnd");const p=!a||a===this.LOOP_COUNT_FOREVER,c=this.banner.loopsPlayed>=this.banner.properties.loopCount;if(!this.isLastSlide()||c||p||(this.banner.loopsPlayed+=1),s.stopSlide||o||!p&&c&&this.isLastSlide()||void 0===s.duration||null===s.duration||(this._buildOutTimeout=x((()=>{n.buildOut()}),1e3*(d+s.duration))),!this.banner.noAnimation)for(i=0;i1){if(s.addClass(s.container,"buildout"),"show"!==n.crosstype){const e=c(n);q.animate(this.getAnimationEl(),e,"buildOut")}a=x((()=>{s.banner.currentSlide!==s&&(s.container.style.display="none"),s.removeClass(s.container,"buildout"),s.trigger("buildOutEnd")}),1e3*n.duration)}else s.trigger("buildOutEnd");e||(e=this.getNextSlide()),e===this&&a&&(P(a),s.removeClass(s.container,"buildout"),s.trigger("buildOutEnd")),!n||r&&!t||e.play(c(n))}getBuildOutTime(){const{transition:e}=this.displayData.properties;return e&&"none"!==e.type?1e3*e.duration:0}getSlideByHashOrId(e){if(!e)return!1;const{slides:t}=this.banner;for(let i=0;i{(e instanceof Se||e instanceof Te)&&(e.reset(),this.banner.noAnimation||e.playAnimation(0))}))}};var Ie;((e,t,i)=>{t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})($e,"symbol"!=typeof(Ie="overflowSlide")?Ie+"":Ie,undefined);var xe=$e,Pe=Object.defineProperty,Le=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,Fe=(e,t,i)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Re=(e,t)=>{for(var i in t||(t={}))Be.call(t,i)&&Fe(e,i,t[i]);if(De)for(var i of De(t))Ue.call(t,i)&&Fe(e,i,t[i]);return e},ze=class extends fe{constructor(){super(),this.startSlide=0,this.overflowSlide=null,this.currentSlide=null,this.lastSlide=null}init(e,t,i,n){const s=this;this.displayData=e,this.container=t,this.displayContainer=this.createElement("div","bs-helper"),this.displayContainer.setAttribute("style","z-index: -1;"),this.container.appendChild(this.displayContainer),this.properties=e.properties,this.resources=e.resources,this.config=i,this.startSlide=parseInt(i.startSlide)||0,this.noAnimation=Boolean(i.noAnimation)||!1,this.showOnlyOneSlide=Boolean(i.showOnlyOneSlide)||!1,this.preload=n,this.setStyle(this.container,"width,height","px"),this.setStyle(this.displayContainer,"width,height","px");const r=this.properties.backgroundColor||{};if((this.properties.width<2||this.properties.height<2)&&(r.useBorder=!1),r.useBorder&&(this.displayContainer.style.left="-1px",this.displayContainer.style.top="-1px",this.displayContainer.style.position="absolute"),this.applyBackground(this.container,r,this.properties.retina),this.applyActions(this.createActionProperties(),this.container),fe.prototype.init.call(this,e),this.initSlides(e.elements,null==e?void 0:e.groups),this.container.addEventListener("click",(e=>{s.statsPresent&&s.stats.launch(e)})),!1!==i.resize){let e=u(this.properties.width,this.properties.height);this.properties.transform=`scale(${e.proportion})`,this.properties.transformOrigin="0 0 0",this.setStyle(this.container,"transform,transformOrigin"),window.addEventListener("resize",(()=>{e=u(s.properties.width,s.properties.height),s.container.style.transform=`scale(${e.proportion})`}))}}initSlides(e,t){var i;let n,s;this.slides=[];const r=[],a={properties:{},elements:[],groups:{}};for(n=0;s=e[n];n++)"slide"===s.type?r.push(s):(s.properties&&(s.properties.showOnAllSlides=!0),a.elements.push(s));let o,l;for(this.overflowSlide=new xe,this.overflowSlide.isOverflowSlide=!0,this.overflowSlide.banner=this,this.overflowSlide.init(a,this.displayContainer),n=0;l=r[n];n++){o=new xe,o.banner=this,o.slideIndex=n;const e=null==(i=null==l?void 0:l.properties)?void 0:i.bannersetElementId;e&&t&&t[e]?o.init((d=Re({},l),p={groups:t[e]},Le(d,Me(p))),this.displayContainer):o.init(l,this.displayContainer),this.slides.push(o)}var d,p}getWidth(){return this.properties.width}getHeight(){return this.properties.height}play(){this.overflowSlide.play(null,!0),this.loopsPlayed=1,this.slides[this.startSlide]&&this.slides[this.startSlide].play(null,!0)}createActionProperties(){const e={event:"click",slideOrUrl:"",type:"gotoURL",target:"_blank",useHandCursor:!0};let t=K();if(!this.config.isCustomEmbed&&(!t&&this.properties.useAsClickTag&&(t=window.clickTag||window.clickTAG||this.config&&this.config.clickTag),t))return e.slideOrUrl=h(t),e;const{properties:i}=this;return i&&(e.target=i.urlTarget,e.useHandCursor=i.useHandCursor||!!t||!!i.bannerUrl),!!i&&!!i.bannerUrl&&(e.slideOrUrl=i.bannerUrl,e.slideOrUrl&&this.config.urlSuffix&&"clickTag"!==i.bannerUrl&&-1===i.bannerUrl.indexOf("bsClickTag")&&(e.slideOrUrl=(n=e.slideOrUrl,"&"===(s=this.config.urlSuffix).charAt(0)&&-1===n.indexOf("?")?s=s.replace("&","?"):"?"===s.charAt(0)&&n.indexOf("?")>-1&&(s=s.replace("?","&")),`${n}${s}`)),e);var n,s}},Ne=Object.defineProperty,_e=Object.defineProperties,je=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ve=(e,t,i)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Xe=(e,t)=>{for(var i in t||(t={}))We.call(t,i)&&Ve(e,i,t[i]);if(He)for(var i of He(t))Ge.call(t,i)&&Ve(e,i,t[i]);return e},Ye=(e,t)=>_e(e,je(t)),qe=class extends J{constructor(){super(),I.init();const e=this;this.banner=new ze,this.initBanner=()=>{e.inited||(e.banner.init(e.json.banner,e.bannerContainer,e.config,e.preload),(!e.config.video&&!e.config.pdf||e.config.autoPlay||void 0===e.config.autoPlay)&&e.banner.play(),["mouseover","mouseout"].forEach((t=>{e.bannerContainer.addEventListener(t,(()=>{document.querySelectorAll("video, audio").forEach((e=>{!function(e,t){const i="mouseover"===e&&function(e){let t=e.parentNode;for(;!t.classList.contains("element");)t=t.parentNode;return"none"!==t.style.display}(t);if(t.dataset.soundOnHover===(!0).toString())try{t.muted=!i}catch(e){console.error(e)}}(t,e)}))}))})),window.bannerConfig.hybridRender&&document.querySelectorAll("video, audio").forEach((e=>{!function(e){e.dataset.soundOnHover===(!0).toString()&&(e.muted=!0)}(e)})),e.inited=!0)}}replaceButtonLayerFontFamily(e,t){const i=null==t?void 0:t.find((t=>t.originalFont.fontFamily===e.fontFamily));return e.fontFamily&&i?Xe(Xe({},e),i.fallbackFont):e}replaceTextLayerFontFamily(e,t){return Ye(Xe({},e),{nodes:function e(i){return i.map((i=>{if(i.children&&i.children.length>0)return Ye(Xe({},i),{children:e(i.children)});{const e=t.find((e=>{var t,n;return(null==(t=e.originalFont)?void 0:t.fontFamily)===(null==(n=null==i?void 0:i.fontSettings)?void 0:n.fontFamily)}));if((null==i?void 0:i.fontSettings)&&e)return Ye(Xe({},i),{fontSettings:Xe(Xe({},i.fontSettings),e.fallbackFont)})}return i}))}(e.nodes)})}applyFallbackFonts(e,t){return t&&t.length?e.banner&&e.banner.elements?(e.banner.elements=e.banner.elements.map((e=>e.elements?(e.elements=e.elements.map((e=>("layer"===e.type&&"text"===e.layerType?e.properties.config=this.replaceTextLayerFontFamily(e.properties.config,t):"layer"===e.type&&"button"===e.layerType&&(e.properties.labelStyle=this.replaceButtonLayerFontFamily(e.properties.labelStyle,t)),e))),e):(console.error("Slide elements are undefined."),e))),e):(console.error("Banner or banner elements are undefined."),e):e}augmentFeed(e,t){window.feedJson&&window.feedJson({json:e.banner,feedRowData:t})}init(e,t,i,n,s){I.pause();const r=this;if(n&&this.augmentFeed(t,n),s){const{feedRow:e,feedTargetId:n}=i;let a=n;a||(a=e);const{fallbackFonts:o}=s,l=null==o?void 0:o.find((e=>e.languageCode===a));if(l){const{fonts:e}=l;t=r.applyFallbackFonts(t,e)}}const a=Math.round(t.banner.properties.width),o=Math.round(t.banner.properties.height);if(t.banner.properties.width=a,t.banner.properties.height=o,this.json=t,this.config=i,this.bannerContainer=e,this.config.assetsPreloaded)this.initBanner();else{this.preload=new y;const e=parseInt(i.startSlide)||0,n=t.banner.elements.filter((e=>"slide"===e.type));i.hybridRender?this.preload.allAssets(t.banner,i,this.initBanner):(this.preload.assets(t.banner,n[e],i,this.initBanner),window.loadAssetsTimer=setTimeout((()=>{r.preload.resolveIfAssetsLoaded(!0)}),3e3))}}showWatermark(){window.BS_ShowWatermark&&window.BS_ShowWatermark()}resumeBanner(){I.resume(),this.trigger("playMedia"),this.trigger("playAutoscroll")}pauseBanner(){I.pause(),this.trigger("pauseMedia")}stopMedia(){I.pause(),this.trigger("stopMedia")}};function Qe({properties:{config:e}}){var t;return(null==(t=null==e?void 0:e.boundary)?void 0:t.type)===Ke.autoscroll}var Je=(e=>(e.MOVE="move",e.ROTATE="rotate",e.SCALE="scale",e.OPACITY="opacity",e.BLUR="blur",e))(Je||{});Object.values(Je);const Ke={overflow:"overflow",shrink:"shrink",ellipsis:"ellipsis",autoscroll:"autoscroll"},Ze=.05;function et(e,t=!1){const{config:{boundary:{scrollSpeed:i,delayAnimationScroll:n}},buildIn:{type:s,duration:r,delay:a}}=e.properties,o=e.displayContainer;if(o){let l,d=function(){if(!1===p){o.scrollTopAbs=(o.scrollTopAbs||o.scrollTop)+1*i*c,o.scrollTop=o.scrollTopAbs,c=Math.min(c+Ze,1);const t=o.scrollHeight-o.clientHeight;Math.round(o.scrollTop){e.effHelper.style.animationPlayState===f&&(p=!0)})),e.autoscrollMouseLeave&&o.removeEventListener("mouseleave",e.autoscrollMouseLeave),e.autoscrollMouseLeave=()=>{e.effHelper.style.animationPlayState===f&&(p=!1,c=Ze,P(l),l=x(d,500),e.buildTimeouts.push(l))},o.addEventListener("mouseleave",e.autoscrollMouseLeave)}}String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value(e,t){if(null==this)throw new TypeError('"this" is null or not defined');const i=Object(this),n=i.length>>>0;if(0===n)return!1;const s=0|t;let r=Math.max(s>=0?s:n-Math.abs(s),0);for(;r{const{bannerConfig:t,bannerJson:i}=window;let n=i;const{fallbackImage:s,brandkitJsonHash:r}=n.banner.properties;if(s&&/MSIE|Trident/.test(window.navigator.userAgent)){const e=window.document.getElementsByTagName("noscript").item(0);if(e){const t=document.createElement("div");t.innerHTML=e.firstChild.data,e.parentElement.replaceChild(t,e)}}else n&&(r?function(e){return t=this,i=null,n=function*(){const t=`brandkits/${e}/json`,i=yield fetch(`${window.bannerConfig.s3Url}${t}?t=${(new Date).getTime()}`,{timeout:1e4});return i.ok&&(yield i.json())||null},new Promise(((e,s)=>{var r=e=>{try{o(n.next(e))}catch(e){s(e)}},a=e=>{try{o(n.throw(e))}catch(e){s(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,a);o((n=n.apply(t,i)).next())}));var t,i,n}(r).then((e=>a(e))).catch((e=>{console.error(e),a()})):a());function a(i=null){e.init(window.document.getElementById("bs"),n,t,null,i)}})),e};window.BS_eaUtils=t,window.BS_eaUtils,window.BS_eff=q,window.BS_eff,window.BS_EventDispatcher=J,window.BS_EventDispatcher,window.BS_BaseDisplay=fe,window.BS_BaseDisplay,window.BS_BannerDisplay=ze,window.BS_BannerDisplay,window.BS_SlideDisplay=xe,window.BS_SlideDisplay,window.BS_EmbedCanvas=qe,window.BS_EmbedCanvas,window.BS_SvgDisplay=class extends fe{init(e){var t,i;this.displayData=e,this.properties=e.properties;const{bannerConfig:n}=window,s=Qe({properties:this.properties});let r,a;if(this.createMainContainers("element","svg"+(s?" autoscrollBoundary":"")),this.properties.resourceKey&&this.slide.banner.displayData.resources){const e=this.slide.banner.displayData.resources[this.properties.resourceKey],t=e&&function(e,t){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.innerHTML=e;const n=i.querySelectorAll("[data-color-group]");for(let e=0;e{a.style.visibility="hidden"})),(null==(i=this.properties.feed)?void 0:i.colorGroups)&&function(e,t,i){const n=new XMLHttpRequest;n.addEventListener("load",(function(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.innerHTML=this.responseText;const n=e.querySelectorAll("[data-color-group]");for(let e=0;e\s{1,}<"),i=i.replace(/\s{2,}/g," "),i.replace(l,encodeURIComponent)}(e.innerHTML,!1)}`})),n.addEventListener("error",(function t(){const i=e.indexOf("?")>=0?"&":"?",s=Math.random().toString(16).substr(2),r=`${e}${i}v=${s}`;n.removeEventListener("error",t),n.open("GET",r,!0),n.send()})),n.open("GET",e,!0),n.send()}(r,a,this.properties.colorGroups)}this.displayContainer.appendChild(a);const o=this.getFlipString(this.properties.flip);return this.transform(`rotate(${this.properties.rotation}deg) ${o} perspective(1px)`,this.displayContainer),this.applyFilters(this.displayContainer,this.properties.adjustColor,this.properties.blur,this.properties.dropShadow),this.reset(),this.slide.banner.statsPresent&&this.slide.banner.stats.trackEvent(this.displayContainer,this),this.applyActions(this.createActionProperties(),this.displayContainer),s&&this.slide.banner.noAnimation&&et(this),super.init(e)}playAnimation(e){super.playAnimation(e),Qe({properties:this.properties})&&et(this)}},window.BS_SvgDisplay,window.BS_ImageDisplay=class extends fe{constructor(e){super(),this.retina=e}init(e){this.displayData=e,this.triggerReadyOnRender=!1,this.properties=e.properties,this.source=this.properties.source;const{properties:t,source:i}=this;let n;this.createMainContainers("element",`bs-image image-${t.scaleMode}`),this.transformContainer=this.createElement("div","transform-container"),this.displayContainer.parentNode.appendChild(this.transformContainer),t.maskImage?(this.maskContainer=this.createElement("div"),this.maskContainer.appendChild(this.displayContainer),this.transformContainer.appendChild(this.maskContainer)):this.transformContainer.appendChild(this.displayContainer);const{bannerConfig:s}=window;if(s.hqImages&&this.properties.hqUrl&&i!==window.bannerConfig.watermark.source?n=this.properties.hqUrl:this.properties.localUrl?(n=`${void 0!==s.imgLocalPath?s.imgLocalPath:"media/"}${this.properties.localUrl}`,s.embedUrl&&(n=s.embedUrl+n)):n=t.url&&(t.url.includes("//")||t.url.startsWith("data"))?t.url:s.photosUrl+t.url,!0===this.retina&&this.properties.retinaReady&&(this.displayContainer.classList.add("retina"),i===window.bannerConfig.watermark.source&&window.bannerConfig.watermark.show?this.displayContainer.style.setProperty("--retina-src",`url(${window.bannerConfig.watermark.watermarkX2}), url("${Z(n)}")`):this.displayContainer.style.setProperty("--retina-src",`url("${Z(n)}")`)),n)if(i===window.bannerConfig.watermark.source&&window.bannerConfig.watermark.show){let e;e=window.devicePixelRatio>1?window.bannerConfig.watermark.watermarkX2:window.bannerConfig.watermark.watermarkX1,this.displayContainer.style.backgroundImage=`url(${e}), url(${n})`,d(this.displayContainer.style,t.scaleMode)}else{let e=window.assetsCache[n];e&&e.imageLoadedWithError&&this.properties.backupUrl&&(n=this.properties.backupUrl),this.displayContainer.style.backgroundImage=`url("${n}")`}let r,a;switch(this.applyFilters(t.maskImage?this.transformContainer:this.displayContainer,t.adjustColor,t.blur,t.dropShadow),t.verticalAlign){case"top":r="0";break;case"middle":r="50%";break;case"bottom":r="100%"}switch(t.horizontalAlign){case"left":a="0";break;case"center":a="50%";break;case"right":a="100%"}if(this.displayContainer.style.backgroundPosition=`${a} ${r}`,"tile"===t.scaleMode){const e=t.contentScale,n=t.originalWidth?t.originalWidth:t.oWidth;this.displayContainer.style.backgroundSize=e/100*n+"px",this.displayContainer.style.backgroundPositionX=`${t.contentOffsetX}%`,this.displayContainer.style.backgroundPositionY=`${t.contentOffsetY}%`,i===window.bannerConfig.watermark.source&&window.bannerConfig.watermark.show&&(this.displayContainer.style.backgroundSize=`${window.bannerConfig.watermark.size}px, ${e/100*n}px`)}else if("userCrop"===t.scaleMode&&t.cropData){const e=t.cropData.width,n=t.cropData.height,s=this.getCropBackgroundPosition(t);this.displayContainer.style.backgroundSize=`${e}px ${n}px`,this.displayContainer.style.backgroundPositionX=`${s.x}px`,this.displayContainer.style.backgroundPositionY=`${s.y}px`,this.displayContainer.style.backgroundRepeat="no-repeat",i===window.bannerConfig.watermark.source&&window.bannerConfig.watermark.show&&(this.displayContainer.style.backgroundSize=`${window.bannerConfig.watermark.size}px, ${e}px ${n}px`,this.displayContainer.style.backgroundRepeat="repeat, no-repeat")}this.transformContainer.style.height="100%",this.transformContainer.style.width="100%";const o=this.getFlipString(t.flip);this.transform(`translateZ(0) rotate(${t.rotation}deg) ${o}`,this.transformContainer),this.reset();return t.maskImage&&(this.onLoadSlide=()=>{this.transformContainer.style.opacity=this.displayContainer.style.opacity,this.displayContainer.style.removeProperty("opacity")},window.bannerConfig.pdf&&(this.maskContainer.style.border="1px solid transparent"),this.maskContainer.style.width="100%",this.maskContainer.style.height="100%",p(this.maskContainer,ke(t.maskImage))),this.slide.banner.statsPresent&&this.slide.banner.stats.trackEvent(this.displayContainer,this),this.applyActions(this.createActionProperties(),this.displayContainer),fe.prototype.init.call(this,e)}},window.BS_ImageDisplay,window.BS_ShapeDisplay=class extends fe{constructor(e){super(),this.retina=e}init(e){this.displayData=e;const{properties:t}=e;if(this.properties=t,this.createMainContainers("element",`shape ${t.type}`),-1!=i()){const e=this.createElement("img","fakeImage");e.src="data:image/gif;base64,R0lGODlhAQABAIAAANvf7wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",this.displayContainer.appendChild(e)}"line"===t.type&&(t.type="rectangle",t.width=t.len,t.height=t.thick,delete t.len,delete t.thick,this.properties=t),this.container.style.width=`${t.width}px`,this.container.style.height=`${t.height}px`;const n=this.getBRadius();n&&("number"==typeof n?this.displayContainer.style.borderRadius=`${n}px`:(this.displayContainer.style.borderTopLeftRadius=`${(null==n?void 0:n.topLeft)||0}px`,this.displayContainer.style.borderTopRightRadius=`${(null==n?void 0:n.topRight)||0}px`,this.displayContainer.style.borderBottomLeftRadius=`${(null==n?void 0:n.bottomLeft)||0}px`,this.displayContainer.style.borderBottomRightRadius=`${(null==n?void 0:n.bottomRight)||0}px`));const s=this.getBorderString();if(this.displayContainer.style.border=s,s&&(this.displayContainer.style.backgroundClip="padding-box"),this.applyBackground(this.displayContainer,t.backgroundColor,this.retina),this.applyExtraPropertiesForGradients(this.displayContainer),t.backgroundColor&&t.backgroundColor.type&&"image"===t.backgroundColor.type&&"userCrop"===t.backgroundColor.scaleMode&&t.cropData){const e=t.cropData.width,i=t.cropData.height,n=this.getCropBackgroundPosition(t);this.displayContainer.style.backgroundSize=`${e}px ${i}px`,this.displayContainer.style.backgroundPositionX=`${n.x}px`,this.displayContainer.style.backgroundPositionY=`${n.y}px`,this.displayContainer.style.backgroundRepeat="no-repeat"}const r=this.getFlipString(t.flip);return this.transform(`rotate(${this.properties.rotation}deg) ${r}`,this.displayContainer),this.applyFilters(this.displayContainer,!1,this.properties.blur,this.properties.dropShadow),this.reset(),this.slide.banner.statsPresent&&this.slide.banner.stats.trackEvent(this.displayContainer,this),this.applyActions(this.createActionProperties(),this.displayContainer),fe.prototype.init.call(this,e)}},window.BS_ShapeDisplay,window.BS_scale=(e,t)=>{const i="buildIn"===t,n=((e,t)=>{let i=1,n=1,s="top left";switch(e.direction){case"topRight":i=0,n=0,s=t?"top right":"bottom left";break;case"bottomRight":i=0,n=0,s=t?"bottom right":"top left";break;case"bottomLeft":i=0,n=0,s=t?"bottom left":"top right";break;case"topLeft":i=0,n=0,s=t?"top left":"bottom right";break;case"l2r":i=0,s=t?"left center":"right center";break;case"r2l":i=0,s=t?"right center":"left center";break;case"t2b":n=0,s=t?"center top":"center bottom";break;case"b2t":n=0,s=t?"center bottom":"center top";break;default:i=0,n=0,s="center center"}return{startScaleX:i,startScaleY:n,transformOrigin:s}})(e,i),{startScaleX:s}=n,{startScaleY:r}=n,{transformOrigin:a}=n,o=`scale_${t}_${a.replace(" ","_")}_${s.toString().replace(".","_")}_${r.toString().replace(".","_")}`;return C(o)||S(o,[{percent:i?0:100,props:{transform:`scaleX(${s}) scaleY(${r})`,"transform-origin":a}},{percent:i?100:0,props:{transform:"scaleX(1) scaleY(1)","transform-origin":a}}]),o},window.BS_scale,window.BS_slide=(e,t)=>{const i="buildIn"===t,n=((e,t)=>{let i=0,n=0;const s=parseInt(e.slideOffset);switch(e.direction){case"custom":i=parseInt(e.slidePosX),n=parseInt(e.slidePosY);break;case"l2r":i=t?-s:s;break;case"r2l":i=t?s:-s;break;case"t2b":n=t?-s:s;break;case"b2t":n=t?s:-s}return{translateX:i,translateY:n,alpha:parseInt(e.alphaOffset)}})(e,i),s=n.translateX,r=n.translateY,a=n.alpha,o=`${e.type}_${t}_${s}_${r}_${a}`;return C(o)||S(o,[{percent:i?0:100,props:{transform:`translateX(${s}px) translateY(${r}px)`,opacity:a/100}},{percent:i?100:0,props:{transform:"translateX(0) translateY(0)",opacity:"1"}}]),o},window.BS_slide,window.BS_init=tt,window.BS_init,window.embedCanvas=tt()}();