[\\s\\S]*?","gi");do t=e,e=e.replace(r,"");while(e!==t);return e.replace(/e.minDistanceForSwipe:"x"===e.validAxis&&(t=n>e.minDistanceForSwipe),{isHorizontal:n>r,isConsideredSwipe:t}}function attach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.addEventListener(o,n,_buildNativeListenerOptions(r))}function detach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.removeEventListener(o,n,_buildNativeListenerOptions(r))}function once(e,t,n,r){attach(e,t,function o(){detach(e,t,o,r),n.apply(this,arguments)},r)}function trigger(e,t,n,r){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r);var i="on"+ucfirst(t);return"function"==typeof e[i]&&e[i](),e.dispatchEvent(o)}function fakeclick(e,t){t=t||window;var n=t.document.createElement("a");n.cssText="visibility: hidden",n.addEventListener("click",function(t){e(),t.preventDefault(),t.stopPropagation(),n.parentNode.removeChild(n)},!0),t.document.body.appendChild(n);var r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),n.dispatchEvent(r)}function fakeClickAhrefBlank(e,t,n){t=t||noop,n=n||window;var r=n.document.createElement("a");r.style.cssText="visibility: hidden",r.setAttribute("href",e),r.setAttribute("target","_blank"),r.addEventListener("click",function(e){e.stopPropagation(),t(),r.parentNode.removeChild(r)},!0),n.document.body.appendChild(r);var o=n.document.createEvent("MouseEvents");o.initEvent("click",!0,!0),r.dispatchEvent(o)}function noop(){}function nullai(e,t){t()}function retTrue(){return!0}function retFalse(){return!1}function offset(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:t.top+(o.pageYOffset||r.scrollTop)-(r.clientTop||0),left:t.left+(o.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}}function addCssRule(e,t,n){var r=document.createElement("style");r.textContent=e+" {"+t+"}",n?n.document.getElementsByTagName("head")[0].appendChild(r):document.getElementsByTagName("head")[0].appendChild(r)}function redrawAndroidIframe(){var e=document.createElement("style");document.body.appendChild(e),document.body.removeChild(e)}function parseQuery(e){var t={};return e=e.replace(/\&$/,"").replace(/\+/g,"%20"),e.split("&").forEach(function(e){var n=e.split("=").map(decodeURIComponent);t[n[0]]=n[1]}),t}function buildQuery(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function postBlob(e,t){var n=new XMLHttpRequest;n.open("POST",creative.apiUrl+"blobs?base64=1"),n.setRequestHeader("Content-Type","application/octet-stream"),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText,n.status)},n.send(e)}function tmpl(e,t){function n(e){return" p.push('"+e.replace(/'/g,"\\'").split(/\r?\n/g).join("\\n');\n p.push('")+"');\n"}if(!e)return"";var r;if(-1==e.indexOf("<%"))r=function(){return e};else{var o=e.split(/<%\s*|\s*%>/g),i="var p = []; with(o) {\n",a=!1;o.forEach(function(e){a?i+="="==e[0]?" p.push("+e.replace(/^=\s*|\s*$/g,"")+");\n":" "+e+"\n":e&&(i+=n(e)),a=!a}),i+='} return p.join("");';try{r=new Function("o",i)}catch(c){var u=new Error("Cannot parse template! (see `template` property)");throw u.template=i,u}}return t?r(t):r}function flash(){var e=document.createElement("div");e.style.background="white",e.style.opacity=.005,e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.width="100%",e.style.height="100%",e.style.zIndex=2147483647,document.body.appendChild(e),setTimeout(function(){e.parentNode.removeChild(e)},0)}function crc32(e){"use strict";var t=-1,n=0,r=[0,-227835133,-516198153,324072436,-946170081,904991772,648144872,-724933397,-1965467441,2024987596,1809983544,-1719030981,1296289744,-1087877933,-1401372889,1578318884,274646895,-499825556,-244992104,51262619,-675000208,632279923,922689671,-996891772,-1702387808,1760304291,2075979607,-1982370732,1562183871,-1351185476,-1138329528,1313733451,549293790,-757723683,-1048117719,871202090,-416867903,357341890,102525238,-193467851,-1436232175,1477399826,1264559846,-1187764763,1845379342,-1617575411,-1933233671,2125378298,820201905,-1031222606,-774358714,598981189,-143008082,85089709,373468761,-467063462,-1170599554,1213305469,1526817161,-1452612982,2107672161,-1882520222,-1667500394,1861252501,1098587580,-1290756417,-1606390453,1378610760,-2032039261,1955203488,1742404180,-1783531177,-878557837,969524848,714683780,-655182201,205050476,-28094097,-318528869,526918040,1361435347,-1555146288,-1340167644,1114974503,-1765847604,1691668175,2005155131,-2047885768,-604208612,697762079,986182379,-928222744,476452099,-301099520,-44210700,255256311,1640403810,-1817374623,-2130844779,1922457750,-1503918979,1412925310,1197962378,-1257441399,-350237779,427051182,170179418,-129025959,746937522,-554770511,-843174843,1070968646,1905808397,-2081171698,-1868356358,1657317369,-1241332974,1147748369,1463399397,-1521340186,-79622974,153784257,444234805,-401473738,1021025245,-827320098,-572462294,797665321,-2097792136,1889384571,1674398607,-1851340660,1164749927,-1224265884,-1537745776,1446797203,137323447,-96149324,-384560320,461344835,-810158936,1037989803,781091935,-588970148,-1834419177,1623424788,1939049696,-2114449437,1429367560,-1487280117,-1274471425,1180866812,410100952,-367384613,-112536529,186734380,-538233913,763408580,1053836080,-860110797,-1572096602,1344288421,1131464017,-1323612590,1708204729,-1749376582,-2065018290,1988219213,680717673,-621187478,-911630946,1002577565,-284657034,493091189,238226049,-61306494,-1307217207,1082061258,1395524158,-1589280451,1972364758,-2015074603,-1800104671,1725896226,952904198,-894981883,-638100751,731699698,-11092711,222117402,510512622,-335130899,-1014159676,837199303,582374963,-790768336,68661723,-159632680,-450051796,390545967,1230274059,-1153434360,-1469116676,1510247935,-1899042540,2091215383,1878366691,-1650582816,-741088853,565732008,854102364,-1065151905,340358836,-433916489,-177076669,119113024,1493875044,-1419691417,-1204696685,1247431312,-1634718085,1828433272,2141937292,-1916740209,-483350502,291187481,34330861,-262120466,615137029,-691946490,-980332558,939183345,1776939221,-1685949482,-1999470558,2058945313,-1368168502,1545135305,1330124605,-1121741762,-210866315,17165430,307568514,-532767615,888469610,-962626711,-707819363,665062302,2042050490,-1948470087,-1735637171,1793573966,-1104306011,1279665062,1595330642,-1384295599];for(n=0;n>>8^r[255&(t^e.charCodeAt(n))];return(-1^t)>>>0}function isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}function isDefAndNotNull(e){return null!=e}function updateQueryStringParameter(e,t,n){t=encodeURIComponent(t),n=encodeURIComponent(n);var r=new RegExp("([?|&])"+t+"=.*?(&|$)","i");return separator=-1!==e.indexOf("?")?"&":"?",e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+separator+t+"="+n}function fetchShortenedUrl(e,t,n){function r(t,n){i[e].forEach(function(e){e[t](n)}),delete i[e]}n=n||noop;var o=!1,i=fetchShortenedUrl.inProgress,a=fetchShortenedUrl.cache;if("http"==!e.slice(0,4))return void n();if(a[e])return void defer(function(){t(a[e])},0,"fetchShortenedUrl defer success callback");if(i[e]||(i[e]=[],o=!0),i[e].push({success:t,error:n}),o){var c=(creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"shortenedUrls/",u={url:e,fields:"shortUrlKey"},s=btoa(to_utf8(e));s=s.replace(/\//g,"$").replace(/\+/g,"_").replace(/=/g,"");var d={cbName:"shortener_"+s};loadJSONP(c+"?"+buildQuery(u),d,function(t){var n=creative.shareUrl+t.shortUrlKey;a[e]=n,r("success",n)},function(){requestCreateShortenedUrl(e,r)})}}function requestCreateShortenedUrl(e,t){var n=(creative.runtimeParams.secure?creative.apiUrl:creative.insecureApiUrl)+"shortenedUrls/",r=fetchShortenedUrl.cache,o=new XMLHttpRequest;o.open("POST",n),o.setRequestHeader("Content-Type","application/json; charset=utf-8"),o.onreadystatechange=function(){if(4===o.readyState)if(201===o.status){var n=JSON.parse(o.responseText),i=creative.shareUrl+n.shortUrlKey;r[e]=i,t("success",i)}else t("error")},o.send(JSON.stringify({url:e}))}function isMediaPlaying(e){try{return e.currentTime>0&&!e.paused&&!e.ended}catch(t){return!1}}function merge(){var e,t,n={};for(t=0;tt?0:1}function pulse(e,t,n){return step(e,n)-step(t,n)}function smoothstep(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return r*r*r*((6*r-15)*r+10)}function bump(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return(Math.cos(Math.PI*r)+1)/2}function getWindowNesting(e){var t={iframe:e!==e.top,friendlyIframe:!1,iabFriendlyIframe:!1,hostileIframe:!1,iframeDepth:0};if(t.iframe){var n=e;try{for(t.friendlyIframe=!!e.top.location.href,t.iabFriendlyIframe=t.friendlyIframe&&"undefined"!=typeof e.inDapIF&&e.inDapIF;"undefined"!=typeof n.parent.location.href&&n.parent.document!==n.document;)n=n.parent,t.iframeDepth++;"undefined"==typeof e.top.document&&(t.hostileIframe=!0)}catch(r){t.hostileIframe=!0}}return t}function isFetchSupported(){return!!(window.fetch&&window.URL&&URL.createObjectURL)}function isBeaconSupported(){return!(!window.navigator||!window.navigator.sendBeacon)}function isNativeImplementation(e){return"function"==typeof e&&e.toString().indexOf("[native code]")>-1}!function(e){if(!this.defer){try{for(;"undefined"!=typeof e.parent.location.href&&e.parent.document!==e.document;)e=e.parent}catch(t){}var n=function(){function t(){return 9007199254740991===s?0:++s}var n,r,o,i,a=e,c="function"==typeof a.setImmediate;if(a.MutationObserver)return function(e){n=document.createElement("div"),new MutationObserver(function(){e(),n=null}).observe(n,{attributes:!0}),n.setAttribute("i","1")};if(!c&&a.postMessage&&!a.importScripts&&a.addEventListener){var u="com.setImmediate"+Math.random(),s=0;i={};var d=function(e){if(e.source===a&&0===e.data.indexOf(u)){var t=e.data.split(":")[1];i[t](),delete i[t]}};return a.addEventListener("message",d,!1),function(e){var n=t();i[n]=e,a.postMessage(u+":"+n,"*")}}return!c&&a.document&&"onreadystatechange"in document.createElement("script")?function(e){r=document.createElement("script"),r.onreadystatechange=function(){r.onreadystatechange=null,r.parentNode.removeChild(r),r=null,e()},document.body.appendChild(r)}:(o=c&&setImmediate||setTimeout,function(e){o(e)})}();this.defer=function(t,r,o,i){var a,c=0|r;if(o){var u;"undefined"!=typeof defer.perf?u=defer.perf:"undefined"!=typeof creative?u=creative.perf:"undefined"!=typeof perf&&(u=perf),u&&(u._stopTrackingDefers||(a=u.start("defer",{deferId:o,delay:c})))}if(t){var s=function(){a&&a.end(),t()};i?n(s):e.setTimeout(s,c)}}}}(window),Function.prototype.bind||Object.defineProperty(Function.prototype,"bind",{value:function(e){var t=this;return function(){return t.apply(e,arguments)}}}),function(e){e.getEventNames=function(){var t={};return"WebKitAnimationEvent"in e&&(t.animationstart="webkitAnimationStart",t.animationiteration="webkitAnimationIteration",t.animationend="webkitAnimationEnd"),"WebKitTransitionEvent"in e&&(t.transitionend="webkitTransitionEnd"),t}}(window),_isListenerOptionSupported.opts={};var getTimestamp=function(){return void 0===window.performance||void 0===window.performance.now?Date.now:window.performance.now.bind(window.performance)}();Date.now||(Date.now=function(){return+new Date}),Array.prototype.waitForEach||Object.defineProperty(Array.prototype,"waitForEach",{value:function(e,t,n){var r=this.length;r?this.forEach(function(o,i,a){var c=!1;e.call(n,o,function(){if(c)throw"Called `done` multiple times for element "+i;c=!0,--r||t()},i,a)},n):t()}}),function(e){e.loadJS=function(t,n,r,o){var i=e.loadJS.externals,a={success:n||noop,error:r||noop};if(!/^[A-Za-z0-9]*:\/\/|^\/\//.test(t)){var c=creative.hostedFiles.filter(function(e){return e.filepath===t})[0];if("undefined"==typeof c)return console.warn('Hosted file "'+t+'" was not found.'),void a.error();if(c.loaded!==!1)return console.warn('Hosted file "'+t+'" is already loaded.'),void setTimeout(a.success,0);c.loaded=!0,t=creative.cachedApiUrl+"hostedFiles/"+creative.id+"/"+creative.version+"/"+t}if(t in i&&!o)i[t].loaded?setTimeout(a.success,0):i[t].cbs.push(a);else{i[t]={cbs:[a]};var u=document.createElement("script");u.type="text/javascript",u.onload=function(){i[t].loaded=!0,i[t].cbs.forEach(function(e){e.success()}),i[t].cbs=[]},u.onerror=function(){i[t].cbs.forEach(function(e){e.error()}),i[t].cbs=[],delete i[t]},u.src=t,e.loadJS.appendToRoot(u)}},e.loadJS.externals={},e.loadJS.appendToRoot=function(e){return document.querySelector("head").appendChild(e)},e.loadJSONP=function(t,n,r,o){"function"==typeof n&&(o=r,r=n,n={});var i=n.cbName||"__jsonp"+randInt();t+=(-1==t.indexOf("?")?"?":"&")+(n.paramName||"jsonp")+"="+i,e[i]=function(t){r(t),delete e[i]},loadJS(t,noop,o,!0)}}(window),"undefined"==typeof Function.prototype.name&&!function(){var e=/^function\s+(\w+?)\s*?\(/;Object.defineProperty(Function.prototype,"name",{get:function(){var t=this.constructor.prototype.toString.call(this);return e.test(t)?t.match(e)[1]:""}})}(),fetchShortenedUrl.cache={},fetchShortenedUrl.inProgress={};;
function CPoint(t,i){this.x=1*t||0,this.y=1*i||0}function CRect(t,i,e,o){this.left=1*t||0,this.top=1*i||0,this.width=1*e||0,this.height=1*o||0}CPoint.offset=function(t){var i=offset(t);return new CPoint(i.left,i.top)},CPoint.convertPointFromNodeToPage=function(t,i){if(!t||"undefined"!=typeof t.x)return null;var e=CPoint.offset(t);return new CPoint((i?i.x:0)+(e?e.x:0),(i?i.y:0)+(e?e.y:0))},CPoint.convertPointFromPageToNode=function(t,i){if(!t||"undefined"!=typeof t.x)return null;var e=CPoint.offset(t);return new CPoint((i?i.x:0)-(e?e.x:0),(i?i.y:0)-(e?e.y:0))},CPoint.sample=function(t,i,e){for(var o=Math.floor(Math.sqrt(t.width*i/t.height)),n=Math.floor(Math.sqrt(t.height*i/t.width)),h=t.width/o,r=t.height/n,s=0;n>s;s++)for(var f=0;o>f;f++)e((f+.5)*h+t.left,(s+.5)*r+t.top)},CPoint.epsilon=function(t,i,e){return Math.abs(t-i)h||0>r?CRect.ZERO:new CRect(i,e,h,r)},CRect.prototype.copyFrom=function(t){this.left=t.left,this.top=t.top,this.width=t.width,this.height=t.height},CRect.prototype.relativeTo=function(t){return new CRect(this.left-t.left,this.top-t.top,this.width,this.height)},CRect.prototype.contains=function(t){return t instanceof CPoint?t.x>=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom:t instanceof CRect?t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom:void 0},CRect.prototype.map=function(t,i){var e=i.width/t.width,o=i.height/t.height;return new CRect((this.left-t.left)*e+i.left,(this.top-t.top)*o+i.top,this.width*e,this.height*o)},CRect.prototype.equals=function(t){return t&&this.left==t.left&&this.top==t.top&&this.right==t.right&&this.bottom==t.bottom},CRect.prototype.toString=function(){return"CRect: "+JSON.stringify(this)};;
function Logger(e){if(!(this instanceof Logger))return new Logger(e);e=e||"";var n=noop;(Logger.enabledNames.indexOf(e)>=0||Logger.enabledNames.indexOf("all")>=0)&&(n=function(){var e=[].slice.apply(arguments);e.unshift(Logger._ts()+" ["+Logger.sessionId+(this.name?" "+this.name:"")+"]"),console.log.apply(console,e)}),this.name=e,this.log=n,this.warn=n,this.debug=n,this.error=n}Logger._ts=function(){function e(e,n){for(e+="";e.lengthn[t])return 1}return 0}var i,o,s;if(!e)return!0;if(0===n.length)o=null,s=null;else if(1===n.length)o=n[0],s=n[0];else{if(2!==n.length)throw"Invalid number of arguments";o=n[0],s=n[1]}for(e=e.split(".").map(t),o=o?o.split(".").map(t):[],s=s?s.split(".").map(t):[],i=Math.max(o.length,s.length)-e.length;i>=0;i--)e.push(0);return!(-1===r(e,o)||1===r(e,s))}function a(e,n){if(-1===e.indexOf("Playstation")){var t=e.match(/\bSilk\/([0-9._-]+)\b/);t&&(n.browserName="Amazon Silk",n.browserVersion=t[1])}n.browserName&&n.browserVersion&&(0===n.browserName.indexOf("Chrome")&&s(n.browserVersion,["28",null])||0===n.browserName.indexOf("Opera")&&s(n.browserVersion,["15",null]))&&(n.browserRenderingEngine="Blink"),n.browserRenderingEngineVersion||(n.browserRenderingEngineVersion=function(){var n;return(n=e.match(/Trident\/([0-9.]+)/))?n[1]:(n=e.match(/Presto\/([0-9.]+)/))?n[1]:(n=e.match(/AppleWebKit\/*([0-9.]+)/i))?n[1]:(n=e.match(/Gecko\/*([0-9.]+)/),n?n[1]:"")}())}t.prototype.android=function(){return"Android"===this.name&&s(this.version,arguments)},t.prototype.osx=function(){return"OSX"===this.name&&s(this.version,arguments)},t.prototype.ios=function(){return"IOS"===this.name&&s(this.version,arguments)},t.prototype.windows=function(){return"Windows"===this.name&&s(this.version,arguments)},t.prototype.windowsPhone=function(){return"WindowsPhone"===this.name&&s(this.version,arguments)},t.prototype.linux=function(){return"Linux"===this.name},r.prototype.safari=function(){return"Safari"===this.name&&s(this.version,arguments)},r.prototype.chrome=function(){return 0===this.name.indexOf("Chrome")&&s(this.version,arguments)},r.prototype.ie=function(){return 0===this.name.indexOf("Internet Explorer")&&s(this.version,arguments)},r.prototype.android=function(){return"Android Browser"===this.name&&s(this.version,arguments)},r.prototype.samsung=function(){return"Samsung Browser"===this.name&&s(this.version,arguments)},r.prototype.opera=function(){return 0===this.name.indexOf("Opera")&&s(this.version,arguments)},r.prototype.silk=function(){return"Amazon Silk"===this.name&&s(this.version,arguments)},r.prototype.firefox=function(){return"Firefox"===this.name&&s(this.version,arguments)},r.prototype.edge=function(){return"Edge"===this.name&&s(this.version,arguments)},r.prototype.webView=function(){var n=null,t="iP"===(e.navigator.platform||"").substr(0,2);if(t){var r=this.userAgent,i=-1!==r.indexOf("Safari")&&-1!==r.indexOf("Version"),o=!/constructor/i.test(e.HTMLElement);i&&!e.navigator.standalone?n="iOS Safari or Safari Controller":(o||e.indexedDB)&&e.statusbar.visible?(e.webkit&&e.webkit.messageHandlers||o||e.indexedDB)&&(n="WKWebView"):n="UIWebView"}else/^.*\/\d\.\d \(.*wv\).*/.test(this.userAgent)&&(n="AndroidWebView");return n},i.prototype.webkit=function(){return"WebKit"===this.name&&s(this.version,arguments)},i.prototype.gecko=function(){return"Gecko"===this.name&&s(this.version,arguments)},i.prototype.trident=function(){return"Trident"===this.name&&s(this.version,arguments)},i.prototype.presto=function(){return"Presto"===this.name&&s(this.version,arguments)},i.prototype.blink=function(){return"Blink"===this.name&&s(this.version,arguments)},o.prototype.phone=function(){return"Phone"===this.hardwareType},o.prototype.tablet=function(){return"Tablet"===this.hardwareType},o.prototype.desktop=function(){return"Desktop"===this.hardwareType},o.prototype.mobileDevice=function(){return this.mobile===!0},e.CeltraDeviceInfo.create=function(t,r){return t=t||e.navigator.userAgent||"",r=r||{},a(t,r),new n(r,t)}}(window);;
window.deviceInfo=CeltraDeviceInfo.create(window.navigator.userAgent,window.celtraDeviceInfoRuntimeParams);;
!function(e){function n(){var e=p().match(/iP(ad|hone|od).*OS ([0-9_]+)/);return!!e&&s(e[2].replace(/_/g,"."),arguments)}function t(){var e=p().match(/Android ([0-9.]+)/),n=p().match(/Windows Phone/);return!n&&!!e&&s(e[1],arguments)}function r(){var e=p().match(/Windows Phone ([0-9.]+)/);return!!e&&s(e[1],arguments)}function i(){var e=p().match(/AppleWebKit\/*([0-9.]+)/i);return!!e&&s(e[1],arguments)}function a(){var e=p().match(/Gecko\/*([0-9.]+)/i);return!!e&&s(e[1],arguments)}function o(){var e=p().match(/MSIE ([0-9]{1,}[.0-9]{0,})|Trident.* rv:([0-9]{1,}[.0-9]{0,})/i);return!!e&&s(e[1]||e[2],arguments)}function u(){var e=p().match(/Silk\/([0-9.]+)/);return!!e&&s(e[1],arguments)}function f(){var e=p().toLowerCase();return/kftt|kfot|kfjwi|kfjwa|kfso|kfth|kfapwi|kfthwi|kfsowi|kfthwa|kfapwa|kfap|sd4930ur/.test(e)?s("2",arguments):!1}function d(){return"undefined"!=typeof offsetWidthOverride?offsetWidthOverride:(document.body.offsetWidth,Math.min(innerWidth,innerHeight))}function c(){return/iPad/.test(p())||d()>550}function m(){return!(t()||n()||r())}function s(e,n){function t(e){return parseInt(e.replace(/\D/g,""),10)}function r(e,n){for(var t=0;tn[t])return 1}return 0}var i,a,o;if(!e)return!0;if(0===n.length)a=null,o=null;else if(1===n.length)a=n[0],o=n[0];else{if(2!==n.length)throw"Invalid number of arguments";a=n[0],o=n[1]}e=e.split(".").map(t),a=a?a.split(".").map(t):[],o=o?o.split(".").map(t):[];for(var i=v.max(a.length,o.length)-e.length;i>=0;i--)e.push(0);return!(-1===r(e,a)||1===r(e,o))}function h(){return v.top!==e}function l(){if(!(n()||window.chrome&&"Google Inc."===window.navigator.vendor))return!1;var e;return e=p().match(n()?/CriOS\/([0-9]+.)/:/Chrome\/([0-9]+.)/),!!e&&s(e[1],arguments)}function g(){var e="(-webkit-min-device-pixel-ratio: 1.5),(min--moz-device-pixel-ratio: 1.5),(-o-min-device-pixel-ratio: 3/2),(min-resolution: 1.5dppx)";return window.devicePixelRatio>1||window.matchMedia&&window.matchMedia(e).matches}e.celtra=e.celtra||{};var w={};w.ios=n,w.android=t,w.webkit=i,w.windowsPhone=r,w.gecko=a,w.windows=o,w.kindleSilk=u,w.kindle=f,w.iframe=h,w.desktop=m,w.tablet=c,w.chromeBased=l,w.isHighDensityDisplay=g,extend(e.celtra,w),delete w.webkit,extend(e,w);var v={max:e.Math.max,min:e.Math.min,userAgent:e.navigator.userAgent,top:e.top},p=function(){return"undefined"!=typeof e.userAgentOverride?e.userAgentOverride:v.userAgent}}(window);;
!function(e){function t(){var t=e;try{for(;"undefined"!=typeof t.parent.location.href&&t.parent.document!==t.document;)t=t.parent}catch(n){}return t}function n(){return s.getComputedStyle(s.document.body,null)}function i(e,t,n){if(!e)throw new Error("No element specified!");if(a(t)){if(!(t in e.style)&&i.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+t);if("undefined"==typeof n)return e.style[t];e.style[t]=n}else{if(-1==w.indexOf(t)&&o(t),"undefined"==typeof n)return e.style[y[t]];e.style[y[t]]=n}}function r(e,t){if(!e)throw new Error("No element specified!");var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if(R&&v.indexOf(t)>-1&&(t="webkit"+u(t)),!n||"none"==n.display||!f())return null;if(!(t in n)&&i.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+t);return a(t)?n[t]:(-1==w.indexOf(t)&&o(t),n[y[t]])}function o(e){S=S||n();var t=E+u(e);if(R&&v.indexOf(e)>-1)y[e]=t;else if(S&&e in S)y[e]=e;else if(S&&t in S)y[e]=t;else if(!S&&deviceInfo.browser.firefox)y[e]=e;else if(i.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+e+' or iframe still display "none" in FF');w.push(e)}function a(e){return p.test(e)}function f(){if(e===s)return!0;var t=e.frameElement.ownerDocument.defaultView.getComputedStyle(e.frameElement,null);return t&&"none"!=t.display}function u(e){return e+="",e?e[0].toUpperCase()+e.slice(1):""}var l=e.navigator.userAgent,s=t(),c=/rv:.*Gecko\//.test(l),d=/MSIE|Trident\//.test(l),m=/WebKit/.test(l),p=/^-?([mM]oz|[wW]eb[kK]it|[mM]s)-?/,y={},w=[],E=function(){return m?"webkit":d?"ms":c?"Moz":""}(),R=function(){var e=l.match(/AppleWebKit\/(\d+)/);return e&&~~e[1]<540}(),v=["transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backface-visibility","perspective","perspective-origin"],S=n();i.BREAK_ON_ERROR=!1,e.celtra=e.celtra||{},e.celtra.styler={css:i,computedCSS:r,isWebkit:m,isGecko:c,isIE:d},e.css=i,e.computedCSS=r}(window);;
var Freezer={};Freezer.unfreeze=function(n,e,o){function t(n,e,o,t,a){ActionInvocationSimulator.isDryRun()?ActionInvocationSimulator.needsDryRun(n.internalId)&&(ActionInvocationSimulator.logActionDryRun(n.internalId,n.method,e.localId),e[n.method+"ActionDryRun"]?e[n.method+"ActionDryRun"](o,t,a):a()):e[n.method+"Action"](o,t,a)}function a(n){if(n instanceof Array)return n.map(a);if(n instanceof Object){var o;if("ActionInvocation"===n.clazz){n.internalId=++c;var s=l;o=function(e,a){if(!e)throw"Cannot execute an action without a context.";a||(a=noop);var i=o.isStatic;if("undefined"==typeof i&&(i=!o.instance),o.disabled)return void a();if(i){if(o.instance)throw"ActionInvocation for a static method must not have an instance assigned.";if("function"!=typeof o.actionClazz[o.method+"Action"])throw"Clazz "+o.actionClazz+' does not define the static action "'+o.method+'".';var r=extend({},o.args,{triggerId:s,caller:n});t(o,o.actionClazz,e,r,a)}else if(o.instance){if(!(o.instance instanceof o.actionClazz))throw"Instance "+o.instance+" is not an instance of clazz "+o.actionClazz;if("function"!=typeof o.instance[o.method+"Action"])throw"Instance of clazz "+o.actionClazz+' does not define the instance action "'+o.method+'".';var r=extend({},o.args,{triggerId:s,caller:n});t(o,o.instance,e,r,a)}else ActionInvocationSimulator.isDryRun()?a():defer(a,0,"Freezer.unfreeze defer c")}}else if(n.clazz){var f=e[n.clazz];if(!f)throw new Error("Unsupported clazz: "+n.clazz);o=Object.create(f.prototype)}else o={},n.onFire&&(l=n.type);for(var d in n)n.hasOwnProperty(d)&&"clazz"!==d&&(o[d]=a(n[d]));i.push(o),o.localId&&(r[o.localId]&&console.error("Duplicate localId: "+o.localId),r[o.localId]=o);for(var d in o)if("clazz"===d.slice(-5).toLowerCase()){var z=o[d];if(!z)continue;e[z]?o[d]=e[z]:console.error("Unsupported clazz: "+o.clazz)}return o}return n}var i=[],r={},c=0,l=null,s=a(n);i.forEach(function(n){for(var e in n)if("LocalId"===e.slice(-7)){var o=n[e];if(o instanceof Function)continue;var t;null===o?t=null:(t=r[o],t||console.error("Invalid localId reference: "+o)),n[e.slice(0,-7)]=t,delete n[e]}else if("LocalIds"===e.slice(-8)){for(var a=[],i=0;in-c;if(!i){var o=r._downloadQueue[t];o.requested||(o.requested=!0,e.push(t),o.secure&&(a=!0))}}e.length&&(Logger("batcher").log(e.length+" new batchable URLs requested during last runloop iteration ("+(a?"at least one secure":"none secure")+"):\n - "+e.join("\n - ")),r._loadBatch(a,e,function(e){for(var a in e){var t=e[a];t===!1&&(t=(r._downloadQueue[a].secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+a),r._cache[a]=t,r._downloadQueue[a].callbacks.forEach(function(e){e(t)}),delete r._downloadQueue[a]}}))},0,"Batcher.getDataUri downloadQueue",useAsap())):defer(function(){a(e)},0,"Batcher.getDataUri url not batchable",useAsap())},Batcher.prototype._generateBatchUrl=function(e,a){var r=(e?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"batch?urls="+a.sort().map(encodeURIComponent).join(",");return r},Batcher.prototype._loadBatch=function(e,a,r){function t(e){var a,r=5381;for(a=0;al+i*l||r>d+c*d)&&(L.addPoint(t,n,o/1e3,u(document.elementFromPoint(t,n))),E=o,j=0)}}function r(e){var t=Date.now();I=D.setTimeout(function(){i(e,t)},200)}function i(e,t){w&&(w=!1,t||(t=Date.now()),L.addPoint(T,C,t/1e3,u(document.elementFromPoint(T,C))),h.track(L),b?(p.removeEventListener("touchmove",o,f),p.removeEventListener("touchend",i,f)):(p.removeEventListener("mousemove",o,f),p.removeEventListener("mouseup",i,f)),p.removeEventListener("mouseout",r,f))}function c(e,t){var n=null,a=null,o=null,r=!1;return t instanceof Screen?(n=t,a=null,o=n.parentUnitVariant,r=!0):"undefined"!=typeof ScreenObject&&t instanceof ScreenObject?(n=t.parentScreen,a=t,o=n.parentUnitVariant,r=!0):"undefined"!=typeof CreativeUnitVariant&&t instanceof CreativeUnitVariant&&(n=null,a=null,o=t,r=!0),r?extend({unitName:o?o.parentUnit.name:n.parentUnit.name,unitVariantLocalId:o?o.localId:null,screenLocalId:n?n.localId:null,screenTitle:n?n.title:null,screenIsMaster:n?n.isMasterScreen():null,objectLocalId:a?a.localId:null,objectName:a?a.name:null,objectClazz:a?a.constructor.name:null,initiationTimestamp:new Date/1e3},e):e}function u(e){function t(e){for(var o in e)if(e.hasOwnProperty(o)){if(e[o].name&&e[o].name==a)return e[o];if(e[o].localId&&e[o].localId==n)return e[o];var r;if(e[o].variants?r=t(e[o].variants):e[o].screens?r=t(e[o].screens):e[o].objects?r=t(e[o].objects):e[o].content&&e[o].content.objects?r=t(e[o].content.objects):e[o].component&&(r=e[o].component),r)return r}}if(!e)return null;for(var n,a,o=e;;){if(o.id&&0==o.id.indexOf("celtra-")){a=o.id.replace("celtra-",""),0==o.id.indexOf("celtra-object-")&&(n=o.id.replace("celtra-object-",""));var r=t(g);if(r)return"undefined"!=typeof CreativeUnit&&r instanceof CreativeUnit?r.currentScreen:r}if(!o.parentNode)break;o=o.parentNode}return null}var l=15,d=100,s=3e3,m=40,f={capture:!0,passive:!0},p=e,v=t,h=t.adapter.trackingCenter,g=t.units,w=!1,I=null,b=!0,L={},j=0,M=null,E=Date.now(),T=0,y=0,C=0,U=0,D=e.ownerDocument.defaultView||e.ownerDocument.parentWindow;attach(p,"touchstart",n,f),attach(p,"mousedown",n,f)};
function Tapper(e,t){function a(e){for(var t=e,a=null;1!=t.nodeType;)t=t.parentNode;for(;t&&1==t.nodeType&&t.tagName;){var n=t.tagName.toLowerCase();if(hasClass(t,"touchable")||"a"===n&&t.href||"button"===n||"img"===n||"input"===n&&t.type&&"button"===t.type.toLowerCase()){a=t;break}t=t.parentNode}return a}function n(e,t){var a=e.ownerDocument.createEvent("MouseEvents");a.initEvent("tap",!0,!0),t.dispatchEvent(a)}var c="undefined"!=typeof creative&&creative.adapter||adapter,o=c.useImprovedTapDetection?10:20,r=c.useImprovedTapDetection?200:400;t=t||c.useNativeClickForTapDetection,t&&(attach(e,"click",function(t){var c=a(t.target);c&&n(e,c)},!c.nativeClickEmittedOnSwipe),c.useNativeClickForTapDetection)||attach(e,"touchstart",function(i){var u=a(i.target);if(u){var h=!1;if(celtra.iframe()){var s=function(){var e=c.getTopWindow();return[e.scrollX,e.scrollY,e.innerWidth,e.innerHeight]},d=s();h=!0}var v=i.targetTouches[0].clientX-o,l=i.targetTouches[0].clientX+o,f=i.targetTouches[0].clientY-o,p=i.targetTouches[0].clientY+o;addClass(u,"touched");var g=!1,m=!1,T=!1,C=!1,w=new Date,D=function(e){if(!g&&!m){var t=e.targetTouches[0].clientX,a=e.targetTouches[0].clientY;g=h&&d.toString()!=s().toString(),m=!(t>=v&&l>=t&&a>=f&&p>=a),m||g?removeClass(u,"touched"):addClass(u,"touched")}},k=function(){if(!C&&(C=!0,detach(e,"touchmove",D,!1),detach(e,"touchend",arguments.callee,!1),hasClass(u,"touched"))){var a=new Date-w>r&&!deviceInfo.deviceType.desktop();if(removeClass(u,"touched"),m||g||T||a)return;t||n(e,u)}},y=function(){detach(e,"touchend",y,!0),nextFrame(function(){T=!0,k()})};attach(e,"touchcancel",function(e){removeClass(u,"touched"),k(e)},!1),attach(e,"touchmove",D,!1),attach(e,"touchend",k,!1),attach(e,"touchend",y,!0)}},!0)};
function TouchEventSimulator(t){this.el=t,this.doc=t.ownerDocument?t.ownerDocument:t,this.win=this.doc.defaultView,this.touch=null,this._initialised=!1,this._firstEventFired=!1,this.handleFirstEvent=this.handleFirstEvent.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handlePointerCancel=this.handlePointerCancel.bind(this),this.captureBubbleEvents=this.captureBubbleEvents.bind(this)}TouchEventSimulator.mode=null,TouchEventSimulator.prototype.start=function(){return this._initialised?void("function"==typeof Logger&&Logger("TouchEventSimulator").warn("Touch event simulator already initialised!")):("function"==typeof Logger&&Logger("TouchEventSimulator").log("Enabling touch event simulation"),this.doc.defaultView.msPointerEnabled?this.startPointers():this.startMouse(),this.el.addEventListener("touchstart",this.captureBubbleEvents,!1),this.el.addEventListener("touchmove",this.captureBubbleEvents,!1),this.el.addEventListener("touchend",this.captureBubbleEvents,!1),this.el.addEventListener("touchcancel",this.captureBubbleEvents,!1),void this.el.addEventListener("tap",this.captureBubbleEvents,!1))},TouchEventSimulator.prototype.stop=function(){return this._initialised?("function"==typeof Logger&&Logger("TouchEventSimulator").log("Disabling touch event simulation"),this.win&&this.win.msPointerEnabled?this.stopPointers():this.stopMouse(),this.el.removeEventListener("touchstart",this.captureBubbleEvents,!1),this.el.removeEventListener("touchmove",this.captureBubbleEvents,!1),this.el.removeEventListener("touchend",this.captureBubbleEvents,!1),this.el.removeEventListener("touchcancel",this.captureBubbleEvents,!1),void this.el.removeEventListener("tap",this.captureBubbleEvents,!1)):void("function"==typeof Logger&&Logger("TouchEventSimulator").warn("Touch event simulator not running!"))},TouchEventSimulator.prototype.captureBubbleEvents=function(t){t.stopPropagation(),t.preventDefault()},TouchEventSimulator.prototype.startMouse=function(){this.el.addEventListener("mousedown",this.handleMouseDown,!0),this.el.addEventListener("mousemove",this.handleMouseMove,!0),this.el.addEventListener("mouseup",this.handleMouseUp,!0),this.el.addEventListener("mouseout",this.handleMouseOut,!0),this.el.addEventListener("dragstart",this.handleDragStart,!0),this._initialised=!0},TouchEventSimulator.prototype.stopMouse=function(){this.el.removeEventListener("mousedown",this.handleMouseDown,!0),this.el.removeEventListener("mousemove",this.handleMouseMove,!0),this.el.removeEventListener("mouseup",this.handleMouseUp,!0),this.el.removeEventListener("mouseout",this.handleMouseOut,!0),this.el.removeEventListener("dragstart",this.handleDragStart,!0),this._initialised=!1},TouchEventSimulator.prototype.startPointers=function(){this.el.addEventListener("MSPointerDown",this.handlePointerDown,!0),this.el.addEventListener("MSPointerMove",this.handlePointerMove,!0),this.el.addEventListener("MSPointerUp",this.handlePointerUp,!0),this.el.addEventListener("MSPointerCancel",this.handlePointerCancel,!0),this._initialised=!0},TouchEventSimulator.prototype.stopPointers=function(){this.el.removeEventListener("MSPointerDown",this.handlePointerDown,!0),this.el.removeEventListener("MSPointerMove",this.handlePointerMove,!0),this.el.removeEventListener("MSPointerUp",this.handlePointerUp,!0),this.el.removeEventListener("MSPointerCancel",this.handlePointerCancel,!0),this._initialised=!1},TouchEventSimulator.prototype.init=function(){this.doc.defaultView.navigator.msPointerEnabled?this.start():(this.el.addEventListener("touchstart",this.handleFirstEvent,!0),this.el.addEventListener("mousedown",this.handleFirstEvent,!0))},TouchEventSimulator.prototype.updateTouchCoordinates=function(t){this.touch.screenX=t.screenX,this.touch.screenY=t.screenY,this.touch.pageX=t.pageX,this.touch.pageY=t.pageY,this.touch.clientX=t.clientX,this.touch.clientY=t.clientY},TouchEventSimulator.prototype.ignorables=["select","input","textarea"],TouchEventSimulator.prototype.isFormElement=function(t){return this.ignorables.indexOf(t.nodeName.toLowerCase())>-1},TouchEventSimulator.prototype.isIgnorable=function(t){for(var e=t;e&&e instanceof HTMLElement;e=e.parentNode)if(hasClass(e,"ignore-toucheventsimulator"))return!0;return!1},TouchEventSimulator.prototype.handleFirstEvent=function(t){this._firstEventFired||(this._firstEventFired=!0,this.el.removeEventListener("touchstart",this.handleFirstEvent,!0),this.el.removeEventListener("mousedown",this.handleFirstEvent,!0),"touch"!=TouchEventSimulator.mode&&"mousedown"==t.type?(TouchEventSimulator.mode="mouse",this.start(),this.handleMouseDown(t)):TouchEventSimulator.mode="touch")},TouchEventSimulator.prototype.handleMouseDown=function(t){0!=t.button||this.isIgnorable(t.target)||(this.touch={identifier:0,target:t.target},this.updateTouchCoordinates(t),t.stopPropagation(),this.isFormElement(t.target)||t.preventDefault(),this.fireTouchEvent("touchstart",t))},TouchEventSimulator.prototype.handleMouseMove=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),t.stopPropagation(),t.preventDefault(),this.fireTouchEvent("touchmove",t))},TouchEventSimulator.prototype.handleMouseUp=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),t.stopPropagation(),t.preventDefault(),this.fireTouchEvent("touchend",t),this.touch=null)},TouchEventSimulator.prototype.handleMouseOut=function(t){this.touch&&0==t.button&&(t.clientX<0||t.clientX>this.win.innerWidth||t.clientY<0||t.clientY>this.win.innerHeight)&&this.cancelInteraction()},TouchEventSimulator.prototype.handleDragStart=function(t){return t.preventDefault(),!1},TouchEventSimulator.prototype.handlePointerDown=function(t){0==t.button&&(this.touch={identifier:0,target:t.target},this.updateTouchCoordinates(t),this.fireTouchEvent("touchstart",t))},TouchEventSimulator.prototype.handlePointerMove=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchmove",t))},TouchEventSimulator.prototype.handlePointerUp=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchend",t))},TouchEventSimulator.prototype.handlePointerCancel=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchcancel",t),this.touch=null)},TouchEventSimulator.prototype.fireTouchEvent=function(t,e){var n=this.doc.createEvent("HTMLEvents");n.initEvent(t,!0,!0),"touchend"==t||"touchcancel"==t?(n.touches=n.targetTouches=[],n.changedTouches=[this.touch]):n.touches=n.targetTouches=n.changedTouches=[this.touch],e.target.dispatchEvent(n)},TouchEventSimulator.prototype.cancelInteraction=function(){this.touch&&(this.fireTouchEvent("touchcancel",this.touch),this.touch=null)};;
function SwipeListener(t){function e(t,e){return Math.abs(t)>Math.abs(e)?t>0?"east":"west":e>0?"south":"north"}function a(){detach(l(),"touchmove",n,!1),detach(l(),"touchend",c,!1)}function n(t){if(t.touches.length>1)a();else{var n=t.changedTouches[0].pageX-o,c=t.changedTouches[0].pageY-i;if(r=Math.max(Math.abs(n),Math.abs(c)),r>Math.min(50,g))if(null===u)u=e(n,c);else{var h=e(n,c);u!=h&&a()}}}function c(){a(),r>=g&&(d(u,r),v.attachClickPreventionHandler())}function h(t){creative.adapter.useNativeClickForTapDetection||t.preventDefault(),1==t.touches.length&&(o=t.changedTouches[0].pageX,i=t.changedTouches[0].pageY,r=0,u=null,attach(l(),"touchmove",n,!1),attach(l(),"touchend",c,!1),v.detachClickPreventionHandler())}var o,i,u,r,s=t.target,l=t.swipeNodeGetter,d=t.swipe,g=t.minLength||50,v=Object.create(ClickPreventer).initClickPrevention(function(){return s});attach(window,"touchstart",noop,!1),attach(s,"touchstart",h,!1)};
var ClickPreventer={initClickPrevention:function(e){return this._getDefaultClickPreventionNode=e||function(){},this._clickPreventionNode=null,this._clickPreventionHandler=this._clickPreventionHandler.bind(this),this},attachClickPreventionHandler:function(e){creative.adapter.nativeClickEmittedOnSwipe&&!this._clickPreventionNode&&(this._clickPreventionNode=e||this._getDefaultClickPreventionNode(),attach(this._clickPreventionNode,"click",this._clickPreventionHandler,!0))},detachClickPreventionHandler:function(){creative.adapter.nativeClickEmittedOnSwipe&&this._clickPreventionNode&&(detach(this._clickPreventionNode,"click",this._clickPreventionHandler,!0),this._clickPreventionNode=null)},_clickPreventionHandler:function(e){e.stopPropagation(),this.detachClickPreventionHandler()}};;
function PlaceboBar(e,t,a,i){var n=!1,r=document.createElement("div");r.className="celtra-placebobar",r.style.cssText="position: absolute; bottom: 60px; left: 0; right: 0; margin: auto; z-index: 20; width: 215px; height: 8px;";var l=document.createElement("img");l.src=creative.resourceUrl+"runner/clazzes/CreativeUnit/loading-back.png",l.style.position="absolute",l.style.width="100%",l.style.height="100%",r.appendChild(l);var o=document.createElement("div");o.style.position="absolute",o.style.top="2px",o.style.bottom="2px",o.style.left="3px",o.style.right="3px",r.appendChild(o);var s=document.createElement("div");return s.style.background="url("+creative.resourceUrl+"runner/clazzes/CreativeUnit/loading-over.png) "+i+" repeat-x",s.style.position="absolute",s.style.width="0",s.style.height="100%",o.appendChild(s),r.start=function(){function i(){if(r.parentNode){var n=Math.min((new Date-l)/e,t);s.style.width=100*n+"%",t>n&&setTimeout(i,2*a*Math.random())}}if(!n){n=!0;var l=new Date;setTimeout(i,0)}},r};
var EventEmitter={emit:function(t){var e=this._listeners;if(e&&e[t]){var n=[].slice.call(arguments,1);e[t].forEach(function(t){t.apply(window,n)})}},emits:function(){var t=arguments;return function(){this.emit.apply(this,t)}.bind(this)},addListener:function(t,e){var n=this._listeners;n||(n=this._listeners={}),n[t]||(n[t]=[]),n[t].push(e)},removeListener:function(t,e){var n=this._listeners;n&&n[t]&&(n[t]=n[t].filter(function(t){return t!==e}))},once:function(t,e){var n=this;n.on(t,function i(){n.off(t,i),e.apply(this,arguments)})},onAll:function(t,e){t.split(" ").waitForEach(function(t,e){this.once(t,e)},e,this)}};EventEmitter.on=EventEmitter.addListener,EventEmitter.off=EventEmitter.removeListener,EventEmitter.addEventListener=EventEmitter.addListener,EventEmitter.removeEventListener=EventEmitter.removeListener;;
function InViewObject(t,e){this.view=t,this.inViewParent=e,this._init()}extend(InViewObject.prototype,EventEmitter),InViewObject.prototype._init=function(){this.rectInView=CRect.ZERO,this.areaInViewRatio=0,this.active=!1,this._maxPossibleDimensions={width:0,height:0,area:0},this.computeRectInView=this.computeRectInView.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)},InViewObject.prototype.getNode=function(){return this.view.getNode()},InViewObject.prototype.getParentMaxPossDims=function(){return this.inViewParent?this.inViewParent.getMaxPossibleDimensions():this.adapter.getViewportRect()},InViewObject.prototype.computeRectInView=function(){var t=this.inViewParent.getRectInView(),e=this.getBoundingClientRect(),i=t.intersect(e),n=!1;this.rectInView.equals(i)||(this.rectInView=i,n=!0),this._computeMaxPossibleDimensions(e,this.getParentMaxPossDims());var s=this._maxPossibleDimensions.area>0?i.area/this._maxPossibleDimensions.area:0,o=!1;s!==this.areaInViewRatio&&(this.areaInViewRatio=s,o=!0),n&&(this.emit("rectInViewChanged",i),Logger("InViewObject").debug(this.view.toString()+", rectInViewChanged: "+this.rectInView.toString())),o&&(this.emit("areaInViewRatioChanged",s),Logger("InViewObject").debug(this.view.toString()+", areaInViewRatioChanged: "+s))},InViewObject.prototype.getBoundingClientRect=function(){var t=this.getNode();return t?CRect.adopt(t.getBoundingClientRect()):CRect.ZERO},InViewObject.prototype.getMaxPossibleDimensions=function(){return this._maxPossibleDimensions},InViewObject.prototype._computeMaxPossibleDimensions=function(t,e){this._maxPossibleDimensions.width=Math.min(e.width,t.width),this._maxPossibleDimensions.height=Math.min(e.height,t.height),this._maxPossibleDimensions.area=this._maxPossibleDimensions.width*this._maxPossibleDimensions.height},InViewObject.prototype.getRectInView=function(){return this.rectInView},InViewObject.prototype.getAreaInViewRatio=function(){return this.areaInViewRatio},InViewObject.prototype.start=function(){this.active||(this._start(),this.active=!0,this.computeRectInView())},InViewObject.prototype._start=function(){this.inViewParent.on("rectInViewChanged",this.computeRectInView),this.inViewParent.on("areaInViewRatioChanged",this.computeRectInView)},InViewObject.prototype.stop=function(){this.active&&(this.computeRectInView(),this._stop(),this.active=!1)},InViewObject.prototype._stop=function(){this.inViewParent.off("rectInViewChanged",this.computeRectInView),this.inViewParent.off("areaInViewRatioChanged",this.computeRectInView)};;
function TaskScheduler(){this.hub=extend({},EventEmitter)}TaskScheduler.prototype.when=function(){var t,e=this;return t=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),{run:function(n){t.waitForEach(function(t,n){e.hub.once(t,n)},n)}}},TaskScheduler.prototype.notify=function(t){this.paused||this.hub.emit(t)},TaskScheduler.prototype.notifies=function(t){return function(){this.notify(t)}.bind(this)},TaskScheduler.prototype.pause=function(){this._paused=!0};;
function DryRunResultSet(t){this._actions=t}DryRunResultSet.prototype.contains=function(t,n){return this._actions.some(function(e){var o=t==e.method,u=!n||n==e.instance;return o&&u})},DryRunResultSet.prototype.getAll=function(){return this._actions},DryRunResultSet.prototype.concat=function(t){return new DryRunResultSet(this._actions.concat(t.getAll()))};;
var ActionInvocationSimulator={_dryRun:!1,_dryRunActions:[],_dryRunExecutedActionsLocalIds:[],beginDryRun:function(){this._dryRun=!0,this._dryRunActions=[],this._dryRunExecutedActionsLocalIds=[]},endDryRun:function(){var n=this._dryRunActions;return this._dryRun=!1,this._dryRunActions=[],this._dryRunExecutedActionsLocalIds=[],new DryRunResultSet(n)},isDryRun:function(){return this._dryRun},needsDryRun:function(n){return!this._dryRunExecutedActionsLocalIds[n]},logActionDryRun:function(n,t,u){this._dryRunExecutedActionsLocalIds[n]=!0,this._dryRunActions.push({method:t,instance:u})}};;
var TriggerHost={_getTriggers:function(r,i){return i||(i=retTrue),this.triggers.filter(function(t){return t.type==r&&i(t.parameters,t)})},_fireArrayOfTriggers:function(r,i,t){var e=this;i||(i=noop),t||(t=new ActionContext(e)),r.waitForEach(function(r,i){r.onFire?r.onFire(t,i):i()},i)},hasTriggers:function(r,i){return this._getTriggers(r,i).length>0},fireTriggersDryRun:function(r,i,t,e){var n;try{ActionInvocationSimulator.beginDryRun(),this.fireTriggers(r,i,t,e)}finally{n=ActionInvocationSimulator.endDryRun()}return n},fireTriggers:function(r,i,t,e){var n=this._getTriggers(r,i);this._fireArrayOfTriggers(n,t,e)},fireSortedTriggers:function(r,i,t,e,n){var g=this._getTriggers(r,i),n=n||null;this._fireArrayOfTriggers(g.sort(n),t,e)},triggerAction:function(r,i,t){this.fireTriggers(i.eventName,null,t,r)},triggerByLocalIdAction:function(r,i,t){var e=i.event?[i.event]:[];this._fireArrayOfTriggers(e,t,r)},triggerByLocalIdActionDryRun:function(r,i,t){this.triggerByLocalIdAction(r,i,t)}};;
var SceneHost={_initImmediatelyPlayedScenes:function(){if(this.immediatelyPlayedScenes){var e=[];if(this instanceof Screen){e=this.immediatelyPlayedScenes.appear.scenes;var i=!this.appearedAtLeastOnce;i&&(e=e.concat(this.immediatelyPlayedScenes.firstAppear.scenes))}else e=this.immediatelyPlayedScenes.conditionMet.scenes;e.forEach(function(e){e.renderFirstFrame()})}}};;
function ActionContext(e,t){if(this._id=randInt(),this.initiator=e,this.initiationTimestamp=new Date/1e3,"object"==typeof t?(this.consideredUserInitiatedByBrowser=!!t.consideredUserInitiatedByBrowser,this.certainlyNotCausedByUserBehavior=!!t.certainlyNotCausedByUserBehavior):(this.consideredUserInitiatedByBrowser=!!t,this.certainlyNotCausedByUserBehavior=!1),this.inUserInitiatedIteration=this.consideredUserInitiatedByBrowser,this.consideredUserInitiatedByBrowser&&this.certainlyNotCausedByUserBehavior)throw new Error("Unable to create an ActionContext where both consideredUserInitiatedByBrowser and certainlyNotCausedByUserBehavior are true!");if(e instanceof Screen)this.screen=e,this.screenObject=null,this.unitVariant=this.screen.parentUnitVariant;else if(e instanceof ScreenObject)this.screen=e.parentScreen,this.screenObject=e,this.unitVariant=this.screen.parentUnitVariant;else{if(!("undefined"!=typeof CreativeUnitVariant&&e instanceof CreativeUnitVariant))throw new Error("Initiator ("+e+") is not a Screen or a ScreenObject. Analytics would be confused.");this.screen=null,this.screenObject=null,this.unitVariant=e}if(this.inUserInitiatedIteration){var i=function(){this.inUserInitiatedIteration=!1}.bind(this);defer(i),nextFrame(i)}if(this.trackUserInteraction=this.trackUserInteraction.bind(this),this._isAttributable=!!this.screen&&this._isScreenReadyForEventAttribution(),this.screen&&!this.screen.parentUnit.name)throw new Error("Parent unit missing name.")}ActionContext.prototype._isScreenReadyForEventAttribution=function(){return this.screen.isMasterScreen()?this.screen.parentContainer.screens.some(function(e){return e.appearedAtLeastOnce&&e.isNormalScreen()}):this.screen.appearedAtLeastOnce},ActionContext.prototype.extendEvent=function(e){return extend({unitName:this.unitVariant?this.unitVariant.parentUnit.name:this.screen.parentUnit.name,unitVariantLocalId:this.unitVariant?this.unitVariant.localId:null,screenLocalId:this.screen?this.screen.localId:null,screenTitle:this.screen?this.screen.title:null,screenIsMaster:this.screen?this.screen.isMasterScreen():null,objectLocalId:this.screenObject?this.screenObject.localId:null,objectName:this.screenObject?this.screenObject.name:null,objectClazz:this.screenObject?this.screenObject.constructor.name:null,initiationTimestamp:this.initiationTimestamp},e)},ActionContext.prototype.track=function(e,t){this.screen&&!this._isAttributable&&console.warn('Event "'+e.name+'" appears to be initiated before a screen was ever shown and will be ignored.'),creative.track(this.extendEvent(e),t)},ActionContext.prototype.trackUserInteraction=function(){if(creative.getUserInteracted())creative.interactionTrackingTimeout||(this.track({name:"interaction"}),creative.interactionTrackingTimeout=setTimeout(function(){creative.interactionTrackingTimeout=null},1e3));else{if(creative.runtimeParams.userInteracted=1,creative.experiments.get("TrackViewableAreaChange")){var e=creative.adapter;e.canMeasureViewportPlacementGeometry&&"function"==typeof e.trackViewableAreaRatio&&e.trackViewableAreaRatio()}this.track({name:"firstInteraction"})}defer(creative.trackingCenter.batchFlush),creative.userInteracted(this)},ActionContext.prototype.trackClickThrough=function(e){e||(e=noop),creative.runtimeParams.clickedThrough?this.track({name:"clickThrough"},e):(creative.runtimeParams.clickedThrough=1,this.track({name:"firstClickThrough"},e)),defer(creative.trackingCenter.batchFlush),creative.clickedThrough(this)};;
function VideoContext(t,e,i){VideoContext.uberConstructor.call(this,t instanceof ActionContext?t.initiator:t,t&&t.userInitiated),this.file=e,this.url=e.getUrl(),this.label=i,this.source=null}inherit(VideoContext,ActionContext),VideoContext._eventNames=["videoDurationUpdate","videoPlayAttempted","videoPlayedSegment","videoStart","videoFirstQuartile","videoMidpoint","videoThirdQuartile","videoComplete"],VideoContext.prototype.registerSource=function(t){if(!t)throw"Not a valid source of video events.";this.source=t,VideoContext._eventNames.forEach(function(t){this.source.on(t,function(e){this.handleEvent(t,e)}.bind(this))}.bind(this))},VideoContext.prototype.handleEvent=function(t,e){this.track(extend(JSON.parse(JSON.stringify(e||{})),{name:t}))},VideoContext.prototype.track=function(t){if("videoPlayAttempted"==t.name){var e=this.file.url?"URL":"File";extend(t,{sourceType:e,source:"URL"==e?this.file.url:this.file.blobHash,label:this.label})}VideoContext.uber.track.call(this,t)};;
function ShakeListener(){this.shakeThreshold=1.5,this.canListen=!0,this.slidingWindow=5,this.signals=[],this.handleMotion=this.handleMotion.bind(this),this.topWindow=creative.adapter.getTopWindow()}extend(ShakeListener.prototype,EventEmitter),ShakeListener.prototype.start=function(){this.canListen=!0,creative.deviceMotionListenerAdded||(creative.deviceMotionListenerAdded=!0,this.topWindow.addEventListener("devicemotion",this.handleMotion))},ShakeListener.prototype.stop=function(){this.canListen=!1,creative.deviceMotionListenerAdded&&(creative.deviceMotionListenerAdded=!1,this.topWindow.removeEventListener("devicemotion",this.handleMotion))},ShakeListener.prototype.handleMotion=function(i){if(this.canListen){this.signals.push(i.accelerationIncludingGravity),this.signals.length>this.slidingWindow&&this.signals.shift();var e=this.signals.reduce(function(i,e){return{x:i.x+e.x,y:i.y+e.y,z:i.z+e.z}}),t={x:e.x/this.signals.length,y:e.y/this.signals.length,z:e.z/this.signals.length};if(this.prevSignal){var s=null,n=Math.abs(t.x-this.prevSignal.x),h=Math.abs(t.y-this.prevSignal.y),a=Math.abs(t.z-this.prevSignal.z);if(90===Math.abs(creative.adapter.orientation)){var o=h;h=n,n=o}n>h&&n>a&&n>this.shakeThreshold?s="x":h>n&&h>a&&h>this.shakeThreshold?s="y":a>n&&a>h&&a>this.shakeThreshold&&(s="z"),(n>this.shakeThreshold||h>this.shakeThreshold||a>this.shakeThreshold)&&this.emit("shake",s)}this.prevSignal=t}};;
!function(){"use strict";function t(t){for(var e in t)this[e]=t[e]}var e=function(t){var e="undefined"!=typeof FontFace,i=/iP(?:ad|hone|od).*OS ([0-9_]+)/.exec(t),n=!!i&&parseInt(i[1],10)>=10,o=/^(?!.*(?:Android|Chrome)).*Version\/(\d+(?:\.\d+)*).*?Safari/.exec(t);if(o||n)return!1;var s=/Gecko.*Firefox\/(\d+)/.exec(t);return s?e&&parseInt(s[1],10)>46:e}(window.navigator.userAgent);t.prototype.getId=function(){return this.typefaceId||this.id},t.prototype.getSubsetString=function(){return this.subset},t.prototype.getUnicodeRange=function(){return this.unicodes},t.prototype.getBrowserCompatibleFontFamily=function(){var t=this.supportsStretch()&&this.stretch?this.family+" "+this.stretch:this.family;if(t.length>25){for(var e,i=5381,n=0,o=t.length;o>n;n++)e=t.charCodeAt(n),i=(i<<5)+i+e;return i.toString()}return t},t.prototype.setBaseUrl=function(t){this.baseUrl=t},t.prototype.isCustom=function(){return"custom"===this.provider},t.prototype.isGoogle=function(){return"google"===this.provider},t.prototype.isMonotype=function(){return"monotype"===this.provider},t.prototype.isSystem=function(){return"system"===this.provider},t.prototype.hasSubsetStringDefined=function(){var t=this.getSubsetString();return"string"==typeof t&&t.length>0},t.prototype.hasUnicodeRangeDefined=function(){var t=this.getUnicodeRange();return"string"==typeof t&&t.length>0},t.prototype.needsLoading=function(){return this.isMonotype()||this.isGoogle()||this.isCustom()},t.prototype.supportsStretch=function(){return this.isMonotype()||this.isCustom()},t.prototype.getCssProperties=function(){return{"font-family":this.needsLoading()?'"'+this.getBrowserCompatibleFontFamily()+'", Helvetica, sans-serif':this.getBrowserCompatibleFontFamily(),"font-style":this.style,"font-weight":this.weight}},t.prototype.getFileUrl=function(t){if("undefined"!=typeof this.files&&"undefined"!=typeof this.files[t]){var e=this.getId();if("string"!=typeof e)return this.baseUrl+this.files[t]+"."+t;var i=this.files[t]&&this.files[t].name||"webfont",n=this.baseUrl+e+"/"+encodeURIComponent(i)+"."+t;return this.hasSubsetStringDefined()&&(n+="?subset="+encodeURIComponent(this.getSubsetString())),n}},t.prototype.getStyleForVariation=function(){var t=/normal|italic|oblique/i.exec(this.style);return"undefined"!=typeof t?t[0]:void 0},t.prototype.getWeightForVariation=function(){var t=/normal|bold|([1-9])00/i.exec(this.weight);return"undefined"!=typeof t?t[0]:void 0},t.prototype.generateFontFace=function(){var t="",e=this.getFileUrl("ttf"),i=this.getFileUrl("woff");return this.style&&this.weight&&(e||i)&&(t="@font-face {",t+='font-family: "'+this.getBrowserCompatibleFontFamily()+'";',t+="font-style: "+this.style+";",t+="font-weight: "+this.weight+";",t+="src:",i&&(t+='url("'+i+'") format("woff")'),e&&i&&(t+=","),e&&(t+='url("'+e+'") format("truetype")'),t+=";",this.hasUnicodeRangeDefined()&&(t+="unicode-range: "+this.getUnicodeRange()+";"),t+="}"),t},t.prototype.loadStyle=function(t){t=t||function(){};var i=this.getBrowserCompatibleFontFamily(),n=function(e){t(e||"Failed to load font files.")},o=function(){if(e){var o="300px",s=this.style+" "+this.weight+" "+o+' "'+i+'"',r=this.hasUnicodeRangeDefined()&&this.hasSubsetStringDefined()?this.getSubsetString():" ";document.fonts.load(s,r).then(function(e){1===e.length?t():n()},function(){n()})}else{if("undefined"==typeof FontLoader)return void n("Font Loader is not initialized.");FontLoader.watch(i,this.style,this.weight,t,n,this.getSubsetString())}}.bind(this);if(this.isCustom()||this.isMonotype()){var s="font-style-manager",r=document.getElementById(s);r||(r=document.createElement("style"),r.id=s,document.getElementsByTagName("head")[0].appendChild(r));var a=this.generateFontFace();if(!a)return void n("Unable to define style for font without specifying files, style and weight.");var f=[].slice.apply(r.sheet.cssRules).some(function(t){var e=t.style.getPropertyValue("font-family").replace(/^['"](.+)['"]$/,"$1");return e==this.getBrowserCompatibleFontFamily()&&t.style.getPropertyValue("font-style")==this.style&&t.style.getPropertyValue("font-weight")==this.weight}.bind(this));f||r.sheet.insertRule(a,r.sheet.cssRules.length),o()}else if(this.isGoogle()){var h=("https:"===document.location.protocol?"https":"http")+"://fonts.googleapis.com/css",l=i.replace(/ /g,"+"),u=this.variation;if(!u){var d="",p="",g=this.getWeightForVariation();if("undefined"!=typeof g){p=g,"normal"==p?p=400:"bold"==p&&(p=700);var c=this.getStyleForVariation();"undefined"!=typeof c&&"italic"==c&&(d=c)}u=p+d}u&&(l+=":"+u);var y=h+"?family="+l;this.hasSubsetStringDefined()&&(y+="&text="+encodeURIComponent(this.getSubsetString()));var m=[].slice.apply(document.getElementsByTagName("link")).filter(function(t){return t.href===y})[0];if(m||(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("media","all"),m.setAttribute("href",y)),e){var v=function(){m._finished=!0,o()};m._finished?o():(m.addEventListener("load",v),m.addEventListener("error",v))}else"undefined"!=typeof defer?defer(o,0,"FontBase.loadStyle defer watchFont"):setTimeout(o,0);m.parentNode||document.getElementsByTagName("head")[0].appendChild(m)}else this.isSystem()?t():n("Invalid or unsupported provider.")},Object.defineProperty(t,"useCSSFontLoadingAPI",{value:e}),window.FontBase=t}();;
var ScreenTransition={replace:function(t,e,r,s,i,a){r.style.opacity=0,r.style.display="block",s.style.display="block",e.style.display="none",nextFrame(function(){r.style.opacity=1,t.style.opacity=0,nextFrame(function(){t.style.display="none",nextFrame(a||noop)})})},fade:function(t,e,r,s,i,a){function n(){celtra.styler.css(r,"transition",""),celtra.styler.css(t,"transition",""),t.style.display="none",nextFrame(a||noop)}r.style.opacity=0,r.style.display="block",s.style.display="block",e.style.display="none",once(t,"transitionend",n),nextFrame(function(){celtra.styler.css(t,"transition","opacity "+i.duration+"ms ease-out"),celtra.styler.css(r,"transition","opacity "+i.duration+"ms ease-out"),nextFrame(function(){r.style.opacity=1,t.style.opacity=0})})},slide:function(t,e,r,s,i,a){var n={transition:"all "+i.duration+"ms ease-out"};switch(i.direction||"west"){case"north":n.startingFrom="translateY(0)",n.endingFrom="translateY("+-i.unitSize.height+"px)",n.startingTo="translateY("+i.unitSize.height+"px)",n.endingTo="translateY(0)";break;case"south":n.startingFrom="translateY(0)",n.endingFrom="translateY("+i.unitSize.height+"px)",n.startingTo="translateY("+-i.unitSize.height+"px)",n.endingTo="translateY(0)";break;case"east":n.startingFrom="translateX(0)",n.endingFrom="translateX("+i.unitSize.width+"px)",n.startingTo="translateX("+-i.unitSize.width+"px)",n.endingTo="translateX(0)";break;case"west":n.startingFrom="translateX(0)",n.endingFrom="translateX("+-i.unitSize.width+"px)",n.startingTo="translateX("+i.unitSize.width+"px)",n.endingTo="translateX(0)"}n.startingFromOpacity=1,n.startingToOpacity=0,n.endingFromOpacity=0,n.endingToOpacity=1,this._runTransition(t,e,r,s,n,i.duration,a)},flip:function(t,e,r,s,i,a){var n={transition:"all "+i.duration+"ms ease-out"},o="perspective("+2*i.unitSize.width+"px) ";switch(i.direction||"west"){case"north":n.startingFrom=o+"rotateX(0)",n.endingFrom=o+"rotateX(180deg)",n.startingTo=o+"rotateX(-180deg)",n.endingTo=o+"rotateX(0)";break;case"south":n.startingFrom=o+"rotateX(0)",n.endingFrom=o+"rotateX(-180deg)",n.startingTo=o+"rotateX(180deg)",n.endingTo=o+"rotateX(0)";break;case"east":n.startingFrom=o+"rotateY(0)",n.endingFrom=o+"rotateY(180deg)",n.startingTo=o+"rotateY(-180deg)",n.endingTo=o+"rotateY(0)";break;case"west":n.startingFrom=o+"rotateY(0)",n.endingFrom=o+"rotateY(-180deg)",n.startingTo=o+"rotateY(180deg)",n.endingTo=o+"rotateY(0)"}celtra.styler.css(t.parentNode,"transformStyle","preserve-3d"),celtra.styler.css(t,"backfaceVisibility","hidden"),celtra.styler.css(e,"backfaceVisibility","hidden"),celtra.styler.css(r,"backfaceVisibility","hidden"),celtra.styler.css(s,"backfaceVisibility","hidden"),celtra.styler.css(t,"transformOrigin","50% 50% 0"),celtra.styler.css(e,"transformOrigin","50% 50% 0"),celtra.styler.css(r,"transformOrigin","50% 50% 0"),celtra.styler.css(s,"transformOrigin","50% 50% 0"),this._runTransition(t,e,r,s,n,i.duration,function(){celtra.styler.css(t.parentNode,"transformStyle",""),celtra.styler.css(t,"backfaceVisibility",""),celtra.styler.css(e,"backfaceVisibility",""),celtra.styler.css(r,"backfaceVisibility",""),celtra.styler.css(s,"backfaceVisibility",""),celtra.styler.css(t,"transform",""),celtra.styler.css(e,"transform",""),celtra.styler.css(r,"transform",""),celtra.styler.css(s,"transform",""),celtra.styler.css(t,"transformOrigin",""),celtra.styler.css(e,"transformOrigin",""),celtra.styler.css(r,"transformOrigin",""),celtra.styler.css(s,"transformOrigin",""),nextFrame(a||noop)})},cube:function(t,e,r,s,i,a){var n={transition:"all "+i.duration+"ms ease-out"},o="perspective("+2*i.unitSize.width+"px) ";switch(i.direction||"west"){case"north":n.startingFrom=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(0) ",n.endingFrom=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(90deg) ",n.startingTo=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(-90deg)",n.endingTo=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(0) ";break;case"south":n.startingFrom=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(0) ",n.endingFrom=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(-90deg)",n.startingTo=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(90deg) ",n.endingTo=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(0) ";break;case"east":n.startingFrom=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(0) ",n.endingFrom=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(90deg) ",n.startingTo=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(-90deg)",n.endingTo=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(0) ";break;case"west":n.startingFrom=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(0) ",n.endingFrom=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(-90deg)",n.startingTo=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(90deg) ",n.endingTo=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(0) "}var l=t.style.overflow,c=e.style.overflow,y=r.style.overflow,d=s.style.overflow;switch(celtra.styler.css(t.parentNode,"transformStyle","preserve-3d"),t.style.overflow=e.style.overflow="hidden",r.style.overflow=s.style.overflow="hidden",t.style.backfaceVisibility=e.style.backfaceVisibility="hidden",r.style.backfaceVisibility=s.style.backfaceVisibility="hidden",i.direction||"west"){case"north":case"south":celtra.styler.css(t,"transformOrigin","50% 50% "+-i.unitSize.height/2+"px"),celtra.styler.css(e,"transformOrigin","50% 50% "+-i.unitSize.height/2+"px"),celtra.styler.css(r,"transformOrigin","50% 50% "+-i.unitSize.height/2+"px"),celtra.styler.css(s,"transformOrigin","50% 50% "+-i.unitSize.height/2+"px");break;case"east":case"west":celtra.styler.css(t,"transformOrigin","50% 50% "+-i.unitSize.width/2+"px"),celtra.styler.css(e,"transformOrigin","50% 50% "+-i.unitSize.width/2+"px"),celtra.styler.css(r,"transformOrigin","50% 50% "+-i.unitSize.width/2+"px"),celtra.styler.css(s,"transformOrigin","50% 50% "+-i.unitSize.width/2+"px")}this._runTransition(t,e,r,s,n,i.duration,function(){celtra.styler.css(t.parentNode,"transformStyle",""),t.style.overflow=l,e.style.overflow=c,r.style.overflow=y,s.style.overflow=d,celtra.styler.css(t,"transformOrigin",""),celtra.styler.css(e,"transformOrigin",""),celtra.styler.css(r,"transformOrigin",""),celtra.styler.css(s,"transformOrigin",""),celtra.styler.css(t,"backfaceVisibility",""),celtra.styler.css(e,"backfaceVisibility",""),celtra.styler.css(r,"backfaceVisibility",""),celtra.styler.css(s,"backfaceVisibility",""),nextFrame(a||noop)})},_runTransition:function(t,e,r,s,i,a,n){function o(){celtra.styler.css(r,"transition",""),celtra.styler.css(s,"transition",""),celtra.styler.css(t,"transition",""),celtra.styler.css(e,"transition",""),celtra.styler.css(r,"transform",""),celtra.styler.css(s,"transform",""),celtra.styler.css(t,"transform",""),celtra.styler.css(e,"transform",""),t.style.display=e.style.display="none",t.style.opacity=e.style.opacity=r.style.opacity=s.style.opacity="",nextFrame(n||noop)}celtra.styler.css(t,"transform",i.startingFrom),celtra.styler.css(e,"transform",i.startingFrom),celtra.styler.css(r,"transform",i.startingTo),celtra.styler.css(s,"transform",i.startingTo),t.style.opacity=e.style.opacity="undefined"==typeof i.startingFromOpacity?1:i.startingFromOpacity,r.style.opacity=s.style.opacity="undefined"==typeof i.startingToOpacity?1:i.startingToOpacity,r.style.display=s.style.display="block";var l=this._runOnce(o);once(r,"transitionend",l),setTimeout(function(){celtra.styler.css(r,"transition",i.transition),celtra.styler.css(t,"transition",i.transition),celtra.styler.css(s,"transition",i.transition),celtra.styler.css(e,"transition",i.transition),nextFrame(function(){celtra.styler.css(t,"transform",i.endingFrom),celtra.styler.css(e,"transform",i.endingFrom),celtra.styler.css(r,"transform",i.endingTo),celtra.styler.css(s,"transform",i.endingTo),t.style.opacity=e.style.opacity="undefined"==typeof i.endingFromOpacity?1:i.endingFromOpacity,r.style.opacity=s.style.opacity="undefined"==typeof i.endingToOpacity?1:i.endingToOpacity}),setTimeout(l,a+50)},20)},run:function(t,e,r,s,i){var a=this._getSupportedAnimation(i.animation||"replace");if(!(a in this))throw new Error("The transition function does not exist!");this[a].apply(this,arguments)},_getSupportedAnimation:function(t){return!android("4")||window.navigator.userAgent.match(/Chrome.*(Mobile)? Safari/)||"cube"!==t&&"flip"!==t?t:"fade"},_runOnce:function(t){var e=!1;return function(){return e?void 0:(e=!0,t())}}};;
function AdViewableTimeObserver(e){this._tracker=e,this._readyToShow=!1,this._adapter}function AdViewableInViewObjectObserver(){AdViewableInViewObjectObserver.uberConstructor.apply(this,arguments),this._inViewObjects=[],this._viewableInViewObjects=[]}function AdViewableUnitObserver(){AdViewableUnitObserver.uberConstructor.apply(this,arguments),this._units=[],this._viewableUnits=[],this._containerIsViewable=!1}AdViewableTimeObserver.prototype.readyToShow=function(){throw new Error("AdViewableInViewObjectObserver.readyToShow not implemented!")},AdViewableTimeObserver.prototype.registerUnit=function(){throw new Error("AdViewableInViewObjectObserver.registerUnit not implemented!")},AdViewableTimeObserver.prototype.registerAdapter=function(){throw new Error("AdViewableTimeObserver.registerAdapter not implemented!")},AdViewableTimeObserver.prototype.stop=function(){this._tracker.stop()},inherit(AdViewableInViewObjectObserver,AdViewableTimeObserver),AdViewableInViewObjectObserver.prototype.registerAdapter=function(e){this._adapter=e;var t=this._tracker;e.mediaState.on("videoStarted",function(){this._tryStartTracker()}.bind(this)),e.mediaState.on("videoStopped",function(){0===this._viewableInViewObjects.length&&t.stop()}.bind(this))},AdViewableInViewObjectObserver.prototype.readyToShow=function(){this._readyToShow=!0,this._tryStartTracker()},AdViewableInViewObjectObserver.prototype.registerUnit=function(e){var t=e.inView,i=this._inViewObjects,r=this._viewableInViewObjects,a=this._tracker;if(-1===i.indexOf(t)){i.push(t);var n=-1!==r.indexOf(t);!n&&t.getAreaInViewRatio()>0&&r.push(t),this._tryStartTracker(),t.on("areaInViewRatioChanged",function(e){var i=r.indexOf(t),n=-1!==i;!n&&e>0?(r.push(t),this._tryStartTracker()):0===e&&n&&(r.splice(i,1),0===r.length&&a.stop())}.bind(this))}},AdViewableInViewObjectObserver.prototype._tryStartTracker=function(){var e=this._adapter,t=e&&e.mediaState.playingVideo;return this._readyToShow&&(this._viewableInViewObjects.length>0||t)?(this._tracker.start(),!0):!1},inherit(AdViewableUnitObserver,AdViewableTimeObserver),AdViewableUnitObserver.prototype.registerAdapter=function(e){this._adapter=e,this._containerIsViewable=e.containerIsViewable;var t=this._tracker;e.on("containerViewableChange",function(e){this._containerIsViewable=e,e?this._tryStartTracker():t.stop()}.bind(this)),e.mediaState.on("videoStarted",function(){this._tryStartTracker()}.bind(this)),e.mediaState.on("videoStopped",function(){this._adapter.containerIsViewable&&0!==this._viewableUnits.length||t.stop()}.bind(this))},AdViewableUnitObserver.prototype.readyToShow=function(){this._readyToShow=!0,this._tryStartTracker()},AdViewableUnitObserver.prototype.registerUnit=function(e){if(!this._adapter)throw new Error("adapter was not registered yet!");var t=this._units,i=this._viewableUnits,r=this._tracker;-1===t.indexOf(e)&&(t.push(e),-1===i.indexOf(e)&&e._visible&&(i.push(e),this._tryStartTracker()),e.on("appeared",function(){-1===i.indexOf(e)&&(i.push(e),this._tryStartTracker())}.bind(this)),e.on("disappeared",function(){var t=i.indexOf(e);-1!==t&&(i.splice(t,1),0===i.length&&r.stop())}.bind(this)))},AdViewableUnitObserver.prototype._tryStartTracker=function(){var e=this._adapter;return e&&(e.containerIsViewable||e.mediaState.playingVideo)&&this._readyToShow&&this._viewableUnits.length>0?(this._tracker.start(),!0):!1};;
function AdViewableTimeTracker(i,e,t,n){this._trackingCenter=i,this._raf=e,this._win=t,this._intervals=n||{3e3:1e3,1e4:2e3,63e3:3e3},this._isRunning=!1,this._viewableMilliseconds=0,this._fromTime=0,this._pendingPingTimeoutId,this._pendingPingRafId,this._maxRafLatency=500}AdViewableTimeTracker.eventName="viewableTime",AdViewableTimeTracker.TrackingData=function(i,e){return i>e&&(e=i),{name:AdViewableTimeTracker.eventName,from:i/1e3,to:e/1e3}},AdViewableTimeTracker.prototype.start=function(){this._isRunning||(this._isRunning=!0,this._fromTime=Date.now(),0===this._viewableMilliseconds?this._initPing():this._setNextPing())},AdViewableTimeTracker.prototype.stop=function(){if(this._clearPendingPing(),this._isRunning&&-1!==this._getPingInterval()){var i=Date.now(),e=i-this._fromTime;this._viewableMilliseconds+=e;var t=new AdViewableTimeTracker.TrackingData(this._fromTime,i);this._track(t)}this._isRunning=!1},AdViewableTimeTracker.prototype._initPing=function(){var i=this._fromTime,e=this._getPingInterval(),t=new AdViewableTimeTracker.TrackingData(this._fromTime,i);this._pendingPingRafId=this._raf.nextFrame(function(){this._track(t),this._setFromTimeForNextPing(i,e),this._setNextPing()}.bind(this))},AdViewableTimeTracker.prototype._setNextPing=function(){function i(){if(this._isRunning){var i=Date.now();this._viewableMilliseconds+=e,this._normalizeFromTime(i,e),this._pendingPingRafId=this._raf.nextFrame(function(){var t=new AdViewableTimeTracker.TrackingData(this._fromTime,i);this._track(t),this._setFromTimeForNextPing(i,e),this._setNextPing()}.bind(this))}}this._clearPendingPing();var e=this._getPingInterval();this._isRunning&&-1!==e&&(this._pendingPingTimeoutId=this._win.setTimeout(i.bind(this),e))},AdViewableTimeTracker.prototype._normalizeFromTime=function(i,e){var t=i-this._fromTime,n=e+this._maxRafLatency;t>n&&(this._fromTime=i)},AdViewableTimeTracker.prototype._setFromTimeForNextPing=function(i,e){var t=Date.now(),n=t-i,r=n>e;this._fromTime=r?t:i},AdViewableTimeTracker.prototype._getPingInterval=function(){var i=this._viewableMilliseconds,e=this._intervals,t=Object.keys(this._intervals),n=1*t[t.length-1],r=-1;return t.some(function(t){return 1*t>i?(r=e[t],i+r>n&&(r=-1),!0):!1}),r},AdViewableTimeTracker.prototype._clearPendingPing=function(){this._raf.cancelFrame(this._pendingPingRafId),this._win.clearTimeout(this._pendingPingTimeoutId)},AdViewableTimeTracker.prototype._track=function(i){this._trackingCenter.track(i)};;
!function(t){function i(){this.playingVideo=!1}var e=i.prototype;extend(e,EventEmitter),e.stopVideo=function(){this.playingVideo=!1,this.emit("videoStopped")},e.startVideo=function(){this.playingVideo=!0,this.emit("videoStarted")},t.MediaState=i}(window);;
function StateObject(t){Object.defineProperties(this,{values:{enumerable:!1,configurable:!1,writable:!0,value:{}},_isDirty:{enumerable:!1,configurable:!1,writable:!0,value:!1}}),Object.keys(t).forEach(function(e){this.registerValue(e,t[e])},this)}extend(StateObject.prototype,EventEmitter),StateObject.prototype.registerValue=function(t,e){this.values[t]={dirty:!1,value:e},Object.defineProperty(this,t,{get:function(){return this.values[t].value},set:function(e){var i=this.values[t],r=i.value;e!=r&&(i.dirty=!0,i.value=e,this._isDirty=!0,this.emit("change:"+t,e,r))},enumerable:!0})},StateObject.prototype.markClean=function(t){var e=!1;Object.keys(this.values).forEach(function(i){t&&i!==t||(this[i].dirty=!1),e=e||this[i].dirty},this.values),this._isDirty=e},StateObject.prototype.getDirtyValues=function(){for(var t={},e=Object.keys(this.values),i=0;i1&&(t=Array.prototype.slice.apply(arguments));for(var e=0;e=this._targetTime?(this.pause(),this.value=this._targetValue,defer(this._callback||noop),this._startValue=null,this._startTime=null,this._targetValue=null,this._targetTime=null,this._callback=null):this.value=Math.pow(t/this._targetTime,this.options.exp)*i+this._startValue};;
function ThresholdObserver(e){this.threshold=e,this._value=null}extend(ThresholdObserver.prototype,EventEmitter),Object.defineProperty(ThresholdObserver.prototype,"value",{get:function(){return this._value},set:function(e){if(null!==this._value&&this._value!==e){var t=this._value-this.threshold,h=e-this.threshold;0>=t*h&&(0>t?this.emit("up"):0>h&&this.emit("down"))}this._value=e}});;
function BaseCreativeUnit(){}inherit(BaseCreativeUnit,View),BaseCreativeUnit.IGNORABLES=["INPUT","SELECT","TEXTAREA","BUTTON"],BaseCreativeUnit.prototype.awake=function(){BaseCreativeUnit.uber.awake.call(this),this._availableSize={width:0,height:0},this._isRendering=!1,this._engagementTracker=null,this._rxState=null,this._rxStateCopies=[]},BaseCreativeUnit.prototype.createNode=function(){return Logger("unit").log("Starting to load "+this),this.on("loaded",creative.adapter.perf.start("CreativeUnit.load").end),creative.experiments.get("TrackingLoadingTimes")&&this.once("_firstScreenLoaded",function(){var e=Date.now()-1e3*creative.runtimeParams.payloadJsClientTimestamp;if(3e4>e){var t={unitName:this.name};creative.aggregatorTracking.trackAggregator("unitLoadTime",e,t),creative.aggregatorTracking.trackAggregator("unitLoadSuccesses",t)}}.bind(this)),creative.adapter.on("mediaStopRequested",function(e){this.emit("mediaStopRequested",e)}.bind(this)),this.unitDiv=BaseCreativeUnit.uber.createNode.call(this),this._engagementTracker=new EngagementTracker(this.unitDiv,creative),Tapper(this.unitDiv,this.useClickForTap),attach(this.unitDiv,"touchstart",this._handleTouchStart.bind(this)),attach(this.unitDiv,"touchmove",this._handleTouchMove.bind(this)),this.unitDiv},BaseCreativeUnit.prototype.setAvailableSize=function(e,t){var r=this._availableSize.width!=e||this._availableSize.height!=t;return this._availableSize.width=e,this._availableSize.height=t,r},BaseCreativeUnit.prototype.getAvailableSize=function(){return{width:this._availableSize.width,height:this._availableSize.height}},BaseCreativeUnit.prototype.enterRenderTree=function(){throw new Error("Not implemented")},BaseCreativeUnit.prototype.exitRenderTree=function(){throw new Error("Not implemented")},BaseCreativeUnit.prototype.finishedLoading=function(){BaseCreativeUnit.uber.finishedLoading.call(this),Logger("unit").log("Finished loading "+this)},BaseCreativeUnit.prototype._handleTouchStart=function(e){if(!this.swipeable&&!creative.adapter.useNativeClickForTapDetection){for(var t=e.target;1!=t.nodeType;)t=t.parentNode;var r=function(){for(;t!==this.unitDiv;){if(t.className&&hasClass(t,"map-container"))return!0;t=t.parentNode}return!1}.bind(this);-1!=BaseCreativeUnit.IGNORABLES.indexOf(t.nodeName)||r()||e.preventDefault()}},BaseCreativeUnit.prototype._handleTouchMove=function(e){this.swipeable||e.preventDefault()},BaseCreativeUnit.prototype.createRxState=function(){this._rxState=this._generateNewRxStateObject()},BaseCreativeUnit.prototype._generateNewRxStateObject=function(){return new StateObject({left:null,top:null,right:null,bottom:null,width:null,height:null,vw:null,vh:null,x:null,y:null,pageYOffset:null})},BaseCreativeUnit.prototype.updateRxState=function(e){if(this._rxState){var t=e.getBoundingClientRect(),r=e.ownerDocument.defaultView;this._rxState.left=~~t.left,this._rxState.top=~~t.top,this._rxState.right=~~t.right,this._rxState.bottom=~~t.bottom,this._rxState.width=~~t.width,this._rxState.height=~~t.height,this._rxState.vw=r.innerWidth,this._rxState.vh=r.innerHeight,this._rxState.pageYOffset=r.pageYOffset,this._rxState.x=~~(t.left+t.width/2-r.innerWidth/2),this._rxState.y=~~(t.top+t.height/2-r.innerHeight/2),this._rxStateCopies.forEach(function(e){e.copyFrom(this._rxState)}.bind(this))}},BaseCreativeUnit.prototype.getRxStateObject=function(){if(this._rxState){var e=this._generateNewRxStateObject();return e.copyFrom(this._rxState),this._rxStateCopies.push(e),e}},BaseCreativeUnit.prototype.goToScreenAction=function(){throw new Error("Not implemented")},BaseCreativeUnit.prototype.alertAction=function(e,t,r){this.alert({message:t.text},r)},BaseCreativeUnit.prototype.checkOrientationAction=function(e,t,r){var a,i=creative.adapter.orientation;0===i||180===i?a=t.onPortrait:(-90==i||90==i)&&(a=t.onLandscape),a?a(e,r):r()},BaseCreativeUnit.prototype.checkOrientationActionDryRun=BaseCreativeUnit.prototype.checkOrientationAction,BaseCreativeUnit.prototype._processURLParams=function(e){return"string"!=typeof e?e:creative.macros(e)},BaseCreativeUnit.prototype._addUrlAppendage=function(e){if(creative.urlOpenedUrlAppendage){var t=this.size.width+"x"+this.size.height,r=function(e){return e.indexOf("?")>=0};return e+(r(e)?"&":"?")+creative.urlOpenedUrlAppendage.replace(new RegExp("{celtraFirstUnitSize}","ig"),t)}return e},BaseCreativeUnit.prototype.openClickThroughDestinationAction=function(e,t,r){var a=creative.clickThroughDestinationUrl,i=creative.shouldClickThroughToNewWindow(e),n=!1,o=2e3,s="clickThroughDestinationOpened",c=function(){n||(n=!0,creative.adapter.openPotentialUniversalOrAppLink(this._processURLParams(a),i))}.bind(this);if(a){var l=function(e){return e.indexOf("itunes.apple.com/us/app/")>0},d=function(e){return 0===e.indexOf("market://details?id=")};creative.adapter._stopAllMedia(),l(a)||d(a)?(e.track({name:s,appUri:a}),e.trackClickThrough(),creative.adapter.trackingCenter.flush(),creative.adapter.getApp(this._processURLParams(a))):(a=this._addUrlAppendage(a),e.track({name:s,url:a}),e.trackClickThrough(),!creative.adapter.canOpenUrlInSameWindow||i?(creative.adapter.trackingCenter.flush(),c()):(creative.adapter.trackingCenter.flush(c),defer(c,o)))}e.screen&&creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,a||""),r()},BaseCreativeUnit.prototype.goToURLAction=function(e,t,r){var a=creative.urlOpenedOverrideUrls&&creative.urlOpenedOverrideUrls[t.reportLabel]||t.url,i=creative.shouldClickThroughToNewWindow(e),n=!1,o=2e3,s=function(){n||(n=!0,creative.adapter.openBrowser(this._processURLParams(a),i))}.bind(this),c=(creative.experiments.get("OpenBrowserRefactor")||{}).chosenVariant,l=(creative.experiments.get("WindowOpenWithDelay")||{}).chosenVariant,d=function(t,r,a,i){if(c){var n={name:"_openBrowserRefactor",experiment:c,branch:t,logic:r,environment:a};i&&(n.redirect=i),e.track(n)}},p=function(e){if(c){var t=creative.adapter.trackingCenter,r=t._createTrackingEvent({name:"redirectTrackingExperiment"});r.redirect=e,t._pendingPixels.push(t._getTrackerUrl(r))}},u=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};if(!a)return r();a=this._addUrlAppendage(a);var h="urlOpened",v={delay:[0,100,500][u(0,2)],step:u(1,3),randId:randInt()};if(creative.adapter._stopAllMedia(),e.track({name:h,url:a,label:t.reportLabel}),e.trackClickThrough(),deviceInfo.browser.ie()||deviceInfo.browser.edge())!creative.adapter.canOpenUrlInSameWindow||i?(d("new-window","flush-and-open","desktop-windows",v),p(v),creative.adapter.trackingCenter.flush(),s()):(d("same-window","flush-then-open","desktop-windows",v),p(v),creative.adapter.trackingCenter.flush(s),defer(s,o));else if("on"==c)!creative.adapter.canOpenUrlInSameWindow||i?(d("new-window","flush-and-open","all-except-desktop-windows",v),p(v),creative.adapter.trackingCenter.flush(),s()):(d("same-window","flush-then-open","all-except-desktop-windows",v),p(v),creative.adapter.trackingCenter.flush(s),defer(s,o));else if(!creative.adapter.canOpenUrlInSameWindow||i){d("new-window","wrap+open","all-except-desktop-windows"),l&&creative.aggregatorTracking.trackAggregator("windowOpenWithDelay",1,{delay:l}),c&&e.track({name:"_openBrowserRefactorFlushVsWrap",trackingWith:"wrap"});var f=creative.wrapRedirectPageUrl(this._processURLParams(a));c&&(e.track({name:"_openBrowserRefactorFlushVsWrap",trackingWith:"flush"}),creative.adapter.trackingCenter.flush()),"control"===l||"undefined"==typeof l?creative.adapter.openBrowser(f,i):setTimeout(function(){creative.adapter.openBrowser(f,i)},"noDelay"===l?0:250)}else d("same-window","wrap+open","all-except-desktop-windows"),creative.adapter.openBrowser(creative.wrapRedirectPageUrl(this._processURLParams(a)),i);creative.adapter.sendToEventMonitor(h,t.triggerId,e.screen.name,a,t.reportLabel),r()},BaseCreativeUnit.prototype.facebookURLAction=function(e,t,r){if(!t.url)return r();creative.adapter._stopAllMedia(),e.track({name:"facebookShareAttempt",url:t.url,label:t.reportLabel}),e.trackClickThrough();var a="http://m.facebook.com/sharer.php?u="+encodeURIComponent(t.url);creative.adapter.openBrowser(creative.wrapRedirectPageUrl(a),creative.shouldClickThroughToNewWindow(e)),r()},BaseCreativeUnit.prototype.callURLAction=function(e,t,r){if(!t.url)return r();var a=this._processURLParams(t.url),i=new Image;i.onload=i.onerror=function(){r()},i.src=a},BaseCreativeUnit.prototype.displayImageAction=function(e,t,r){if(!t.file)return r();var a=function(e,a){var i=document.createElement("div");i.className="celtra-display-image-overlay touchable",i.style.backgroundImage="url("+t.file.getUrl()+")",this.unitDiv.appendChild(i),(e>this.size.width||a>this.size.height)&&(i.style.backgroundSize="contain"),t.color&&(i.style.backgroundColor=t.color),attach(i,"tap",function(){i.parentNode.removeChild(i),r()},!1);var n=document.createElement("div");n.className="celtra-back-button touchable "+this.alignBackButtonHorizontal,i.appendChild(n)}.bind(this);if(t.file.meta)a(t.file.meta.width,t.file.meta.height);else{var i=new Image;i.onload=function(){a(this.width,this.height)},i.onerror=function(){return console.error("Couldn't display image: "+t.file.getUrl()),r()},i.src=t.file.getUrl()}},BaseCreativeUnit.prototype.saveImageAction=function(e,t,r){function a(a,n){var o=a.getOriginalUrl(),c=a.name,l=a.blobHash;if(i(l),creative.adapter.canSaveImage())creative.adapter.trackingCenter.flush(function(){var a="shared.png";"undefined"!=typeof c?a=c:"string"==typeof n&&n.trim().length>0&&(a=n.trim()+".png"),creative.adapter.saveImage(o,a,r);var i=n||c;creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,i,t.reportLabel)});else{var d=new SaveImageDialog(creative.adapter,creative.resourceUrl,o);d.show(r)}}function i(r){e.track({name:s,blobHash:r,label:t.reportLabel}),e.trackClickThrough()}function n(){creative.adapter.createPlacements({preloader:{attachment:"body",positioning:"screen",type:"layer"}},function(){var e=creative.adapter.placements.preloader;e.setZIndex("max"),e.setSize("100%","100%"),e.setPosition(0,0);var t=e.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=creative.resourceUrl+"runner/clazzes/PostBlobPreloader.css",e.getContainer().appendChild(t);var r=e.createElement("div");addClass(r,"celtra-preloader-container");var a=e.createElement("div");addClass(a,"celtra-preloader-image"),a.style.backgroundImage="url("+creative.resourceUrl+"runner/clazzes/CreativeUnit/preloader.png)",r.appendChild(a),e.populate(r,function(){e.show()})})}function o(){creative.adapter.destroyPlacement("preloader")}var s="imageSaveAttempted";if(t.imageOrigin=t.imageOrigin?t.imageOrigin:"asset","component"==t.imageOrigin&&t.component)if(t.component.file)a(t.component.file,t.component.name);else{var c=t.component.getField();if(null===c)return void r();if(-1===creative.runtimeParams.enabledServices.indexOf("contentSharing"))return void this.alertAction(e,{text:"This feature is not available in your region"},r);var l=c.url,d=l.split(",")[1];n(),postBlob(d,function(e,i){if(o(),i>=200&&300>i){var n=JSON.parse(e),s=creative.cachedApiUrl+"blobs/"+n.hash+"/shared.png",c=new File(s);a(c,t.component.name)}else r()})}else"asset"==t.imageOrigin&&t.file?a(t.file):r()},BaseCreativeUnit.prototype.playSoundAction=function(e,t,r){if(!t.file)return r();var a=new Audio(t.file.getUrl());attach(a,"ended",function(){r()},!1),a.play()},BaseCreativeUnit.prototype.playVideoInPlayerAction=function(e,t,r){if(!t.file)return r();var a=creative.adapter.useFSVP,i=new VideoContext(e,t.file,t.reportLabel);i.track({engineType:"html5",name:"videoPlayAttempted",trackable:a,filename:t.file.name,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:"fullscreen",videoPreset:null}),creative.adapter.playVideoInPlayer(i,function(a){var i=(a?t.onSuccess:t.onFailure)||nullai;i(e,r)})},BaseCreativeUnit.prototype.playVideoInPlayerActionDryRun=function(e,t,r){return t.file?((t.onSuccess||nullai)(e,noop),(t.onFailure||nullai)(e,noop),void r()):r()},BaseCreativeUnit.prototype.playVideoFromURLAction=function(e,t,r){if(!t.url)return r();var a=creative.adapter.useFSVP;creative.adapter._stopAllMedia(),videoContext=new VideoContext(e,new File(t.url),t.reportLabel),videoContext.track({engineType:"html5",name:"videoPlayAttempted",trackable:a,filename:null,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:"fullscreen",videoPreset:null}),creative.adapter.playVideoInPlayer(videoContext,function(a){var i=(a?t.onSuccess:t.onFailure)||nullai;i(e,r)})},BaseCreativeUnit.prototype.playVideoFromURLActionDryRun=function(e,t,r){return t.url?((t.onSuccess||nullai)(e,noop),(t.onFailure||nullai)(e,noop),void r()):r()},BaseCreativeUnit.prototype.vibrateAction=function(e,t,r){r()},BaseCreativeUnit.prototype.getAppAction=function(e,t,r){var a=function(e){return new RegExp("(^http(s)?://)|(^market://)","i").test(e)},i=function(){return new RegExp("^\\d+$").test(t.appStoreUrl)?"http://itunes.apple.com/us/app/keynote/id"+t.appStoreUrl:(a(t.appStoreUrl)?"":"http://")+t.appStoreUrl},n=function(){return a(t.androidMarketAppId)?t.androidMarketAppId:"market://details?id="+t.androidMarketAppId};creative.adapter._stopAllMedia();var o;if(creative.storeOpenedOverrideUrls[t.reportLabel]?o=creative.storeOpenedOverrideUrls[t.reportLabel]:ios()&&t.appStoreUrl?o=i():android()&&t.androidMarketAppId?o=n():desktop()&&(t.appStoreUrl||t.androidMarketAppId)&&(o="app://"+encodeURIComponent(t.reportLabel)),o){var s=!ios("9",null),c="storeOpened",l=2,d=function(){creative.adapter.getApp(this._processURLParams(o))}.bind(this),p=function(){if(!--l&&s){d();var r={};t.appStoreUrl&&(r.appStoreUrl=i()),t.androidMarketAppId&&(r.androidMarketAppId=n()),creative.adapter.sendToEventMonitor(c,t.triggerId,e.screen.name,r,t.reportLabel)}}.bind(this);e.track({name:c,appUri:o,label:t.reportLabel},p),e.trackClickThrough(p),s||setTimeout(d,0)}r()},BaseCreativeUnit.prototype.callPhoneAction=function(e,t,r){if(!t.number)return r();creative.adapter._stopAllMedia();var a="phoneCalled",i=deviceInfo.os.ios()&&deviceInfo.browser.safari(),n=function(){creative.adapter.callPhone(t.number),creative.adapter.sendToEventMonitor(a,t.triggerId,e.screen.name,t.number,t.reportLabel)};e.track({name:a,number:t.number,label:t.reportLabel}),e.trackClickThrough(),i?(creative.adapter.trackingCenter.flush(),defer(n)):creative.adapter.trackingCenter.flush(n),r()},BaseCreativeUnit.prototype.answerSurveyQuestion=function(e,t,r){var a=["answerIds","questionId","surveyId"],i=/[0-9a-f]{8}/;a.forEach(function(e){if("answerIds"==e){if(!(t.answerIds instanceof Array))throw new Error("args.answerIds must be an array");t.answerIds.forEach(function(e){if(!i.test(e))throw new Error("args.answerIds must contain Ids that have hexadecimal formatted string containing 8 characters")})}else if(!i.test(t[e]))throw new Error("args."+e+" must be hexadecimal formatted string containing 8 characters")}),e.track({name:"surveyQuestionAnswered",answerIds:t.answerIds,questionId:t.questionId,surveyId:t.surveyId}),r()},BaseCreativeUnit.prototype.saveTheDateAction=function(e,t,r){function a(e){var r;return t.allDay?(r=new CDate,r.value=e.getFullYear()+"-"+zeroPad(e.getMonth()+1)+"-"+zeroPad(e.getDate())):(e="my"===t.timezone?e.getUTCFullYear()+"-"+zeroPad(e.getUTCMonth()+1)+"-"+zeroPad(e.getUTCDate())+" "+zeroPad(e.getUTCHours())+":"+zeroPad(e.getUTCMinutes())+":"+zeroPad(e.getUTCSeconds()):e.getFullYear()+"-"+zeroPad(e.getMonth()+1)+"-"+zeroPad(e.getDate())+" "+zeroPad(e.getHours())+":"+zeroPad(e.getMinutes())+":"+zeroPad(e.getSeconds()),r=new CDateTime,r.value=e,r.tz=t.timezone),r}return t.eventName&&t.location&&t.start?(t.end=t.end||new Date(t.start.getTime()+36e5),t.timezone=t.timezone||"my",t.end0?t[0]:null};;
!function(e){"use strict";var r={};r.toString=function(){return"[Clazz CustomAudiences]"};var t=function(e,r,t,n){function i(r,t){var i=new XMLHttpRequest;i.open(e,u+s+"/"+encodeURIComponent(r)+"/"+encodeURIComponent(t)+"?"+creative.authTokenUrlParam),i.send(n)}if(-1===["PUT","DELETE"].indexOf(e))throw new Error("Unsupported request method: "+e);if("undefined"==typeof creative.runtimeParams.customAudiences[r])throw new Error('Custom audience "'+r+'" is not used by the creative.');creative.runtimeParams.customAudiences[r]={userExists:t,userData:n};var u=creative.secure?creative.customAudiencesUrl:creative.insecureCustomAudiencesUrl,s="/audiences/"+r,o=creative.userIdentifiers;for(var a in o)for(var c in o[a])i(a,o[a][c])};r.addUser=function(e,r){creative.runtimeParams.userOptOut||t("PUT",e,!0,r)},r.removeUser=function(e){creative.runtimeParams.userOptOut||t("DELETE",e,!1)},e.CustomAudiences=r}(window);;
!function(e){"use strict";var t={ambience:"Ambience",animatey:"Animatey",abtest:"Best",basket:"Basket",button:"Button",canvas:"Canvas",celebration:"Celebration",checkbox:"CheckBox",feedbasedchoice:"ChoiceFeed",countdown:"Countdown",draggy:"Draggy",dropdown:"Dropdown",dynamiccontent:"DynamicContent",facebookshare:"FacebookShareButton",fallback:"Fallback",frame:"Frame",flippy:"Flippy",grid:"Grid",group:"Group",gyro:"Gyro",hotspot:"Hotspot",input:"Input",lighttable:"LightTable",map:"Map",transitions:"Transitions",mastervideo:"MasterVideo",nearby:"Nearby",painty:"Painty",pannable:"Pannable",particles:"Particle",picture:"Picture",puzzle:"Puzzle",shapey:"Shapey",smoke:"Smoke",stack:"Stack",stopwatch:"Stopwatch",locatorclassic:"StoreLocator2",locator:"StoreLocator3",swipeygallery:"Swipey",swipeygroup:"SwipeyGroup",takephoto:"TakePhotoButton",texty:"Texty",twitterfeed:"TwitterFeed",twittershare:"TwitterShareButton",inlinevideo:"Video","360view":"View360","360video":"Video360","360°video":"Video360",weather:"Weather",whatsappshare:"WhatsAppShareButton",wipeable:"Wipeable",youtube:"Youtube",scene:"Scene",brandtracksurvey:"BrandTrackSurvey",brandtrackquestion:"BrandTrackQuestion",customcode:"CustomCode",videoasset:"VideoAsset"},n=function(e){return e=e.toLowerCase().replace(/\W+/g,""),e in t?t[e]:""},o={findAll:function(e){function t(a){a.forEach(function(a){("undefined"==typeof e||a.name==e)&&o.push(a),a.getActiveContainers().forEach(function(e){t(e.objects),n(e.scenes)})})}function n(t){t&&t.forEach(function(t){("undefined"==typeof e||t.name==e)&&o.push(t)})}var o=[];return"Screen"==this.constructor.name?(t(this.objects),n(this.scenes)):"function"==typeof this.getActiveContainers&&this.getActiveContainers().forEach(function(e){t(e.objects),n(e.scenes)}),o},findByType:function(e){function t(i){i.forEach(function(i){i.constructor.name==n(e)&&a.push(i),i.getActiveContainers().forEach(function(e){t(e.objects),o(e.scenes)})})}function o(t){t&&t.forEach(function(t){t.constructor.name==n(e)&&a.push(t)})}var a=[];return"undefined"==typeof e?a:("Screen"==this.constructor.name?(t(this.objects),o(this.scenes)):"function"==typeof this.getActiveContainers&&this.getActiveContainers().forEach(function(e){t(e.objects),o(e.scenes)}),a)},find:function(e){var t=this.findAll(e);return t.length>0?t[0]:null}};e.DiscoverableTrait=o}(window);;
!function(e){"use strict";function t(e){return r[e]}var r={choice:["ChoiceFeed","checkChoiceFeed"],image:["Picture"],video:["Video"],text:["Texty"],html:["CustomCode"],url:["goToFeedURL"]},i={checkAndTrackValue:function(e,t){e&&(this.isCorrectFieldType(e,t)?"string"!=typeof creative.runtimeParams.dynamicContent[e]&&creative.adapter.trackingCenter.track({name:"userError",userErrorId:"feedValueMissing"}):creative.adapter.trackingCenter.track({name:"userError",userErrorId:"feedValueUnlinked"}))},getCustomFields:function(){return creative.runtimeParams.customFeedFields.map(function(e){var t=creative.runtimeParams.dynamicContent["CustomFeedField/"+e.id];return{id:e.id,feedId:e.feedId,name:e.name,type:e.type,values:[t].filter(function(e){return null!==e})}})},getCustomFieldByKey:function(e){if(e)for(var t=e.split("/")[1],r=this.getCustomFields(),i=0;is,c=this.image.naturalHeight>h,g=this.containerMinMargin,m=this.containerMinMargin,d=0,p=0;if(o&&c){var u;t=s,i=h,l>r?(u=l/r*100,this.image.style.width=u+"%",this.image.style.height="100%",d=-(u-100)/2):(u=r/l*100,this.image.style.width="100%",this.image.style.height=u+"%",p=-((u-100)/2)*(i/t))}else if(o){var y=this.image.naturalWidth/s*100;d=-(y-100)/2,t=s,i=this.image.naturalHeight,this.image.style.width=y+"%",this.image.style.height="100%",m=(e.height-i-this.imageContainerTotalVMargin)/2}else if(c){var v=this.image.naturalHeight/h*100,C=-(v-100)/2;t=this.image.naturalWidth,i=h,p=C*(i/t),this.image.style.width="100%",this.image.style.height=v+"%",g=(e.width-t-this.imageContainerTotalHMargin)/2}else t=this.image.naturalWidth,i=this.image.naturalHeight,this.image.style.width="100%",this.image.style.height="100%",g=(e.width-t-this.imageContainerTotalHMargin)/2,m=(e.height-i-this.imageContainerTotalVMargin)/2;var I=t+this.imageContainerTotalHMargin,M=t+this.imageContainerTotalHMargin-this.containerMinWidth;if(0>M){var T=M/2;g+=T,this.imageContainer.style.left=19-T+"px",this.imageContainer.style.right=19-T+"px",I-=M}this.container.style.left=g+"px",this.container.style.right=g+"px",this.container.style.top=m+"px",this.container.style.bottom=m+"px",this.image.style.marginLeft=d+"%",this.image.style.marginTop=p+"%",I0?"-":"+")+n(r)+":"+n(a-60*r)}function n(e){return("0"+e).slice(-2)}var r="https://calendar.google.com/calendar/"+(desktop()?"render?":"gp#~calendar:view=e&")+"action=TEMPLATE",o={dates:t(e,"start")+"/"+t(e,"end"),location:e.location,text:e.eventName,details:e.notes};return r+"&"+buildQuery(o)},toString:function(){return"[Clazz CCalendar]"}};;
function CDate(){}CDate.toString=function(){return"[Clazz CDate]"},CDate.prototype.toString=function(){return"[CDate "+this.localId+"]"},CDate.prototype.getLocalStartDate=function(){var t=this._getParts();return new Date(t[1],t[2]-1,t[3],0,0,0)},CDate.prototype.getLocalEndDate=function(){var t=this._getParts();return new Date(t[1],t[2]-1,t[3]+1,0,0,0)},CDate.prototype.getDate=function(){return this.getLocalStartDate()},CDate.prototype._getParts=function(){return this.value.match(/^(....)-(..)-(..)$/).map(function(t){return parseInt(t,10)})};;
function CDateTime(){}CDateTime.toString=function(){return"[Clazz CDateTime]"},CDateTime.prototype.toString=function(){return"[CDateTime "+this.localId+"]"},CDateTime.prototype.getDate=function(){var t=this.value.match(/^(....)-(..)-(..) (..):(..):(..)$/).map(function(t){return parseInt(t,10)});switch(this.tz){case"my":case"utc":return new Date(Date.UTC(t[1],t[2]-1,t[3],t[4],t[5],t[6]));case"user":return new Date(t[1],t[2]-1,t[3],t[4],t[5],t[6]);default:Creative._throw("Invalid CDateTime timezone: "+this.tz)}};;
var Twitter={};Twitter.showUserAction=function(e,t,r){if(!t.screenName)return void r();var a="twitterProfileOpened";creative.adapter._stopAllMedia(),e.track({name:a,screenName:t.screenName,label:t.reportLabel}),e.trackClickThrough();var i=desktop()?"www":"mobile",o="http://"+i+".twitter.com/"+t.screenName;creative.adapter.openBrowser(creative.wrapRedirectPageUrl(o),creative.shouldClickThroughToNewWindow(e)),creative.adapter.sendToEventMonitor(a,t.triggerId,e.screen.name,"@"+t.screenName,t.reportLabel),r()},Twitter.tweetAction=function(e,t,r){if(!t.text)return void r();e.track({name:"tweetPageOpened",tweet:t.text,tweetVia:t.via,label:t.reportLabel}),e.trackClickThrough();var a="http://twitter.com/intent/tweet?text="+encodeURIComponent(t.text);t.via&&(a+="&via="+encodeURIComponent(t.via)),creative.adapter.openBrowser(creative.wrapRedirectPageUrl(creative.apiUrl+"redirect?url="+encodeURIComponent(a)+"&type=js"),creative.shouldClickThroughToNewWindow(e)),r()};;
!function(t){"use strict";var e={stringPatternAngle:"(?:[+-]?\\d*\\.?\\d+)(?:deg|grad|rad|turn)",stringPatternColor:"(?:#(?:[A-Fa-f0-9]{3,6})|(?:(?:rgb|hsl)a?)\\(\\s*(?:\\d+(?:\\%)?\\s*,\\s*){2,3}(?:(?:\\d+\\.)?\\d+)\\s*\\))",stringPatternSideCorner:"top|bottom|left|right",stringPatternValue:"(?:[+-]?\\d*\\.?\\d+)(?:%|[a-z]+)?",patternHex:/^(#|)([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,matchHexHash:1,matchHexColor:2,patternRgb:/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i,matchRgbRed:1,matchRgbGreen:2,matchRgbBlue:3,patternRgba:/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((?:\d\.)?\d\d?)\s*\)$/i,matchRgbaRed:1,matchRgbaGreen:2,matchRgbaBlue:3,matchRgbaAlpha:4,patternGradient:/^\-?(moz|webkit|o|ms|)(?:(?:-|)(?:repeating-|)(linear|radial|))-gradient\((.*?)\)(?:;|)$/i,matchGradientPrefix:1,matchGradientType:2,matchGradientValues:3,generatedGradientSyntax:null,matchGradientSyntaxLine:1,matchGradientSyntaxAngle:2,matchGradientSyntaxSideCorner:3,matchGradientSyntaxStopList:4,buildGradientSyntax:function(){var t=["(?:to\\s+)?((?:",e.stringPatternSideCorner,")\\s*(?:",e.stringPatternSideCorner,")?)"].join(""),a=["(",e.stringPatternAngle,")"].join(""),n=["(",a,"|",t,")"].join(""),r=[e.stringPatternColor,"\\s*(?:",e.stringPatternValue,")?"].join(""),i=["(?:",r,"\\s*,\\s*)*",r].join(""),o=["^\\s*",n,"\\s*,\\s*(",i,")\\s*$"].join("");return e.generatedGradientSyntax=new RegExp(o,"i"),e.generatedGradientSyntax},generatedRadialGradientSyntax:null,matchRadialGradientSyntaxEllipse:1,matchRadialGradientSyntaxWidth:2,matchRadialGradientSyntaxHeight:3,matchRadialGradientSyntaxXPosition:4,matchRadialGradientSyntaxYPosition:5,matchRadialGradientSyntaxStopList:6,buildRadialGradientSyntax:function(){var t=["(ellipse)?\\s*","(",e.stringPatternValue,")\\s+","(",e.stringPatternValue,")\\s+at\\s+","(",e.stringPatternValue,")\\s+","(",e.stringPatternValue,")"].join(""),a=[e.stringPatternColor,"\\s*(?:",e.stringPatternValue,")?"].join(""),n=["(?:",a,"\\s*,\\s*)*",a].join(""),r=["^\\s*",t,"\\s*,\\s*(",n,")\\s*$"].join("");return e.generatedRadialGradientSyntax=new RegExp(r,"i"),e.generatedRadialGradientSyntax},generatedGradientStopList:null,matchGradientStopListColor:1,matchGradientStopListPosition:2,buildGradientStopList:function(){var t=["\\s*(",e.stringPatternColor,")","(?:\\s+","(",e.stringPatternValue,"))?","(?:\\s*,\\s*)?"].join("");return e.generatedGradientStopList=new RegExp(t,"gi"),e.generatedGradientStopList},gradientOldSideCorner:{"to top":"left bottom, left top","to left":"right top, left top","to bottom":"left top, left bottom","to right":"left top, right top","to top right":"left bottom, right top","to top left":"right bottom, left top","to bottom right":"left top, right bottom","to bottom left":"right top, left bottom"},gradientPrefixedSideCorner:{"to top":"bottom","to left":"right","to bottom":"top","to right":"left","to top right":"bottom left","to top left":"bottom right","to bottom right":"top left","to bottom left":"top right"}};Object.defineProperties(e,{patternGradientSyntax:{get:function(){return null===e.generatedGradientSyntax?e.buildGradientSyntax():e.generatedGradientSyntax}},patternRadialGradientSyntax:{get:function(){return null===e.generatedRadialGradientSyntax?e.buildRadialGradientSyntax():e.generatedRadialGradientSyntax}},patternGradientStopList:{get:function(){return null===e.generatedGradientStopList?e.buildGradientStopList():e.generatedGradientStopList}}}),e.convertAngleToSideCorner=function(t,e){/\-?(moz|webkit|o|ms)/.test(e)&&(t=90-t);var a=(t+360)%360,n="to top";return a>347||14>a?n="to top":a>=14&&75>=a?n="to top right":a>75&&105>a?n="to right":a>=105&&167>=a?n="to bottom right":a>167&&194>a?n="to bottom":a>=194&&255>=a?n="to bottom left":a>255&&285>a?n="to left":a>=285&&347>=a&&(n="to left top"),n},e.convertSideCornerToAngle=function(t,e){var a=0;switch(t){case"bottom":case"to top":a=0;break;case"left":case"to right":a=90;break;case"right":case"to left":a=270;break;case"top":case"to bottom":a=180;break;case"to bottom right":case"to right bottom":a=167;break;case"to bottom left":case"to left bottom":a=194;break;case"to top right":case"to right top":a=14;break;case"to top left":case"to left top":a=347;break;case"bottom right":case"right bottom":a=285;break;case"bottom left":case"left bottom":a=75;break;case"top right":case"right top":a=255;break;case"top left":case"left top":a=105}return/\-?(moz|webkit|o|ms)/.test(e)&&(a=90-a),(a+360)%360},e.isHex=function(t){return e.patternHex.test(t)},e.isRgb=function(t){return e.patternRgb.test(t)},e.isRgba=function(t){return e.patternRgba.test(t)},e.isGradient=function(t){return e.patternGradient.test(t)},e.parseColorStopList=function(t){for(var a,n=e.patternGradientStopList.exec(t),r=[];null!==n;)a={color:n[e.matchGradientStopListColor]},n[e.matchGradientStopListPosition]&&(a.position=n[e.matchGradientStopListPosition]),r.push(a),n=e.patternGradientStopList.exec(t);return r},e.parseGradient=function(t){var a=null,n=e.patternGradient.exec(t);if(null!==n){a={original:n[0],oldSyntax:!n[e.matchGradientType],prefix:n[e.matchGradientPrefix],type:n[e.matchGradientType],colorStopList:[]};var r=e.patternGradientSyntax.exec(n[e.matchGradientValues]);null!==r&&(r[e.matchGradientSyntaxLine]&&(a.line=r[e.matchGradientSyntaxLine]),r[e.matchGradientSyntaxAngle]&&(a.angle=r[e.matchGradientSyntaxAngle]),r[e.matchGradientSyntaxSideCorner]&&(a.sideCorner=r[e.matchGradientSyntaxSideCorner]),a.colorStopList=e.parseColorStopList(r[e.matchGradientSyntaxStopList]));var i=e.patternRadialGradientSyntax.exec(n[e.matchGradientValues]);null!==i&&(a.radialGradientEllipse=i[e.matchRadialGradientSyntaxEllipse],i[e.matchRadialGradientSyntaxWidth]&&(a.radialGradientWidth=i[e.matchRadialGradientSyntaxWidth]),i[e.matchRadialGradientSyntaxHeight]&&(a.radialGradientHeight=i[e.matchRadialGradientSyntaxHeight]),i[e.matchRadialGradientSyntaxXPosition]&&(a.radialGradientXPosition=i[e.matchRadialGradientSyntaxXPosition]),i[e.matchRadialGradientSyntaxYPosition]&&(a.radialGradientYPosition=i[e.matchRadialGradientSyntaxYPosition]),a.colorStopList=e.parseColorStopList(i[e.matchRadialGradientSyntaxStopList]))}return a},e.createGradient=function(t){var a={backgroundColor:null,webkitGradient:null,mozLinearGradient:null,msLinearGradient:null,oLinearGradient:null,webkitLinearGradient:null,linearGradient:null,radialGradient:null},n=e.parseGradient(t);if(n.oldSyntax)throw new Error('[Not supported] Can not create gradient from old "webkit-gradient" syntax.');for(var r="",i="",o=n.colorStopList.length,d=0;o>d;d++){var l=n.colorStopList[d];if(l.color){if(0!==d?(r+=", ",i+=", "):a.backgroundColor=l.color,r+=l.color,i+="color-stop(",l.position)r+=" "+l.position,i+=l.position;else{var s=100/(o-1)*d;i+=s+"%"}i+=", "+l.color+")"}}if("linear"===n.type){var g=0;"undefined"!=typeof n.angle?g=parseInt(n.angle,10):"undefined"!=typeof n.sideCorner&&(g=e.convertSideCornerToAngle(n.line,n.prefix));var c=g;/\-?(moz|webkit|o|ms)/.test(n.prefix)?g=90-c:c=90-g;var p=e.convertAngleToSideCorner(g),G=e.gradientOldSideCorner[p];a.webkitGradient="-webkit-gradient(linear, "+G+", "+i+")",a.mozLinearGradient="-moz-linear-gradient("+c+"deg, "+r+")",a.msLinearGradient="-ms-linear-gradient("+c+"deg, "+r+")",a.oLinearGradient="-o-linear-gradient("+c+"deg, "+r+")",a.webkitLinearGradient="-webkit-linear-gradient("+c+"deg, "+r+")",a.linearGradient="linear-gradient("+g+"deg, "+r+")"}else if("radial"===n.type){var m=parseInt(n.radialGradientWidth,10),h=parseInt(n.radialGradientHeight,10),S=parseInt(n.radialGradientXPosition,10),u=parseInt(n.radialGradientYPosition,10),f=m+"% "+h+"%",b=S+"% "+u+"% ",x=f+" at "+b;a.radialGradient="radial-gradient("+x+", "+r+")"}return a},e.createGradientStyle=function(t){var a=e.createGradient(t),n="";for(var r in a){var i=a[r];null!==i&&e.isGradient(i)&&(n+="background-image: "+i+"; ")}return n},t.Color=e}(window),"undefined"!=typeof module&&"undefined"!=typeof module.exports&&(module.exports=window.Color);;
!function(){"use strict";var t={updateTextStyle:function(){},initializeFont:function(){this.font.setBaseUrl((creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"fonts/"),this.incrementLoadingCount(),this.loadFont(deferred(this.decrementLoadingCount.bind(this),0,"TextStyleIntegrator.initializeFont deferred loadFont callback")),this.updateTextStyle()},getFontSize:function(){return this.fontSize},getLineSpacing:function(){return this.lineSpacing},getLetterSpacing:function(){return this.letterSpacing},getTextShadowOffset:function(){var t={x:0,y:0};if("undefined"!=typeof this.textShadow&&this.textShadow){var e=this.textShadowAngle*(Math.PI/180);t.x=Math.round(this.textShadowDistance*Math.cos(e)),t.y=Math.round(this.textShadowDistance*Math.sin(e))}return t},getTextShadowBlur:function(){return android("2")&&this.textShadowBlur<1?1:this.textShadowBlur},applyTextStyle:function(t){var e=this.font.getCssProperties(),i={fontFamily:e["font-family"],fontStyle:e["font-style"],fontWeight:e["font-weight"],color:this.textColor,direction:"",letterSpacing:"",textAlign:"",textDecoration:"",textShadow:""};if("undefined"!=typeof this.textDirection&&(i.direction=this.textDirection),"undefined"!=typeof this.textAlign&&(i.textAlign=this.textAlign),"undefined"!=typeof this.textDecoration&&(i.textDecoration=this.textDecoration),"undefined"!=typeof this.letterSpacing&&(i.letterSpacing=this.getLetterSpacing()+"px"),"undefined"!=typeof this.textShadow&&this.textShadow){var n=this.getTextShadowOffset();i.textShadow=n.x+"px "+n.y+"px "+this.getTextShadowBlur()+"px "+this.textShadowColor}extend(t,i)},applyTextSize:function(t){var e=this.getFontSize();this.scaleFont&&this.scaleBaseWidth>0&&"undefined"!=typeof this.scaleBaseHeight&&this.scaleBaseHeight>0?e=Math.min(e/(this.scaleBaseWidth/this.size.width),e/(this.scaleBaseHeight/this.size.height)):this.scaleFont&&this.scaleBaseWidth>0&&(e/=this.scaleBaseWidth/this.size.width);var i={fontSize:e+"px",lineHeight:"",paddingLeft:"",paddingRight:""};if("undefined"!=typeof this.lineSpacing&&(i.lineHeight=Math.max(1,this.getLineSpacing()+e)+"px"),this.scaleFont&&"undefined"!=typeof this.scaleBaseHeight){var n=this.getNaturalSize(),o=this.scaleBaseWidth/this.scaleBaseHeight,a=o*n.height,r=n.width-a;if(r>0)switch(this.textAlign){case"center":i.paddingRight=Math.round(r/2)+"px",i.paddingLeft=Math.round(r/2)+"px";break;case"right":i.paddingLeft=Math.round(r)+"px";break;default:i.paddingRight=Math.round(r)+"px"}}extend(t,i)},getFontLoader:function(t){t=t||noop,!this.font.needsLoading()||FontBase.useCSSFontLoadingAPI||"undefined"!=typeof FontLoader?t():loadJS(creative.resourceUrl+"runner-min/FontLoader.js",t)},loadFont:function(t){t=t||noop;var e={fontFamily:this.font.family,fontProvider:this.font.provider,fontStretch:this.font.stretch||"",fontStyle:this.font.style,fontWeight:this.font.weight,fontTtfUrl:this.font.getFileUrl("ttf")||"",fontWoffUrl:this.font.getFileUrl("woff")||""},i=creative.perf.start("TextStyleIntegrator.loadFont",e);this.getFontLoader(function(){var n=creative.perf.start("TextStyleIntegrator.loadStyle",e);this.font.loadStyle(function(o){e.errorMessage=o||"",n.end(),i.end(),!o&&this.font.isMonotype()&&this.trackMonotypeUsage(),t(o)}.bind(this))}.bind(this))},setFont:function(t){var e=["provider","family","style","weight","stretch","variation","files","baseUrl"],i={};e.forEach(function(e){this.font.localId&&(i[e]="files"===e?{}:this.font[e]),"undefined"!=typeof t[e]&&(i[e]=t[e])}.bind(this)),-1===["custom","google","web"].indexOf(i.provider)&&(i.provider="custom"),this.font.localId?("custom"===i.provider&&i.family===this.font.family&&(i.family=this.font.family+" (custom)"),this.font=new FontBase(i)):extend(this.font,i),creative.track({name:"retiredFeatureUsed",featureType:"apifunction",featureName:"TextStyleIntegrator.setFont"})},trackMonotypeUsage:function(){creative.runtimeParams.monotypeProjectId&&!creative.runtimeParams.monotypeUsageReported&&(creative.runtimeParams.monotypeUsageReported=1,creative.aggregatorTracking.trackAggregator("monotypeUsageReported",{monotypeProjectId:creative.runtimeParams.monotypeProjectId,creativeId:creative.id}))}};window.TextStyleIntegrator=t}();;
!function(e){var o=Date.now||function(){return+new Date},t=60,_=1e3,i={},l=1;e.core?core.effect||(core.effect={}):e.core={effect:{}},core.effect.Animate={requestAnimationFrame:function(){var o=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,t=!!o;if(o&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(o.toString())&&(t=!1),t)return function(e,t){o(e,t)};var _=60,i={},l=0,n=1,r=null,a=+new Date;return function(e){var o=n++;return i[o]=e,l++,null===r&&(r=setInterval(function(){var e=+new Date,o=i;i={},l=0;for(var t in o)o.hasOwnProperty(t)&&(o[t](e),a=e);e-a>2500&&(clearInterval(r),r=null)},1e3/_)),o}}(),stop:function(e){var o=null!=i[e];return o&&(i[e]=null),o},isRunning:function(e){return null!=i[e]},start:function(e,n,r,a,c,s){var p=o(),h=p,f=0,m=0,u=l++;if(s||(s=document.body),u%20===0){var g={};for(var v in i)g[v]=!0;i=g}var d=function(l){var g=l!==!0,v=o();if(!i[u]||n&&!n(u))return i[u]=null,void(r&&r(t-m/((v-p)/_),u,!1));if(g)for(var T=Math.round((v-h)/(_/t))-1,S=0;S1&&(f=1));var D=c?c(f):f;e(D,v,g)!==!1&&1!==f||!g?g&&(h=v,core.effect.Animate.requestAnimationFrame(d,s)):(i[u]=null,r&&r(t-m/((v-p)/_),u,1===f||null==a))};return i[u]=!0,core.effect.Animate.requestAnimationFrame(d,s),u}}}(window);var ZyngaScroller;!function(){var e=function(){};ZyngaScroller=function(o,t){this.__callback=o,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:e,penetrationDeceleration:.03,penetrationAcceleration:.08};for(var _ in t)this.options[_]=t[_]};var o=function(e){return Math.pow(e-1,3)+1},t=function(e){return(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2)},_={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,o,t,_){var i=this;e===+e&&(i.__clientWidth=e),o===+o&&(i.__clientHeight=o),t===+t&&(i.__contentWidth=t),_===+_&&(i.__contentHeight=_),i.__computeScrollMax(),i.scrollTo(i.__scrollLeft,i.__scrollTop,!0)},setPosition:function(e,o){var t=this;t.__clientLeft=e||0,t.__clientTop=o||0},setSnapSize:function(e,o){var t=this;t.__snapWidth=e,t.__snapHeight=o},activatePullToRefresh:function(e,o,t,_){var i=this;i.__refreshHeight=e,i.__refreshActivate=o,i.__refreshDeactivate=t,i.__refreshStart=_},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var e=this;e.__refreshActive=!1,e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)},getValues:function(){var e=this;return{left:e.__scrollLeft,top:e.__scrollTop,zoom:e.__zoomLevel,isDragging:e.__isDragging}},getScrollMax:function(){var e=this;return{left:e.__maxScrollLeft,top:e.__maxScrollTop}},zoomTo:function(e,o,t,_,i){var l=this;if(!l.options.zooming)throw new Error("Zooming is not enabled!");i&&(l.__zoomComplete=i),l.__isDecelerating&&(core.effect.Animate.stop(l.__isDecelerating),l.__isDecelerating=!1);var n=l.__zoomLevel;null==t&&(t=l.__clientWidth/2),null==_&&(_=l.__clientHeight/2),e=Math.max(Math.min(e,l.options.maxZoom),l.options.minZoom),l.__computeScrollMax(e);var r=(t+l.__scrollLeft)*e/n-t,a=(_+l.__scrollTop)*e/n-_;r>l.__maxScrollLeft?r=l.__maxScrollLeft:0>r&&(r=0),a>l.__maxScrollTop?a=l.__maxScrollTop:0>a&&(a=0),l.__publish(r,a,e,o)},zoomBy:function(e,o,t,_,i){var l=this;l.zoomTo(l.__zoomLevel*e,o,t,_,i)},scrollTo:function(e,o,t,_){var i=this;if(i.__isDecelerating&&(core.effect.Animate.stop(i.__isDecelerating),i.__isDecelerating=!1),null!=_&&_!==i.__zoomLevel){if(!i.options.zooming)throw new Error("Zooming is not enabled!");e*=_,o*=_,i.__computeScrollMax(_)}else _=i.__zoomLevel;i.options.scrollingX?i.options.paging?e=Math.round(e/i.__clientWidth)*i.__clientWidth:i.options.snapping&&(e=Math.round(e/i.__snapWidth)*i.__snapWidth):e=i.__scrollLeft,i.options.scrollingY?i.options.paging?o=Math.round(o/i.__clientHeight)*i.__clientHeight:i.options.snapping&&(o=Math.round(o/i.__snapHeight)*i.__snapHeight):o=i.__scrollTop,e=Math.max(Math.min(i.__maxScrollLeft,e),0),o=Math.max(Math.min(i.__maxScrollTop,o),0),e===i.__scrollLeft&&o===i.__scrollTop&&(t=!1),i.__publish(e,o,_,t)},scrollBy:function(e,o,t){var _=this,i=_.__isAnimating?_.__scheduledLeft:_.__scrollLeft,l=_.__isAnimating?_.__scheduledTop:_.__scrollTop;_.scrollTo(i+(e||0),l+(o||0),t)},doMouseZoom:function(e,o,t,_){var i=this,l=e>0?.97:1.03;return i.zoomTo(i.__zoomLevel*l,!1,t-i.__clientLeft,_-i.__clientTop)},doTouchStart:function(e,o){if(null==e.length)throw new Error("Invalid touch list: "+e);if(o instanceof Date&&(o=o.valueOf()),"number"!=typeof o)throw new Error("Invalid timestamp value: "+o);var t=this;t.__interruptedAnimation=!0,t.__isDecelerating&&(core.effect.Animate.stop(t.__isDecelerating),t.__isDecelerating=!1,t.__interruptedAnimation=!0),t.__isAnimating&&(core.effect.Animate.stop(t.__isAnimating),t.__isAnimating=!1,t.__interruptedAnimation=!0);var _,i,l=1===e.length;l?(_=e[0].pageX,i=e[0].pageY):(_=Math.abs(e[0].pageX+e[1].pageX)/2,i=Math.abs(e[0].pageY+e[1].pageY)/2),t.__initialTouchLeft=_,t.__initialTouchTop=i,t.__zoomLevelStart=t.__zoomLevel,t.__lastTouchLeft=_,t.__lastTouchTop=i,t.__lastTouchMove=o,t.__lastScale=1,t.__enableScrollX=!l&&t.options.scrollingX,t.__enableScrollY=!l&&t.options.scrollingY,t.__isTracking=!0,t.__didDecelerationComplete=!1,t.__isDragging=!l,t.__isSingleTouch=l,t.__positions=[]},doTouchMove:function(e,o,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(o instanceof Date&&(o=o.valueOf()),"number"!=typeof o)throw new Error("Invalid timestamp value: "+o);var _=this;if(_.__isTracking){var i,l;2===e.length?(i=Math.abs(e[0].pageX+e[1].pageX)/2,l=Math.abs(e[0].pageY+e[1].pageY)/2):(i=e[0].pageX,l=e[0].pageY);var n=_.__positions;if(_.__isDragging){var r=i-_.__lastTouchLeft,a=l-_.__lastTouchTop,c=_.__scrollLeft,s=_.__scrollTop,p=_.__zoomLevel;if(null!=t&&_.options.zooming){var h=p;if(p=p/_.__lastScale*t,p=Math.max(Math.min(p,_.options.maxZoom),_.options.minZoom),h!==p){var f=i-_.__clientLeft,m=l-_.__clientTop;c=(f+c)*p/h-f,s=(m+s)*p/h-m,_.__computeScrollMax(p)}}if(_.__enableScrollX){c-=r*this.options.speedMultiplier;var u=_.__maxScrollLeft;(c>u||0>c)&&(_.options.bouncing?c+=r/2*this.options.speedMultiplier:c=c>u?u:0)}if(_.__enableScrollY){s-=a*this.options.speedMultiplier;var g=_.__maxScrollTop;(s>g||0>s)&&(_.options.bouncing?(s+=a/2*this.options.speedMultiplier,_.__enableScrollX||null==_.__refreshHeight||(!_.__refreshActive&&s<=-_.__refreshHeight?(_.__refreshActive=!0,_.__refreshActivate&&_.__refreshActivate()):_.__refreshActive&&s>-_.__refreshHeight&&(_.__refreshActive=!1,_.__refreshDeactivate&&_.__refreshDeactivate()))):s=s>g?g:0)}n.length>60&&n.splice(0,30),n.push(c,s,o),_.__publish(c,s,p)}else{var v=_.options.locking?3:0,d=5,T=Math.abs(i-_.__initialTouchLeft),S=Math.abs(l-_.__initialTouchTop);_.__enableScrollX=_.options.scrollingX&&T>=v,_.__enableScrollY=_.options.scrollingY&&S>=v,n.push(_.__scrollLeft,_.__scrollTop,o),_.__isDragging=(_.__enableScrollX||_.__enableScrollY)&&(T>=d||S>=d),_.__isDragging&&(_.__interruptedAnimation=!1)}_.__lastTouchLeft=i,_.__lastTouchTop=l,_.__lastTouchMove=o,_.__lastScale=t}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);var o=this;if(o.__isTracking){if(o.__isTracking=!1,o.__isDragging)if(o.__isDragging=!1,o.__isSingleTouch&&o.options.animating&&e-o.__lastTouchMove<=100){for(var t=o.__positions,_=t.length-1,i=_,l=_;l>0&&t[l]>o.__lastTouchMove-100;l-=3)i=l;if(i!==_){var n=t[_]-t[i],r=o.__scrollLeft-t[i-2],a=o.__scrollTop-t[i-1];o.__decelerationVelocityX=r/n*(1e3/60),o.__decelerationVelocityY=a/n*(1e3/60);var c=o.options.paging||o.options.snapping?4:1;(Math.abs(o.__decelerationVelocityX)>c||Math.abs(o.__decelerationVelocityY)>c)&&(o.__refreshActive||o.__startDeceleration(e))}else o.options.scrollingComplete()}else e-o.__lastTouchMove>100&&o.options.scrollingComplete();o.__isDecelerating||(o.__refreshActive&&o.__refreshStart?(o.__publish(o.__scrollLeft,-o.__refreshHeight,o.__zoomLevel,!0),o.__refreshStart&&o.__refreshStart()):((o.__interruptedAnimation||o.__isDragging)&&o.options.scrollingComplete(),o.scrollTo(o.__scrollLeft,o.__scrollTop,!0,o.__zoomLevel),o.__refreshActive&&(o.__refreshActive=!1,o.__refreshDeactivate&&o.__refreshDeactivate()))),o.__positions.length=0}},__publish:function(e,_,i,l){var n=this,r=n.__isAnimating;if(r&&(core.effect.Animate.stop(r),n.__isAnimating=!1),l&&n.options.animating){n.__scheduledLeft=e,n.__scheduledTop=_,n.__scheduledZoom=i;var a=n.__scrollLeft,c=n.__scrollTop,s=n.__zoomLevel,p=e-a,h=_-c,f=i-s,m=function(e,o,t){t&&(n.__scrollLeft=a+p*e,n.__scrollTop=c+h*e,n.__zoomLevel=s+f*e,n.__callback&&n.__callback(n.__scrollLeft,n.__scrollTop,n.__zoomLevel))},u=function(e){return n.__isAnimating===e},g=function(e,o,t){o===n.__isAnimating&&(n.__isAnimating=!1),(n.__didDecelerationComplete||t)&&n.options.scrollingComplete(),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))};n.__isAnimating=core.effect.Animate.start(m,u,g,n.options.animationDuration,r?o:t)}else n.__scheduledLeft=n.__scrollLeft=e,n.__scheduledTop=n.__scrollTop=_,n.__scheduledZoom=n.__zoomLevel=i,n.__callback&&n.__callback(e,_,i),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))},__computeScrollMax:function(e){var o=this;null==e&&(e=o.__zoomLevel),o.__maxScrollLeft=Math.max(o.__contentWidth*e-o.__clientWidth,0),o.__maxScrollTop=Math.max(o.__contentHeight*e-o.__clientHeight,0)},__startDeceleration:function(){var e=this;if(e.options.paging){var o=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),t=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),_=e.__clientWidth,i=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(o/_)*_,e.__minDecelerationScrollTop=Math.floor(t/i)*i,e.__maxDecelerationScrollLeft=Math.ceil(o/_)*_,e.__maxDecelerationScrollTop=Math.ceil(t/i)*i}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=function(o,t,_){e.__stepThroughDeceleration(_)},n=e.options.snapping?4:.1,r=function(){var o=Math.abs(e.__decelerationVelocityX)>=n||Math.abs(e.__decelerationVelocityY)>=n;return o||(e.__didDecelerationComplete=!0),o},a=function(){e.__isDecelerating=!1,e.__didDecelerationComplete&&e.options.scrollingComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping)};e.__isDecelerating=core.effect.Animate.start(l,r,a)},__stepThroughDeceleration:function(e){var o=this,t=o.__scrollLeft+o.__decelerationVelocityX,_=o.__scrollTop+o.__decelerationVelocityY;if(!o.options.bouncing){var i=Math.max(Math.min(o.__maxDecelerationScrollLeft,t),o.__minDecelerationScrollLeft);i!==t&&(t=i,o.__decelerationVelocityX=0);var l=Math.max(Math.min(o.__maxDecelerationScrollTop,_),o.__minDecelerationScrollTop);l!==_&&(_=l,o.__decelerationVelocityY=0)}if(e?o.__publish(t,_,o.__zoomLevel):(o.__scrollLeft=t,o.__scrollTop=_),!o.options.paging){var n=.95;o.__decelerationVelocityX*=n,o.__decelerationVelocityY*=n}if(o.options.bouncing){var r=0,a=0,c=o.options.penetrationDeceleration,s=o.options.penetrationAcceleration;to.__maxDecelerationScrollLeft&&(r=o.__maxDecelerationScrollLeft-t),_o.__maxDecelerationScrollTop&&(a=o.__maxDecelerationScrollTop-_),0!==r&&(r*o.__decelerationVelocityX<=0?o.__decelerationVelocityX+=r*c:o.__decelerationVelocityX=r*s),0!==a&&(a*o.__decelerationVelocityY<=0?o.__decelerationVelocityY+=a*c:o.__decelerationVelocityY=a*s)}}};for(var i in _)ZyngaScroller.prototype[i]=_[i]}();;
function Scroller(t,i,o){this.container=t,this.list=i,this.options=o||{},this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handleScroll=this._handleScroll.bind(this),this.silentScrolling=!1,this.zyngaScroller=new ZyngaScroller(this._handleScroll,{scrollingX:"vertical"===this.options.direction?!1:!0,scrollingY:"horizontal"===this.options.direction?!1:!0,bouncing:!!this.options.bouncing,animating:!!this.options.animating,locking:!!this.options.locking,snapping:!!this.options.snapping,animationDuration:"undefined"!=typeof this.options.animationDuration?this.options.animationDuration:250,scrollingComplete:deferred(this.emits("scrollingEnd"))}),this.setEasing("undefined"==typeof this.options.easing?!0:this.options.easing),this.redraw()}extend(Scroller.prototype,EventEmitter),Object.defineProperty(Scroller.prototype,"isDragging",{get:function(){return this.zyngaScroller.getValues().isDragging}}),Scroller._owner="celtra",Scroller.prototype._handleScroll=function(t,i){t=isNaN(t)?0:t,i=isNaN(i)?0:i;var o=this.getMaxScroll();this.currentPosition={left:t,top:i,leftPercent:o.left?t/o.left:0,topPercent:o.top?i/o.top:0},celtra.styler.css(this.list,"transform",ScreenObject.supports3d?"translate3d("+-t+"px, "+-i+"px, 0)":"translate("+-t+"px, "+-i+"px)"),this.scrollbars&&(this.currentPosition.sbTop=this.currentPosition.top/(this.list.size.height-this.container.size.height)*(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10)),this.currentPosition.sbLeft=this.currentPosition.left/(this.list.size.width-this.container.size.width)*(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10)),this.currentPosition.sbTopPercent=this.currentPosition.sbTop/(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10)),this.currentPosition.sbLeftPercent=this.currentPosition.sbLeft/(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10)),this._renderScrollbars(this.currentPosition.sbLeft,this.currentPosition.sbTop)),this.silentScrolling||this.emit("scrolling",this.currentPosition)},Scroller.prototype._handleTouchStart=function(t){this.zyngaScroller.doTouchStart(t.touches,t.timeStamp),this.emit("scrollingStart")},Scroller.prototype._handleTouchMove=function(t){this.zyngaScroller.doTouchMove(t.touches,t.timeStamp)},Scroller.prototype._handleTouchEnd=function(t){this.zyngaScroller.doTouchEnd(t.timeStamp)},Scroller.prototype._createScrollbars=function(){var t=document.createElement("div");addClass(t,"celtra-vertical-scrollbar "+this.options.scrollbarPosition||"none"),this.container.appendChild(t);var i=document.createElement("div");t.appendChild(i),t.style.height=Math.round(this.container.size.height/this.list.size.height*this.container.size.height)+"px",t.style.backgroundColor=this.options.scrollbarColor,t.style.display=this.list.size.height<=this.container.size.height?"none":"block";var o=document.createElement("div");addClass(o,"celtra-horizontal-scrollbar "+this.options.scrollbarPosition||"none"),this.container.appendChild(o);var e=document.createElement("div");o.appendChild(e),o.style.width=Math.round(this.container.size.width/this.list.size.width*this.container.size.width)+"px",o.style.backgroundColor=this.options.scrollbarColor,o.style.display=this.list.size.width<=this.container.size.width?"none":"block",this.scrollbars={vertical:t,horizontal:o,verticalStyle:t.style,horizontalStyle:o.style}},Scroller.prototype.scrollTo=function(t,i,o,e,s,n){this._scroll("scrollTo",{left:t,top:i,animate:o,duration:e,easing:s,callback:n})},Scroller.prototype.scrollBy=function(t,i,o,e,s,n){this._scroll("scrollBy",{left:t,top:i,animate:o,duration:e,easing:s,callback:n})},Scroller.prototype._scroll=function(t,i){i.animate&&("number"==typeof i.duration?this._setAnimationDuration(i.duration):"boolean"==typeof i.duration&&(i.easing=i.duration),"boolean"==typeof i.easing&&this.setEasing(i.easing)),this.once("scrollingEnd",function(){"function"==typeof i.callback&&i.callback()}),this.zyngaScroller[t](i.left,i.top,i.animate),this.emit("scrollingStart")},Scroller.prototype.getMaxScroll=function(){return{left:this.zyngaScroller.__maxScrollLeft,top:this.zyngaScroller.__maxScrollTop}},Scroller.prototype.getCurrentScroll=function(){return this.currentPosition},Scroller.prototype._setAnimationDuration=function(t){this.zyngaScroller.options.animationDuration=t},Scroller.prototype.setEasing=function(t){this.options.easing=t,this.zyngaScroller.__publish=function(i,o,e,s){var n=this,r=function(t){return Math.pow(t-1,3)+1},l=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},a=n.__isAnimating;if(a&&(core.effect.Animate.stop(a),n.__isAnimating=!1),s&&n.options.animating){n.__scheduledLeft=i,n.__scheduledTop=o,n.__scheduledZoom=e;var c=n.__scrollLeft,h=n.__scrollTop,p=n.__zoomLevel,d=i-c,u=o-h,_=e-p,g=function(t,i,o){o&&(n.__scrollLeft=c+d*t,n.__scrollTop=h+u*t,n.__zoomLevel=p+_*t,n.__callback&&n.__callback(n.__scrollLeft,n.__scrollTop,n.__zoomLevel))},S=function(t){return n.__isAnimating===t},z=function(t,i,o){i===n.__isAnimating&&(n.__isAnimating=!1),(n.__didDecelerationComplete||o)&&n.options.scrollingComplete(),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))};n.__isAnimating=t?core.effect.Animate.start(g,S,z,n.options.animationDuration,a?r:l):core.effect.Animate.start(g,S,z,n.options.animationDuration)}else n.__scheduledLeft=n.__scrollLeft=i,n.__scheduledTop=n.__scrollTop=o,n.__scheduledZoom=n.__zoomLevel=e,n.__callback&&n.__callback(i,o,e),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))}},Scroller.prototype.redraw=function(){this.container.size={width:this.container.offsetWidth,height:this.container.offsetHeight},this.list.size={width:this.list.offsetWidth,height:this.list.offsetHeight},this.zyngaScroller.setDimensions(this.container.size.width,this.container.size.height,this.list.size.width,this.list.size.height),this.options.snapping&&this._setSnapSize(this.container.size.width,this.container.size.height);var t=this.getMaxScroll();this.zyngaScroller.scrollTo(t.left*this.currentPosition.leftPercent,t.top*this.currentPosition.topPercent,!1),this.scrollbars?(this.scrollbars.verticalStyle.height=Math.round(this.container.size.height/this.list.size.height*this.container.size.height)+"px",this.scrollbars.horizontalStyle.width=Math.round(this.container.size.width/this.list.size.width*this.container.size.width)+"px",this.currentPosition.sbTop=(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10))*this.currentPosition.sbTopPercent,this.currentPosition.sbLeft=(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10))*this.currentPosition.sbLeftPercent,this._renderScrollbars(this.currentPosition.sbLeft,this.currentPosition.sbTop)):("outer"===this.options.scrollbarPosition||"inner"===this.options.scrollbarPosition)&&this._createScrollbars()},Scroller.prototype._renderScrollbars=function(t,i){ScreenObject.allowPositioningAndSizingUsingTransforms?(celtra.styler.css(this.scrollbars.vertical,"transform",ScreenObject.supports3d?"translate3d(0, "+i+"px, 0)":"translate(0, "+i+"px)"),celtra.styler.css(this.scrollbars.horizontal,"transform",ScreenObject.supports3d?"translate3d("+t+"px, 0, 0)":"translate("+t+"px, 0)")):(this.scrollbars.verticalStyle.top=i+"px",this.scrollbars.horizontalStyle.left=t+"px"),this.container.size.height>=this.list.size.height?(this.scrollbars.verticalStyle.display="none",removeClass(this.container,"vertical-scrollbar")):(this.scrollbars.verticalStyle.display="block",addClass(this.container,"vertical-scrollbar")),this.container.size.width>=this.list.size.width?(this.scrollbars.horizontalStyle.display="none",removeClass(this.container,"horizontal-scrollbar")):(this.scrollbars.horizontalStyle.display="block",addClass(this.container,"horizontal-scrollbar"))},Scroller.prototype._setSnapSize=function(t,i){this.zyngaScroller.setSnapSize(t,i)};;
function Creative(e,t,r,n,i,a,o,s,u,c,d,m,l){if(e instanceof Creative)throw"This JSON has already been unfreezed. We do it inline, to improve performance. Duplicate it yourself before unfreezing, if you need to use it again.";var p=l.start("Creative.new"),v=extend({adapter:a,runtimeParams:t||{},urlOpenedOverrideUrls:s,urlOpenedUrlAppendage:d,clickThroughDestinationUrl:m,storeOpenedOverrideUrls:u,macros:c},o);if("InstaAdHtml"!==e.clazz){var f=l.start("Creative.unfreeze");e=Freezer.unfreeze(e,window,v),f.end()}return e.instantiation=randInt(),e.batcher=new Batcher,e.trackingCenter=r,e.universalInteractionId="",e.aggregatorTracking=n,e.experiments=i,e.perf=l,e.platformAdvId=t.platformAdvId,e.platformAdvIdTrackingLimited=t.platformAdvIdTrackingLimited,"InstaAdHtml"===e.clazz&&(e.adapter=a,e.runtimeParams=t||{},e.urlOpenedOverrideUrls=s,e.urlOpenedUrlAppendage=d,e.clickThroughDestinationUrl=m,e.storeOpenedOverrideUrls=u,e.macros=c,extend(this,e),e=this),"undefined"!=typeof a&&null!==a&&(a.openBrowserSameWindowInHostileIFrame=function(e){window.top.location.href=e}),p.end(),e}Creative.toString=function(){return"[Clazz Creative]"},Creative.prototype.toString=function(){return"[Creative "+this.name+"]"},window.creative=null,extend(Creative.prototype,EventEmitter),Creative.init=function(e,t,r,n,i,a,o,s,u,c,d,m,l){if(window.creative)throw"creative is a singleton and was already initialized.";Logger.initFromRuntimeParams(t),window.creative=new Creative(e,t,r,n,i,a,o,s,u,c,d,m,l)},Creative.prototype.userInteracted=function(e){this.emit("interaction",e)},Creative.prototype.clickedThrough=function(e){this.emit("clickThrough",e)},Creative.prototype._getRuntimeParamsWithPrefix=function(e){var t={};for(var r in this.runtimeParams)0===r.indexOf(e)&&(t[r.slice(e.length)]=this.runtimeParams[r]);return t},Object.defineProperties(Creative.prototype,{sessionId:{enumerable:!0,get:function(){return this.runtimeParams.sessionId}},placementId:{enumerable:!0,get:function(){return this.runtimeParams.placementId||null}},folderId:{enumerable:!0,get:function(){return this.runtimeParams.folderId}},supplierId:{enumerable:!0,get:function(){return this.runtimeParams.supplierId||null}},dataURIsEnabled:{enumerable:!1,get:function(){return 1==this.runtimeParams.dataURIsEnabled||"treatment"===(this.experiments.get("UseDataURIsGlobally")||{}).chosenVariant}},secure:{enumerable:!0,get:function(){return 1==this.runtimeParams.secure}},userParams:{enumerable:!0,get:function(){return this._getRuntimeParamsWithPrefix("user.")}},userIdentifiers:{enumerable:!0,get:function(){return this.runtimeParams.userIdentifiers}},authTokenUrlParam:{enumerable:!1,get:function(){return"authBasis="+creative.runtimeParams.authBasis+"&authToken="+creative.runtimeParams.authToken}},customAudiences:{enumerable:!0,get:function(){return function(e){if(!creative.runtimeParams.customAudiences[e])throw new Error('Custom audience "'+e+'" is not used by the creative.');return{userExists:creative.runtimeParams.customAudiences[e].userExists,userData:creative.runtimeParams.customAudiences[e].userData,addUser:function(t){return CustomAudiences.addUser(e,t)},removeUser:function(){return CustomAudiences.removeUser(e)}}}}},acceptLanguage:{enumerable:!0,get:function(){return this.runtimeParams.acceptLanguage}}}),Creative.prototype.awake=function(){function e(r,n,i,a){r.forEach(function(r){r.parentUnit=a,r.parentScreen=i,r.parentContainer=n;var o=r.getNestedContainers();o.forEach(function(n){n.parentUnit=a,n.parentScreen=i,n.parentObject=r,e(n.objects,n,i,a),n.scenes&&t(n.scenes,n,i,a)})})}function t(e,t,r,n){e.forEach(function(e){e.parentUnit=n,e.parentScreen=r,e.parentContainer=t})}var r=this;for(var n in r.units){var i=r.units[n];i.name=n;var a=[];i.variants?i.variants.forEach(function(e){a=a.concat(e.master,e.screens)}):(a=[i.master].concat(i.screens),i.loadingScreen&&(a=[i.loadingScreen].concat(a))),a.forEach(function(r){r.parentUnit=i,e(r.objects,r,r,i),r.scenes&&t(r.scenes,r,r,i)})}},Creative.prototype.track=function(e,t){["firstInteraction","interaction","endCardInteraction","unitCollapsed","creativeDismissed","clickThroughDestinationOpened","firstClickThrough","itemSwiped"].indexOf(e.name)>=0&&(e=extend(e,{universalInteractionId:this.universalInteractionId})),this.trackingCenter.track(e,t)},Creative.prototype.setUniversalInteractionId=function(e){this.universalInteractionId=e},Creative.prototype.wrapRedirectPageUrl=function(e,t){return this.trackingCenter.wrapRedirectPageUrl(e,t)},Object.defineProperty(Creative.prototype,"sdk",{get:function(){return this.adapter},enumerable:!0}),Creative._throw=function(e){throw e},Creative.prototype.getUserInteracted=function(){return 1==this.runtimeParams.userInteracted},Creative.prototype.trackCreativeRendered=function(){creative.adapter.notifycreativeRendered(),this._getCreativeRendered()||(this.track({name:"creativeRendered"}),this.runtimeParams.creativeRendered=1,defer(this.trackingCenter.batchFlush))},Creative.prototype._getCreativeRendered=function(){return 1===this.runtimeParams.creativeRendered},Creative.prototype.trackCreativeRenderedOnScreenShow=Creative.prototype.trackCreativeRendered,Creative.prototype.trackCreativeRenderedOnVideoStart=noop,Creative.trackCustomEventAction=function(e,t,r){var n="custom";e.track({name:n,label:t.name}),creative.adapter.sendToEventMonitor(n,t.triggerId,e.screen.name,null,t.name),r&&r()},Creative.prototype.trackCreativeLoaded=function(e){this.track({name:"creativeLoaded",viewability00Measurable:e.observingViewability("00"),viewability501Measurable:e.observingViewability("501"),viewableTimeMeasurable:e.observingViewableTime(),cdnVariant:this.runtimeParams.variantChoices.CdnTiming||"none"}),defer(this.trackingCenter.batchFlush),this.perf._stopTrackingDefers=!0,this.perf.mark("creativeLoaded")},Creative.prototype.createUserLocation=function(e){return"undefined"!=typeof UserLocation?new UserLocation({lat:this.runtimeParams.gpsLat,lng:this.runtimeParams.gpsLng},e):void 0},Creative.prototype.getPageUrl=function(e){return(this.secure?this.creativeUrl:this.insecureCreativeUrl)+e+"?base64json="+encodeURIComponent(btoa(to_utf8(JSON.stringify(this.runtimeParams))))},Creative.prototype.shouldClickThroughToNewWindow=function(e){var t;t=["same","new"].indexOf(this.runtimeParams.preferredClickThroughWindow)>=0?this.runtimeParams.preferredClickThroughWindow:"new";var r=e&&e.inUserInitiatedIteration;return"new"==t&&r},Creative.prototype.getFeedFields=function(){return FeedData.getCustomFields()},Creative.prototype.getFeedFieldByName=function(e){return FeedData.getCustomFieldByName(e)},Creative.prototype.getAllFeedFieldsByName=function(e){return FeedData.getCustomFields().filter(function(t){return t.name===e})};;
function ExpandableBanner(){}inherit(ExpandableBanner,Creative),ExpandableBanner.toString=function(){return"[Clazz ExpandableBanner]"},ExpandableBanner.prototype.toString=function(){return"[ExpandableBanner "+this.name+"]"},ExpandableBanner.prototype.awake=function(){ExpandableBanner.uber.awake.call(this),this.adapter.wrapRedirectPageUrl=this.wrapRedirectPageUrl.bind(this),this.adapter.getModalUrl=function(e){return creative.getPageUrl(e?e:"modal.html")}.bind(this),this.units.banner.expandAction=function(e,a,n){this._assertAppearBeforeExpand(),"undefined"!=typeof a.destinationPage&&null!==a.destinationPage&&(creative.runtimeParams.goToPageAfterExpand=a.destinationPage),e.track({name:"expandRequested"}),e.trackClickThrough(),creative.adapter.expand(n,a)},this.units.banner.dismissAction=function(e,a,n){e.track({name:"creativeDismissed"}),creative.adapter.dismiss(n,a)},this.units.modal.collapseAction=function(e,a,n){e.track({name:"unitCollapsed"}),creative.adapter.collapse(n,a)},this.units.modal.dismissAction=function(e,a,n){e.track({name:"creativeDismissed"}),creative.adapter.dismiss(n,a)},this.units.banner.trackCreativeDismissed=function(){new ActionContext(this.visibleScreen).track({name:"creativeDismissed"})},this.units.banner.userLocation=this.createUserLocation(!1),this.units.modal.userLocation=this.createUserLocation(!0)};;
var Kernel={};Kernel.toString=function(){return"[Clazz Kernel]"},Kernel.runInParallelAction=function(e,n,t){n.actions.waitForEach(function(n,t){n(e,t)},t)},Kernel.runInParallelActionDryRun=Kernel.runInParallelAction,Kernel.runInBackgroundAction=function(e,n,t){n.action&&n.action(e,noop),t()},Kernel.runInSequenceAction=function(e,n,t){for(var r=t,i=n.actions.length-1;i>=0;i--)r=function(n,t){return function(){t(e,n)}}(r,n.actions[i]);r()},Kernel.runInSequenceActionDryRun=Kernel.runInSequenceAction,Kernel.runNTimesAction=function(e,n){n.caller.hasOwnProperty("executionsLeft")||(n.caller.executionsLeft=n.repeat),n.caller.executionsLeft>0&&(n.caller.executionsLeft--,(n.action||nullai)(e))},Kernel.runNTimesActionDryRun=function(e,n,t){(n.action||nullai)(e,t)},Kernel.loopAction=function(e,n,t){function r(){return 0==i?t():(-1!=i&&i--,void(n.action||nullai)(e,"thumb"===creative.runtimeParams.purpose?t:r))}var i=n.repeat;r()},Kernel.loopActionDryRun=function(e,n,t){(n.action||nullai)(e,t)},Kernel.sleepAction=function(e,n,t){setTimeout(t,n.duration)},Kernel.executeJavascriptAction=function(e,n,t){try{var r=e.initiator,i=e.screen.parentUnit,c=e.screen,a=new Function("ctx","c","unit","screen","variant",n.script.code),o=!1,u=i.getVariantForScreen?i.getVariantForScreen(c):void 0;null!==n.script.code.match(/http:/)&&this._track("executeJavascriptAction.code");var l=function(){o?console.warn('Multiple calls made to "c()" from "'+e.initiator.fieldName+'" Execute JS Action'):(t(),o=!0)}.bind(this);a.call(r,e,l,i,c,u)}catch(s){console.error(s.message+"\n"+s.stack)}},Kernel.randomAction=function(e,n,t){var r=0;if(n.outcomes.forEach(function(e){r+=e.weight}),!r)return t();for(var i=Math.random()*r,c=0;ci)return(a.action||nullai)(e,t)}},Kernel.randomActionDryRun=function(e,n,t){n.outcomes.forEach(function(n){(n.action||nullai)(e)}),t()},Kernel.bestAction=function(e,n,t){var r=creative.experiments.get("Best",[creative.id,n.experimentName]);r.trackExposure();var i=n.outcomes.filter(function(e){return e.experimentVariant==r.chosenVariant})[0],c=i?i:n.outcomes[0];(c.action||nullai)(e,t)},Kernel.bestActionDryRun=function(e,n,t){var r=creative.experiments.get("Best",[creative.id,n.experimentName]),i=n.outcomes.filter(function(e){return e.experimentVariant==r.chosenVariant})[0],c=i?i:n.outcomes[0];(c.action||nullai)(e,t)},Kernel.trackBestVariantSuccessAction=function(e,n,t){var r=creative.experiments.get("Best",[creative.id,n.experimentName]);r.trackSuccess(),creative.adapter.sendToEventMonitor("trackBestVariantSuccess",n.triggerId,e.screen.name,r.chosenVariant,""),t()},Kernel._track=function(e){this._privateApiTracked=this._privateApiTracked||{},this._privateApiTracked[e]||(this._privateApiTracked[e]=!0,creative.track({name:"retiredFeatureUsed",featureType:"loadingInsecureContent",featureName:e}))};;
;
function View(){}extend(View.prototype,EventEmitter),View.prototype.awake=function(){this.node=null,this._loadingCount=null,this._waitingForLoadCallbacks=[],this._isAppearing=!1,this._hasAppearedAtLeastOnce=!1,this._shouldAppear=!1,this.incrementLoadingCount=this.incrementLoadingCount.bind(this),this.decrementLoadingCount=this.decrementLoadingCount.bind(this),this._preloadImage=this._preloadImage.bind(this),this._loadImage=this._loadImage.bind(this),this._trackViewShown=this._trackViewShown.bind(this),this.isTrackable&&this.once("appeared",this._trackViewShown),this.hacks={}},View.prototype.incrementLoadingCount=function(){if(this.loaded)throw"Starting loads after the view has already finished loading?";this._loadingCount++},View.prototype.decrementLoadingCount=function(){if(!this.loading)throw"decrementLoadingCount called while not loading!";if(!--this._loadingCount){this.finishedLoading();for(var e=this._waitingForLoadCallbacks,t=0;t0}}),View.prototype.createNode=function(){this.on("loaded",creative.perf.start("View.load",{clazz:this.constructor.name,name:this.name}).end);var e=document.createElement("div");"undefined"!=typeof creative&&creative.adapter&&creative.adapter.useNativeClickForTapDetection&&(e.style.touchAction="manipulation"),this.localId&&(e.id="celtra-object-"+this.localId);for(var t=this.constructor;t;t=t.uber?t.uber.constructor:void 0)e.className+=" celtra"+t.name.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});return e},View.prototype.getNode=function(e){return this.loaded?e&&defer(e,0,"View.getNode defer finishedLoadingCallback",useAsap()):(e&&this._waitingForLoadCallbacks.push(e),this.node||(this.incrementLoadingCount(),this.node=this.createNode(),defer(this.decrementLoadingCount,0,"View.getNode defer decrementLoadingCount",useAsap()))),this.node},Object.defineProperty(View.prototype,"isAppearing",{get:function(){return this._isAppearing}}),Object.defineProperty(View.prototype,"hasAppearedAtLeastOnce",{get:function(){return this._hasAppearedAtLeastOnce}}),View.prototype.appear=function(){var e="View APPEAR called on "+this.constructor.name+" "+this.localId+" (name="+this.name+")";this.parentContainer&&(e+=" from "+this.parentContainer.constructor.name+" "+this.parentContainer.localId+" (name="+this.parentContainer.name+")"),Logger("events.appear").log(e),this.hidden?this._shouldAppear=!0:this.isAppearing||(this._appear(),this._isAppearing=!0,this._hasAppearedAtLeastOnce=!0,this.emit("appeared"))},View.prototype.disappear=function(){var e="View DISAPPEAR called on "+this.constructor.name+" "+this.localId+" (name="+this.name+")";this.parentContainer&&(e+=" from "+this.parentContainer.constructor.name+" "+this.parentContainer.localId+" (name="+this.parentContainer.name+")"),Logger("events.appear").log(e),this.isAppearing&&(this._disappear(),this._isAppearing=!1,this._shouldAppear=!1,this.emit("disappeared"))},View.prototype.reset=function(){this.isAppearing&&(this._shouldAppear=this.hidden,this._isAppearing=!this.hidden)},View.prototype._appear=function(){},View.prototype._disappear=function(){},View.prototype.appearNestedObjects=function(){this.objects.forEach(function(e){e.appear()},this)},View.prototype.disappearNestedObjects=function(){this.objects.forEach(function(e){e.disappear()},this)},View.prototype._trackViewShown=function(e){var t={name:"viewShown",viewName:this.name,clazz:this.constructor.name};new ActionContext(this,!1).track(extend(t,e))};;
BaseCreativeUnit.prototype.alert=function(e,t){var a=this.size.width,r=this.size.height,l=e.boxWidth||320,n=e.boxHeight||160;e.message=removeHtmlTags(e.message),a>=l&&r>=n?this.showModalDialogInPlacement("alert",e,t):(alert(e.message),t())},BaseCreativeUnit.prototype.prompt=function(e,t){var a=this.size.width,r=this.size.height,l=e.boxWidth||320,n=e.boxHeight||190;if(a>=l&&r>=n)this.showModalDialogInPlacement("prompt",e,t);else{var i=prompt(removeHtmlTags(e.message));t(i)}},BaseCreativeUnit.prototype._getUniqueId=function(){var e=new Date,t=e.getTime()+Math.random();return t},BaseCreativeUnit.prototype.showModalDialogInPlacement=function(e,t,a){var r=this._getUniqueId(),l={};l[r]={attachment:"body",positioning:"screen",type:"layer"},creative.adapter.createPlacements(l,function(){function l(e){13==e.keyCode&&(creative.adapter.destroyPlacement(r),o=null,a(C.value))}function n(e){e.preventDefault(),e.stopPropagation()}function i(t){t.preventDefault(),t.stopPropagation(),creative.adapter.destroyPlacement(r),o=null,"prompt"==e?a(C.value):a()}function s(e){e.preventDefault(),e.stopPropagation(),creative.adapter.destroyPlacement(r),o=null,a(null)}if(window){var o=creative.adapter.placements[r];o.setZIndex("max"),o.setSize("100%","100%"),o.setPosition(0,0);var d=o.createElement("link");d.rel="stylesheet",d.type="text/css",d.href=creative.resourceUrl+"runner-min/clazzes/ModalDialogs-Overlay.css",o.getContainer().appendChild(d);var c=o.createElement("div");addClass(c,"celtra-alert"),c.style.display="none";var p=o.createElement("div");addClass(p,"celtra-alert-dark-overlay"),c.appendChild(p),this.preventScroll(c);var h=o.createElement("div");if(addClass(h,"celtra-alert-box"),t.title&&""!=t.title){var m=o.createElement("h1");addClass(m,"celtra-alert-title"),m.innerHTML=t.title,h.appendChild(m)}if(t.title&&""!=t.title&&t.message&&""!=t.message){var v=o.createElement("hr");addClass(v,"celtra-alert-dark-line"),h.appendChild(v);var u=o.createElement("hr");addClass(u,"celtra-alert-light-line"),h.appendChild(u)}if(t.message&&""!=t.message){var g=o.createElement("div");addClass(g,"celtra-alert-message"),g.innerHTML=t.message,h.appendChild(g)}if("prompt"==e){var C=o.createElement("input");addClass(C,"celtra-alert-input"),C.value=t.defaultValue||"",h.appendChild(C),attach(C,"keypress",l)}var f=o.createElement("div");if(addClass(f,"celtra-alert-ok"),f.innerHTML="OK",h.appendChild(f),this.preventScroll(h),once(f,"touchend",i,!1),"prompt"==e&&t.showCancel){addClass(f,"with-cancel");var y=o.createElement("div");addClass(y,"celtra-alert-cancel"),y.innerHTML="CANCEL",h.appendChild(y),attach(f,"touchstart",n,!1),once(y,"touchend",s,!1)}c.appendChild(h),o.populate(c,function(){o.show();var e=setInterval(function(){"absolute"===celtra.styler.computedCSS(h,"position")&&(computedBoxHeight=parseInt(celtra.styler.computedCSS(h,"height"),10)+parseInt(celtra.styler.computedCSS(h,"paddingTop"),10)+parseInt(celtra.styler.computedCSS(h,"paddingBottom"),10),h.style.marginTop=-computedBoxHeight/2+"px",h.style.opacity=1,clearInterval(e),e=null)},100)})}}.bind(this))},BaseCreativeUnit.prototype.preventScroll=function(e){var t=["mousewheel","touchmove"];t.forEach(function(t){attach(e,t,function(e){e.preventDefault()},!1)})};;
function CreativeUnit(){}inherit(CreativeUnit,BaseCreativeUnit),CreativeUnit.IGNORABLES=BaseCreativeUnit.IGNORABLES,CreativeUnit.DEBUG_EXTRA_PHASE_DELAY=0,CreativeUnit.toString=function(){return"[Clazz CreativeUnit]"},CreativeUnit.prototype.toString=function(){return"[CreativeUnit "+this.name+" ("+this.localId+")]"},Object.defineProperty(CreativeUnit.prototype,"size",{get:function(){var t=this.getAvailableSize();return this.layoutCurrent||this._updateActiveLayout(this._getOrientation(),t.width,t.height),"responsive"===this.sizing?{width:t.width,height:t.height}:{width:this.layoutCurrent.unitSize.width,height:this.layoutCurrent.unitSize.height}},set:function(){}}),Object.defineProperty(CreativeUnit.prototype,"unitAlignment",{get:function(){return"undefined"==typeof this.layoutCurrent.unitAlignment?{}:this.layoutCurrent.unitAlignment}}),Object.defineProperty(CreativeUnit.prototype,"layoutCurrent",{get:function(){return this.layouts[this.layoutCurrentIndex]}}),Object.defineProperty(CreativeUnit.prototype,"hasOverflow",{get:function(){return this.screens.concat([this.master]).filter(function(t){return t.showOverflow}).length>0}}),Object.defineProperty(CreativeUnit.prototype,"hasScreens",{get:function(){return this.screens.length>0}}),CreativeUnit.prototype._getDestinationScreen=function(){var t=this.hasScreens?this.screens[0]:this.master;if("modal"==this.name&&"undefined"!=typeof creative.runtimeParams.goToPageAfterExpand){var e=creative.runtimeParams.goToPageAfterExpand;if("string"!=typeof e)throw new TypeError("Only string type is allowed to reference destination screen!");var i=this.screens.filter(function(t){return t.title===e});i.length>0&&(t=i[0])}return t},CreativeUnit.prototype.awake=function(){var t=this;CreativeUnit.uber.awake.call(this),this.currentScreen=null,this.visibleScreen=null,this._masterShown=!1,this.overflowsY=!1,this.layoutCurrentIndex=null,this.screens.forEach(function(t){t.objects.forEach(function(t){t.zIndex+=ScreenObject._zIndexOffset})}),"undefined"==typeof this.backgroundColor&&(this.backgroundColor="#000000"),"undefined"==typeof this.usePlaceboBar&&(this.usePlaceboBar=!1),"undefined"==typeof this.showCloseButton&&(this.showCloseButton=!1),"undefined"==typeof this.alignBackButtonHorizontal&&(this.alignBackButtonHorizontal="left"),this.on("_firstScreenLoaded",function(){t.placeboBar&&(t.placeboBar.parentNode.removeChild(t.placeboBar),t.placeboBar=null),this._setVisibleScreen(this._getDestinationScreen())}.bind(this)),this.onAll("_firstScreenLoaded _unitFirstShown",function(){this.goToScreen(this._getDestinationScreen())}.bind(this)),this.triggerOrientationChange=this.triggerOrientationChange.bind(this),this.updateWindowMetrics=this.updateWindowMetrics.bind(this),this.hacks.triggerBlurWhenTappingOutsideOfInputs=ios()},CreativeUnit.prototype.setAvailableSize=function(t,e){var i=CreativeUnit.uber.setAvailableSize.apply(this,arguments),n=this._getOrientation(),o=this.layouts[this.layoutCurrentIndex];this._updateActiveLayout(n,t,e),this.updateWindowMetrics(n,t,e);var r=this._previousOrientation&&n!=this._previousOrientation,s=o&&o.orientation!=this.layoutCurrent.orientation;(r||s)&&this.triggerOrientationChange(),this._previousOrientation=n,(i||s)&&this.emit("resize")},CreativeUnit.prototype._getOrientation=function(){return creative.adapter.orientation%180===0?"portrait":"landscape"},CreativeUnit.prototype._updateActiveLayout=function(t,e,i){{var n=this.layouts.slice(),o=this.layoutCurrentIndex;this.layouts[o]||null}n.forEach(function(n){n.sortIndex=0,"independent"==n.orientation?n.sortIndex+=1:n.orientation!=t&&(n.sortIndex+=4e3),n.minSize.width>e&&(n.sortIndex+=2e3),n.minSize.height>i&&(n.sortIndex+=2e3),n.sortIndex+=Math.abs(n.minSize.width-e)+Math.abs(n.minSize.height-i)}),n.sort(function(t,e){return t.sortIndex-e.sortIndex}),this.layoutCurrentIndex=this.layouts.indexOf(n[0]),o!=this.layoutCurrentIndex&&this.emit("layoutChanged")},CreativeUnit.prototype.enterRenderTree=function(){if(!this._isRendering){this._isRendering=!0;var t=this.getAvailableSize();this.updateWindowMetrics(this._getOrientation(),t.width,t.height),this.master&&(this.master.loaded?defer(this.master.enterRenderTree.bind(this.master),void 0,void 0,useAsap()):this.once("_firstScreenLoaded",this.master.enterRenderTree.bind(this.master))),this.visibleScreen&&defer(this.visibleScreen.enterRenderTree.bind(this.visibleScreen),void 0,void 0,useAsap()),this.hacks.triggerBlurWhenTappingOutsideOfInputs&&(attach(this.node,"touchstart",function(t){-1==["INPUT","TEXTAREA","SELECT"].indexOf(t.target.nodeName)&&null!=this.lastInputElementFocused&&this.lastInputElementFocused.blur()}.bind(this),!0),attach(this.node,"focus",function(t){["INPUT","TEXTAREA","SELECT"].indexOf(t.target.nodeName)>-1&&(this.lastInputElementFocused=t.target)}.bind(this),!0),attach(this.node,"blur",function(t){["INPUT","TEXTAREA","SELECT"].indexOf(t.target.nodeName)>-1&&(this.lastInputElementFocused=null)}.bind(this),!0))}},CreativeUnit.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.master&&this.master.exitRenderTree(),this.visibleScreen&&this.visibleScreen.exitRenderTree())},CreativeUnit.prototype._appear=function(){this.loaded||Creative._throw("Cannot show the unit before it has finished loading."),this.isAppearing&&Creative._throw("The unit is already appearing."),this.node.parentNode||Creative._throw("Creative unit must be added to DOM before show() is called. Animations will start on show()."),Logger("unit").log("Showing "+this),this.inView&&(this.inView.start(),this.currentScreen&&this.currentScreen.inView&&this.currentScreen.inView.start()),this.hasAppearedAtLeastOnce||(this.placeboBar&&this.placeboBar.start(),this._orientationLockIsOn?this._emitUnitFirstShownAfterOrientationPrompt=!0:this.emit("_unitFirstShown"))},CreativeUnit.prototype._disappear=function(){this.isAppearing||Creative._throw("The unit is not appearing, can not disappear."),Logger("unit").log("Hiding "+this),this.inView&&this.inView.stop()},CreativeUnit.prototype.createNode=function(){var t=this.unitDiv=CreativeUnit.uber.createNode.call(this);if(t.id="celtra-"+this.name.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}),Color.isGradient(this.backgroundColor)?addCssRule("#"+t.id,Color.createGradientStyle(this.backgroundColor)):t.style.backgroundColor=this.backgroundColor,t.style.overflow=this.master.showOverflow?"visible":"hidden",this.screenContainer=document.createElement("div"),this.screenContainer.className="celtra-screen-container",this.screenContainer.style.position="absolute",t.appendChild(this.screenContainer),this.screenHolder=document.createElement("div"),this.screenHolder.className="celtra-screen-holder",this.screenHolder.style.width="100%",this.screenHolder.style.height="100%",this.screenContainer.appendChild(this.screenHolder),t.style.position="absolute",this.usePlaceboBar){var e=this.loadingScreen&&this.loadingScreen.loaderColor||"white";this.placeboBar=new PlaceboBar(5e3,.9,200,e),this.screenContainer.appendChild(this.placeboBar)}if(this.showCloseButton){if(this.closeAction||Creative._throw("Close button requested, but no close action defined?"),this.closeButtonType&&"text"===this.closeButtonType){var i=document.createElement("div");i.className="celtra-close-button touchable celtra-close-button-text",i.textContent=this.closeButtonText,i.style.color=this.closeButtonTextColor,this.unitDiv.appendChild(i)}else{var i=document.createElement("img"),n=document.createElement("img");this.closeButtonUp?(this.closeButtonDown||(this.closeButtonDown=this.closeButtonUp),this.closeButtonWidth&&this.closeButtonHeight&&(i.style.width=n.style.width=this.closeButtonWidth+"px",i.style.height=n.style.height=this.closeButtonHeight+"px")):(this.closeButtonUp=new File("runner/clazzes/CreativeUnit/close-up.svg"),this.closeButtonDown=new File("runner/clazzes/CreativeUnit/close-down.svg")),i.className="celtra-close-button touchable celtra-close-button-up",this._preloadImage(this.closeButtonUp,{force:!1},function(t,e){i.src=e}),n.className="celtra-close-button celtra-close-button-down",this._preloadImage(this.closeButtonDown,{force:!1},function(t,e){n.src=e}),this.closeButtonImage=i,this.closeButtonImagePressed=n,this.unitDiv.appendChild(this.closeButtonImage),this.unitDiv.appendChild(this.closeButtonImagePressed)}attach(i,"tap",function(){var t=this.currentScreen||this.visibleScreen;this.closeAction(t?new ActionContext(t,!0):null,{},noop)}.bind(this),!1)}var o=[];o.push({name:"loading",fun:function(t){if(this.loadingScreen){var e=creative.perf.start("CreativeUnit.loadingScreen");this.loadingScreen.getNode(function(){defer(function(){e.end(),this._setVisibleScreen(this.loadingScreen),t(!0)}.bind(this),CreativeUnit.DEBUG_EXTRA_PHASE_DELAY,"CreativeUnit.createNode defer loading phase completion",useAsap())}.bind(this))}else t(!1)}.bind(this)}),o.push({name:"interactive",fun:function(t){var e=creative.perf.start("CreativeUnit.firstScreenLoaded"),i=this.hasScreens?2:1,n=function(){--i||defer(function(){e.end(),defer(this.emits("_firstScreenLoaded"),0,"CreativeUnit.createNode emit _firstScreenLoaded",useAsap()),t(!0)}.bind(this),CreativeUnit.DEBUG_EXTRA_PHASE_DELAY,"CreativeUnit.createNode defer onScreenLoaded",useAsap())}.bind(this);this.hasScreens&&this._getDestinationScreen().getNode(n),this.master.getNode(n)}.bind(this)}),this.incrementLoadingCount();var r=!1,s=function(){r||Creative._throw("Unit still not ready to show after last phase?!")};return o.reverse().forEach(function(t){var e=s;s=function(){Logger("unit").log("Phase '"+t.name+"' started."),t.fun(function(i){Logger("unit").log("Phase '"+t.name+"' finished, "+(i?"DID":"DID NOT")+" draw something."),i&&(r||(r=!0,this.decrementLoadingCount())),e()}.bind(this))}.bind(this)}.bind(this)),s(),t},CreativeUnit.prototype._repositionCloseButton=function(t){function e(t,e,i){function n(t){return{left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}var o=n(i),r=n(e),s=n(t);s.left=r.left+r.width-s.width,s.top=r.top;var a=o.left<=s.left&&s.left+s.width-1-1,r=!1,a=!1,s=500;return n?(clearTimeout(i.shakeTimeout),i.shakeStartTime||(i.shakeStartTime=new Date),r=t.duration&&(new Date).getTime()-i.shakeStartTime.getTime()>=t.duration,i.shakeTimeout=setTimeout(function(){delete i.shakeStartTime,i.triggered=!1},s),r&&!i.triggered&&(a=!0,i.triggered=!0),a):!1},null,t)}},Screen.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit("enteredRenderTree"))},Screen.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.emit("exitedRenderTree"))},Screen.prototype._updateSize=function(){this.emit("resize")},Screen.prototype.finishedLoading=function(){Screen.uber.finishedLoading.call(this),Logger("unit").log("Finished loading "+this)},Screen.prototype.triggerBeforeAppear=function(e){var t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&!this.appearedAtLeastOnce&&(this.isFirstScreen()||this.isMasterScreen())});this.fireTriggers("beforeAppear",null,e,t)},Screen.prototype.triggerOrientationChange=function(e){this.fireTriggers("orientationChange",null,e)},Screen.prototype.getMaxZIndex=function(){var e=0;return this.objects.forEach(function(t){t.zIndex>e&&(e=t.zIndex)}),e},Screen.prototype.inViewTriggerSetup=function(){var e=!1;this.triggers.forEach(function(t){("enterView"===t.type||"leaveView"===t.type)&&(e=!0,this.inViewAreaRatio=0)},this),e&&this.inView.on("areaInViewRatioChanged",this.triggerInView.bind(this))},Screen.prototype.triggerInView=function(e){var t=new ActionContext(this),i="enterView",n=this.inViewAreaRatio,r=e,a=function(e,t){return e.parameters.area-t.parameters.area};e=n&&r>=t},null,t,a),this._getTriggers(i,function(e){var t=e.area/100;return t>=n&&r>=t}),this.inViewAreaRatio=e},Screen.prototype.getActionsExecutedOnAppear=function(){var e=!this.appearedAtLeastOnce,t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&e&&(this.isFirstScreen()||this.isMasterScreen())}),i=this.fireTriggersDryRun("beforeAppear",null,noop,t);return e&&(i=i.concat(this.fireTriggersDryRun("firstAppear",null,noop,t))),i.concat(this.fireTriggersDryRun("appear",null,noop,t))},Screen.prototype.resetAction=function(e,t,i){var n=this.findAll(),r=n.length;r?n.forEach(function(n){n.resetAction(e,t,function(){--r||i()})}):i()},Screen.prototype.shuffleAction=function(e,t,i){function n(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return e}var r=n(t.objects.map(function(e){return JSON.parse(JSON.stringify(e.layoutSpecificValues))}));t.objects.forEach(function(e,t){e.layoutSpecificValues.forEach(function(e,i){e.position=r[t][i].position}),e._refreshDisplayState()}),i&&i()},Screen.prototype._trackViewShown=function(){Screen.uber._trackViewShown.call(this,{isMasterScreen:this.isMasterScreen(),isLoadingScreen:this.isLoadingScreen()})};;
function NestedContainer(){}inherit(NestedContainer,ScreenObjectContainer),extend(NestedContainer.prototype,TriggerHost),NestedContainer.toString=function(){return"[Clazz NestedContainer]"},NestedContainer.prototype.toString=function(){return"[NestedContainer "+this.localId+"]"},NestedContainer.prototype.createNode=function(){var e=NestedContainer.uber.createNode.call(this);return this.node=e,this._updateSize=this._updateSize.bind(this),this.enterRenderTree=this.enterRenderTree.bind(this),this.exitRenderTree=this.exitRenderTree.bind(this),this.parentObject.on("enteredRenderTree",this.enterRenderTree),this.parentObject.on("exitedRenderTree",this.exitRenderTree),this.objects.forEach(function(t){this.incrementLoadingCount(),e.appendChild(t.getNode(this.decrementLoadingCount))}.bind(this)),0===this.objects.length&&(e.className+=" empty"),this.parentObject.parentContainer.on("resize",this._updateSize),e},NestedContainer.prototype.redrawLayout=function(){this.node.style.width=this.layoutCurrent.size.width,this.node.style.height=this.layoutCurrent.size.height,this.node.style.position="relative",this.node.style.overflow="hidden"},NestedContainer.prototype._updateSize=function(){this.redrawLayout(),this.emit("resize")},NestedContainer.prototype.enterRenderTree=function(){this.emit("enteredRenderTree"),this._updateSize()},NestedContainer.prototype.exitRenderTree=function(){this.emit("exitedRenderTree")},NestedContainer.prototype.onFocus=function(e){this.hasTriggers("itemFocus")&&this.fireTriggers("itemFocus",null,e,new ActionContext(this.parentObject))},NestedContainer.prototype.onBlur=function(e){this.hasTriggers("itemBlur")&&this.fireTriggers("itemBlur",null,e,new ActionContext(this.parentObject))},Object.defineProperty(NestedContainer.prototype,"layoutCurrent",{get:function(){return this.layoutSpecificValues[this.parentUnit.layoutCurrentIndex]}}),Object.defineProperties(NestedContainer.prototype,{size:{get:function(){var e,t=this.layoutCurrent.size,i=parseFloat(t.width),n=parseFloat(t.height);return t.width.toString().indexOf("%")>-1&&(e=this.parentObject.getNaturalSize(),i=e.width*i/100),t.height.toString().indexOf("%")>-1&&(e||(e=this.parentObject.getNaturalSize()),n=e.height*n/100),{width:Math.round(i),height:Math.round(n)}}}});;
function ScreenObject(){}inherit(ScreenObject,View),extend(ScreenObject.prototype,TriggerHost),extend(ScreenObject.prototype,DiscoverableTrait),extend(ScreenObject.prototype,ClickPreventer),ScreenObject.requiresRedrawToTriggerAnimationEvents=android("4.0"),ScreenObject.redrawTriggerInterval=60,ScreenObject.toString=function(){return"[Clazz ScreenObject]"},ScreenObject.prototype.toString=function(){return"[ScreenObject "+this.localId+" (name="+this.name+")]"},ScreenObject.allowPositioningAndSizingUsingTransforms=!android("2.2","2.3")||celtra.iframe(),ScreenObject._zIndexOffset=1e4,ScreenObject._resettableProperties=["position","size","rotation","zIndex","opacity","hidden"],ScreenObject._3dTransformBlacklisted=function(t){return/Silk\/\d|Kindle Fire| KFTT | KFOT | KFJWI | KFJWA |\bGT-P3100\b| HTC[ _]One[ _]S /.test(t)||/\bGT-I9300\b/.test(t)&&android("4.0")}(navigator.userAgent),ScreenObject.supports3d=function(){var t="WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MSCSSMatrix"in window||/Gecko\//.test(navigator.userAgent);return t&&!this._3dTransformBlacklisted}(),ScreenObject.requires3dTranslateForPositioning=/GT-I9500|GT-I9505|SM-N900|GT-P5210|SM-T520/.test(navigator.userAgent),ScreenObject.dummyImageSpacer=windows("10"),ScreenObject._toPositionPx=function(t,e,i){var n,r,o,s,a=i.width,c=i.height,h=e.width,u=e.height;return["left","right","hcenter"].forEach(function(e){e in t&&(n=e)}),["bottom","top","vcenter"].forEach(function(e){e in t&&(r=e)}),o=t[n],s=t[r],o=o.indexOf("%")>-1?a*parseFloat(o)/100:parseFloat(o),"hcenter"===n?o=(a-h)/2+o:"right"===n&&(o=a-(o+h)),s=s.indexOf("%")>-1?c*parseFloat(s)/100:parseFloat(s),"vcenter"===r?s=(c-u)/2+s:"bottom"===r&&(s=c-(s+u)),{x:ScreenObject._roundIfNeeded(o),y:ScreenObject._roundIfNeeded(s)}},ScreenObject._toSizePx=function(t,e){var i=parseFloat(t.width),n=parseFloat(t.height),r=e.width,o=e.height;return t.width.toString().indexOf("%")>-1&&(i=r*i/100),t.height.toString().indexOf("%")>-1&&(n=o*n/100),{width:ScreenObject._roundIfNeeded(i),height:ScreenObject._roundIfNeeded(n)}},ScreenObject._roundIfNeeded=function(t){return Math.round(t)},Object.defineProperty(ScreenObject.prototype,"layoutCurrent",{get:function(){return null==this.layoutCurrentIndex?this.layoutSpecificValues[0]:this.layoutSpecificValues[this.layoutCurrentIndex]},enumerable:!0,configurable:!1}),Object.defineProperty(ScreenObject.prototype,"layoutCurrentIndex",{get:function(){return this.parentUnit.layoutCurrentIndex},enumerable:!0,configurable:!1}),ScreenObject._Position=function(t,e){this._instance=t,this._position=e},Object.defineProperties(ScreenObject._Position.prototype,{x:{get:function(){return this._position.x},set:function(t){delete this._instance.layoutCurrent.right,delete this._instance.layoutCurrent.hcenter,this._instance.layoutCurrent.position.left=t+("number"==typeof t?"px":"")}},y:{get:function(){return this._position.y},set:function(t){delete this._instance.layoutCurrent.bottom,delete this._instance.layoutCurrent.vcenter,this._instance.layoutCurrent.position.top=t+("number"==typeof t?"px":"")}}}),ScreenObject._Size=function(t,e){this._instance=t,this._size=e},Object.defineProperties(ScreenObject._Size.prototype,{width:{get:function(){return this._size.width},set:function(t){this._instance.layoutCurrent.size.width=t+("number"==typeof t?"px":"")}},height:{get:function(){return this._size.height},set:function(t){this._instance.layoutCurrent.size.height=t+("number"==typeof t?"px":"")}}}),Object.defineProperties(ScreenObject.prototype,{position:{get:function(){var t=ScreenObject._toPositionPx(this.layoutCurrent.position,this.size,this.parentContainer.size);return new ScreenObject._Position(this,t)},set:function(t){delete this.layoutCurrent.position.right,delete this.layoutCurrent.position.hcenter,delete this.layoutCurrent.position.bottom,delete this.layoutCurrent.position.vcenter,this.layoutCurrent.position.left=t.left,this.layoutCurrent.position.top=t.top}},originalSize:{get:function(){var t=this.layoutCurrentIndex||0;return ScreenObject._toSizePx(JSON.parse(this.originalLayoutSpecificValues)[t].size,this.parentContainer.size)},set:function(){throw new Error("originalSize is not settable!")}},size:{get:function(){var t=ScreenObject._toSizePx(this.layoutCurrent.size,this.parentContainer.size);return new ScreenObject._Size(this,t)},set:function(t){this.layoutCurrent.size.width=t.width,this.layoutCurrent.size.height=t.height}},opacity:{get:function(){return this.layoutCurrent.opacity},set:function(t){this.layoutCurrent.opacity=t}},rotation:{get:function(){return this.layoutCurrent.rotation},set:function(t){this.layoutCurrent.rotation=t}},hidden:{get:function(){return this.layoutCurrent.hidden},set:function(t){this.layoutSpecificValues.forEach(function(e){e.hidden=t})}}}),ScreenObject.getCSSTranslate=function(t,e){return ScreenObject.requires3dTranslateForPositioning?"translate3d("+t+"px,"+e+"px, 0)":"translate("+t+"px,"+e+"px)"},ScreenObject.prototype.awake=function(){ScreenObject.uber.awake.call(this),this.originalLayoutSpecificValues=JSON.stringify(this.layoutSpecificValues),this.originalZIndex=this.zIndex,this.finishAnimation=this.finishAnimation.bind(this),this._refreshDisplayState=this._refreshDisplayState.bind(this)},ScreenObject.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit("enteredRenderTree"))},ScreenObject.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this._isInMouseOver&&trigger(this.node,"mouseout",!1),this.emit("exitedRenderTree"))},ScreenObject.prototype.react=function(t){var e=this.parentUnit.getRxStateObject(),i=function(){this._isRendering&&t.call(this,e)}.bind(this);null!==e&&(this._rxListeners.push(i),Ticker.frame(i,"render"))},ScreenObject.prototype.appearNestedObjects=function(){this.getNestedContainers().forEach(function(t){t.appear(),t.appearNestedObjects(t.objects)},this)},ScreenObject.prototype.disappearNestedObjects=function(){this.getNestedContainers().forEach(function(t){t.disappearNestedObjects(t.objects),t.disappear()},this)},ScreenObject.prototype.initTemplates=function(){var t=this.templates={},e=this.constructor.templates;if(e){for(var i in e)"string"==typeof e[i]&&(e[i]=tmpl(e[i]));extend(t,e)}},ScreenObject.prototype.tmpl=function(t,e,i){this.templates||this.initTemplates();var n=this.templates[t];return n?n.call(i||this,e):"Missing template: "+t},ScreenObject.prototype.template=function(t,e,i){var n,r=document.createElement("div");r.innerHTML=this.tmpl(t,e);var o=r.firstChild;if(i)for(;n=r.firstChild;)i.appendChild(n);return o},ScreenObject.prototype.ifNotClosing=function(t,e,i){var n=this.fireTriggersDryRun(t,null,noop,e)._actions,r=["dismiss","collapse"],o=!n.some(function(t){return r.indexOf(t.method)>-1});o&&i()},ScreenObject.prototype.createNode=function(){this._isInMouseOver=!1;var t=this,e=ScreenObject.uber.createNode.call(t);e.style.position="absolute",this.hasTriggers("tap")&&(addClass(e,"touchable"),attach(e,"tap",function(){var e=new ActionContext(t,!0);t.ifNotClosing("tap",e,e.trackUserInteraction),t.fireTriggers("tap",null,null,e)},!1));var i="mouseOver",n=[];if(this.hasTriggers(i)){var r=this._getTriggers(i,null),o=[],s=noop;r.forEach(function(t){t.parameters&&t.parameters.delay&&o.indexOf(t.parameters.delay)<0&&o.push(t.parameters.delay)}),attach(e,"mouseover",function(){var e=new ActionContext(t,!0),r=function(n){return function(){t.fireTriggers(i,function(t){return t.delay==n},null,e)}};t._isInMouseOver=!0,o.forEach(function(t,e){s=r(t),n[e]=setTimeout(s,t)})},!1)}return attach(e,"mouseout",function(){var e=new ActionContext(t,!0);t._isInMouseOver=!1,n.forEach(clearTimeout),n=[],t.hasTriggers("mouseOut")&&t.fireTriggers("mouseOut",null,null,e)},!1),attach(e,"touchstart",function(){if(t.hasTriggers("touchstart")){var e=new ActionContext(t,!0);t.ifNotClosing("touchstart",e,e.trackUserInteraction),t.fireTriggers("touchstart",null,null,e)}},!1),attach(e,"touchend",function(){if(t.hasTriggers("touchend")){var e=new ActionContext(t,!0);t.ifNotClosing("touchend",e,e.trackUserInteraction),t.fireTriggers("touchend",null,null,e)}},!1),this.hasTriggers("swipe")&&(attach(e,"touchstart",function(t){t.stopPropagation()}),new SwipeListener({target:e,swipeNodeGetter:function(){return this.parentUnit.node}.bind(this),swipe:function(e,i){var n=new ActionContext(t,!0);t.fireTriggers("swipe",function(r){var o=e==r.direction&&i>=r.length;return o&&t.ifNotClosing("swipe",n,n.trackUserInteraction),o},null,n)}})),attach(e,"transitionend",function(t){t.stopPropagation()},!1),this.parentContainer.on("resize",this._refreshDisplayState),this.parentContainer.on("enteredRenderTree",function(){this.hidden||this.enterRenderTree()}.bind(this)),this.parentContainer.on("exitedRenderTree",function(){this.hidden||this.exitRenderTree()}.bind(this)),this.layoutPrevious=this.layoutCurrent,this.parentUnit.on("layoutChanged",this.handleLayoutChanged.bind(this)),this.initClickPrevention(function(){return this.node}.bind(this)),this._applyStyles(e,this._calculateNewStyleAttributes()),this.positionUsingTransforms()||deviceInfo.browser.safari("9.0.0",null)||(e.style.outline="1px solid transparent"),this._rxListeners=[],e},ScreenObject.prototype.positionUsingTransforms=retFalse,ScreenObject.prototype.sizeUsingTransforms=retFalse,ScreenObject.prototype.isValid=retTrue,ScreenObject.prototype.getNaturalSize=function(){return this.originalSize},ScreenObject.prototype._calculateNewStyleAttributes=function(){var t={transform:"",transformOrigin:"50% 50%"},e=this.getNaturalSize(),i=this.position.x,n=this.position.y;if(this.sizeUsingTransforms()&&(i+=ScreenObject._roundIfNeeded((this.size.width-e.width)/2),n+=ScreenObject._roundIfNeeded((this.size.height-e.height)/2)),this.positionUsingTransforms()?(t.left="0",t.top="0",(i||n)&&(t.transform+=ScreenObject.getCSSTranslate(i,n))):(t.left=i+"px",t.top=n+"px"),(this.isAnimated||0!=this.rotation)&&(t.transform+=" rotate("+this.rotation+"deg) "),this.sizeUsingTransforms()){t.width=e.width+"px",t.height=e.height+"px";var r=this.size.width/e.width,o=this.size.height/e.height;t.transform+=" scale("+r+", "+o+")"}else t.width=this.size.width+"px",t.height=this.size.height+"px";return t.zIndex=this.zIndex,t.opacity=this.opacity,t.display=this.hidden?"none":"block",t},ScreenObject.prototype._applyStyles=function(t,e){e&&Object.keys(e).forEach(function(i){celtra.styler.css(t,i,e[i])})},ScreenObject.prototype._refreshDisplayState=function(){if(this.node){var t=this._calculateNewStyleAttributes(),e=!1;for(var i in t){var n=String(t[i]).replace(/^\s*|\s*$/g,""),r=celtra.styler.css(this.node,i),o=null;celtra.styler.css(this.node,i)!==n&&(o=n,r!=o&&"zIndex"!=i&&"display"!=i&&(e=!0))}return this._applyStyles(this.node,t),this.redrawLayout(),e}},ScreenObject.prototype.finishAnimation=function(){this.node&&void 0!==celtra.styler.css(this.node,"transitionDuration")&&(celtra.styler.css(this.node,"transitionDuration","1ms"),this.node.offsetWidth,celtra.styler.css(this.node,"transitionDuration",""))},ScreenObject.prototype.handleLayoutChanged=function(){var t=function(){this.layoutPrevious.hidden&&!this.layoutCurrent.hidden?this.enterRenderTreeAndAppear(!0):!this.layoutPrevious.hidden&&this.layoutCurrent.hidden&&this.parentContainer._isRendering&&this.exitRenderTree(),this.layoutPrevious=this.layoutCurrent}.bind(this);ios()?defer(t):t(),this.finishAnimation(),this._refreshDisplayState()},ScreenObject.prototype.redrawLayout=function(){},ScreenObject.prototype._preloadImage=function(t,e,i){if(!(t instanceof File))throw"file is not a File";"function"==typeof e?(i=e,e={}):"undefined"==typeof e&&(e={}),e.creativeUnitVariantId=this.parentScreen.parentContainer.localId,ScreenObject.uber._preloadImage.call(this,t,e,i)},ScreenObject.prototype.setPosition=function(t,e){this.position={left:t+"px",top:e+"px"},this._refreshDisplayState()},ScreenObject.prototype.getPosition=function(){return{x:this.position.x,y:this.position.y}},ScreenObject.prototype.setSize=function(t,e){this.size.width=t,this.size.height=e,this._refreshDisplayState()},ScreenObject.prototype.getSize=function(){return{width:this.size.width,height:this.size.height}},ScreenObject.prototype.setOpacity=function(t){this.opacity=t,this._refreshDisplayState()},ScreenObject.prototype.getOpacity=function(){return this.opacity},ScreenObject.prototype.animateAction=function(t,e,i){function n(t){return!isNaN(parseFloat(t))&&isFinite(t)}function r(t){var e={position:{},size:{width:null,height:null},zIndex:null,opacity:null,rotation:null};return deep(e,t),e}function o(t,e){var i=e.size,n=t.size;null==i.width&&(i.width=n.width),null==i.height&&(i.height=n.height),t.size=i;var r=t.position,o=e.position,s=null,a=null,c=null,h=null;["left","right","hcenter"].forEach(function(t){t in r&&(s=t),t in o&&(c=t)}),["bottom","top","vcenter"].forEach(function(t){t in r&&(a=t),t in o&&(h=t)}),c&&null!==o[c]&&(delete r[s],r[c]=o[c]),h&&null!==o[h]&&(delete r[a],r[h]=o[h]),null!=e.rotation&&(t.rotation=e.rotation),null!=e.opacity&&(t.opacity=e.opacity),null!=e.zIndex&&(t.zIndex=e.zIndex)}i=i||noop,this.isAnimated=!0;var s="undefined"!=typeof e.duration?e.duration:1e3,a=e.timingFunction||"linear";if(e.layoutSpecificValues)e.layoutSpecificValues.forEach(function(t,e){this.layoutSpecificValues[e]&&o(this.layoutSpecificValues[e],r(t))}.bind(this));else{var c=r(e.properties);null!=c.position.x&&(c.position.left=c.position.x+"px"),null!=c.position.y&&(c.position.top=c.position.y+"px"),null!=c.zIndex&&(c.zIndex=c.zIndex+ScreenObject._zIndexOffset,this.zIndex=c.zIndex),null!=c.size.width&&n(c.size.width)&&(c.size.width+="px"),null!=c.size.height&&n(c.size.height)&&(c.size.height+="px"),o(this.layoutCurrent,c)}var h=this.node;celtra.styler.css(h,"transition",""),celtra.styler.css(h,"transitionProperty","all"),celtra.styler.css(h,"transitionDuration",s+"ms"),celtra.styler.css(h,"transitionTimingFunction",a);var u=this._refreshDisplayState();if(s>0&&u){var l=!1,p=function(){l||(l=!0,i())};ScreenObject.requiresRedrawToTriggerAnimationEvents&&!function(){var t=Date.now(),e=t+(Number(s)||0),i=function(){flash(),Date.now()0?s:0;setTimeout(i,d)}},ScreenObject.prototype.enterRenderTreeAndAppear=function(t){t&&this.parentScreen._isRendering&&this.enterRenderTree(),t&&!this.isAppearing&&this._shouldAppear&&this.appear()},ScreenObject.prototype.scaleAction=function(t,e,i){var n=e.useOriginalSize?this.originalSize:this.size,r=e.scale/100,o={width:n.width*r,height:n.height*r},s={x:this.position.x+this.size.width/2-o.width/2,y:this.position.y+this.size.height/2-o.height/2};this.animateAction(t,{properties:{position:s,size:o},duration:e.duration,timingFunction:e.timingFunction},i)},ScreenObject.prototype.showAction=function(t,e,i){var n=this.hidden;this.hidden=!1,this.node.style.display="block",this.enterRenderTreeAndAppear(n),this.node.offsetWidth,nextFrame(i)},ScreenObject.prototype.hideAction=function(t,e,i){var n=this.hidden;this.hidden=!0,this.node.style.display="none",!n&&this.parentScreen._isRendering&&(this.isAppearing&&(this.disappear(),this._shouldAppear=!0),this.exitRenderTree()),setTimeout(i,0)},ScreenObject.prototype.isHidden=function(){return this.hidden},ScreenObject.prototype.resetAction=function(t,e,i){this.layoutSpecificValues=JSON.parse(this.originalLayoutSpecificValues),this.reset(),this.zIndex=this.originalZIndex,this.finishAnimation(),this._refreshDisplayState(),defer(i)},ScreenObject.prototype.addStyle=function(t){var e="#celtra-object-"+this.localId,i=this.node,n=/^:(link|visited|active|hover|focus|first-child|nth-child|nth-last-child|nth-of-type|first-of-type|last-of-type|empty|target|checked|enabled|disabled)/,r=/,\s*/g;this.styleNode||(this.styleNode=document.createElement("style"),i||(i=document.getElementsByTagName("head")[0]),i.appendChild(this.styleNode));var o=[];for(var s in t)o.push({selector:s.split(r).map(function(t){return e+(n.test(t)?"":" ")+t}).join(","),attributes:t[s]});var a=this._styleSheetTemplate({rules:o});this.styleNode.textContent+=a},ScreenObject.prototype._styleSheetTemplate=tmpl("<% for (var i = 0; i < rules.length; i++) { %><%= rules[i].selector %> { <%= rules[i].attributes %> }\n<% } %>"),ScreenObject.prototype.css=function(t,e){"undefined"==typeof e&&(e=t,t=this.getNode()),Object.keys(e).forEach(function(i){celtra.styler.css(t,i,e[i])})},ScreenObject.prototype.getNestedContainers=function(){return[]},ScreenObject.prototype.getActiveContainers=function(){return this.getNestedContainers()};;
function Group(){}inherit(Group,ScreenObject),Group.toString=function(){return"[Clazz Group]"},Group.prototype.toString=function(){return"[Group "+this.localId+"]"},Group.prototype.createNode=function(){var t=Group.uber.createNode.call(this);return this.incrementLoadingCount(),t.appendChild(this.content.getNode(this.decrementLoadingCount)),t},Group.prototype.getNestedContainers=function(){return[this.content]},Group.prototype.positionUsingTransforms=ios("8")?retFalse:retTrue,Group.prototype.sizeUsingTransforms=retTrue,Group.prototype.getNaturalSize=function(){return this.originalSize},Group.prototype._appear=function(){this.appearNestedObjects()},Group.prototype._disappear=function(){this.disappearNestedObjects()};var ObjectGroup=Group;;
function Picture(){}inherit(Picture,ScreenObject),Picture.toString=function(){return"[Clazz Picture]"},Picture.prototype.toString=function(){return"[Picture "+this.localId+"]"},Picture.prototype.createNode=function(){var e=new File("runner/image-placeholder.png");e.meta={height:28,width:28},this.file||(this.file=e);var i={};this._useDynamicImage="feed"===this.assetSource&&null!=this.feedFieldKey&&"string"==typeof creative.runtimeParams.dynamicContent[this.feedFieldKey],"feed"===this.assetSource&&FeedData.checkAndTrackValue(this.feedFieldKey,this.constructor.name),this._useDynamicImage&&(this.file=null,FeedData.isCorrectFieldType(this.feedFieldKey,this.constructor.name)&&(this.file=new File,this.file.url=creative.runtimeParams.dynamicContent[this.feedFieldKey],this.file.meta=ScreenObject._toSizePx(this.layoutCurrent.size,this.parentContainer.size),i.force=!1));var t=Picture.uber.createNode.call(this);return this.file===e?(("feed"!=this.assetSource||"feed"===this.assetSource&&null===this.feedFieldKey)&&(addClass(t,"empty"),this._preloadImage(new File("runner/image-placeholder.png"),{force:!1},function(e,i){t.style.backgroundImage="url("+i+")"})),t):(this.file&&this._preloadImage(this.file,i,this._handlePreloadedImage.bind(this,t)),t)},Picture.prototype._handlePreloadedImage=function(e,i){this._useDynamicImage&&(this.file.meta={height:i.naturalHeight,width:i.naturalWidth});var t="",r="",s="no-repeat";this.imagePosition&&(t=this.imagePosition.replace("-"," "));var a=this.sizeUsingTransforms()?this.getNaturalSize():this.size,n=this.fittingSize;switch("fitUpToOriginal"===this.fittingSize&&(n=a.widtho&&"fit"==this.fittingSize||o>n&&"fill"==this.fittingSize,i=o>n&&"fit"==this.fittingSize||n>o&&"fill"==this.fittingSize,t=s,r=a,e?r=s/h*l:i&&(t=a/l*h),t>c&&(r*=c/t,t=c),r>c&&(t*=c/r,r=c),{width:t,height:r})},Picture.prototype.getImageUrl=function(){return this.file?this.file.getUrl():void 0};;
function Button(){}inherit(Button,ScreenObject),extend(Button.prototype,TextStyleIntegrator),Button.toString=function(){return"[Clazz Button]"},Button.prototype.toString=function(){return"[Button "+this.localId+"]"},Object.defineProperties(Button.prototype,{_borderRoundness:{get:function(){var e=0,t=0,o=0,r=0;if(this.border&&"number"==typeof this.borderRadius)e=this.borderRadius;else if(this.border!==!1||this.roundness){if("number"==typeof this.roundness&&(r=this.roundness),r>0){var n=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),s=n/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),a=i/2;if(50>r){var d=r/50;e=s*d}else{var h=(r-50)/50,u=(a-s)*h,l=s+u;t=this.getNaturalSize().width==n?s:l,o=this.getNaturalSize().height==n?s:l}}}else r=0;return this.shadow&&ios("8")&&window.devicePixelRatio>=3&&(1>e&&(e=1),1>t&&(t=1),1>o&&(o=1)),50>r?e+"px":t+"px "+o+"px"}}}),Button.prototype.getBorderWidth=function(){return this.borderWidth},Button.prototype.getShadowDistance=function(){return this.shadowDistance},Button.prototype.getShadowBlur=function(){return this.shadowBlur},Button.prototype.awake=function(){Button.uber.awake.call(this),this._defaultValues={backgroundUpImage:"runner/clazzes/Button/button.png",backgroundDownImage:"runner/clazzes/Button/button-down.png"},this._handleTap=this._handleTap.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this)},Button.prototype.createNode=function(){var e=Button.uber.createNode.call(this),t=creative.runtimeParams.overrides||creative.runtimeParams,o=t.deviceInfo&&t.deviceInfo.deviceType.toLowerCase();return this._hoverEnabled=("Desktop"===creative.intendedDeviceType||"Any"===creative.intendedDeviceType)&&"desktop"===o,this._privateApiTracked={},this._backgroundElement=null,this._foregroundElement=null,this._textBorder=0,this._cssRules={},this._useBackgroundImage="image"===this.background,this._useForegroundImage="image"===(this._useBackgroundImage?this.foregroundForImage:this.foregroundForCss),addClass(e,"touchable"),this._createBackground(e),this._createForeground(e),this.addStyle(this._cssRules),attach(e,"tap",this._handleTap),attach(e,"touchstart",this._handleTouchStart),e},Button.prototype._createBackground=function(e){if(this._backgroundElement=document.createElement("div"),addClass(this._backgroundElement,"background"),this._useBackgroundImage){var t=!1,o="normal",r="focus",n="pressed",s=function(e,t){addClass(t,e),this._backgroundElement.appendChild(t)}.bind(this);this.backgroundUpImage?this._preloadImage(this.backgroundUpImage,function(e){s(o,e)}):(t=!0,this._preloadImage(new File(this._defaultValues.backgroundUpImage),{force:!1},function(e){s(o,e)})),this._hoverEnabled&&this.backgroundHoverImage&&this._preloadImage(this.backgroundHoverImage,function(e){s(r,e)}),this.backgroundDownImage?this._preloadImage(this.backgroundDownImage,function(e){s(n,e)}):t&&this._preloadImage(new File(this._defaultValues.backgroundDownImage),{force:!1},function(e){s(n,e)}),this._cssRules[".background ."+o]="display: block;",this._cssRules[".background ."+r]="display: none;",this._cssRules[".background ."+n]="display: none;",this._hoverEnabled&&this.backgroundHoverImage&&(this._cssRules[":hover .background ."+o]="display: none;",this._cssRules[":hover .background ."+r]="display: block;",this._cssRules[":hover .background ."+n]="display: none;"),(this.backgroundDownImage||t)&&(this._cssRules[".background.down ."+o]="display: none;",this._cssRules[".background.down ."+r]="display: none;",this._cssRules[".background.down ."+n]="display: block;")}else{if(this.backgroundColor){var i="";if(Color.isGradient(this.backgroundColorUp)?(i+=Color.createGradientStyle(this.backgroundColorUp),i+="background-color: transparent;"):(i+="background-image: none; ",i+="background-color: "+this.backgroundColorUp+";"),this._cssRules[".background"]=i,this._hoverEnabled&&this.backgroundColorHover){var a="";Color.isGradient(this.backgroundColorHover)?(a+=Color.createGradientStyle(this.backgroundColorHover),a+="background-color: transparent;"):(a+="background-image: none; ",a+="background-color: "+this.backgroundColorHover+";"),this._cssRules[":hover .background"]=a}var d="";Color.isGradient(this.backgroundColorDown)?(d+=Color.createGradientStyle(this.backgroundColorDown),d+="background-color: transparent;"):(d+="background-image: none; ",d+="background-color: "+this.backgroundColorDown+";"),this._cssRules[".background.down"]=d}if(this.border&&(this._backgroundElement.style.borderColor=this.borderColor,this._backgroundElement.style.borderWidth=this.getBorderWidth()+"px"),this.shadow){var h=this.shadowAngle%90===0?-.3:0,u=this.shadowAngle*(Math.PI/180),l=Math.round(this.getShadowDistance()*Math.cos(u)),c=Math.round(this.getShadowDistance()*Math.sin(u));celtra.styler.css(this._backgroundElement,"boxShadow",l+"px "+c+"px "+this.getShadowBlur()+"px "+h+"px "+this.shadowColor)}}e.appendChild(this._backgroundElement)},Button.prototype._createForeground=function(e){var t=this.callToActionText.trim().length>0;if(this._foregroundElement=document.createElement("div"),addClass(this._foregroundElement,"foreground"),!this._useBackgroundImage&&this.border?(this._foregroundElement.style.borderWidth=this.getBorderWidth()+"px",this._textBorder=this.getBorderWidth()):this._textBorder=0,this._useForegroundImage){this._foregroundElement.className+=this.foregroundStretchImage?" image-stretch":" image-fit";var o="normal",r="focus",n="pressed",s=function(e,t){var o=document.createElement("div");addClass(o,e),o.style.backgroundImage="url("+t.src+")",this._foregroundElement.appendChild(o)}.bind(this);this.foregroundUpImage&&this._preloadImage(this.foregroundUpImage,function(e){s(o,e)}),this._hoverEnabled&&this.foregroundHoverImage&&this._preloadImage(this.foregroundHoverImage,function(e){s(r,e)}),this.foregroundDownImage&&this._preloadImage(this.foregroundDownImage,function(e){s(n,e)}),this._cssRules[".foreground ."+o]="display: block;",this._cssRules[".foreground ."+r]="display: none;",this._cssRules[".foreground ."+n]="display: none;",this._hoverEnabled&&this.foregroundHoverImage&&(this._cssRules[":hover .foreground ."+o]="display: none;",this._cssRules[":hover .foreground ."+r]="display: block;",this._cssRules[":hover .foreground ."+n]="display: none;"),this.foregroundDownImage&&(this._cssRules[".foreground.down ."+o]="display: none;",this._cssRules[".foreground.down ."+r]="display: none;",this._cssRules[".foreground.down ."+n]="display: block;")}else t&&(this._foregroundElement.className+=" call-to-action",this._foregroundElement.textContent=this.callToActionText,this.initializeFont(),this._cssRules[".foreground"]="color: "+this.textColor+";",this._hoverEnabled&&this.textColorHover&&(this._cssRules[":hover .foreground"]="color: "+this.textColorHover+";"),this._cssRules[".foreground.down"]="color: "+this.textColorDown+";");e.appendChild(this._foregroundElement)},Button.prototype.redrawLayout=function(){if(!this._useBackgroundImage){var e=this._borderRoundness;parseInt(e,10)>0&&(this._backgroundElement&&(this._backgroundElement.style.borderTopLeftRadius=e,this._backgroundElement.style.borderTopRightRadius=e,this._backgroundElement.style.borderBottomLeftRadius=e,this._backgroundElement.style.borderBottomRightRadius=e),this._foregroundElement&&(this._foregroundElement.style.borderTopLeftRadius=e,this._foregroundElement.style.borderTopRightRadius=e,this._foregroundElement.style.borderBottomLeftRadius=e,this._foregroundElement.style.borderBottomRightRadius=e))}var t=this.callToActionText.trim().length>0;if(!this._useForegroundImage&&t){this.applyTextSize(this._foregroundElement.style);var o;if("undefined"!=typeof this.lineSpacing){o=parseInt(this._foregroundElement.style.lineHeight,10);var r=this.callToActionText.split(/\n/).length,n=o*r,s=this.sizeUsingTransforms()?this.getNaturalSize():this.size,i=(s.height-n)/2,a=i-this._textBorder;this._foregroundElement.style.paddingTop=a+"px"}else o=this.size.height-2*this._textBorder,this._foregroundElement.style.lineHeight=o+"px"}},Button.prototype.updateTextStyle=function(){var e=this.callToActionText.trim().length>0;!this._useForegroundImage&&e&&(this.applyTextStyle(this._foregroundElement.style),this._foregroundElement.style.color="")},Button.prototype._handleTap=function(e){e.stopPropagation()},Button.prototype._handleTouchStart=function(){addClass(this._backgroundElement,"down"),addClass(this._foregroundElement,"down"),attach(this.parentUnit.node,"touchend",this._handleTouchEnd)},Button.prototype._handleTouchEnd=function(){removeClass(this._backgroundElement,"down"),removeClass(this._foregroundElement,"down"),detach(this.parentUnit.node,"touchend",this._handleTouchEnd)};;
function Texty(){}inherit(Texty,ScreenObject),extend(Texty.prototype,TextStyleIntegrator),Texty.toString=function(){return"[Clazz Texty]"},Texty.prototype.toString=function(){return"[Texty "+this.localId+"]"},Texty.prototype.awake=function(){Texty.uber.awake.call(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handleTouchCancel=this._handleTouchCancel.bind(this)},Texty.prototype.createNode=function(){var t=Texty.uber.createNode.call(this);if(this.scroller=null,this._autoscrolling=!1,this._listeningForTouches=!1,this._sanitizeText=!0,this._fontScaleFactor=1,this._lineHeightRatio=1,this._letterSpacingRatio=1,this._responsiveFontSize=this._getNaturalFontSize(),this.dynamicContentEnabled){FeedData.checkAndTrackValue(this.feedFieldKey,this.constructor.name);var e="";null!=this.feedFieldKey&&"string"==typeof creative.runtimeParams.dynamicContent[this.feedFieldKey]&&FeedData.isCorrectFieldType(this.feedFieldKey,this.constructor.name)&&(e=creative.runtimeParams.dynamicContent[this.feedFieldKey]),this.text=e}return this._initialText=this.text,this._initialScaleFont=this.scaleFont,this._scrollContainer=document.createElement("div"),this._scrollContainer.className="scroll-container",this._textContainer=document.createElement("div"),this._textContainerClone=document.createElement("div"),this._textContainerClone.style.display="none",this._textContainerResponsive=document.createElement("div"),this._textContainerResponsive.style.visibility="hidden",this._setTextContainerStyle("paddingBottom",this._getDefaultPadding()+"px"),(deviceInfo.browser.chrome(null,"48")||"Samsung Browser"===deviceInfo.browser.name)&&this._setTextContainerStyle("textRendering","geometricPrecision"),this.scrollable&&(this.scroller=new Scroller(t,this._textContainer,{direction:"vertical",animating:!0,easing:!0,locking:!1,scrollbarPosition:this.scrollbarPosition,scrollbarColor:this.scrollbarColor})),this.initializeFont(),this._updateTextContent(),this._scrollContainer.appendChild(this._textContainer),this._scrollContainer.appendChild(this._textContainerClone),this._scrollContainer.appendChild(this._textContainerResponsive),t.appendChild(this._scrollContainer),this._startListeningForTouches(),t},Texty.prototype._appear=function(){this._handleSizeUpdate()},Texty.prototype.redrawLayout=function(){this._handleSizeUpdate()},Texty.prototype._handleSizeUpdate=function(){this._updateTextSizeAndAlignment(),this._updateScrollbar()},Texty.prototype._updateTextSizeAndAlignment=function(){var t=this._getDefaultPadding();this._setTextContainerStyle("paddingLeft",t+"px"),this._setTextContainerStyle("paddingRight",t+"px"),this._setTextContainerStyle("paddingTop",t+"px"),this._setTextContainerStyle("marginTop",""),this.responsiveFont||(this.applyTextSize(this._textContainer.style),this.applyTextSize(this._textContainerClone.style)),this._horizontallyRealignTextWithPadding(),this._adjustFontSizeToFitContainer(),this._verticallyAlignText()},Texty.prototype._getContentSizeOfResponsiveContainer=function(){var t=this._textContainerResponsive.getBoundingClientRect(),e=this._textContainerResponsive.scrollHeight+(parseInt(t.height)-t.height),i=this._textContainerResponsive.scrollWidth+(parseInt(t.width)-t.width);return{width:i,height:e}},Texty.prototype._setTextContainerStyle=function(t,e){this._textContainer.style[t]=e,this._textContainerClone.style[t]=e,this._textContainerResponsive.style[t]=e},Texty.prototype._applyAdjustedFontSizeStyle=function(t){var e=this._responsiveFontSize*this._fontScaleFactor;t.style.fontSize=e+"px",t.style.lineHeight=Math.max(1,e*this._lineHeightRatio)+"px",t.style.letterSpacing=e*this._letterSpacingRatio+"px"},Texty.prototype._adjustFontSizeToFitContainer=function(){if(this.responsiveFont&&!hasClass(this.node,"animated")){var t=.5,e=this.getFontSize(),i=this._getNaturalFontSize(),n=Math.max(Math.round(i*t),1);this._fontScaleFactor=e/i;var o=1/this._fontScaleFactor;this._responsiveFontSize=i;var s=Math.max(1,this.getLineSpacing()+e);this._lineHeightRatio=s/e,this._letterSpacingRatio=this.getLetterSpacing()/e;var a=this.getNaturalSize();this._applyAdjustedFontSizeStyle(this._textContainerResponsive);for(var h=this._getContentSizeOfResponsiveContainer();this._responsiveFontSize>n&&(h.height>a.height||h.width>a.width);)this._responsiveFontSize-=o,this._applyAdjustedFontSizeStyle(this._textContainerResponsive),h=this._getContentSizeOfResponsiveContainer();this._applyAdjustedFontSizeStyle(this._textContainer),this._applyAdjustedFontSizeStyle(this._textContainerClone)}},Texty.prototype.updateTextStyle=function(){this.applyTextStyle(this._textContainer.style),this.applyTextStyle(this._textContainerClone.style),this.applyTextStyle(this._textContainerResponsive.style),this._setTextContainerStyle("whiteSpace","pre-wrap")},Texty.prototype._horizontallyRealignTextWithPadding=function(){var t=this._getDefaultPadding(),e=t,i=t,n=parseInt(this._textContainer.style.paddingLeft,10),o=parseInt(this._textContainer.style.paddingRight,10);this.scaleFont&&"right"==this.textAlign&&!isNaN(n)?e=n-t:this.scaleFont&&"left"==this.textAlign&&!isNaN(o)&&(i=o-t);var s=Math.max(e,t),a=Math.max(i,t);s!==n&&this._setTextContainerStyle("paddingLeft",s+"px"),a!==o&&this._setTextContainerStyle("paddingRight",a+"px")},Texty.prototype._verticallyAlignText=function(){if(!(this.scrollable||this._scrollContainer.offsetHeight<=this._textContainer.offsetHeight||"undefined"==typeof this.textAlignVertical)){this._setTextContainerStyle("paddingTop","");var t=this._getDefaultPadding(),e=0,i=this.scrollable?0:Number(this.textAlignVertical),n=this.getNaturalSize().height;this._textContainerClone.style.height=0,this._textContainerClone.style.display="inline";var o=0===i?0:this._textContainerClone.scrollHeight;this._textContainerClone.style.display="none";var s=Math.max(0,(n-o)*i/100);s=isNaN(s)?0:s,e=i>50&&n>o?-t:50==i&&n>o?t/2:t,this._setTextContainerStyle("marginTop",s+e+"px")}},Texty.prototype._updateTextContent=function(){var t=this._sanitizeText?htmlentitize(this.text.toString()):this.text;this._textContainer.innerHTML=t,this._textContainerClone.innerHTML=t,this._textContainerResponsive.innerHTML=t},Texty.prototype._updateScrollbar=function(){this.scrollable&&(this.scroller.redraw(),this.scroller.scrollTo(0,0,!1),this.autoscrollEnabled&&(this._resetAutoScroll(),this._createAutoScroll()))},Texty.prototype._createAutoScroll=function(){var t=this.scroller.getMaxScroll();defer(function(){this.scroller.scrollTo(t.left,t.top,!0,this.autoscrollDuration,!0,function(){"return"===this.autoscrollConclusion?this.scroller.scrollTo(0,0,!0,this.autoscrollDuration,!0):"loop"===this.autoscrollConclusion&&(this._autoscrolling=!0,e())}.bind(this))}.bind(this),this.autoscrollDelay);var e=function(){this._autoscrolling&&this.scroller.scrollTo(0,0,!0,this.autoscrollDuration,!0,function(){this.scroller.scrollTo(t.left,t.top,!0,this.autoscrollDuration,!0,e)}.bind(this))}.bind(this)},Texty.prototype._resetAutoScroll=function(){this._autoscrolling=!1},Texty.prototype._handleTouchStart=function(t){t.preventDefault(),new ActionContext(this,!0).trackUserInteraction(),this.scrollable&&(this._resetAutoScroll(),t.stopPropagation(),this.scroller._handleTouchStart(t),attach(this.parentUnit.node,"touchmove",this._handleTouchMove),attach(this.parentUnit.node,"touchend",this._handleTouchEnd),attach(this.parentUnit.node,"touchcancel",this._handleTouchCancel))},Texty.prototype._handleTouchMove=function(t){t.preventDefault(),this.scroller._handleTouchMove(t)},Texty.prototype._handleTouchEnd=function(t){t.preventDefault(),this.scroller._handleTouchEnd(t),detach(this.parentUnit.node,"touchmove",this._handleTouchMove),detach(this.parentUnit.node,"touchend",this._handleTouchEnd),detach(this.parentUnit.node,"touchcancel",this._handleTouchCancel)},Texty.prototype._handleTouchCancel=function(t){this._handleTouchEnd(t)},Texty.prototype.positionUsingTransforms=retTrue,Texty.prototype.sizeUsingTransforms=retTrue,Texty.prototype.getNaturalSize=function(){return this.originalSize},Texty.prototype._getNaturalFontSize=function(){return this.fontSize},Texty.prototype._getDefaultPadding=function(){return this.usePadding?2:0},Texty.prototype._startListeningForTouches=function(){this.scrollable&&!this._listeningForTouches&&(attach(this._textContainer,"touchstart",this._handleTouchStart),this._listeningForTouches=!0)},Texty.prototype._stopListeningForTouches=function(){this._listeningForTouches&&(detach(this._textContainer,"touchstart",this._handleTouchStart),this._listeningForTouches=!1)},Texty.prototype._setText=function(t){this._sanitizeText=!1,this.text=t,this._updateTextContent(),this.scaleFont&&(this.scaleFont=!1),this.hidden||this._handleSizeUpdate()},Texty.prototype.showAction=function(t,e,i){Texty.uber.showAction.call(this,t,e,function(){this._startListeningForTouches(),i()}.bind(this))},Texty.prototype.hideAction=function(t,e,i){Texty.uber.hideAction.call(this,t,e,function(){this._stopListeningForTouches(),i()}.bind(this))},Texty.prototype.resetAction=function(t,e,i){this._sanitizeText=!0,Texty.uber.resetAction.call(this,t,e,function(){this.hidden||this._startListeningForTouches(),this.text=this._initialText,this._updateTextContent(),this.scaleFont=this._initialScaleFont,this._handleSizeUpdate(),i()}.bind(this))},Texty.prototype.setTextAction=function(t,e,i){this._setText(e.text),i()};;
function Shapey(){}inherit(Shapey,ScreenObject),Shapey.toString=function(){return"[Clazz Shapey]"},Shapey.prototype.toString=function(){return"[Shapey "+this.localId+"]"},Object.defineProperties(Shapey.prototype,{_borderRoundness:{get:function(){var e=0,t=0,a=0,r=this._defaultValues.roundness;if("number"==typeof this.roundness&&(r=this.roundness),r>0){var s=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),o=s/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),h=i/2;if(50>r){var d=r/50;e=o*d}else{var p=(r-50)/50,n=(h-o)*p,u=o+n;t=this.getNaturalSize().width==s?o:u,a=this.getNaturalSize().height==s?o:u}}return this.shadow&&ios("8")&&window.devicePixelRatio>=3&&(1>e&&(e=1),1>t&&(t=1),1>a&&(a=1)),50>r?e+"px":t+"px "+a+"px"}}}),Shapey.prototype.awake=function(){Shapey.uber.awake.call(this),this._defaultValues={backgroundColor:"#365c99",borderColor:"#000000",borderWidth:5,roundness:0,shadowAngle:0,shadowBlur:10,shadowColor:"rgba(0,0,0,0.5)",shadowDistance:0}},Shapey.prototype.createNode=function(){var e=Shapey.uber.createNode.call(this);if(this._privateApiTracked={},e.className+=" touchable",this._shapey=document.createElement("div"),this.backgroundColor)if(Color.isGradient(this.backgroundColor)){var t=Color.createGradientStyle(this.backgroundColor);this.addStyle({".gradient-shapey":t}),addClass(this._shapey,"gradient-shapey")}else this._shapey.style.backgroundColor=this.backgroundColor;if(this.border){var a="undefined"!=typeof this.borderColor?this.borderColor:this._defaultValues.borderColor,r="number"==typeof this.borderWidth?this.borderWidth:this._defaultValues.borderWidth;this._shapey.style.borderColor=a,this._shapey.style.borderStyle="solid",this._shapey.style.borderWidth=r+"px"}if(this.shadow){var s=("number"==typeof this.shadowAngle?this.shadowAngle:this._defaultValues.shadowAngle)*(Math.PI/180),o="number"==typeof this.shadowBlur?this.shadowBlur:this._defaultValues.shadowBlur,i="undefined"!=typeof this.shadowColor?this.shadowColor:this._defaultValues.shadowColor,h="number"==typeof this.shadowDistance?this.shadowDistance:this._defaultValues.shadowDistance,d=Math.round(h*Math.cos(s)),p=Math.round(h*Math.sin(s));celtra.styler.css(this._shapey,"boxShadow",d+"px "+p+"px "+o+"px "+i)}return e.appendChild(this._shapey),e},Shapey.prototype.redrawLayout=function(){if(this._shapey){var e=this._borderRoundness;parseInt(e,10)>0&&(this._shapey.style.borderTopLeftRadius=e,this._shapey.style.borderTopRightRadius=e,this._shapey.style.borderBottomLeftRadius=e,this._shapey.style.borderBottomRightRadius=e)}},Shapey.prototype._track=function(e){this._privateApiTracked[e]||(this._privateApiTracked[e]=!0,creative.track({name:"retiredFeatureUsed",featureType:"apifunction",featureName:e}))},Shapey.deprecatedPropertiesArray=["borderRoundness","shapey","defaultValues"],Shapey.deprecatedPropertiesObject={},Shapey.deprecatedPropertiesArray.forEach(function(e){Shapey.deprecatedPropertiesObject[e]={get:function(){return this._track("Shapey."+e+".getter"),this["_"+e]},set:function(t){this._track("Shapey."+e+".setter"),this["_"+e]=t}}}),Object.defineProperties(Shapey.prototype,Shapey.deprecatedPropertiesObject);;
function File(t){this.url=t}File.toString=function(){return"[Clazz File]"},File.prototype.toString=function(){return"[File "+this.localId+"("+this.name+"/"+this.url+")]"},File.prototype.getOriginalUrl=function(){if(this.url){if(-1!==this.url.indexOf("://"))return this.url;if("/"===this.url[0])throw"An absolute path as URL?";return creative.resourceUrl+this.url}if(this.blobHash)return(creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"blobs/"+this.blobHash+"/"+encodeURIComponent(this.name);throw"Neither url nor blobHash set?"},File.prototype.getUrl=function(t){var i=this.getOriginalUrl(),e=String(this.name).match(/\.(gif|png|jpe?g)$/i);return this.blobHash&&e&&(i+="?transform=crush",this.quality>-1&&(i+="&quality="+this.quality),t&&this.optimizedWidth(t)>0&&this.optimizedHeight(t)>0&&(i+="&resize="+this.optimizedWidth(t)+"x"+this.optimizedHeight(t))),i},File.prototype.getDataUri=function(t,i){t instanceof Function&&(i=t,t={});var e=this,r=this.getUrl(t.creativeUnitVariantId);"undefined"!=typeof this.dataUri?defer(function(){i(e.dataUri)},0,"File.getDataUri defer callback, has dataUri"):creative.dataURIsEnabled||t.force?creative.batcher.getDataUri(r,i):defer(function(){i(r)},0,"File.getDataUri defer callback, url")},Object.defineProperty(File.prototype,"retina",{get:function(){return this.retinaScaleFactor>1}}),Object.defineProperty(File.prototype,"width",{get:function(){return this.retina?Math.round(this.meta.width/this.retinaScaleFactor):this.meta.width}}),Object.defineProperty(File.prototype,"height",{get:function(){return this.retina?Math.round(this.meta.height/this.retinaScaleFactor):this.meta.height}}),Object.defineProperty(File.prototype,"optimizedWidth",{enumerable:!1,configurable:!1,get:function(){return function(t){if("number"!=typeof t||!this.optimizationSettings)return null;for(var i=null,e=0;e[\\\\s\\\\S]*?\",\"gi\");do t=e,e=e.replace(r,\"\");while(e!==t);return e.replace(/e.minDistanceForSwipe:\"x\"===e.validAxis&&(t=n>e.minDistanceForSwipe),{isHorizontal:n>r,isConsideredSwipe:t}}function attach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.addEventListener(o,n,_buildNativeListenerOptions(r))}function detach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.removeEventListener(o,n,_buildNativeListenerOptions(r))}function once(e,t,n,r){attach(e,t,function o(){detach(e,t,o,r),n.apply(this,arguments)},r)}function trigger(e,t,n,r){var o=document.createEvent(\"HTMLEvents\");o.initEvent(t,n,r);var i=\"on\"+ucfirst(t);return\"function\"==typeof e[i]&&e[i](),e.dispatchEvent(o)}function fakeclick(e,t){t=t||window;var n=t.document.createElement(\"a\");n.cssText=\"visibility: hidden\",n.addEventListener(\"click\",function(t){e(),t.preventDefault(),t.stopPropagation(),n.parentNode.removeChild(n)},!0),t.document.body.appendChild(n);var r=document.createEvent(\"MouseEvents\");r.initEvent(\"click\",!0,!0),n.dispatchEvent(r)}function fakeClickAhrefBlank(e,t,n){t=t||noop,n=n||window;var r=n.document.createElement(\"a\");r.style.cssText=\"visibility: hidden\",r.setAttribute(\"href\",e),r.setAttribute(\"target\",\"_blank\"),r.addEventListener(\"click\",function(e){e.stopPropagation(),t(),r.parentNode.removeChild(r)},!0),n.document.body.appendChild(r);var o=n.document.createEvent(\"MouseEvents\");o.initEvent(\"click\",!0,!0),r.dispatchEvent(o)}function noop(){}function nullai(e,t){t()}function retTrue(){return!0}function retFalse(){return!1}function offset(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:t.top+(o.pageYOffset||r.scrollTop)-(r.clientTop||0),left:t.left+(o.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}}function addCssRule(e,t,n){var r=document.createElement(\"style\");r.textContent=e+\" {\"+t+\"}\",n?n.document.getElementsByTagName(\"head\")[0].appendChild(r):document.getElementsByTagName(\"head\")[0].appendChild(r)}function redrawAndroidIframe(){var e=document.createElement(\"style\");document.body.appendChild(e),document.body.removeChild(e)}function parseQuery(e){var t={};return e=e.replace(/\\&$/,\"\").replace(/\\+/g,\"%20\"),e.split(\"&\").forEach(function(e){var n=e.split(\"=\").map(decodeURIComponent);t[n[0]]=n[1]}),t}function buildQuery(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+\"=\"+encodeURIComponent(e[n]));return t.join(\"&\")}function postBlob(e,t){var n=new XMLHttpRequest;n.open(\"POST\",creative.apiUrl+\"blobs?base64=1\"),n.setRequestHeader(\"Content-Type\",\"application/octet-stream\"),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText,n.status)},n.send(e)}function tmpl(e,t){function n(e){return\" p.push('\"+e.replace(/'/g,\"\\\\'\").split(/\\r?\\n/g).join(\"\\\\n');\\n p.push('\")+\"');\\n\"}if(!e)return\"\";var r;if(-1==e.indexOf(\"<%\"))r=function(){return e};else{var o=e.split(/<%\\s*|\\s*%>/g),i=\"var p = []; with(o) {\\n\",a=!1;o.forEach(function(e){a?i+=\"=\"==e[0]?\" p.push(\"+e.replace(/^=\\s*|\\s*$/g,\"\")+\");\\n\":\" \"+e+\"\\n\":e&&(i+=n(e)),a=!a}),i+='} return p.join(\"\");';try{r=new Function(\"o\",i)}catch(c){var u=new Error(\"Cannot parse template! (see `template` property)\");throw u.template=i,u}}return t?r(t):r}function flash(){var e=document.createElement(\"div\");e.style.background=\"white\",e.style.opacity=.005,e.style.position=\"absolute\",e.style.top=0,e.style.left=0,e.style.width=\"100%\",e.style.height=\"100%\",e.style.zIndex=2147483647,document.body.appendChild(e),setTimeout(function(){e.parentNode.removeChild(e)},0)}function crc32(e){\"use strict\";var t=-1,n=0,r=[0,-227835133,-516198153,324072436,-946170081,904991772,648144872,-724933397,-1965467441,2024987596,1809983544,-1719030981,1296289744,-1087877933,-1401372889,1578318884,274646895,-499825556,-244992104,51262619,-675000208,632279923,922689671,-996891772,-1702387808,1760304291,2075979607,-1982370732,1562183871,-1351185476,-1138329528,1313733451,549293790,-757723683,-1048117719,871202090,-416867903,357341890,102525238,-193467851,-1436232175,1477399826,1264559846,-1187764763,1845379342,-1617575411,-1933233671,2125378298,820201905,-1031222606,-774358714,598981189,-143008082,85089709,373468761,-467063462,-1170599554,1213305469,1526817161,-1452612982,2107672161,-1882520222,-1667500394,1861252501,1098587580,-1290756417,-1606390453,1378610760,-2032039261,1955203488,1742404180,-1783531177,-878557837,969524848,714683780,-655182201,205050476,-28094097,-318528869,526918040,1361435347,-1555146288,-1340167644,1114974503,-1765847604,1691668175,2005155131,-2047885768,-604208612,697762079,986182379,-928222744,476452099,-301099520,-44210700,255256311,1640403810,-1817374623,-2130844779,1922457750,-1503918979,1412925310,1197962378,-1257441399,-350237779,427051182,170179418,-129025959,746937522,-554770511,-843174843,1070968646,1905808397,-2081171698,-1868356358,1657317369,-1241332974,1147748369,1463399397,-1521340186,-79622974,153784257,444234805,-401473738,1021025245,-827320098,-572462294,797665321,-2097792136,1889384571,1674398607,-1851340660,1164749927,-1224265884,-1537745776,1446797203,137323447,-96149324,-384560320,461344835,-810158936,1037989803,781091935,-588970148,-1834419177,1623424788,1939049696,-2114449437,1429367560,-1487280117,-1274471425,1180866812,410100952,-367384613,-112536529,186734380,-538233913,763408580,1053836080,-860110797,-1572096602,1344288421,1131464017,-1323612590,1708204729,-1749376582,-2065018290,1988219213,680717673,-621187478,-911630946,1002577565,-284657034,493091189,238226049,-61306494,-1307217207,1082061258,1395524158,-1589280451,1972364758,-2015074603,-1800104671,1725896226,952904198,-894981883,-638100751,731699698,-11092711,222117402,510512622,-335130899,-1014159676,837199303,582374963,-790768336,68661723,-159632680,-450051796,390545967,1230274059,-1153434360,-1469116676,1510247935,-1899042540,2091215383,1878366691,-1650582816,-741088853,565732008,854102364,-1065151905,340358836,-433916489,-177076669,119113024,1493875044,-1419691417,-1204696685,1247431312,-1634718085,1828433272,2141937292,-1916740209,-483350502,291187481,34330861,-262120466,615137029,-691946490,-980332558,939183345,1776939221,-1685949482,-1999470558,2058945313,-1368168502,1545135305,1330124605,-1121741762,-210866315,17165430,307568514,-532767615,888469610,-962626711,-707819363,665062302,2042050490,-1948470087,-1735637171,1793573966,-1104306011,1279665062,1595330642,-1384295599];for(n=0;n>>8^r[255&(t^e.charCodeAt(n))];return(-1^t)>>>0}function isArray(e){return\"[object Array]\"===Object.prototype.toString.call(e)}function isDefAndNotNull(e){return null!=e}function updateQueryStringParameter(e,t,n){t=encodeURIComponent(t),n=encodeURIComponent(n);var r=new RegExp(\"([?|&])\"+t+\"=.*?(&|$)\",\"i\");return separator=-1!==e.indexOf(\"?\")?\"&\":\"?\",e.match(r)?e.replace(r,\"$1\"+t+\"=\"+n+\"$2\"):e+separator+t+\"=\"+n}function fetchShortenedUrl(e,t,n){function r(t,n){i[e].forEach(function(e){e[t](n)}),delete i[e]}n=n||noop;var o=!1,i=fetchShortenedUrl.inProgress,a=fetchShortenedUrl.cache;if(\"http\"==!e.slice(0,4))return void n();if(a[e])return void defer(function(){t(a[e])},0,\"fetchShortenedUrl defer success callback\");if(i[e]||(i[e]=[],o=!0),i[e].push({success:t,error:n}),o){var c=(creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"shortenedUrls/\",u={url:e,fields:\"shortUrlKey\"},s=btoa(to_utf8(e));s=s.replace(/\\//g,\"$\").replace(/\\+/g,\"_\").replace(/=/g,\"\");var d={cbName:\"shortener_\"+s};loadJSONP(c+\"?\"+buildQuery(u),d,function(t){var n=creative.shareUrl+t.shortUrlKey;a[e]=n,r(\"success\",n)},function(){requestCreateShortenedUrl(e,r)})}}function requestCreateShortenedUrl(e,t){var n=(creative.runtimeParams.secure?creative.apiUrl:creative.insecureApiUrl)+\"shortenedUrls/\",r=fetchShortenedUrl.cache,o=new XMLHttpRequest;o.open(\"POST\",n),o.setRequestHeader(\"Content-Type\",\"application/json; charset=utf-8\"),o.onreadystatechange=function(){if(4===o.readyState)if(201===o.status){var n=JSON.parse(o.responseText),i=creative.shareUrl+n.shortUrlKey;r[e]=i,t(\"success\",i)}else t(\"error\")},o.send(JSON.stringify({url:e}))}function isMediaPlaying(e){try{return e.currentTime>0&&!e.paused&&!e.ended}catch(t){return!1}}function merge(){var e,t,n={};for(t=0;tt?0:1}function pulse(e,t,n){return step(e,n)-step(t,n)}function smoothstep(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return r*r*r*((6*r-15)*r+10)}function bump(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return(Math.cos(Math.PI*r)+1)/2}function getWindowNesting(e){var t={iframe:e!==e.top,friendlyIframe:!1,iabFriendlyIframe:!1,hostileIframe:!1,iframeDepth:0};if(t.iframe){var n=e;try{for(t.friendlyIframe=!!e.top.location.href,t.iabFriendlyIframe=t.friendlyIframe&&\"undefined\"!=typeof e.inDapIF&&e.inDapIF;\"undefined\"!=typeof n.parent.location.href&&n.parent.document!==n.document;)n=n.parent,t.iframeDepth++;\"undefined\"==typeof e.top.document&&(t.hostileIframe=!0)}catch(r){t.hostileIframe=!0}}return t}function isFetchSupported(){return!!(window.fetch&&window.URL&&URL.createObjectURL)}function isBeaconSupported(){return!(!window.navigator||!window.navigator.sendBeacon)}function isNativeImplementation(e){return\"function\"==typeof e&&e.toString().indexOf(\"[native code]\")>-1}!function(e){if(!this.defer){try{for(;\"undefined\"!=typeof e.parent.location.href&&e.parent.document!==e.document;)e=e.parent}catch(t){}var n=function(){function t(){return 9007199254740991===s?0:++s}var n,r,o,i,a=e,c=\"function\"==typeof a.setImmediate;if(a.MutationObserver)return function(e){n=document.createElement(\"div\"),new MutationObserver(function(){e(),n=null}).observe(n,{attributes:!0}),n.setAttribute(\"i\",\"1\")};if(!c&&a.postMessage&&!a.importScripts&&a.addEventListener){var u=\"com.setImmediate\"+Math.random(),s=0;i={};var d=function(e){if(e.source===a&&0===e.data.indexOf(u)){var t=e.data.split(\":\")[1];i[t](),delete i[t]}};return a.addEventListener(\"message\",d,!1),function(e){var n=t();i[n]=e,a.postMessage(u+\":\"+n,\"*\")}}return!c&&a.document&&\"onreadystatechange\"in document.createElement(\"script\")?function(e){r=document.createElement(\"script\"),r.onreadystatechange=function(){r.onreadystatechange=null,r.parentNode.removeChild(r),r=null,e()},document.body.appendChild(r)}:(o=c&&setImmediate||setTimeout,function(e){o(e)})}();this.defer=function(t,r,o,i){var a,c=0|r;if(o){var u;\"undefined\"!=typeof defer.perf?u=defer.perf:\"undefined\"!=typeof creative?u=creative.perf:\"undefined\"!=typeof perf&&(u=perf),u&&(u._stopTrackingDefers||(a=u.start(\"defer\",{deferId:o,delay:c})))}if(t){var s=function(){a&&a.end(),t()};i?n(s):e.setTimeout(s,c)}}}}(window),Function.prototype.bind||Object.defineProperty(Function.prototype,\"bind\",{value:function(e){var t=this;return function(){return t.apply(e,arguments)}}}),function(e){e.getEventNames=function(){var t={};return\"WebKitAnimationEvent\"in e&&(t.animationstart=\"webkitAnimationStart\",t.animationiteration=\"webkitAnimationIteration\",t.animationend=\"webkitAnimationEnd\"),\"WebKitTransitionEvent\"in e&&(t.transitionend=\"webkitTransitionEnd\"),t}}(window),_isListenerOptionSupported.opts={};var getTimestamp=function(){return void 0===window.performance||void 0===window.performance.now?Date.now:window.performance.now.bind(window.performance)}();Date.now||(Date.now=function(){return+new Date}),Array.prototype.waitForEach||Object.defineProperty(Array.prototype,\"waitForEach\",{value:function(e,t,n){var r=this.length;r?this.forEach(function(o,i,a){var c=!1;e.call(n,o,function(){if(c)throw\"Called `done` multiple times for element \"+i;c=!0,--r||t()},i,a)},n):t()}}),function(e){e.loadJS=function(t,n,r,o){var i=e.loadJS.externals,a={success:n||noop,error:r||noop};if(!/^[A-Za-z0-9]*:\\/\\/|^\\/\\//.test(t)){var c=creative.hostedFiles.filter(function(e){return e.filepath===t})[0];if(\"undefined\"==typeof c)return console.warn('Hosted file \"'+t+'\" was not found.'),void a.error();if(c.loaded!==!1)return console.warn('Hosted file \"'+t+'\" is already loaded.'),void setTimeout(a.success,0);c.loaded=!0,t=creative.cachedApiUrl+\"hostedFiles/\"+creative.id+\"/\"+creative.version+\"/\"+t}if(t in i&&!o)i[t].loaded?setTimeout(a.success,0):i[t].cbs.push(a);else{i[t]={cbs:[a]};var u=document.createElement(\"script\");u.type=\"text/javascript\",u.onload=function(){i[t].loaded=!0,i[t].cbs.forEach(function(e){e.success()}),i[t].cbs=[]},u.onerror=function(){i[t].cbs.forEach(function(e){e.error()}),i[t].cbs=[],delete i[t]},u.src=t,e.loadJS.appendToRoot(u)}},e.loadJS.externals={},e.loadJS.appendToRoot=function(e){return document.querySelector(\"head\").appendChild(e)},e.loadJSONP=function(t,n,r,o){\"function\"==typeof n&&(o=r,r=n,n={});var i=n.cbName||\"__jsonp\"+randInt();t+=(-1==t.indexOf(\"?\")?\"?\":\"&\")+(n.paramName||\"jsonp\")+\"=\"+i,e[i]=function(t){r(t),delete e[i]},loadJS(t,noop,o,!0)}}(window),\"undefined\"==typeof Function.prototype.name&&!function(){var e=/^function\\s+(\\w+?)\\s*?\\(/;Object.defineProperty(Function.prototype,\"name\",{get:function(){var t=this.constructor.prototype.toString.call(this);return e.test(t)?t.match(e)[1]:\"\"}})}(),fetchShortenedUrl.cache={},fetchShortenedUrl.inProgress={};;\nfunction CPoint(t,i){this.x=1*t||0,this.y=1*i||0}function CRect(t,i,e,o){this.left=1*t||0,this.top=1*i||0,this.width=1*e||0,this.height=1*o||0}CPoint.offset=function(t){var i=offset(t);return new CPoint(i.left,i.top)},CPoint.convertPointFromNodeToPage=function(t,i){if(!t||\"undefined\"!=typeof t.x)return null;var e=CPoint.offset(t);return new CPoint((i?i.x:0)+(e?e.x:0),(i?i.y:0)+(e?e.y:0))},CPoint.convertPointFromPageToNode=function(t,i){if(!t||\"undefined\"!=typeof t.x)return null;var e=CPoint.offset(t);return new CPoint((i?i.x:0)-(e?e.x:0),(i?i.y:0)-(e?e.y:0))},CPoint.sample=function(t,i,e){for(var o=Math.floor(Math.sqrt(t.width*i/t.height)),n=Math.floor(Math.sqrt(t.height*i/t.width)),h=t.width/o,r=t.height/n,s=0;n>s;s++)for(var f=0;o>f;f++)e((f+.5)*h+t.left,(s+.5)*r+t.top)},CPoint.epsilon=function(t,i,e){return Math.abs(t-i)h||0>r?CRect.ZERO:new CRect(i,e,h,r)},CRect.prototype.copyFrom=function(t){this.left=t.left,this.top=t.top,this.width=t.width,this.height=t.height},CRect.prototype.relativeTo=function(t){return new CRect(this.left-t.left,this.top-t.top,this.width,this.height)},CRect.prototype.contains=function(t){return t instanceof CPoint?t.x>=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom:t instanceof CRect?t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom:void 0},CRect.prototype.map=function(t,i){var e=i.width/t.width,o=i.height/t.height;return new CRect((this.left-t.left)*e+i.left,(this.top-t.top)*o+i.top,this.width*e,this.height*o)},CRect.prototype.equals=function(t){return t&&this.left==t.left&&this.top==t.top&&this.right==t.right&&this.bottom==t.bottom},CRect.prototype.toString=function(){return\"CRect: \"+JSON.stringify(this)};;\nfunction Logger(e){if(!(this instanceof Logger))return new Logger(e);e=e||\"\";var n=noop;(Logger.enabledNames.indexOf(e)>=0||Logger.enabledNames.indexOf(\"all\")>=0)&&(n=function(){var e=[].slice.apply(arguments);e.unshift(Logger._ts()+\" [\"+Logger.sessionId+(this.name?\" \"+this.name:\"\")+\"]\"),console.log.apply(console,e)}),this.name=e,this.log=n,this.warn=n,this.debug=n,this.error=n}Logger._ts=function(){function e(e,n){for(e+=\"\";e.lengthn[t])return 1}return 0}var i,o,s;if(!e)return!0;if(0===n.length)o=null,s=null;else if(1===n.length)o=n[0],s=n[0];else{if(2!==n.length)throw\"Invalid number of arguments\";o=n[0],s=n[1]}for(e=e.split(\".\").map(t),o=o?o.split(\".\").map(t):[],s=s?s.split(\".\").map(t):[],i=Math.max(o.length,s.length)-e.length;i>=0;i--)e.push(0);return!(-1===r(e,o)||1===r(e,s))}function a(e,n){if(-1===e.indexOf(\"Playstation\")){var t=e.match(/\\bSilk\\/([0-9._-]+)\\b/);t&&(n.browserName=\"Amazon Silk\",n.browserVersion=t[1])}n.browserName&&n.browserVersion&&(0===n.browserName.indexOf(\"Chrome\")&&s(n.browserVersion,[\"28\",null])||0===n.browserName.indexOf(\"Opera\")&&s(n.browserVersion,[\"15\",null]))&&(n.browserRenderingEngine=\"Blink\"),n.browserRenderingEngineVersion||(n.browserRenderingEngineVersion=function(){var n;return(n=e.match(/Trident\\/([0-9.]+)/))?n[1]:(n=e.match(/Presto\\/([0-9.]+)/))?n[1]:(n=e.match(/AppleWebKit\\/*([0-9.]+)/i))?n[1]:(n=e.match(/Gecko\\/*([0-9.]+)/),n?n[1]:\"\")}())}t.prototype.android=function(){return\"Android\"===this.name&&s(this.version,arguments)},t.prototype.osx=function(){return\"OSX\"===this.name&&s(this.version,arguments)},t.prototype.ios=function(){return\"IOS\"===this.name&&s(this.version,arguments)},t.prototype.windows=function(){return\"Windows\"===this.name&&s(this.version,arguments)},t.prototype.windowsPhone=function(){return\"WindowsPhone\"===this.name&&s(this.version,arguments)},t.prototype.linux=function(){return\"Linux\"===this.name},r.prototype.safari=function(){return\"Safari\"===this.name&&s(this.version,arguments)},r.prototype.chrome=function(){return 0===this.name.indexOf(\"Chrome\")&&s(this.version,arguments)},r.prototype.ie=function(){return 0===this.name.indexOf(\"Internet Explorer\")&&s(this.version,arguments)},r.prototype.android=function(){return\"Android Browser\"===this.name&&s(this.version,arguments)},r.prototype.samsung=function(){return\"Samsung Browser\"===this.name&&s(this.version,arguments)},r.prototype.opera=function(){return 0===this.name.indexOf(\"Opera\")&&s(this.version,arguments)},r.prototype.silk=function(){return\"Amazon Silk\"===this.name&&s(this.version,arguments)},r.prototype.firefox=function(){return\"Firefox\"===this.name&&s(this.version,arguments)},r.prototype.edge=function(){return\"Edge\"===this.name&&s(this.version,arguments)},r.prototype.webView=function(){var n=null,t=\"iP\"===(e.navigator.platform||\"\").substr(0,2);if(t){var r=this.userAgent,i=-1!==r.indexOf(\"Safari\")&&-1!==r.indexOf(\"Version\"),o=!/constructor/i.test(e.HTMLElement);i&&!e.navigator.standalone?n=\"iOS Safari or Safari Controller\":(o||e.indexedDB)&&e.statusbar.visible?(e.webkit&&e.webkit.messageHandlers||o||e.indexedDB)&&(n=\"WKWebView\"):n=\"UIWebView\"}else/^.*\\/\\d\\.\\d \\(.*wv\\).*/.test(this.userAgent)&&(n=\"AndroidWebView\");return n},i.prototype.webkit=function(){return\"WebKit\"===this.name&&s(this.version,arguments)},i.prototype.gecko=function(){return\"Gecko\"===this.name&&s(this.version,arguments)},i.prototype.trident=function(){return\"Trident\"===this.name&&s(this.version,arguments)},i.prototype.presto=function(){return\"Presto\"===this.name&&s(this.version,arguments)},i.prototype.blink=function(){return\"Blink\"===this.name&&s(this.version,arguments)},o.prototype.phone=function(){return\"Phone\"===this.hardwareType},o.prototype.tablet=function(){return\"Tablet\"===this.hardwareType},o.prototype.desktop=function(){return\"Desktop\"===this.hardwareType},o.prototype.mobileDevice=function(){return this.mobile===!0},e.CeltraDeviceInfo.create=function(t,r){return t=t||e.navigator.userAgent||\"\",r=r||{},a(t,r),new n(r,t)}}(window);;\nwindow.deviceInfo=CeltraDeviceInfo.create(window.navigator.userAgent,window.celtraDeviceInfoRuntimeParams);;\n!function(e){function n(){var e=p().match(/iP(ad|hone|od).*OS ([0-9_]+)/);return!!e&&s(e[2].replace(/_/g,\".\"),arguments)}function t(){var e=p().match(/Android ([0-9.]+)/),n=p().match(/Windows Phone/);return!n&&!!e&&s(e[1],arguments)}function r(){var e=p().match(/Windows Phone ([0-9.]+)/);return!!e&&s(e[1],arguments)}function i(){var e=p().match(/AppleWebKit\\/*([0-9.]+)/i);return!!e&&s(e[1],arguments)}function a(){var e=p().match(/Gecko\\/*([0-9.]+)/i);return!!e&&s(e[1],arguments)}function o(){var e=p().match(/MSIE ([0-9]{1,}[.0-9]{0,})|Trident.* rv:([0-9]{1,}[.0-9]{0,})/i);return!!e&&s(e[1]||e[2],arguments)}function u(){var e=p().match(/Silk\\/([0-9.]+)/);return!!e&&s(e[1],arguments)}function f(){var e=p().toLowerCase();return/kftt|kfot|kfjwi|kfjwa|kfso|kfth|kfapwi|kfthwi|kfsowi|kfthwa|kfapwa|kfap|sd4930ur/.test(e)?s(\"2\",arguments):!1}function d(){return\"undefined\"!=typeof offsetWidthOverride?offsetWidthOverride:(document.body.offsetWidth,Math.min(innerWidth,innerHeight))}function c(){return/iPad/.test(p())||d()>550}function m(){return!(t()||n()||r())}function s(e,n){function t(e){return parseInt(e.replace(/\\D/g,\"\"),10)}function r(e,n){for(var t=0;tn[t])return 1}return 0}var i,a,o;if(!e)return!0;if(0===n.length)a=null,o=null;else if(1===n.length)a=n[0],o=n[0];else{if(2!==n.length)throw\"Invalid number of arguments\";a=n[0],o=n[1]}e=e.split(\".\").map(t),a=a?a.split(\".\").map(t):[],o=o?o.split(\".\").map(t):[];for(var i=v.max(a.length,o.length)-e.length;i>=0;i--)e.push(0);return!(-1===r(e,a)||1===r(e,o))}function h(){return v.top!==e}function l(){if(!(n()||window.chrome&&\"Google Inc.\"===window.navigator.vendor))return!1;var e;return e=p().match(n()?/CriOS\\/([0-9]+.)/:/Chrome\\/([0-9]+.)/),!!e&&s(e[1],arguments)}function g(){var e=\"(-webkit-min-device-pixel-ratio: 1.5),(min--moz-device-pixel-ratio: 1.5),(-o-min-device-pixel-ratio: 3/2),(min-resolution: 1.5dppx)\";return window.devicePixelRatio>1||window.matchMedia&&window.matchMedia(e).matches}e.celtra=e.celtra||{};var w={};w.ios=n,w.android=t,w.webkit=i,w.windowsPhone=r,w.gecko=a,w.windows=o,w.kindleSilk=u,w.kindle=f,w.iframe=h,w.desktop=m,w.tablet=c,w.chromeBased=l,w.isHighDensityDisplay=g,extend(e.celtra,w),delete w.webkit,extend(e,w);var v={max:e.Math.max,min:e.Math.min,userAgent:e.navigator.userAgent,top:e.top},p=function(){return\"undefined\"!=typeof e.userAgentOverride?e.userAgentOverride:v.userAgent}}(window);;\n!function(e){function t(){var t=e;try{for(;\"undefined\"!=typeof t.parent.location.href&&t.parent.document!==t.document;)t=t.parent}catch(n){}return t}function n(){return s.getComputedStyle(s.document.body,null)}function i(e,t,n){if(!e)throw new Error(\"No element specified!\");if(a(t)){if(!(t in e.style)&&i.BREAK_ON_ERROR)throw new Error(\"Invalid CSS attribute \"+t);if(\"undefined\"==typeof n)return e.style[t];e.style[t]=n}else{if(-1==w.indexOf(t)&&o(t),\"undefined\"==typeof n)return e.style[y[t]];e.style[y[t]]=n}}function r(e,t){if(!e)throw new Error(\"No element specified!\");var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if(R&&v.indexOf(t)>-1&&(t=\"webkit\"+u(t)),!n||\"none\"==n.display||!f())return null;if(!(t in n)&&i.BREAK_ON_ERROR)throw new Error(\"Invalid CSS attribute \"+t);return a(t)?n[t]:(-1==w.indexOf(t)&&o(t),n[y[t]])}function o(e){S=S||n();var t=E+u(e);if(R&&v.indexOf(e)>-1)y[e]=t;else if(S&&e in S)y[e]=e;else if(S&&t in S)y[e]=t;else if(!S&&deviceInfo.browser.firefox)y[e]=e;else if(i.BREAK_ON_ERROR)throw new Error(\"Invalid CSS attribute \"+e+' or iframe still display \"none\" in FF');w.push(e)}function a(e){return p.test(e)}function f(){if(e===s)return!0;var t=e.frameElement.ownerDocument.defaultView.getComputedStyle(e.frameElement,null);return t&&\"none\"!=t.display}function u(e){return e+=\"\",e?e[0].toUpperCase()+e.slice(1):\"\"}var l=e.navigator.userAgent,s=t(),c=/rv:.*Gecko\\//.test(l),d=/MSIE|Trident\\//.test(l),m=/WebKit/.test(l),p=/^-?([mM]oz|[wW]eb[kK]it|[mM]s)-?/,y={},w=[],E=function(){return m?\"webkit\":d?\"ms\":c?\"Moz\":\"\"}(),R=function(){var e=l.match(/AppleWebKit\\/(\\d+)/);return e&&~~e[1]<540}(),v=[\"transform\",\"transform-origin\",\"transform-style\",\"transition\",\"transition-delay\",\"transition-duration\",\"transition-property\",\"transition-timing-function\",\"animation\",\"animation-delay\",\"animation-direction\",\"animation-duration\",\"animation-fill-mode\",\"animation-iteration-count\",\"animation-name\",\"animation-play-state\",\"animation-timing-function\",\"appearance\",\"backface-visibility\",\"perspective\",\"perspective-origin\"],S=n();i.BREAK_ON_ERROR=!1,e.celtra=e.celtra||{},e.celtra.styler={css:i,computedCSS:r,isWebkit:m,isGecko:c,isIE:d},e.css=i,e.computedCSS=r}(window);;\nvar Freezer={};Freezer.unfreeze=function(n,e,o){function t(n,e,o,t,a){ActionInvocationSimulator.isDryRun()?ActionInvocationSimulator.needsDryRun(n.internalId)&&(ActionInvocationSimulator.logActionDryRun(n.internalId,n.method,e.localId),e[n.method+\"ActionDryRun\"]?e[n.method+\"ActionDryRun\"](o,t,a):a()):e[n.method+\"Action\"](o,t,a)}function a(n){if(n instanceof Array)return n.map(a);if(n instanceof Object){var o;if(\"ActionInvocation\"===n.clazz){n.internalId=++c;var s=l;o=function(e,a){if(!e)throw\"Cannot execute an action without a context.\";a||(a=noop);var i=o.isStatic;if(\"undefined\"==typeof i&&(i=!o.instance),o.disabled)return void a();if(i){if(o.instance)throw\"ActionInvocation for a static method must not have an instance assigned.\";if(\"function\"!=typeof o.actionClazz[o.method+\"Action\"])throw\"Clazz \"+o.actionClazz+' does not define the static action \"'+o.method+'\".';var r=extend({},o.args,{triggerId:s,caller:n});t(o,o.actionClazz,e,r,a)}else if(o.instance){if(!(o.instance instanceof o.actionClazz))throw\"Instance \"+o.instance+\" is not an instance of clazz \"+o.actionClazz;if(\"function\"!=typeof o.instance[o.method+\"Action\"])throw\"Instance of clazz \"+o.actionClazz+' does not define the instance action \"'+o.method+'\".';var r=extend({},o.args,{triggerId:s,caller:n});t(o,o.instance,e,r,a)}else ActionInvocationSimulator.isDryRun()?a():defer(a,0,\"Freezer.unfreeze defer c\")}}else if(n.clazz){var f=e[n.clazz];if(!f)throw new Error(\"Unsupported clazz: \"+n.clazz);o=Object.create(f.prototype)}else o={},n.onFire&&(l=n.type);for(var d in n)n.hasOwnProperty(d)&&\"clazz\"!==d&&(o[d]=a(n[d]));i.push(o),o.localId&&(r[o.localId]&&console.error(\"Duplicate localId: \"+o.localId),r[o.localId]=o);for(var d in o)if(\"clazz\"===d.slice(-5).toLowerCase()){var z=o[d];if(!z)continue;e[z]?o[d]=e[z]:console.error(\"Unsupported clazz: \"+o.clazz)}return o}return n}var i=[],r={},c=0,l=null,s=a(n);i.forEach(function(n){for(var e in n)if(\"LocalId\"===e.slice(-7)){var o=n[e];if(o instanceof Function)continue;var t;null===o?t=null:(t=r[o],t||console.error(\"Invalid localId reference: \"+o)),n[e.slice(0,-7)]=t,delete n[e]}else if(\"LocalIds\"===e.slice(-8)){for(var a=[],i=0;in-c;if(!i){var o=r._downloadQueue[t];o.requested||(o.requested=!0,e.push(t),o.secure&&(a=!0))}}e.length&&(Logger(\"batcher\").log(e.length+\" new batchable URLs requested during last runloop iteration (\"+(a?\"at least one secure\":\"none secure\")+\"):\\n - \"+e.join(\"\\n - \")),r._loadBatch(a,e,function(e){for(var a in e){var t=e[a];t===!1&&(t=(r._downloadQueue[a].secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+a),r._cache[a]=t,r._downloadQueue[a].callbacks.forEach(function(e){e(t)}),delete r._downloadQueue[a]}}))},0,\"Batcher.getDataUri downloadQueue\",useAsap())):defer(function(){a(e)},0,\"Batcher.getDataUri url not batchable\",useAsap())},Batcher.prototype._generateBatchUrl=function(e,a){var r=(e?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"batch?urls=\"+a.sort().map(encodeURIComponent).join(\",\");return r},Batcher.prototype._loadBatch=function(e,a,r){function t(e){var a,r=5381;for(a=0;al+i*l||r>d+c*d)&&(L.addPoint(t,n,o/1e3,u(document.elementFromPoint(t,n))),E=o,j=0)}}function r(e){var t=Date.now();I=D.setTimeout(function(){i(e,t)},200)}function i(e,t){w&&(w=!1,t||(t=Date.now()),L.addPoint(T,C,t/1e3,u(document.elementFromPoint(T,C))),h.track(L),b?(p.removeEventListener(\"touchmove\",o,f),p.removeEventListener(\"touchend\",i,f)):(p.removeEventListener(\"mousemove\",o,f),p.removeEventListener(\"mouseup\",i,f)),p.removeEventListener(\"mouseout\",r,f))}function c(e,t){var n=null,a=null,o=null,r=!1;return t instanceof Screen?(n=t,a=null,o=n.parentUnitVariant,r=!0):\"undefined\"!=typeof ScreenObject&&t instanceof ScreenObject?(n=t.parentScreen,a=t,o=n.parentUnitVariant,r=!0):\"undefined\"!=typeof CreativeUnitVariant&&t instanceof CreativeUnitVariant&&(n=null,a=null,o=t,r=!0),r?extend({unitName:o?o.parentUnit.name:n.parentUnit.name,unitVariantLocalId:o?o.localId:null,screenLocalId:n?n.localId:null,screenTitle:n?n.title:null,screenIsMaster:n?n.isMasterScreen():null,objectLocalId:a?a.localId:null,objectName:a?a.name:null,objectClazz:a?a.constructor.name:null,initiationTimestamp:new Date/1e3},e):e}function u(e){function t(e){for(var o in e)if(e.hasOwnProperty(o)){if(e[o].name&&e[o].name==a)return e[o];if(e[o].localId&&e[o].localId==n)return e[o];var r;if(e[o].variants?r=t(e[o].variants):e[o].screens?r=t(e[o].screens):e[o].objects?r=t(e[o].objects):e[o].content&&e[o].content.objects?r=t(e[o].content.objects):e[o].component&&(r=e[o].component),r)return r}}if(!e)return null;for(var n,a,o=e;;){if(o.id&&0==o.id.indexOf(\"celtra-\")){a=o.id.replace(\"celtra-\",\"\"),0==o.id.indexOf(\"celtra-object-\")&&(n=o.id.replace(\"celtra-object-\",\"\"));var r=t(g);if(r)return\"undefined\"!=typeof CreativeUnit&&r instanceof CreativeUnit?r.currentScreen:r}if(!o.parentNode)break;o=o.parentNode}return null}var l=15,d=100,s=3e3,m=40,f={capture:!0,passive:!0},p=e,v=t,h=t.adapter.trackingCenter,g=t.units,w=!1,I=null,b=!0,L={},j=0,M=null,E=Date.now(),T=0,y=0,C=0,U=0,D=e.ownerDocument.defaultView||e.ownerDocument.parentWindow;attach(p,\"touchstart\",n,f),attach(p,\"mousedown\",n,f)};\nfunction Tapper(e,t){function a(e){for(var t=e,a=null;1!=t.nodeType;)t=t.parentNode;for(;t&&1==t.nodeType&&t.tagName;){var n=t.tagName.toLowerCase();if(hasClass(t,\"touchable\")||\"a\"===n&&t.href||\"button\"===n||\"img\"===n||\"input\"===n&&t.type&&\"button\"===t.type.toLowerCase()){a=t;break}t=t.parentNode}return a}function n(e,t){var a=e.ownerDocument.createEvent(\"MouseEvents\");a.initEvent(\"tap\",!0,!0),t.dispatchEvent(a)}var c=\"undefined\"!=typeof creative&&creative.adapter||adapter,o=c.useImprovedTapDetection?10:20,r=c.useImprovedTapDetection?200:400;t=t||c.useNativeClickForTapDetection,t&&(attach(e,\"click\",function(t){var c=a(t.target);c&&n(e,c)},!c.nativeClickEmittedOnSwipe),c.useNativeClickForTapDetection)||attach(e,\"touchstart\",function(i){var u=a(i.target);if(u){var h=!1;if(celtra.iframe()){var s=function(){var e=c.getTopWindow();return[e.scrollX,e.scrollY,e.innerWidth,e.innerHeight]},d=s();h=!0}var v=i.targetTouches[0].clientX-o,l=i.targetTouches[0].clientX+o,f=i.targetTouches[0].clientY-o,p=i.targetTouches[0].clientY+o;addClass(u,\"touched\");var g=!1,m=!1,T=!1,C=!1,w=new Date,D=function(e){if(!g&&!m){var t=e.targetTouches[0].clientX,a=e.targetTouches[0].clientY;g=h&&d.toString()!=s().toString(),m=!(t>=v&&l>=t&&a>=f&&p>=a),m||g?removeClass(u,\"touched\"):addClass(u,\"touched\")}},k=function(){if(!C&&(C=!0,detach(e,\"touchmove\",D,!1),detach(e,\"touchend\",arguments.callee,!1),hasClass(u,\"touched\"))){var a=new Date-w>r&&!deviceInfo.deviceType.desktop();if(removeClass(u,\"touched\"),m||g||T||a)return;t||n(e,u)}},y=function(){detach(e,\"touchend\",y,!0),nextFrame(function(){T=!0,k()})};attach(e,\"touchcancel\",function(e){removeClass(u,\"touched\"),k(e)},!1),attach(e,\"touchmove\",D,!1),attach(e,\"touchend\",k,!1),attach(e,\"touchend\",y,!0)}},!0)};\nfunction TouchEventSimulator(t){this.el=t,this.doc=t.ownerDocument?t.ownerDocument:t,this.win=this.doc.defaultView,this.touch=null,this._initialised=!1,this._firstEventFired=!1,this.handleFirstEvent=this.handleFirstEvent.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handlePointerCancel=this.handlePointerCancel.bind(this),this.captureBubbleEvents=this.captureBubbleEvents.bind(this)}TouchEventSimulator.mode=null,TouchEventSimulator.prototype.start=function(){return this._initialised?void(\"function\"==typeof Logger&&Logger(\"TouchEventSimulator\").warn(\"Touch event simulator already initialised!\")):(\"function\"==typeof Logger&&Logger(\"TouchEventSimulator\").log(\"Enabling touch event simulation\"),this.doc.defaultView.msPointerEnabled?this.startPointers():this.startMouse(),this.el.addEventListener(\"touchstart\",this.captureBubbleEvents,!1),this.el.addEventListener(\"touchmove\",this.captureBubbleEvents,!1),this.el.addEventListener(\"touchend\",this.captureBubbleEvents,!1),this.el.addEventListener(\"touchcancel\",this.captureBubbleEvents,!1),void this.el.addEventListener(\"tap\",this.captureBubbleEvents,!1))},TouchEventSimulator.prototype.stop=function(){return this._initialised?(\"function\"==typeof Logger&&Logger(\"TouchEventSimulator\").log(\"Disabling touch event simulation\"),this.win&&this.win.msPointerEnabled?this.stopPointers():this.stopMouse(),this.el.removeEventListener(\"touchstart\",this.captureBubbleEvents,!1),this.el.removeEventListener(\"touchmove\",this.captureBubbleEvents,!1),this.el.removeEventListener(\"touchend\",this.captureBubbleEvents,!1),this.el.removeEventListener(\"touchcancel\",this.captureBubbleEvents,!1),void this.el.removeEventListener(\"tap\",this.captureBubbleEvents,!1)):void(\"function\"==typeof Logger&&Logger(\"TouchEventSimulator\").warn(\"Touch event simulator not running!\"))},TouchEventSimulator.prototype.captureBubbleEvents=function(t){t.stopPropagation(),t.preventDefault()},TouchEventSimulator.prototype.startMouse=function(){this.el.addEventListener(\"mousedown\",this.handleMouseDown,!0),this.el.addEventListener(\"mousemove\",this.handleMouseMove,!0),this.el.addEventListener(\"mouseup\",this.handleMouseUp,!0),this.el.addEventListener(\"mouseout\",this.handleMouseOut,!0),this.el.addEventListener(\"dragstart\",this.handleDragStart,!0),this._initialised=!0},TouchEventSimulator.prototype.stopMouse=function(){this.el.removeEventListener(\"mousedown\",this.handleMouseDown,!0),this.el.removeEventListener(\"mousemove\",this.handleMouseMove,!0),this.el.removeEventListener(\"mouseup\",this.handleMouseUp,!0),this.el.removeEventListener(\"mouseout\",this.handleMouseOut,!0),this.el.removeEventListener(\"dragstart\",this.handleDragStart,!0),this._initialised=!1},TouchEventSimulator.prototype.startPointers=function(){this.el.addEventListener(\"MSPointerDown\",this.handlePointerDown,!0),this.el.addEventListener(\"MSPointerMove\",this.handlePointerMove,!0),this.el.addEventListener(\"MSPointerUp\",this.handlePointerUp,!0),this.el.addEventListener(\"MSPointerCancel\",this.handlePointerCancel,!0),this._initialised=!0},TouchEventSimulator.prototype.stopPointers=function(){this.el.removeEventListener(\"MSPointerDown\",this.handlePointerDown,!0),this.el.removeEventListener(\"MSPointerMove\",this.handlePointerMove,!0),this.el.removeEventListener(\"MSPointerUp\",this.handlePointerUp,!0),this.el.removeEventListener(\"MSPointerCancel\",this.handlePointerCancel,!0),this._initialised=!1},TouchEventSimulator.prototype.init=function(){this.doc.defaultView.navigator.msPointerEnabled?this.start():(this.el.addEventListener(\"touchstart\",this.handleFirstEvent,!0),this.el.addEventListener(\"mousedown\",this.handleFirstEvent,!0))},TouchEventSimulator.prototype.updateTouchCoordinates=function(t){this.touch.screenX=t.screenX,this.touch.screenY=t.screenY,this.touch.pageX=t.pageX,this.touch.pageY=t.pageY,this.touch.clientX=t.clientX,this.touch.clientY=t.clientY},TouchEventSimulator.prototype.ignorables=[\"select\",\"input\",\"textarea\"],TouchEventSimulator.prototype.isFormElement=function(t){return this.ignorables.indexOf(t.nodeName.toLowerCase())>-1},TouchEventSimulator.prototype.isIgnorable=function(t){for(var e=t;e&&e instanceof HTMLElement;e=e.parentNode)if(hasClass(e,\"ignore-toucheventsimulator\"))return!0;return!1},TouchEventSimulator.prototype.handleFirstEvent=function(t){this._firstEventFired||(this._firstEventFired=!0,this.el.removeEventListener(\"touchstart\",this.handleFirstEvent,!0),this.el.removeEventListener(\"mousedown\",this.handleFirstEvent,!0),\"touch\"!=TouchEventSimulator.mode&&\"mousedown\"==t.type?(TouchEventSimulator.mode=\"mouse\",this.start(),this.handleMouseDown(t)):TouchEventSimulator.mode=\"touch\")},TouchEventSimulator.prototype.handleMouseDown=function(t){0!=t.button||this.isIgnorable(t.target)||(this.touch={identifier:0,target:t.target},this.updateTouchCoordinates(t),t.stopPropagation(),this.isFormElement(t.target)||t.preventDefault(),this.fireTouchEvent(\"touchstart\",t))},TouchEventSimulator.prototype.handleMouseMove=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),t.stopPropagation(),t.preventDefault(),this.fireTouchEvent(\"touchmove\",t))},TouchEventSimulator.prototype.handleMouseUp=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),t.stopPropagation(),t.preventDefault(),this.fireTouchEvent(\"touchend\",t),this.touch=null)},TouchEventSimulator.prototype.handleMouseOut=function(t){this.touch&&0==t.button&&(t.clientX<0||t.clientX>this.win.innerWidth||t.clientY<0||t.clientY>this.win.innerHeight)&&this.cancelInteraction()},TouchEventSimulator.prototype.handleDragStart=function(t){return t.preventDefault(),!1},TouchEventSimulator.prototype.handlePointerDown=function(t){0==t.button&&(this.touch={identifier:0,target:t.target},this.updateTouchCoordinates(t),this.fireTouchEvent(\"touchstart\",t))},TouchEventSimulator.prototype.handlePointerMove=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent(\"touchmove\",t))},TouchEventSimulator.prototype.handlePointerUp=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent(\"touchend\",t))},TouchEventSimulator.prototype.handlePointerCancel=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent(\"touchcancel\",t),this.touch=null)},TouchEventSimulator.prototype.fireTouchEvent=function(t,e){var n=this.doc.createEvent(\"HTMLEvents\");n.initEvent(t,!0,!0),\"touchend\"==t||\"touchcancel\"==t?(n.touches=n.targetTouches=[],n.changedTouches=[this.touch]):n.touches=n.targetTouches=n.changedTouches=[this.touch],e.target.dispatchEvent(n)},TouchEventSimulator.prototype.cancelInteraction=function(){this.touch&&(this.fireTouchEvent(\"touchcancel\",this.touch),this.touch=null)};;\nfunction SwipeListener(t){function e(t,e){return Math.abs(t)>Math.abs(e)?t>0?\"east\":\"west\":e>0?\"south\":\"north\"}function a(){detach(l(),\"touchmove\",n,!1),detach(l(),\"touchend\",c,!1)}function n(t){if(t.touches.length>1)a();else{var n=t.changedTouches[0].pageX-o,c=t.changedTouches[0].pageY-i;if(r=Math.max(Math.abs(n),Math.abs(c)),r>Math.min(50,g))if(null===u)u=e(n,c);else{var h=e(n,c);u!=h&&a()}}}function c(){a(),r>=g&&(d(u,r),v.attachClickPreventionHandler())}function h(t){creative.adapter.useNativeClickForTapDetection||t.preventDefault(),1==t.touches.length&&(o=t.changedTouches[0].pageX,i=t.changedTouches[0].pageY,r=0,u=null,attach(l(),\"touchmove\",n,!1),attach(l(),\"touchend\",c,!1),v.detachClickPreventionHandler())}var o,i,u,r,s=t.target,l=t.swipeNodeGetter,d=t.swipe,g=t.minLength||50,v=Object.create(ClickPreventer).initClickPrevention(function(){return s});attach(window,\"touchstart\",noop,!1),attach(s,\"touchstart\",h,!1)};\nvar ClickPreventer={initClickPrevention:function(e){return this._getDefaultClickPreventionNode=e||function(){},this._clickPreventionNode=null,this._clickPreventionHandler=this._clickPreventionHandler.bind(this),this},attachClickPreventionHandler:function(e){creative.adapter.nativeClickEmittedOnSwipe&&!this._clickPreventionNode&&(this._clickPreventionNode=e||this._getDefaultClickPreventionNode(),attach(this._clickPreventionNode,\"click\",this._clickPreventionHandler,!0))},detachClickPreventionHandler:function(){creative.adapter.nativeClickEmittedOnSwipe&&this._clickPreventionNode&&(detach(this._clickPreventionNode,\"click\",this._clickPreventionHandler,!0),this._clickPreventionNode=null)},_clickPreventionHandler:function(e){e.stopPropagation(),this.detachClickPreventionHandler()}};;\nfunction PlaceboBar(e,t,a,i){var n=!1,r=document.createElement(\"div\");r.className=\"celtra-placebobar\",r.style.cssText=\"position: absolute; bottom: 60px; left: 0; right: 0; margin: auto; z-index: 20; width: 215px; height: 8px;\";var l=document.createElement(\"img\");l.src=creative.resourceUrl+\"runner/clazzes/CreativeUnit/loading-back.png\",l.style.position=\"absolute\",l.style.width=\"100%\",l.style.height=\"100%\",r.appendChild(l);var o=document.createElement(\"div\");o.style.position=\"absolute\",o.style.top=\"2px\",o.style.bottom=\"2px\",o.style.left=\"3px\",o.style.right=\"3px\",r.appendChild(o);var s=document.createElement(\"div\");return s.style.background=\"url(\"+creative.resourceUrl+\"runner/clazzes/CreativeUnit/loading-over.png) \"+i+\" repeat-x\",s.style.position=\"absolute\",s.style.width=\"0\",s.style.height=\"100%\",o.appendChild(s),r.start=function(){function i(){if(r.parentNode){var n=Math.min((new Date-l)/e,t);s.style.width=100*n+\"%\",t>n&&setTimeout(i,2*a*Math.random())}}if(!n){n=!0;var l=new Date;setTimeout(i,0)}},r};\nvar EventEmitter={emit:function(t){var e=this._listeners;if(e&&e[t]){var n=[].slice.call(arguments,1);e[t].forEach(function(t){t.apply(window,n)})}},emits:function(){var t=arguments;return function(){this.emit.apply(this,t)}.bind(this)},addListener:function(t,e){var n=this._listeners;n||(n=this._listeners={}),n[t]||(n[t]=[]),n[t].push(e)},removeListener:function(t,e){var n=this._listeners;n&&n[t]&&(n[t]=n[t].filter(function(t){return t!==e}))},once:function(t,e){var n=this;n.on(t,function i(){n.off(t,i),e.apply(this,arguments)})},onAll:function(t,e){t.split(\" \").waitForEach(function(t,e){this.once(t,e)},e,this)}};EventEmitter.on=EventEmitter.addListener,EventEmitter.off=EventEmitter.removeListener,EventEmitter.addEventListener=EventEmitter.addListener,EventEmitter.removeEventListener=EventEmitter.removeListener;;\nfunction InViewObject(t,e){this.view=t,this.inViewParent=e,this._init()}extend(InViewObject.prototype,EventEmitter),InViewObject.prototype._init=function(){this.rectInView=CRect.ZERO,this.areaInViewRatio=0,this.active=!1,this._maxPossibleDimensions={width:0,height:0,area:0},this.computeRectInView=this.computeRectInView.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)},InViewObject.prototype.getNode=function(){return this.view.getNode()},InViewObject.prototype.getParentMaxPossDims=function(){return this.inViewParent?this.inViewParent.getMaxPossibleDimensions():this.adapter.getViewportRect()},InViewObject.prototype.computeRectInView=function(){var t=this.inViewParent.getRectInView(),e=this.getBoundingClientRect(),i=t.intersect(e),n=!1;this.rectInView.equals(i)||(this.rectInView=i,n=!0),this._computeMaxPossibleDimensions(e,this.getParentMaxPossDims());var s=this._maxPossibleDimensions.area>0?i.area/this._maxPossibleDimensions.area:0,o=!1;s!==this.areaInViewRatio&&(this.areaInViewRatio=s,o=!0),n&&(this.emit(\"rectInViewChanged\",i),Logger(\"InViewObject\").debug(this.view.toString()+\", rectInViewChanged: \"+this.rectInView.toString())),o&&(this.emit(\"areaInViewRatioChanged\",s),Logger(\"InViewObject\").debug(this.view.toString()+\", areaInViewRatioChanged: \"+s))},InViewObject.prototype.getBoundingClientRect=function(){var t=this.getNode();return t?CRect.adopt(t.getBoundingClientRect()):CRect.ZERO},InViewObject.prototype.getMaxPossibleDimensions=function(){return this._maxPossibleDimensions},InViewObject.prototype._computeMaxPossibleDimensions=function(t,e){this._maxPossibleDimensions.width=Math.min(e.width,t.width),this._maxPossibleDimensions.height=Math.min(e.height,t.height),this._maxPossibleDimensions.area=this._maxPossibleDimensions.width*this._maxPossibleDimensions.height},InViewObject.prototype.getRectInView=function(){return this.rectInView},InViewObject.prototype.getAreaInViewRatio=function(){return this.areaInViewRatio},InViewObject.prototype.start=function(){this.active||(this._start(),this.active=!0,this.computeRectInView())},InViewObject.prototype._start=function(){this.inViewParent.on(\"rectInViewChanged\",this.computeRectInView),this.inViewParent.on(\"areaInViewRatioChanged\",this.computeRectInView)},InViewObject.prototype.stop=function(){this.active&&(this.computeRectInView(),this._stop(),this.active=!1)},InViewObject.prototype._stop=function(){this.inViewParent.off(\"rectInViewChanged\",this.computeRectInView),this.inViewParent.off(\"areaInViewRatioChanged\",this.computeRectInView)};;\nfunction TaskScheduler(){this.hub=extend({},EventEmitter)}TaskScheduler.prototype.when=function(){var t,e=this;return t=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),{run:function(n){t.waitForEach(function(t,n){e.hub.once(t,n)},n)}}},TaskScheduler.prototype.notify=function(t){this.paused||this.hub.emit(t)},TaskScheduler.prototype.notifies=function(t){return function(){this.notify(t)}.bind(this)},TaskScheduler.prototype.pause=function(){this._paused=!0};;\nfunction DryRunResultSet(t){this._actions=t}DryRunResultSet.prototype.contains=function(t,n){return this._actions.some(function(e){var o=t==e.method,u=!n||n==e.instance;return o&&u})},DryRunResultSet.prototype.getAll=function(){return this._actions},DryRunResultSet.prototype.concat=function(t){return new DryRunResultSet(this._actions.concat(t.getAll()))};;\nvar ActionInvocationSimulator={_dryRun:!1,_dryRunActions:[],_dryRunExecutedActionsLocalIds:[],beginDryRun:function(){this._dryRun=!0,this._dryRunActions=[],this._dryRunExecutedActionsLocalIds=[]},endDryRun:function(){var n=this._dryRunActions;return this._dryRun=!1,this._dryRunActions=[],this._dryRunExecutedActionsLocalIds=[],new DryRunResultSet(n)},isDryRun:function(){return this._dryRun},needsDryRun:function(n){return!this._dryRunExecutedActionsLocalIds[n]},logActionDryRun:function(n,t,u){this._dryRunExecutedActionsLocalIds[n]=!0,this._dryRunActions.push({method:t,instance:u})}};;\nvar TriggerHost={_getTriggers:function(r,i){return i||(i=retTrue),this.triggers.filter(function(t){return t.type==r&&i(t.parameters,t)})},_fireArrayOfTriggers:function(r,i,t){var e=this;i||(i=noop),t||(t=new ActionContext(e)),r.waitForEach(function(r,i){r.onFire?r.onFire(t,i):i()},i)},hasTriggers:function(r,i){return this._getTriggers(r,i).length>0},fireTriggersDryRun:function(r,i,t,e){var n;try{ActionInvocationSimulator.beginDryRun(),this.fireTriggers(r,i,t,e)}finally{n=ActionInvocationSimulator.endDryRun()}return n},fireTriggers:function(r,i,t,e){var n=this._getTriggers(r,i);this._fireArrayOfTriggers(n,t,e)},fireSortedTriggers:function(r,i,t,e,n){var g=this._getTriggers(r,i),n=n||null;this._fireArrayOfTriggers(g.sort(n),t,e)},triggerAction:function(r,i,t){this.fireTriggers(i.eventName,null,t,r)},triggerByLocalIdAction:function(r,i,t){var e=i.event?[i.event]:[];this._fireArrayOfTriggers(e,t,r)},triggerByLocalIdActionDryRun:function(r,i,t){this.triggerByLocalIdAction(r,i,t)}};;\nvar SceneHost={_initImmediatelyPlayedScenes:function(){if(this.immediatelyPlayedScenes){var e=[];if(this instanceof Screen){e=this.immediatelyPlayedScenes.appear.scenes;var i=!this.appearedAtLeastOnce;i&&(e=e.concat(this.immediatelyPlayedScenes.firstAppear.scenes))}else e=this.immediatelyPlayedScenes.conditionMet.scenes;e.forEach(function(e){e.renderFirstFrame()})}}};;\nfunction ActionContext(e,t){if(this._id=randInt(),this.initiator=e,this.initiationTimestamp=new Date/1e3,\"object\"==typeof t?(this.consideredUserInitiatedByBrowser=!!t.consideredUserInitiatedByBrowser,this.certainlyNotCausedByUserBehavior=!!t.certainlyNotCausedByUserBehavior):(this.consideredUserInitiatedByBrowser=!!t,this.certainlyNotCausedByUserBehavior=!1),this.inUserInitiatedIteration=this.consideredUserInitiatedByBrowser,this.consideredUserInitiatedByBrowser&&this.certainlyNotCausedByUserBehavior)throw new Error(\"Unable to create an ActionContext where both consideredUserInitiatedByBrowser and certainlyNotCausedByUserBehavior are true!\");if(e instanceof Screen)this.screen=e,this.screenObject=null,this.unitVariant=this.screen.parentUnitVariant;else if(e instanceof ScreenObject)this.screen=e.parentScreen,this.screenObject=e,this.unitVariant=this.screen.parentUnitVariant;else{if(!(\"undefined\"!=typeof CreativeUnitVariant&&e instanceof CreativeUnitVariant))throw new Error(\"Initiator (\"+e+\") is not a Screen or a ScreenObject. Analytics would be confused.\");this.screen=null,this.screenObject=null,this.unitVariant=e}if(this.inUserInitiatedIteration){var i=function(){this.inUserInitiatedIteration=!1}.bind(this);defer(i),nextFrame(i)}if(this.trackUserInteraction=this.trackUserInteraction.bind(this),this._isAttributable=!!this.screen&&this._isScreenReadyForEventAttribution(),this.screen&&!this.screen.parentUnit.name)throw new Error(\"Parent unit missing name.\")}ActionContext.prototype._isScreenReadyForEventAttribution=function(){return this.screen.isMasterScreen()?this.screen.parentContainer.screens.some(function(e){return e.appearedAtLeastOnce&&e.isNormalScreen()}):this.screen.appearedAtLeastOnce},ActionContext.prototype.extendEvent=function(e){return extend({unitName:this.unitVariant?this.unitVariant.parentUnit.name:this.screen.parentUnit.name,unitVariantLocalId:this.unitVariant?this.unitVariant.localId:null,screenLocalId:this.screen?this.screen.localId:null,screenTitle:this.screen?this.screen.title:null,screenIsMaster:this.screen?this.screen.isMasterScreen():null,objectLocalId:this.screenObject?this.screenObject.localId:null,objectName:this.screenObject?this.screenObject.name:null,objectClazz:this.screenObject?this.screenObject.constructor.name:null,initiationTimestamp:this.initiationTimestamp},e)},ActionContext.prototype.track=function(e,t){this.screen&&!this._isAttributable&&console.warn('Event \"'+e.name+'\" appears to be initiated before a screen was ever shown and will be ignored.'),creative.track(this.extendEvent(e),t)},ActionContext.prototype.trackUserInteraction=function(){if(creative.getUserInteracted())creative.interactionTrackingTimeout||(this.track({name:\"interaction\"}),creative.interactionTrackingTimeout=setTimeout(function(){creative.interactionTrackingTimeout=null},1e3));else{if(creative.runtimeParams.userInteracted=1,creative.experiments.get(\"TrackViewableAreaChange\")){var e=creative.adapter;e.canMeasureViewportPlacementGeometry&&\"function\"==typeof e.trackViewableAreaRatio&&e.trackViewableAreaRatio()}this.track({name:\"firstInteraction\"})}defer(creative.trackingCenter.batchFlush),creative.userInteracted(this)},ActionContext.prototype.trackClickThrough=function(e){e||(e=noop),creative.runtimeParams.clickedThrough?this.track({name:\"clickThrough\"},e):(creative.runtimeParams.clickedThrough=1,this.track({name:\"firstClickThrough\"},e)),defer(creative.trackingCenter.batchFlush),creative.clickedThrough(this)};;\nfunction VideoContext(t,e,i){VideoContext.uberConstructor.call(this,t instanceof ActionContext?t.initiator:t,t&&t.userInitiated),this.file=e,this.url=e.getUrl(),this.label=i,this.source=null}inherit(VideoContext,ActionContext),VideoContext._eventNames=[\"videoDurationUpdate\",\"videoPlayAttempted\",\"videoPlayedSegment\",\"videoStart\",\"videoFirstQuartile\",\"videoMidpoint\",\"videoThirdQuartile\",\"videoComplete\"],VideoContext.prototype.registerSource=function(t){if(!t)throw\"Not a valid source of video events.\";this.source=t,VideoContext._eventNames.forEach(function(t){this.source.on(t,function(e){this.handleEvent(t,e)}.bind(this))}.bind(this))},VideoContext.prototype.handleEvent=function(t,e){this.track(extend(JSON.parse(JSON.stringify(e||{})),{name:t}))},VideoContext.prototype.track=function(t){if(\"videoPlayAttempted\"==t.name){var e=this.file.url?\"URL\":\"File\";extend(t,{sourceType:e,source:\"URL\"==e?this.file.url:this.file.blobHash,label:this.label})}VideoContext.uber.track.call(this,t)};;\nfunction ShakeListener(){this.shakeThreshold=1.5,this.canListen=!0,this.slidingWindow=5,this.signals=[],this.handleMotion=this.handleMotion.bind(this),this.topWindow=creative.adapter.getTopWindow()}extend(ShakeListener.prototype,EventEmitter),ShakeListener.prototype.start=function(){this.canListen=!0,creative.deviceMotionListenerAdded||(creative.deviceMotionListenerAdded=!0,this.topWindow.addEventListener(\"devicemotion\",this.handleMotion))},ShakeListener.prototype.stop=function(){this.canListen=!1,creative.deviceMotionListenerAdded&&(creative.deviceMotionListenerAdded=!1,this.topWindow.removeEventListener(\"devicemotion\",this.handleMotion))},ShakeListener.prototype.handleMotion=function(i){if(this.canListen){this.signals.push(i.accelerationIncludingGravity),this.signals.length>this.slidingWindow&&this.signals.shift();var e=this.signals.reduce(function(i,e){return{x:i.x+e.x,y:i.y+e.y,z:i.z+e.z}}),t={x:e.x/this.signals.length,y:e.y/this.signals.length,z:e.z/this.signals.length};if(this.prevSignal){var s=null,n=Math.abs(t.x-this.prevSignal.x),h=Math.abs(t.y-this.prevSignal.y),a=Math.abs(t.z-this.prevSignal.z);if(90===Math.abs(creative.adapter.orientation)){var o=h;h=n,n=o}n>h&&n>a&&n>this.shakeThreshold?s=\"x\":h>n&&h>a&&h>this.shakeThreshold?s=\"y\":a>n&&a>h&&a>this.shakeThreshold&&(s=\"z\"),(n>this.shakeThreshold||h>this.shakeThreshold||a>this.shakeThreshold)&&this.emit(\"shake\",s)}this.prevSignal=t}};;\n!function(){\"use strict\";function t(t){for(var e in t)this[e]=t[e]}var e=function(t){var e=\"undefined\"!=typeof FontFace,i=/iP(?:ad|hone|od).*OS ([0-9_]+)/.exec(t),n=!!i&&parseInt(i[1],10)>=10,o=/^(?!.*(?:Android|Chrome)).*Version\\/(\\d+(?:\\.\\d+)*).*?Safari/.exec(t);if(o||n)return!1;var s=/Gecko.*Firefox\\/(\\d+)/.exec(t);return s?e&&parseInt(s[1],10)>46:e}(window.navigator.userAgent);t.prototype.getId=function(){return this.typefaceId||this.id},t.prototype.getSubsetString=function(){return this.subset},t.prototype.getUnicodeRange=function(){return this.unicodes},t.prototype.getBrowserCompatibleFontFamily=function(){var t=this.supportsStretch()&&this.stretch?this.family+\" \"+this.stretch:this.family;if(t.length>25){for(var e,i=5381,n=0,o=t.length;o>n;n++)e=t.charCodeAt(n),i=(i<<5)+i+e;return i.toString()}return t},t.prototype.setBaseUrl=function(t){this.baseUrl=t},t.prototype.isCustom=function(){return\"custom\"===this.provider},t.prototype.isGoogle=function(){return\"google\"===this.provider},t.prototype.isMonotype=function(){return\"monotype\"===this.provider},t.prototype.isSystem=function(){return\"system\"===this.provider},t.prototype.hasSubsetStringDefined=function(){var t=this.getSubsetString();return\"string\"==typeof t&&t.length>0},t.prototype.hasUnicodeRangeDefined=function(){var t=this.getUnicodeRange();return\"string\"==typeof t&&t.length>0},t.prototype.needsLoading=function(){return this.isMonotype()||this.isGoogle()||this.isCustom()},t.prototype.supportsStretch=function(){return this.isMonotype()||this.isCustom()},t.prototype.getCssProperties=function(){return{\"font-family\":this.needsLoading()?'\"'+this.getBrowserCompatibleFontFamily()+'\", Helvetica, sans-serif':this.getBrowserCompatibleFontFamily(),\"font-style\":this.style,\"font-weight\":this.weight}},t.prototype.getFileUrl=function(t){if(\"undefined\"!=typeof this.files&&\"undefined\"!=typeof this.files[t]){var e=this.getId();if(\"string\"!=typeof e)return this.baseUrl+this.files[t]+\".\"+t;var i=this.files[t]&&this.files[t].name||\"webfont\",n=this.baseUrl+e+\"/\"+encodeURIComponent(i)+\".\"+t;return this.hasSubsetStringDefined()&&(n+=\"?subset=\"+encodeURIComponent(this.getSubsetString())),n}},t.prototype.getStyleForVariation=function(){var t=/normal|italic|oblique/i.exec(this.style);return\"undefined\"!=typeof t?t[0]:void 0},t.prototype.getWeightForVariation=function(){var t=/normal|bold|([1-9])00/i.exec(this.weight);return\"undefined\"!=typeof t?t[0]:void 0},t.prototype.generateFontFace=function(){var t=\"\",e=this.getFileUrl(\"ttf\"),i=this.getFileUrl(\"woff\");return this.style&&this.weight&&(e||i)&&(t=\"@font-face {\",t+='font-family: \"'+this.getBrowserCompatibleFontFamily()+'\";',t+=\"font-style: \"+this.style+\";\",t+=\"font-weight: \"+this.weight+\";\",t+=\"src:\",i&&(t+='url(\"'+i+'\") format(\"woff\")'),e&&i&&(t+=\",\"),e&&(t+='url(\"'+e+'\") format(\"truetype\")'),t+=\";\",this.hasUnicodeRangeDefined()&&(t+=\"unicode-range: \"+this.getUnicodeRange()+\";\"),t+=\"}\"),t},t.prototype.loadStyle=function(t){t=t||function(){};var i=this.getBrowserCompatibleFontFamily(),n=function(e){t(e||\"Failed to load font files.\")},o=function(){if(e){var o=\"300px\",s=this.style+\" \"+this.weight+\" \"+o+' \"'+i+'\"',r=this.hasUnicodeRangeDefined()&&this.hasSubsetStringDefined()?this.getSubsetString():\" \";document.fonts.load(s,r).then(function(e){1===e.length?t():n()},function(){n()})}else{if(\"undefined\"==typeof FontLoader)return void n(\"Font Loader is not initialized.\");FontLoader.watch(i,this.style,this.weight,t,n,this.getSubsetString())}}.bind(this);if(this.isCustom()||this.isMonotype()){var s=\"font-style-manager\",r=document.getElementById(s);r||(r=document.createElement(\"style\"),r.id=s,document.getElementsByTagName(\"head\")[0].appendChild(r));var a=this.generateFontFace();if(!a)return void n(\"Unable to define style for font without specifying files, style and weight.\");var f=[].slice.apply(r.sheet.cssRules).some(function(t){var e=t.style.getPropertyValue(\"font-family\").replace(/^['\"](.+)['\"]$/,\"$1\");return e==this.getBrowserCompatibleFontFamily()&&t.style.getPropertyValue(\"font-style\")==this.style&&t.style.getPropertyValue(\"font-weight\")==this.weight}.bind(this));f||r.sheet.insertRule(a,r.sheet.cssRules.length),o()}else if(this.isGoogle()){var h=(\"https:\"===document.location.protocol?\"https\":\"http\")+\"://fonts.googleapis.com/css\",l=i.replace(/ /g,\"+\"),u=this.variation;if(!u){var d=\"\",p=\"\",g=this.getWeightForVariation();if(\"undefined\"!=typeof g){p=g,\"normal\"==p?p=400:\"bold\"==p&&(p=700);var c=this.getStyleForVariation();\"undefined\"!=typeof c&&\"italic\"==c&&(d=c)}u=p+d}u&&(l+=\":\"+u);var y=h+\"?family=\"+l;this.hasSubsetStringDefined()&&(y+=\"&text=\"+encodeURIComponent(this.getSubsetString()));var m=[].slice.apply(document.getElementsByTagName(\"link\")).filter(function(t){return t.href===y})[0];if(m||(m=document.createElement(\"link\"),m.setAttribute(\"rel\",\"stylesheet\"),m.setAttribute(\"media\",\"all\"),m.setAttribute(\"href\",y)),e){var v=function(){m._finished=!0,o()};m._finished?o():(m.addEventListener(\"load\",v),m.addEventListener(\"error\",v))}else\"undefined\"!=typeof defer?defer(o,0,\"FontBase.loadStyle defer watchFont\"):setTimeout(o,0);m.parentNode||document.getElementsByTagName(\"head\")[0].appendChild(m)}else this.isSystem()?t():n(\"Invalid or unsupported provider.\")},Object.defineProperty(t,\"useCSSFontLoadingAPI\",{value:e}),window.FontBase=t}();;\nvar ScreenTransition={replace:function(t,e,r,s,i,a){r.style.opacity=0,r.style.display=\"block\",s.style.display=\"block\",e.style.display=\"none\",nextFrame(function(){r.style.opacity=1,t.style.opacity=0,nextFrame(function(){t.style.display=\"none\",nextFrame(a||noop)})})},fade:function(t,e,r,s,i,a){function n(){celtra.styler.css(r,\"transition\",\"\"),celtra.styler.css(t,\"transition\",\"\"),t.style.display=\"none\",nextFrame(a||noop)}r.style.opacity=0,r.style.display=\"block\",s.style.display=\"block\",e.style.display=\"none\",once(t,\"transitionend\",n),nextFrame(function(){celtra.styler.css(t,\"transition\",\"opacity \"+i.duration+\"ms ease-out\"),celtra.styler.css(r,\"transition\",\"opacity \"+i.duration+\"ms ease-out\"),nextFrame(function(){r.style.opacity=1,t.style.opacity=0})})},slide:function(t,e,r,s,i,a){var n={transition:\"all \"+i.duration+\"ms ease-out\"};switch(i.direction||\"west\"){case\"north\":n.startingFrom=\"translateY(0)\",n.endingFrom=\"translateY(\"+-i.unitSize.height+\"px)\",n.startingTo=\"translateY(\"+i.unitSize.height+\"px)\",n.endingTo=\"translateY(0)\";break;case\"south\":n.startingFrom=\"translateY(0)\",n.endingFrom=\"translateY(\"+i.unitSize.height+\"px)\",n.startingTo=\"translateY(\"+-i.unitSize.height+\"px)\",n.endingTo=\"translateY(0)\";break;case\"east\":n.startingFrom=\"translateX(0)\",n.endingFrom=\"translateX(\"+i.unitSize.width+\"px)\",n.startingTo=\"translateX(\"+-i.unitSize.width+\"px)\",n.endingTo=\"translateX(0)\";break;case\"west\":n.startingFrom=\"translateX(0)\",n.endingFrom=\"translateX(\"+-i.unitSize.width+\"px)\",n.startingTo=\"translateX(\"+i.unitSize.width+\"px)\",n.endingTo=\"translateX(0)\"}n.startingFromOpacity=1,n.startingToOpacity=0,n.endingFromOpacity=0,n.endingToOpacity=1,this._runTransition(t,e,r,s,n,i.duration,a)},flip:function(t,e,r,s,i,a){var n={transition:\"all \"+i.duration+\"ms ease-out\"},o=\"perspective(\"+2*i.unitSize.width+\"px) \";switch(i.direction||\"west\"){case\"north\":n.startingFrom=o+\"rotateX(0)\",n.endingFrom=o+\"rotateX(180deg)\",n.startingTo=o+\"rotateX(-180deg)\",n.endingTo=o+\"rotateX(0)\";break;case\"south\":n.startingFrom=o+\"rotateX(0)\",n.endingFrom=o+\"rotateX(-180deg)\",n.startingTo=o+\"rotateX(180deg)\",n.endingTo=o+\"rotateX(0)\";break;case\"east\":n.startingFrom=o+\"rotateY(0)\",n.endingFrom=o+\"rotateY(180deg)\",n.startingTo=o+\"rotateY(-180deg)\",n.endingTo=o+\"rotateY(0)\";break;case\"west\":n.startingFrom=o+\"rotateY(0)\",n.endingFrom=o+\"rotateY(-180deg)\",n.startingTo=o+\"rotateY(180deg)\",n.endingTo=o+\"rotateY(0)\"}celtra.styler.css(t.parentNode,\"transformStyle\",\"preserve-3d\"),celtra.styler.css(t,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(e,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(r,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(s,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(t,\"transformOrigin\",\"50% 50% 0\"),celtra.styler.css(e,\"transformOrigin\",\"50% 50% 0\"),celtra.styler.css(r,\"transformOrigin\",\"50% 50% 0\"),celtra.styler.css(s,\"transformOrigin\",\"50% 50% 0\"),this._runTransition(t,e,r,s,n,i.duration,function(){celtra.styler.css(t.parentNode,\"transformStyle\",\"\"),celtra.styler.css(t,\"backfaceVisibility\",\"\"),celtra.styler.css(e,\"backfaceVisibility\",\"\"),celtra.styler.css(r,\"backfaceVisibility\",\"\"),celtra.styler.css(s,\"backfaceVisibility\",\"\"),celtra.styler.css(t,\"transform\",\"\"),celtra.styler.css(e,\"transform\",\"\"),celtra.styler.css(r,\"transform\",\"\"),celtra.styler.css(s,\"transform\",\"\"),celtra.styler.css(t,\"transformOrigin\",\"\"),celtra.styler.css(e,\"transformOrigin\",\"\"),celtra.styler.css(r,\"transformOrigin\",\"\"),celtra.styler.css(s,\"transformOrigin\",\"\"),nextFrame(a||noop)})},cube:function(t,e,r,s,i,a){var n={transition:\"all \"+i.duration+\"ms ease-out\"},o=\"perspective(\"+2*i.unitSize.width+\"px) \";switch(i.direction||\"west\"){case\"north\":n.startingFrom=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(0) \",n.endingFrom=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(90deg) \",n.startingTo=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(-90deg)\",n.endingTo=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(0) \";break;case\"south\":n.startingFrom=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(0) \",n.endingFrom=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(-90deg)\",n.startingTo=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(90deg) \",n.endingTo=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(0) \";break;case\"east\":n.startingFrom=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(0) \",n.endingFrom=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(90deg) \",n.startingTo=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(-90deg)\",n.endingTo=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(0) \";break;case\"west\":n.startingFrom=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(0) \",n.endingFrom=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(-90deg)\",n.startingTo=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(90deg) \",n.endingTo=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(0) \"}var l=t.style.overflow,c=e.style.overflow,y=r.style.overflow,d=s.style.overflow;switch(celtra.styler.css(t.parentNode,\"transformStyle\",\"preserve-3d\"),t.style.overflow=e.style.overflow=\"hidden\",r.style.overflow=s.style.overflow=\"hidden\",t.style.backfaceVisibility=e.style.backfaceVisibility=\"hidden\",r.style.backfaceVisibility=s.style.backfaceVisibility=\"hidden\",i.direction||\"west\"){case\"north\":case\"south\":celtra.styler.css(t,\"transformOrigin\",\"50% 50% \"+-i.unitSize.height/2+\"px\"),celtra.styler.css(e,\"transformOrigin\",\"50% 50% \"+-i.unitSize.height/2+\"px\"),celtra.styler.css(r,\"transformOrigin\",\"50% 50% \"+-i.unitSize.height/2+\"px\"),celtra.styler.css(s,\"transformOrigin\",\"50% 50% \"+-i.unitSize.height/2+\"px\");break;case\"east\":case\"west\":celtra.styler.css(t,\"transformOrigin\",\"50% 50% \"+-i.unitSize.width/2+\"px\"),celtra.styler.css(e,\"transformOrigin\",\"50% 50% \"+-i.unitSize.width/2+\"px\"),celtra.styler.css(r,\"transformOrigin\",\"50% 50% \"+-i.unitSize.width/2+\"px\"),celtra.styler.css(s,\"transformOrigin\",\"50% 50% \"+-i.unitSize.width/2+\"px\")}this._runTransition(t,e,r,s,n,i.duration,function(){celtra.styler.css(t.parentNode,\"transformStyle\",\"\"),t.style.overflow=l,e.style.overflow=c,r.style.overflow=y,s.style.overflow=d,celtra.styler.css(t,\"transformOrigin\",\"\"),celtra.styler.css(e,\"transformOrigin\",\"\"),celtra.styler.css(r,\"transformOrigin\",\"\"),celtra.styler.css(s,\"transformOrigin\",\"\"),celtra.styler.css(t,\"backfaceVisibility\",\"\"),celtra.styler.css(e,\"backfaceVisibility\",\"\"),celtra.styler.css(r,\"backfaceVisibility\",\"\"),celtra.styler.css(s,\"backfaceVisibility\",\"\"),nextFrame(a||noop)})},_runTransition:function(t,e,r,s,i,a,n){function o(){celtra.styler.css(r,\"transition\",\"\"),celtra.styler.css(s,\"transition\",\"\"),celtra.styler.css(t,\"transition\",\"\"),celtra.styler.css(e,\"transition\",\"\"),celtra.styler.css(r,\"transform\",\"\"),celtra.styler.css(s,\"transform\",\"\"),celtra.styler.css(t,\"transform\",\"\"),celtra.styler.css(e,\"transform\",\"\"),t.style.display=e.style.display=\"none\",t.style.opacity=e.style.opacity=r.style.opacity=s.style.opacity=\"\",nextFrame(n||noop)}celtra.styler.css(t,\"transform\",i.startingFrom),celtra.styler.css(e,\"transform\",i.startingFrom),celtra.styler.css(r,\"transform\",i.startingTo),celtra.styler.css(s,\"transform\",i.startingTo),t.style.opacity=e.style.opacity=\"undefined\"==typeof i.startingFromOpacity?1:i.startingFromOpacity,r.style.opacity=s.style.opacity=\"undefined\"==typeof i.startingToOpacity?1:i.startingToOpacity,r.style.display=s.style.display=\"block\";var l=this._runOnce(o);once(r,\"transitionend\",l),setTimeout(function(){celtra.styler.css(r,\"transition\",i.transition),celtra.styler.css(t,\"transition\",i.transition),celtra.styler.css(s,\"transition\",i.transition),celtra.styler.css(e,\"transition\",i.transition),nextFrame(function(){celtra.styler.css(t,\"transform\",i.endingFrom),celtra.styler.css(e,\"transform\",i.endingFrom),celtra.styler.css(r,\"transform\",i.endingTo),celtra.styler.css(s,\"transform\",i.endingTo),t.style.opacity=e.style.opacity=\"undefined\"==typeof i.endingFromOpacity?1:i.endingFromOpacity,r.style.opacity=s.style.opacity=\"undefined\"==typeof i.endingToOpacity?1:i.endingToOpacity}),setTimeout(l,a+50)},20)},run:function(t,e,r,s,i){var a=this._getSupportedAnimation(i.animation||\"replace\");if(!(a in this))throw new Error(\"The transition function does not exist!\");this[a].apply(this,arguments)},_getSupportedAnimation:function(t){return!android(\"4\")||window.navigator.userAgent.match(/Chrome.*(Mobile)? Safari/)||\"cube\"!==t&&\"flip\"!==t?t:\"fade\"},_runOnce:function(t){var e=!1;return function(){return e?void 0:(e=!0,t())}}};;\nfunction AdViewableTimeObserver(e){this._tracker=e,this._readyToShow=!1,this._adapter}function AdViewableInViewObjectObserver(){AdViewableInViewObjectObserver.uberConstructor.apply(this,arguments),this._inViewObjects=[],this._viewableInViewObjects=[]}function AdViewableUnitObserver(){AdViewableUnitObserver.uberConstructor.apply(this,arguments),this._units=[],this._viewableUnits=[],this._containerIsViewable=!1}AdViewableTimeObserver.prototype.readyToShow=function(){throw new Error(\"AdViewableInViewObjectObserver.readyToShow not implemented!\")},AdViewableTimeObserver.prototype.registerUnit=function(){throw new Error(\"AdViewableInViewObjectObserver.registerUnit not implemented!\")},AdViewableTimeObserver.prototype.registerAdapter=function(){throw new Error(\"AdViewableTimeObserver.registerAdapter not implemented!\")},AdViewableTimeObserver.prototype.stop=function(){this._tracker.stop()},inherit(AdViewableInViewObjectObserver,AdViewableTimeObserver),AdViewableInViewObjectObserver.prototype.registerAdapter=function(e){this._adapter=e;var t=this._tracker;e.mediaState.on(\"videoStarted\",function(){this._tryStartTracker()}.bind(this)),e.mediaState.on(\"videoStopped\",function(){0===this._viewableInViewObjects.length&&t.stop()}.bind(this))},AdViewableInViewObjectObserver.prototype.readyToShow=function(){this._readyToShow=!0,this._tryStartTracker()},AdViewableInViewObjectObserver.prototype.registerUnit=function(e){var t=e.inView,i=this._inViewObjects,r=this._viewableInViewObjects,a=this._tracker;if(-1===i.indexOf(t)){i.push(t);var n=-1!==r.indexOf(t);!n&&t.getAreaInViewRatio()>0&&r.push(t),this._tryStartTracker(),t.on(\"areaInViewRatioChanged\",function(e){var i=r.indexOf(t),n=-1!==i;!n&&e>0?(r.push(t),this._tryStartTracker()):0===e&&n&&(r.splice(i,1),0===r.length&&a.stop())}.bind(this))}},AdViewableInViewObjectObserver.prototype._tryStartTracker=function(){var e=this._adapter,t=e&&e.mediaState.playingVideo;return this._readyToShow&&(this._viewableInViewObjects.length>0||t)?(this._tracker.start(),!0):!1},inherit(AdViewableUnitObserver,AdViewableTimeObserver),AdViewableUnitObserver.prototype.registerAdapter=function(e){this._adapter=e,this._containerIsViewable=e.containerIsViewable;var t=this._tracker;e.on(\"containerViewableChange\",function(e){this._containerIsViewable=e,e?this._tryStartTracker():t.stop()}.bind(this)),e.mediaState.on(\"videoStarted\",function(){this._tryStartTracker()}.bind(this)),e.mediaState.on(\"videoStopped\",function(){this._adapter.containerIsViewable&&0!==this._viewableUnits.length||t.stop()}.bind(this))},AdViewableUnitObserver.prototype.readyToShow=function(){this._readyToShow=!0,this._tryStartTracker()},AdViewableUnitObserver.prototype.registerUnit=function(e){if(!this._adapter)throw new Error(\"adapter was not registered yet!\");var t=this._units,i=this._viewableUnits,r=this._tracker;-1===t.indexOf(e)&&(t.push(e),-1===i.indexOf(e)&&e._visible&&(i.push(e),this._tryStartTracker()),e.on(\"appeared\",function(){-1===i.indexOf(e)&&(i.push(e),this._tryStartTracker())}.bind(this)),e.on(\"disappeared\",function(){var t=i.indexOf(e);-1!==t&&(i.splice(t,1),0===i.length&&r.stop())}.bind(this)))},AdViewableUnitObserver.prototype._tryStartTracker=function(){var e=this._adapter;return e&&(e.containerIsViewable||e.mediaState.playingVideo)&&this._readyToShow&&this._viewableUnits.length>0?(this._tracker.start(),!0):!1};;\nfunction AdViewableTimeTracker(i,e,t,n){this._trackingCenter=i,this._raf=e,this._win=t,this._intervals=n||{3e3:1e3,1e4:2e3,63e3:3e3},this._isRunning=!1,this._viewableMilliseconds=0,this._fromTime=0,this._pendingPingTimeoutId,this._pendingPingRafId,this._maxRafLatency=500}AdViewableTimeTracker.eventName=\"viewableTime\",AdViewableTimeTracker.TrackingData=function(i,e){return i>e&&(e=i),{name:AdViewableTimeTracker.eventName,from:i/1e3,to:e/1e3}},AdViewableTimeTracker.prototype.start=function(){this._isRunning||(this._isRunning=!0,this._fromTime=Date.now(),0===this._viewableMilliseconds?this._initPing():this._setNextPing())},AdViewableTimeTracker.prototype.stop=function(){if(this._clearPendingPing(),this._isRunning&&-1!==this._getPingInterval()){var i=Date.now(),e=i-this._fromTime;this._viewableMilliseconds+=e;var t=new AdViewableTimeTracker.TrackingData(this._fromTime,i);this._track(t)}this._isRunning=!1},AdViewableTimeTracker.prototype._initPing=function(){var i=this._fromTime,e=this._getPingInterval(),t=new AdViewableTimeTracker.TrackingData(this._fromTime,i);this._pendingPingRafId=this._raf.nextFrame(function(){this._track(t),this._setFromTimeForNextPing(i,e),this._setNextPing()}.bind(this))},AdViewableTimeTracker.prototype._setNextPing=function(){function i(){if(this._isRunning){var i=Date.now();this._viewableMilliseconds+=e,this._normalizeFromTime(i,e),this._pendingPingRafId=this._raf.nextFrame(function(){var t=new AdViewableTimeTracker.TrackingData(this._fromTime,i);this._track(t),this._setFromTimeForNextPing(i,e),this._setNextPing()}.bind(this))}}this._clearPendingPing();var e=this._getPingInterval();this._isRunning&&-1!==e&&(this._pendingPingTimeoutId=this._win.setTimeout(i.bind(this),e))},AdViewableTimeTracker.prototype._normalizeFromTime=function(i,e){var t=i-this._fromTime,n=e+this._maxRafLatency;t>n&&(this._fromTime=i)},AdViewableTimeTracker.prototype._setFromTimeForNextPing=function(i,e){var t=Date.now(),n=t-i,r=n>e;this._fromTime=r?t:i},AdViewableTimeTracker.prototype._getPingInterval=function(){var i=this._viewableMilliseconds,e=this._intervals,t=Object.keys(this._intervals),n=1*t[t.length-1],r=-1;return t.some(function(t){return 1*t>i?(r=e[t],i+r>n&&(r=-1),!0):!1}),r},AdViewableTimeTracker.prototype._clearPendingPing=function(){this._raf.cancelFrame(this._pendingPingRafId),this._win.clearTimeout(this._pendingPingTimeoutId)},AdViewableTimeTracker.prototype._track=function(i){this._trackingCenter.track(i)};;\n!function(t){function i(){this.playingVideo=!1}var e=i.prototype;extend(e,EventEmitter),e.stopVideo=function(){this.playingVideo=!1,this.emit(\"videoStopped\")},e.startVideo=function(){this.playingVideo=!0,this.emit(\"videoStarted\")},t.MediaState=i}(window);;\nfunction StateObject(t){Object.defineProperties(this,{values:{enumerable:!1,configurable:!1,writable:!0,value:{}},_isDirty:{enumerable:!1,configurable:!1,writable:!0,value:!1}}),Object.keys(t).forEach(function(e){this.registerValue(e,t[e])},this)}extend(StateObject.prototype,EventEmitter),StateObject.prototype.registerValue=function(t,e){this.values[t]={dirty:!1,value:e},Object.defineProperty(this,t,{get:function(){return this.values[t].value},set:function(e){var i=this.values[t],r=i.value;e!=r&&(i.dirty=!0,i.value=e,this._isDirty=!0,this.emit(\"change:\"+t,e,r))},enumerable:!0})},StateObject.prototype.markClean=function(t){var e=!1;Object.keys(this.values).forEach(function(i){t&&i!==t||(this[i].dirty=!1),e=e||this[i].dirty},this.values),this._isDirty=e},StateObject.prototype.getDirtyValues=function(){for(var t={},e=Object.keys(this.values),i=0;i1&&(t=Array.prototype.slice.apply(arguments));for(var e=0;e=this._targetTime?(this.pause(),this.value=this._targetValue,defer(this._callback||noop),this._startValue=null,this._startTime=null,this._targetValue=null,this._targetTime=null,this._callback=null):this.value=Math.pow(t/this._targetTime,this.options.exp)*i+this._startValue};;\nfunction ThresholdObserver(e){this.threshold=e,this._value=null}extend(ThresholdObserver.prototype,EventEmitter),Object.defineProperty(ThresholdObserver.prototype,\"value\",{get:function(){return this._value},set:function(e){if(null!==this._value&&this._value!==e){var t=this._value-this.threshold,h=e-this.threshold;0>=t*h&&(0>t?this.emit(\"up\"):0>h&&this.emit(\"down\"))}this._value=e}});;\nfunction BaseCreativeUnit(){}inherit(BaseCreativeUnit,View),BaseCreativeUnit.IGNORABLES=[\"INPUT\",\"SELECT\",\"TEXTAREA\",\"BUTTON\"],BaseCreativeUnit.prototype.awake=function(){BaseCreativeUnit.uber.awake.call(this),this._availableSize={width:0,height:0},this._isRendering=!1,this._engagementTracker=null,this._rxState=null,this._rxStateCopies=[]},BaseCreativeUnit.prototype.createNode=function(){return Logger(\"unit\").log(\"Starting to load \"+this),this.on(\"loaded\",creative.adapter.perf.start(\"CreativeUnit.load\").end),creative.experiments.get(\"TrackingLoadingTimes\")&&this.once(\"_firstScreenLoaded\",function(){var e=Date.now()-1e3*creative.runtimeParams.payloadJsClientTimestamp;if(3e4>e){var t={unitName:this.name};creative.aggregatorTracking.trackAggregator(\"unitLoadTime\",e,t),creative.aggregatorTracking.trackAggregator(\"unitLoadSuccesses\",t)}}.bind(this)),creative.adapter.on(\"mediaStopRequested\",function(e){this.emit(\"mediaStopRequested\",e)}.bind(this)),this.unitDiv=BaseCreativeUnit.uber.createNode.call(this),this._engagementTracker=new EngagementTracker(this.unitDiv,creative),Tapper(this.unitDiv,this.useClickForTap),attach(this.unitDiv,\"touchstart\",this._handleTouchStart.bind(this)),attach(this.unitDiv,\"touchmove\",this._handleTouchMove.bind(this)),this.unitDiv},BaseCreativeUnit.prototype.setAvailableSize=function(e,t){var r=this._availableSize.width!=e||this._availableSize.height!=t;return this._availableSize.width=e,this._availableSize.height=t,r},BaseCreativeUnit.prototype.getAvailableSize=function(){return{width:this._availableSize.width,height:this._availableSize.height}},BaseCreativeUnit.prototype.enterRenderTree=function(){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.exitRenderTree=function(){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.finishedLoading=function(){BaseCreativeUnit.uber.finishedLoading.call(this),Logger(\"unit\").log(\"Finished loading \"+this)},BaseCreativeUnit.prototype._handleTouchStart=function(e){if(!this.swipeable&&!creative.adapter.useNativeClickForTapDetection){for(var t=e.target;1!=t.nodeType;)t=t.parentNode;var r=function(){for(;t!==this.unitDiv;){if(t.className&&hasClass(t,\"map-container\"))return!0;t=t.parentNode}return!1}.bind(this);-1!=BaseCreativeUnit.IGNORABLES.indexOf(t.nodeName)||r()||e.preventDefault()}},BaseCreativeUnit.prototype._handleTouchMove=function(e){this.swipeable||e.preventDefault()},BaseCreativeUnit.prototype.createRxState=function(){this._rxState=this._generateNewRxStateObject()},BaseCreativeUnit.prototype._generateNewRxStateObject=function(){return new StateObject({left:null,top:null,right:null,bottom:null,width:null,height:null,vw:null,vh:null,x:null,y:null,pageYOffset:null})},BaseCreativeUnit.prototype.updateRxState=function(e){if(this._rxState){var t=e.getBoundingClientRect(),r=e.ownerDocument.defaultView;this._rxState.left=~~t.left,this._rxState.top=~~t.top,this._rxState.right=~~t.right,this._rxState.bottom=~~t.bottom,this._rxState.width=~~t.width,this._rxState.height=~~t.height,this._rxState.vw=r.innerWidth,this._rxState.vh=r.innerHeight,this._rxState.pageYOffset=r.pageYOffset,this._rxState.x=~~(t.left+t.width/2-r.innerWidth/2),this._rxState.y=~~(t.top+t.height/2-r.innerHeight/2),this._rxStateCopies.forEach(function(e){e.copyFrom(this._rxState)}.bind(this))}},BaseCreativeUnit.prototype.getRxStateObject=function(){if(this._rxState){var e=this._generateNewRxStateObject();return e.copyFrom(this._rxState),this._rxStateCopies.push(e),e}},BaseCreativeUnit.prototype.goToScreenAction=function(){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.alertAction=function(e,t,r){this.alert({message:t.text},r)},BaseCreativeUnit.prototype.checkOrientationAction=function(e,t,r){var a,i=creative.adapter.orientation;0===i||180===i?a=t.onPortrait:(-90==i||90==i)&&(a=t.onLandscape),a?a(e,r):r()},BaseCreativeUnit.prototype.checkOrientationActionDryRun=BaseCreativeUnit.prototype.checkOrientationAction,BaseCreativeUnit.prototype._processURLParams=function(e){return\"string\"!=typeof e?e:creative.macros(e)},BaseCreativeUnit.prototype._addUrlAppendage=function(e){if(creative.urlOpenedUrlAppendage){var t=this.size.width+\"x\"+this.size.height,r=function(e){return e.indexOf(\"?\")>=0};return e+(r(e)?\"&\":\"?\")+creative.urlOpenedUrlAppendage.replace(new RegExp(\"{celtraFirstUnitSize}\",\"ig\"),t)}return e},BaseCreativeUnit.prototype.openClickThroughDestinationAction=function(e,t,r){var a=creative.clickThroughDestinationUrl,i=creative.shouldClickThroughToNewWindow(e),n=!1,o=2e3,s=\"clickThroughDestinationOpened\",c=function(){n||(n=!0,creative.adapter.openPotentialUniversalOrAppLink(this._processURLParams(a),i))}.bind(this);if(a){var l=function(e){return e.indexOf(\"itunes.apple.com/us/app/\")>0},d=function(e){return 0===e.indexOf(\"market://details?id=\")};creative.adapter._stopAllMedia(),l(a)||d(a)?(e.track({name:s,appUri:a}),e.trackClickThrough(),creative.adapter.trackingCenter.flush(),creative.adapter.getApp(this._processURLParams(a))):(a=this._addUrlAppendage(a),e.track({name:s,url:a}),e.trackClickThrough(),!creative.adapter.canOpenUrlInSameWindow||i?(creative.adapter.trackingCenter.flush(),c()):(creative.adapter.trackingCenter.flush(c),defer(c,o)))}e.screen&&creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,a||\"\"),r()},BaseCreativeUnit.prototype.goToURLAction=function(e,t,r){var a=creative.urlOpenedOverrideUrls&&creative.urlOpenedOverrideUrls[t.reportLabel]||t.url,i=creative.shouldClickThroughToNewWindow(e),n=!1,o=2e3,s=function(){n||(n=!0,creative.adapter.openBrowser(this._processURLParams(a),i))}.bind(this),c=(creative.experiments.get(\"OpenBrowserRefactor\")||{}).chosenVariant,l=(creative.experiments.get(\"WindowOpenWithDelay\")||{}).chosenVariant,d=function(t,r,a,i){if(c){var n={name:\"_openBrowserRefactor\",experiment:c,branch:t,logic:r,environment:a};i&&(n.redirect=i),e.track(n)}},p=function(e){if(c){var t=creative.adapter.trackingCenter,r=t._createTrackingEvent({name:\"redirectTrackingExperiment\"});r.redirect=e,t._pendingPixels.push(t._getTrackerUrl(r))}},u=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};if(!a)return r();a=this._addUrlAppendage(a);var h=\"urlOpened\",v={delay:[0,100,500][u(0,2)],step:u(1,3),randId:randInt()};if(creative.adapter._stopAllMedia(),e.track({name:h,url:a,label:t.reportLabel}),e.trackClickThrough(),deviceInfo.browser.ie()||deviceInfo.browser.edge())!creative.adapter.canOpenUrlInSameWindow||i?(d(\"new-window\",\"flush-and-open\",\"desktop-windows\",v),p(v),creative.adapter.trackingCenter.flush(),s()):(d(\"same-window\",\"flush-then-open\",\"desktop-windows\",v),p(v),creative.adapter.trackingCenter.flush(s),defer(s,o));else if(\"on\"==c)!creative.adapter.canOpenUrlInSameWindow||i?(d(\"new-window\",\"flush-and-open\",\"all-except-desktop-windows\",v),p(v),creative.adapter.trackingCenter.flush(),s()):(d(\"same-window\",\"flush-then-open\",\"all-except-desktop-windows\",v),p(v),creative.adapter.trackingCenter.flush(s),defer(s,o));else if(!creative.adapter.canOpenUrlInSameWindow||i){d(\"new-window\",\"wrap+open\",\"all-except-desktop-windows\"),l&&creative.aggregatorTracking.trackAggregator(\"windowOpenWithDelay\",1,{delay:l}),c&&e.track({name:\"_openBrowserRefactorFlushVsWrap\",trackingWith:\"wrap\"});var f=creative.wrapRedirectPageUrl(this._processURLParams(a));c&&(e.track({name:\"_openBrowserRefactorFlushVsWrap\",trackingWith:\"flush\"}),creative.adapter.trackingCenter.flush()),\"control\"===l||\"undefined\"==typeof l?creative.adapter.openBrowser(f,i):setTimeout(function(){creative.adapter.openBrowser(f,i)},\"noDelay\"===l?0:250)}else d(\"same-window\",\"wrap+open\",\"all-except-desktop-windows\"),creative.adapter.openBrowser(creative.wrapRedirectPageUrl(this._processURLParams(a)),i);creative.adapter.sendToEventMonitor(h,t.triggerId,e.screen.name,a,t.reportLabel),r()},BaseCreativeUnit.prototype.facebookURLAction=function(e,t,r){if(!t.url)return r();creative.adapter._stopAllMedia(),e.track({name:\"facebookShareAttempt\",url:t.url,label:t.reportLabel}),e.trackClickThrough();var a=\"http://m.facebook.com/sharer.php?u=\"+encodeURIComponent(t.url);creative.adapter.openBrowser(creative.wrapRedirectPageUrl(a),creative.shouldClickThroughToNewWindow(e)),r()},BaseCreativeUnit.prototype.callURLAction=function(e,t,r){if(!t.url)return r();var a=this._processURLParams(t.url),i=new Image;i.onload=i.onerror=function(){r()},i.src=a},BaseCreativeUnit.prototype.displayImageAction=function(e,t,r){if(!t.file)return r();var a=function(e,a){var i=document.createElement(\"div\");i.className=\"celtra-display-image-overlay touchable\",i.style.backgroundImage=\"url(\"+t.file.getUrl()+\")\",this.unitDiv.appendChild(i),(e>this.size.width||a>this.size.height)&&(i.style.backgroundSize=\"contain\"),t.color&&(i.style.backgroundColor=t.color),attach(i,\"tap\",function(){i.parentNode.removeChild(i),r()},!1);var n=document.createElement(\"div\");n.className=\"celtra-back-button touchable \"+this.alignBackButtonHorizontal,i.appendChild(n)}.bind(this);if(t.file.meta)a(t.file.meta.width,t.file.meta.height);else{var i=new Image;i.onload=function(){a(this.width,this.height)},i.onerror=function(){return console.error(\"Couldn't display image: \"+t.file.getUrl()),r()},i.src=t.file.getUrl()}},BaseCreativeUnit.prototype.saveImageAction=function(e,t,r){function a(a,n){var o=a.getOriginalUrl(),c=a.name,l=a.blobHash;if(i(l),creative.adapter.canSaveImage())creative.adapter.trackingCenter.flush(function(){var a=\"shared.png\";\"undefined\"!=typeof c?a=c:\"string\"==typeof n&&n.trim().length>0&&(a=n.trim()+\".png\"),creative.adapter.saveImage(o,a,r);var i=n||c;creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,i,t.reportLabel)});else{var d=new SaveImageDialog(creative.adapter,creative.resourceUrl,o);d.show(r)}}function i(r){e.track({name:s,blobHash:r,label:t.reportLabel}),e.trackClickThrough()}function n(){creative.adapter.createPlacements({preloader:{attachment:\"body\",positioning:\"screen\",type:\"layer\"}},function(){var e=creative.adapter.placements.preloader;e.setZIndex(\"max\"),e.setSize(\"100%\",\"100%\"),e.setPosition(0,0);var t=e.createElement(\"link\");t.rel=\"stylesheet\",t.type=\"text/css\",t.href=creative.resourceUrl+\"runner/clazzes/PostBlobPreloader.css\",e.getContainer().appendChild(t);var r=e.createElement(\"div\");addClass(r,\"celtra-preloader-container\");var a=e.createElement(\"div\");addClass(a,\"celtra-preloader-image\"),a.style.backgroundImage=\"url(\"+creative.resourceUrl+\"runner/clazzes/CreativeUnit/preloader.png)\",r.appendChild(a),e.populate(r,function(){e.show()})})}function o(){creative.adapter.destroyPlacement(\"preloader\")}var s=\"imageSaveAttempted\";if(t.imageOrigin=t.imageOrigin?t.imageOrigin:\"asset\",\"component\"==t.imageOrigin&&t.component)if(t.component.file)a(t.component.file,t.component.name);else{var c=t.component.getField();if(null===c)return void r();if(-1===creative.runtimeParams.enabledServices.indexOf(\"contentSharing\"))return void this.alertAction(e,{text:\"This feature is not available in your region\"},r);var l=c.url,d=l.split(\",\")[1];n(),postBlob(d,function(e,i){if(o(),i>=200&&300>i){var n=JSON.parse(e),s=creative.cachedApiUrl+\"blobs/\"+n.hash+\"/shared.png\",c=new File(s);a(c,t.component.name)}else r()})}else\"asset\"==t.imageOrigin&&t.file?a(t.file):r()},BaseCreativeUnit.prototype.playSoundAction=function(e,t,r){if(!t.file)return r();var a=new Audio(t.file.getUrl());attach(a,\"ended\",function(){r()},!1),a.play()},BaseCreativeUnit.prototype.playVideoInPlayerAction=function(e,t,r){if(!t.file)return r();var a=creative.adapter.useFSVP,i=new VideoContext(e,t.file,t.reportLabel);i.track({engineType:\"html5\",name:\"videoPlayAttempted\",trackable:a,filename:t.file.name,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:\"fullscreen\",videoPreset:null}),creative.adapter.playVideoInPlayer(i,function(a){var i=(a?t.onSuccess:t.onFailure)||nullai;i(e,r)})},BaseCreativeUnit.prototype.playVideoInPlayerActionDryRun=function(e,t,r){return t.file?((t.onSuccess||nullai)(e,noop),(t.onFailure||nullai)(e,noop),void r()):r()},BaseCreativeUnit.prototype.playVideoFromURLAction=function(e,t,r){if(!t.url)return r();var a=creative.adapter.useFSVP;creative.adapter._stopAllMedia(),videoContext=new VideoContext(e,new File(t.url),t.reportLabel),videoContext.track({engineType:\"html5\",name:\"videoPlayAttempted\",trackable:a,filename:null,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:\"fullscreen\",videoPreset:null}),creative.adapter.playVideoInPlayer(videoContext,function(a){var i=(a?t.onSuccess:t.onFailure)||nullai;i(e,r)})},BaseCreativeUnit.prototype.playVideoFromURLActionDryRun=function(e,t,r){return t.url?((t.onSuccess||nullai)(e,noop),(t.onFailure||nullai)(e,noop),void r()):r()},BaseCreativeUnit.prototype.vibrateAction=function(e,t,r){r()},BaseCreativeUnit.prototype.getAppAction=function(e,t,r){var a=function(e){return new RegExp(\"(^http(s)?://)|(^market://)\",\"i\").test(e)},i=function(){return new RegExp(\"^\\\\d+$\").test(t.appStoreUrl)?\"http://itunes.apple.com/us/app/keynote/id\"+t.appStoreUrl:(a(t.appStoreUrl)?\"\":\"http://\")+t.appStoreUrl},n=function(){return a(t.androidMarketAppId)?t.androidMarketAppId:\"market://details?id=\"+t.androidMarketAppId};creative.adapter._stopAllMedia();var o;if(creative.storeOpenedOverrideUrls[t.reportLabel]?o=creative.storeOpenedOverrideUrls[t.reportLabel]:ios()&&t.appStoreUrl?o=i():android()&&t.androidMarketAppId?o=n():desktop()&&(t.appStoreUrl||t.androidMarketAppId)&&(o=\"app://\"+encodeURIComponent(t.reportLabel)),o){var s=!ios(\"9\",null),c=\"storeOpened\",l=2,d=function(){creative.adapter.getApp(this._processURLParams(o))}.bind(this),p=function(){if(!--l&&s){d();var r={};t.appStoreUrl&&(r.appStoreUrl=i()),t.androidMarketAppId&&(r.androidMarketAppId=n()),creative.adapter.sendToEventMonitor(c,t.triggerId,e.screen.name,r,t.reportLabel)}}.bind(this);e.track({name:c,appUri:o,label:t.reportLabel},p),e.trackClickThrough(p),s||setTimeout(d,0)}r()},BaseCreativeUnit.prototype.callPhoneAction=function(e,t,r){if(!t.number)return r();creative.adapter._stopAllMedia();var a=\"phoneCalled\",i=deviceInfo.os.ios()&&deviceInfo.browser.safari(),n=function(){creative.adapter.callPhone(t.number),creative.adapter.sendToEventMonitor(a,t.triggerId,e.screen.name,t.number,t.reportLabel)};e.track({name:a,number:t.number,label:t.reportLabel}),e.trackClickThrough(),i?(creative.adapter.trackingCenter.flush(),defer(n)):creative.adapter.trackingCenter.flush(n),r()},BaseCreativeUnit.prototype.answerSurveyQuestion=function(e,t,r){var a=[\"answerIds\",\"questionId\",\"surveyId\"],i=/[0-9a-f]{8}/;a.forEach(function(e){if(\"answerIds\"==e){if(!(t.answerIds instanceof Array))throw new Error(\"args.answerIds must be an array\");t.answerIds.forEach(function(e){if(!i.test(e))throw new Error(\"args.answerIds must contain Ids that have hexadecimal formatted string containing 8 characters\")})}else if(!i.test(t[e]))throw new Error(\"args.\"+e+\" must be hexadecimal formatted string containing 8 characters\")}),e.track({name:\"surveyQuestionAnswered\",answerIds:t.answerIds,questionId:t.questionId,surveyId:t.surveyId}),r()},BaseCreativeUnit.prototype.saveTheDateAction=function(e,t,r){function a(e){var r;return t.allDay?(r=new CDate,r.value=e.getFullYear()+\"-\"+zeroPad(e.getMonth()+1)+\"-\"+zeroPad(e.getDate())):(e=\"my\"===t.timezone?e.getUTCFullYear()+\"-\"+zeroPad(e.getUTCMonth()+1)+\"-\"+zeroPad(e.getUTCDate())+\" \"+zeroPad(e.getUTCHours())+\":\"+zeroPad(e.getUTCMinutes())+\":\"+zeroPad(e.getUTCSeconds()):e.getFullYear()+\"-\"+zeroPad(e.getMonth()+1)+\"-\"+zeroPad(e.getDate())+\" \"+zeroPad(e.getHours())+\":\"+zeroPad(e.getMinutes())+\":\"+zeroPad(e.getSeconds()),r=new CDateTime,r.value=e,r.tz=t.timezone),r}return t.eventName&&t.location&&t.start?(t.end=t.end||new Date(t.start.getTime()+36e5),t.timezone=t.timezone||\"my\",t.end0?t[0]:null};;\n!function(e){\"use strict\";var r={};r.toString=function(){return\"[Clazz CustomAudiences]\"};var t=function(e,r,t,n){function i(r,t){var i=new XMLHttpRequest;i.open(e,u+s+\"/\"+encodeURIComponent(r)+\"/\"+encodeURIComponent(t)+\"?\"+creative.authTokenUrlParam),i.send(n)}if(-1===[\"PUT\",\"DELETE\"].indexOf(e))throw new Error(\"Unsupported request method: \"+e);if(\"undefined\"==typeof creative.runtimeParams.customAudiences[r])throw new Error('Custom audience \"'+r+'\" is not used by the creative.');creative.runtimeParams.customAudiences[r]={userExists:t,userData:n};var u=creative.secure?creative.customAudiencesUrl:creative.insecureCustomAudiencesUrl,s=\"/audiences/\"+r,o=creative.userIdentifiers;for(var a in o)for(var c in o[a])i(a,o[a][c])};r.addUser=function(e,r){creative.runtimeParams.userOptOut||t(\"PUT\",e,!0,r)},r.removeUser=function(e){creative.runtimeParams.userOptOut||t(\"DELETE\",e,!1)},e.CustomAudiences=r}(window);;\n!function(e){\"use strict\";var t={ambience:\"Ambience\",animatey:\"Animatey\",abtest:\"Best\",basket:\"Basket\",button:\"Button\",canvas:\"Canvas\",celebration:\"Celebration\",checkbox:\"CheckBox\",feedbasedchoice:\"ChoiceFeed\",countdown:\"Countdown\",draggy:\"Draggy\",dropdown:\"Dropdown\",dynamiccontent:\"DynamicContent\",facebookshare:\"FacebookShareButton\",fallback:\"Fallback\",frame:\"Frame\",flippy:\"Flippy\",grid:\"Grid\",group:\"Group\",gyro:\"Gyro\",hotspot:\"Hotspot\",input:\"Input\",lighttable:\"LightTable\",map:\"Map\",transitions:\"Transitions\",mastervideo:\"MasterVideo\",nearby:\"Nearby\",painty:\"Painty\",pannable:\"Pannable\",particles:\"Particle\",picture:\"Picture\",puzzle:\"Puzzle\",shapey:\"Shapey\",smoke:\"Smoke\",stack:\"Stack\",stopwatch:\"Stopwatch\",locatorclassic:\"StoreLocator2\",locator:\"StoreLocator3\",swipeygallery:\"Swipey\",swipeygroup:\"SwipeyGroup\",takephoto:\"TakePhotoButton\",texty:\"Texty\",twitterfeed:\"TwitterFeed\",twittershare:\"TwitterShareButton\",inlinevideo:\"Video\",\"360view\":\"View360\",\"360video\":\"Video360\",\"360\u00b0video\":\"Video360\",weather:\"Weather\",whatsappshare:\"WhatsAppShareButton\",wipeable:\"Wipeable\",youtube:\"Youtube\",scene:\"Scene\",brandtracksurvey:\"BrandTrackSurvey\",brandtrackquestion:\"BrandTrackQuestion\",customcode:\"CustomCode\",videoasset:\"VideoAsset\"},n=function(e){return e=e.toLowerCase().replace(/\\W+/g,\"\"),e in t?t[e]:\"\"},o={findAll:function(e){function t(a){a.forEach(function(a){(\"undefined\"==typeof e||a.name==e)&&o.push(a),a.getActiveContainers().forEach(function(e){t(e.objects),n(e.scenes)})})}function n(t){t&&t.forEach(function(t){(\"undefined\"==typeof e||t.name==e)&&o.push(t)})}var o=[];return\"Screen\"==this.constructor.name?(t(this.objects),n(this.scenes)):\"function\"==typeof this.getActiveContainers&&this.getActiveContainers().forEach(function(e){t(e.objects),n(e.scenes)}),o},findByType:function(e){function t(i){i.forEach(function(i){i.constructor.name==n(e)&&a.push(i),i.getActiveContainers().forEach(function(e){t(e.objects),o(e.scenes)})})}function o(t){t&&t.forEach(function(t){t.constructor.name==n(e)&&a.push(t)})}var a=[];return\"undefined\"==typeof e?a:(\"Screen\"==this.constructor.name?(t(this.objects),o(this.scenes)):\"function\"==typeof this.getActiveContainers&&this.getActiveContainers().forEach(function(e){t(e.objects),o(e.scenes)}),a)},find:function(e){var t=this.findAll(e);return t.length>0?t[0]:null}};e.DiscoverableTrait=o}(window);;\n!function(e){\"use strict\";function t(e){return r[e]}var r={choice:[\"ChoiceFeed\",\"checkChoiceFeed\"],image:[\"Picture\"],video:[\"Video\"],text:[\"Texty\"],html:[\"CustomCode\"],url:[\"goToFeedURL\"]},i={checkAndTrackValue:function(e,t){e&&(this.isCorrectFieldType(e,t)?\"string\"!=typeof creative.runtimeParams.dynamicContent[e]&&creative.adapter.trackingCenter.track({name:\"userError\",userErrorId:\"feedValueMissing\"}):creative.adapter.trackingCenter.track({name:\"userError\",userErrorId:\"feedValueUnlinked\"}))},getCustomFields:function(){return creative.runtimeParams.customFeedFields.map(function(e){var t=creative.runtimeParams.dynamicContent[\"CustomFeedField/\"+e.id];return{id:e.id,feedId:e.feedId,name:e.name,type:e.type,values:[t].filter(function(e){return null!==e})}})},getCustomFieldByKey:function(e){if(e)for(var t=e.split(\"/\")[1],r=this.getCustomFields(),i=0;is,c=this.image.naturalHeight>h,g=this.containerMinMargin,m=this.containerMinMargin,d=0,p=0;if(o&&c){var u;t=s,i=h,l>r?(u=l/r*100,this.image.style.width=u+\"%\",this.image.style.height=\"100%\",d=-(u-100)/2):(u=r/l*100,this.image.style.width=\"100%\",this.image.style.height=u+\"%\",p=-((u-100)/2)*(i/t))}else if(o){var y=this.image.naturalWidth/s*100;d=-(y-100)/2,t=s,i=this.image.naturalHeight,this.image.style.width=y+\"%\",this.image.style.height=\"100%\",m=(e.height-i-this.imageContainerTotalVMargin)/2}else if(c){var v=this.image.naturalHeight/h*100,C=-(v-100)/2;t=this.image.naturalWidth,i=h,p=C*(i/t),this.image.style.width=\"100%\",this.image.style.height=v+\"%\",g=(e.width-t-this.imageContainerTotalHMargin)/2}else t=this.image.naturalWidth,i=this.image.naturalHeight,this.image.style.width=\"100%\",this.image.style.height=\"100%\",g=(e.width-t-this.imageContainerTotalHMargin)/2,m=(e.height-i-this.imageContainerTotalVMargin)/2;var I=t+this.imageContainerTotalHMargin,M=t+this.imageContainerTotalHMargin-this.containerMinWidth;if(0>M){var T=M/2;g+=T,this.imageContainer.style.left=19-T+\"px\",this.imageContainer.style.right=19-T+\"px\",I-=M}this.container.style.left=g+\"px\",this.container.style.right=g+\"px\",this.container.style.top=m+\"px\",this.container.style.bottom=m+\"px\",this.image.style.marginLeft=d+\"%\",this.image.style.marginTop=p+\"%\",I0?\"-\":\"+\")+n(r)+\":\"+n(a-60*r)}function n(e){return(\"0\"+e).slice(-2)}var r=\"https://calendar.google.com/calendar/\"+(desktop()?\"render?\":\"gp#~calendar:view=e&\")+\"action=TEMPLATE\",o={dates:t(e,\"start\")+\"/\"+t(e,\"end\"),location:e.location,text:e.eventName,details:e.notes};return r+\"&\"+buildQuery(o)},toString:function(){return\"[Clazz CCalendar]\"}};;\nfunction CDate(){}CDate.toString=function(){return\"[Clazz CDate]\"},CDate.prototype.toString=function(){return\"[CDate \"+this.localId+\"]\"},CDate.prototype.getLocalStartDate=function(){var t=this._getParts();return new Date(t[1],t[2]-1,t[3],0,0,0)},CDate.prototype.getLocalEndDate=function(){var t=this._getParts();return new Date(t[1],t[2]-1,t[3]+1,0,0,0)},CDate.prototype.getDate=function(){return this.getLocalStartDate()},CDate.prototype._getParts=function(){return this.value.match(/^(....)-(..)-(..)$/).map(function(t){return parseInt(t,10)})};;\nfunction CDateTime(){}CDateTime.toString=function(){return\"[Clazz CDateTime]\"},CDateTime.prototype.toString=function(){return\"[CDateTime \"+this.localId+\"]\"},CDateTime.prototype.getDate=function(){var t=this.value.match(/^(....)-(..)-(..) (..):(..):(..)$/).map(function(t){return parseInt(t,10)});switch(this.tz){case\"my\":case\"utc\":return new Date(Date.UTC(t[1],t[2]-1,t[3],t[4],t[5],t[6]));case\"user\":return new Date(t[1],t[2]-1,t[3],t[4],t[5],t[6]);default:Creative._throw(\"Invalid CDateTime timezone: \"+this.tz)}};;\nvar Twitter={};Twitter.showUserAction=function(e,t,r){if(!t.screenName)return void r();var a=\"twitterProfileOpened\";creative.adapter._stopAllMedia(),e.track({name:a,screenName:t.screenName,label:t.reportLabel}),e.trackClickThrough();var i=desktop()?\"www\":\"mobile\",o=\"http://\"+i+\".twitter.com/\"+t.screenName;creative.adapter.openBrowser(creative.wrapRedirectPageUrl(o),creative.shouldClickThroughToNewWindow(e)),creative.adapter.sendToEventMonitor(a,t.triggerId,e.screen.name,\"@\"+t.screenName,t.reportLabel),r()},Twitter.tweetAction=function(e,t,r){if(!t.text)return void r();e.track({name:\"tweetPageOpened\",tweet:t.text,tweetVia:t.via,label:t.reportLabel}),e.trackClickThrough();var a=\"http://twitter.com/intent/tweet?text=\"+encodeURIComponent(t.text);t.via&&(a+=\"&via=\"+encodeURIComponent(t.via)),creative.adapter.openBrowser(creative.wrapRedirectPageUrl(creative.apiUrl+\"redirect?url=\"+encodeURIComponent(a)+\"&type=js\"),creative.shouldClickThroughToNewWindow(e)),r()};;\n!function(t){\"use strict\";var e={stringPatternAngle:\"(?:[+-]?\\\\d*\\\\.?\\\\d+)(?:deg|grad|rad|turn)\",stringPatternColor:\"(?:#(?:[A-Fa-f0-9]{3,6})|(?:(?:rgb|hsl)a?)\\\\(\\\\s*(?:\\\\d+(?:\\\\%)?\\\\s*,\\\\s*){2,3}(?:(?:\\\\d+\\\\.)?\\\\d+)\\\\s*\\\\))\",stringPatternSideCorner:\"top|bottom|left|right\",stringPatternValue:\"(?:[+-]?\\\\d*\\\\.?\\\\d+)(?:%|[a-z]+)?\",patternHex:/^(#|)([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,matchHexHash:1,matchHexColor:2,patternRgb:/^rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/i,matchRgbRed:1,matchRgbGreen:2,matchRgbBlue:3,patternRgba:/^rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*((?:\\d\\.)?\\d\\d?)\\s*\\)$/i,matchRgbaRed:1,matchRgbaGreen:2,matchRgbaBlue:3,matchRgbaAlpha:4,patternGradient:/^\\-?(moz|webkit|o|ms|)(?:(?:-|)(?:repeating-|)(linear|radial|))-gradient\\((.*?)\\)(?:;|)$/i,matchGradientPrefix:1,matchGradientType:2,matchGradientValues:3,generatedGradientSyntax:null,matchGradientSyntaxLine:1,matchGradientSyntaxAngle:2,matchGradientSyntaxSideCorner:3,matchGradientSyntaxStopList:4,buildGradientSyntax:function(){var t=[\"(?:to\\\\s+)?((?:\",e.stringPatternSideCorner,\")\\\\s*(?:\",e.stringPatternSideCorner,\")?)\"].join(\"\"),a=[\"(\",e.stringPatternAngle,\")\"].join(\"\"),n=[\"(\",a,\"|\",t,\")\"].join(\"\"),r=[e.stringPatternColor,\"\\\\s*(?:\",e.stringPatternValue,\")?\"].join(\"\"),i=[\"(?:\",r,\"\\\\s*,\\\\s*)*\",r].join(\"\"),o=[\"^\\\\s*\",n,\"\\\\s*,\\\\s*(\",i,\")\\\\s*$\"].join(\"\");return e.generatedGradientSyntax=new RegExp(o,\"i\"),e.generatedGradientSyntax},generatedRadialGradientSyntax:null,matchRadialGradientSyntaxEllipse:1,matchRadialGradientSyntaxWidth:2,matchRadialGradientSyntaxHeight:3,matchRadialGradientSyntaxXPosition:4,matchRadialGradientSyntaxYPosition:5,matchRadialGradientSyntaxStopList:6,buildRadialGradientSyntax:function(){var t=[\"(ellipse)?\\\\s*\",\"(\",e.stringPatternValue,\")\\\\s+\",\"(\",e.stringPatternValue,\")\\\\s+at\\\\s+\",\"(\",e.stringPatternValue,\")\\\\s+\",\"(\",e.stringPatternValue,\")\"].join(\"\"),a=[e.stringPatternColor,\"\\\\s*(?:\",e.stringPatternValue,\")?\"].join(\"\"),n=[\"(?:\",a,\"\\\\s*,\\\\s*)*\",a].join(\"\"),r=[\"^\\\\s*\",t,\"\\\\s*,\\\\s*(\",n,\")\\\\s*$\"].join(\"\");return e.generatedRadialGradientSyntax=new RegExp(r,\"i\"),e.generatedRadialGradientSyntax},generatedGradientStopList:null,matchGradientStopListColor:1,matchGradientStopListPosition:2,buildGradientStopList:function(){var t=[\"\\\\s*(\",e.stringPatternColor,\")\",\"(?:\\\\s+\",\"(\",e.stringPatternValue,\"))?\",\"(?:\\\\s*,\\\\s*)?\"].join(\"\");return e.generatedGradientStopList=new RegExp(t,\"gi\"),e.generatedGradientStopList},gradientOldSideCorner:{\"to top\":\"left bottom, left top\",\"to left\":\"right top, left top\",\"to bottom\":\"left top, left bottom\",\"to right\":\"left top, right top\",\"to top right\":\"left bottom, right top\",\"to top left\":\"right bottom, left top\",\"to bottom right\":\"left top, right bottom\",\"to bottom left\":\"right top, left bottom\"},gradientPrefixedSideCorner:{\"to top\":\"bottom\",\"to left\":\"right\",\"to bottom\":\"top\",\"to right\":\"left\",\"to top right\":\"bottom left\",\"to top left\":\"bottom right\",\"to bottom right\":\"top left\",\"to bottom left\":\"top right\"}};Object.defineProperties(e,{patternGradientSyntax:{get:function(){return null===e.generatedGradientSyntax?e.buildGradientSyntax():e.generatedGradientSyntax}},patternRadialGradientSyntax:{get:function(){return null===e.generatedRadialGradientSyntax?e.buildRadialGradientSyntax():e.generatedRadialGradientSyntax}},patternGradientStopList:{get:function(){return null===e.generatedGradientStopList?e.buildGradientStopList():e.generatedGradientStopList}}}),e.convertAngleToSideCorner=function(t,e){/\\-?(moz|webkit|o|ms)/.test(e)&&(t=90-t);var a=(t+360)%360,n=\"to top\";return a>347||14>a?n=\"to top\":a>=14&&75>=a?n=\"to top right\":a>75&&105>a?n=\"to right\":a>=105&&167>=a?n=\"to bottom right\":a>167&&194>a?n=\"to bottom\":a>=194&&255>=a?n=\"to bottom left\":a>255&&285>a?n=\"to left\":a>=285&&347>=a&&(n=\"to left top\"),n},e.convertSideCornerToAngle=function(t,e){var a=0;switch(t){case\"bottom\":case\"to top\":a=0;break;case\"left\":case\"to right\":a=90;break;case\"right\":case\"to left\":a=270;break;case\"top\":case\"to bottom\":a=180;break;case\"to bottom right\":case\"to right bottom\":a=167;break;case\"to bottom left\":case\"to left bottom\":a=194;break;case\"to top right\":case\"to right top\":a=14;break;case\"to top left\":case\"to left top\":a=347;break;case\"bottom right\":case\"right bottom\":a=285;break;case\"bottom left\":case\"left bottom\":a=75;break;case\"top right\":case\"right top\":a=255;break;case\"top left\":case\"left top\":a=105}return/\\-?(moz|webkit|o|ms)/.test(e)&&(a=90-a),(a+360)%360},e.isHex=function(t){return e.patternHex.test(t)},e.isRgb=function(t){return e.patternRgb.test(t)},e.isRgba=function(t){return e.patternRgba.test(t)},e.isGradient=function(t){return e.patternGradient.test(t)},e.parseColorStopList=function(t){for(var a,n=e.patternGradientStopList.exec(t),r=[];null!==n;)a={color:n[e.matchGradientStopListColor]},n[e.matchGradientStopListPosition]&&(a.position=n[e.matchGradientStopListPosition]),r.push(a),n=e.patternGradientStopList.exec(t);return r},e.parseGradient=function(t){var a=null,n=e.patternGradient.exec(t);if(null!==n){a={original:n[0],oldSyntax:!n[e.matchGradientType],prefix:n[e.matchGradientPrefix],type:n[e.matchGradientType],colorStopList:[]};var r=e.patternGradientSyntax.exec(n[e.matchGradientValues]);null!==r&&(r[e.matchGradientSyntaxLine]&&(a.line=r[e.matchGradientSyntaxLine]),r[e.matchGradientSyntaxAngle]&&(a.angle=r[e.matchGradientSyntaxAngle]),r[e.matchGradientSyntaxSideCorner]&&(a.sideCorner=r[e.matchGradientSyntaxSideCorner]),a.colorStopList=e.parseColorStopList(r[e.matchGradientSyntaxStopList]));var i=e.patternRadialGradientSyntax.exec(n[e.matchGradientValues]);null!==i&&(a.radialGradientEllipse=i[e.matchRadialGradientSyntaxEllipse],i[e.matchRadialGradientSyntaxWidth]&&(a.radialGradientWidth=i[e.matchRadialGradientSyntaxWidth]),i[e.matchRadialGradientSyntaxHeight]&&(a.radialGradientHeight=i[e.matchRadialGradientSyntaxHeight]),i[e.matchRadialGradientSyntaxXPosition]&&(a.radialGradientXPosition=i[e.matchRadialGradientSyntaxXPosition]),i[e.matchRadialGradientSyntaxYPosition]&&(a.radialGradientYPosition=i[e.matchRadialGradientSyntaxYPosition]),a.colorStopList=e.parseColorStopList(i[e.matchRadialGradientSyntaxStopList]))}return a},e.createGradient=function(t){var a={backgroundColor:null,webkitGradient:null,mozLinearGradient:null,msLinearGradient:null,oLinearGradient:null,webkitLinearGradient:null,linearGradient:null,radialGradient:null},n=e.parseGradient(t);if(n.oldSyntax)throw new Error('[Not supported] Can not create gradient from old \"webkit-gradient\" syntax.');for(var r=\"\",i=\"\",o=n.colorStopList.length,d=0;o>d;d++){var l=n.colorStopList[d];if(l.color){if(0!==d?(r+=\", \",i+=\", \"):a.backgroundColor=l.color,r+=l.color,i+=\"color-stop(\",l.position)r+=\" \"+l.position,i+=l.position;else{var s=100/(o-1)*d;i+=s+\"%\"}i+=\", \"+l.color+\")\"}}if(\"linear\"===n.type){var g=0;\"undefined\"!=typeof n.angle?g=parseInt(n.angle,10):\"undefined\"!=typeof n.sideCorner&&(g=e.convertSideCornerToAngle(n.line,n.prefix));var c=g;/\\-?(moz|webkit|o|ms)/.test(n.prefix)?g=90-c:c=90-g;var p=e.convertAngleToSideCorner(g),G=e.gradientOldSideCorner[p];a.webkitGradient=\"-webkit-gradient(linear, \"+G+\", \"+i+\")\",a.mozLinearGradient=\"-moz-linear-gradient(\"+c+\"deg, \"+r+\")\",a.msLinearGradient=\"-ms-linear-gradient(\"+c+\"deg, \"+r+\")\",a.oLinearGradient=\"-o-linear-gradient(\"+c+\"deg, \"+r+\")\",a.webkitLinearGradient=\"-webkit-linear-gradient(\"+c+\"deg, \"+r+\")\",a.linearGradient=\"linear-gradient(\"+g+\"deg, \"+r+\")\"}else if(\"radial\"===n.type){var m=parseInt(n.radialGradientWidth,10),h=parseInt(n.radialGradientHeight,10),S=parseInt(n.radialGradientXPosition,10),u=parseInt(n.radialGradientYPosition,10),f=m+\"% \"+h+\"%\",b=S+\"% \"+u+\"% \",x=f+\" at \"+b;a.radialGradient=\"radial-gradient(\"+x+\", \"+r+\")\"}return a},e.createGradientStyle=function(t){var a=e.createGradient(t),n=\"\";for(var r in a){var i=a[r];null!==i&&e.isGradient(i)&&(n+=\"background-image: \"+i+\"; \")}return n},t.Color=e}(window),\"undefined\"!=typeof module&&\"undefined\"!=typeof module.exports&&(module.exports=window.Color);;\n!function(){\"use strict\";var t={updateTextStyle:function(){},initializeFont:function(){this.font.setBaseUrl((creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"fonts/\"),this.incrementLoadingCount(),this.loadFont(deferred(this.decrementLoadingCount.bind(this),0,\"TextStyleIntegrator.initializeFont deferred loadFont callback\")),this.updateTextStyle()},getFontSize:function(){return this.fontSize},getLineSpacing:function(){return this.lineSpacing},getLetterSpacing:function(){return this.letterSpacing},getTextShadowOffset:function(){var t={x:0,y:0};if(\"undefined\"!=typeof this.textShadow&&this.textShadow){var e=this.textShadowAngle*(Math.PI/180);t.x=Math.round(this.textShadowDistance*Math.cos(e)),t.y=Math.round(this.textShadowDistance*Math.sin(e))}return t},getTextShadowBlur:function(){return android(\"2\")&&this.textShadowBlur<1?1:this.textShadowBlur},applyTextStyle:function(t){var e=this.font.getCssProperties(),i={fontFamily:e[\"font-family\"],fontStyle:e[\"font-style\"],fontWeight:e[\"font-weight\"],color:this.textColor,direction:\"\",letterSpacing:\"\",textAlign:\"\",textDecoration:\"\",textShadow:\"\"};if(\"undefined\"!=typeof this.textDirection&&(i.direction=this.textDirection),\"undefined\"!=typeof this.textAlign&&(i.textAlign=this.textAlign),\"undefined\"!=typeof this.textDecoration&&(i.textDecoration=this.textDecoration),\"undefined\"!=typeof this.letterSpacing&&(i.letterSpacing=this.getLetterSpacing()+\"px\"),\"undefined\"!=typeof this.textShadow&&this.textShadow){var n=this.getTextShadowOffset();i.textShadow=n.x+\"px \"+n.y+\"px \"+this.getTextShadowBlur()+\"px \"+this.textShadowColor}extend(t,i)},applyTextSize:function(t){var e=this.getFontSize();this.scaleFont&&this.scaleBaseWidth>0&&\"undefined\"!=typeof this.scaleBaseHeight&&this.scaleBaseHeight>0?e=Math.min(e/(this.scaleBaseWidth/this.size.width),e/(this.scaleBaseHeight/this.size.height)):this.scaleFont&&this.scaleBaseWidth>0&&(e/=this.scaleBaseWidth/this.size.width);var i={fontSize:e+\"px\",lineHeight:\"\",paddingLeft:\"\",paddingRight:\"\"};if(\"undefined\"!=typeof this.lineSpacing&&(i.lineHeight=Math.max(1,this.getLineSpacing()+e)+\"px\"),this.scaleFont&&\"undefined\"!=typeof this.scaleBaseHeight){var n=this.getNaturalSize(),o=this.scaleBaseWidth/this.scaleBaseHeight,a=o*n.height,r=n.width-a;if(r>0)switch(this.textAlign){case\"center\":i.paddingRight=Math.round(r/2)+\"px\",i.paddingLeft=Math.round(r/2)+\"px\";break;case\"right\":i.paddingLeft=Math.round(r)+\"px\";break;default:i.paddingRight=Math.round(r)+\"px\"}}extend(t,i)},getFontLoader:function(t){t=t||noop,!this.font.needsLoading()||FontBase.useCSSFontLoadingAPI||\"undefined\"!=typeof FontLoader?t():loadJS(creative.resourceUrl+\"runner-min/FontLoader.js\",t)},loadFont:function(t){t=t||noop;var e={fontFamily:this.font.family,fontProvider:this.font.provider,fontStretch:this.font.stretch||\"\",fontStyle:this.font.style,fontWeight:this.font.weight,fontTtfUrl:this.font.getFileUrl(\"ttf\")||\"\",fontWoffUrl:this.font.getFileUrl(\"woff\")||\"\"},i=creative.perf.start(\"TextStyleIntegrator.loadFont\",e);this.getFontLoader(function(){var n=creative.perf.start(\"TextStyleIntegrator.loadStyle\",e);this.font.loadStyle(function(o){e.errorMessage=o||\"\",n.end(),i.end(),!o&&this.font.isMonotype()&&this.trackMonotypeUsage(),t(o)}.bind(this))}.bind(this))},setFont:function(t){var e=[\"provider\",\"family\",\"style\",\"weight\",\"stretch\",\"variation\",\"files\",\"baseUrl\"],i={};e.forEach(function(e){this.font.localId&&(i[e]=\"files\"===e?{}:this.font[e]),\"undefined\"!=typeof t[e]&&(i[e]=t[e])}.bind(this)),-1===[\"custom\",\"google\",\"web\"].indexOf(i.provider)&&(i.provider=\"custom\"),this.font.localId?(\"custom\"===i.provider&&i.family===this.font.family&&(i.family=this.font.family+\" (custom)\"),this.font=new FontBase(i)):extend(this.font,i),creative.track({name:\"retiredFeatureUsed\",featureType:\"apifunction\",featureName:\"TextStyleIntegrator.setFont\"})},trackMonotypeUsage:function(){creative.runtimeParams.monotypeProjectId&&!creative.runtimeParams.monotypeUsageReported&&(creative.runtimeParams.monotypeUsageReported=1,creative.aggregatorTracking.trackAggregator(\"monotypeUsageReported\",{monotypeProjectId:creative.runtimeParams.monotypeProjectId,creativeId:creative.id}))}};window.TextStyleIntegrator=t}();;\n!function(e){var o=Date.now||function(){return+new Date},t=60,_=1e3,i={},l=1;e.core?core.effect||(core.effect={}):e.core={effect:{}},core.effect.Animate={requestAnimationFrame:function(){var o=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,t=!!o;if(o&&!/requestAnimationFrame\\(\\)\\s*\\{\\s*\\[native code\\]\\s*\\}/i.test(o.toString())&&(t=!1),t)return function(e,t){o(e,t)};var _=60,i={},l=0,n=1,r=null,a=+new Date;return function(e){var o=n++;return i[o]=e,l++,null===r&&(r=setInterval(function(){var e=+new Date,o=i;i={},l=0;for(var t in o)o.hasOwnProperty(t)&&(o[t](e),a=e);e-a>2500&&(clearInterval(r),r=null)},1e3/_)),o}}(),stop:function(e){var o=null!=i[e];return o&&(i[e]=null),o},isRunning:function(e){return null!=i[e]},start:function(e,n,r,a,c,s){var p=o(),h=p,f=0,m=0,u=l++;if(s||(s=document.body),u%20===0){var g={};for(var v in i)g[v]=!0;i=g}var d=function(l){var g=l!==!0,v=o();if(!i[u]||n&&!n(u))return i[u]=null,void(r&&r(t-m/((v-p)/_),u,!1));if(g)for(var T=Math.round((v-h)/(_/t))-1,S=0;S1&&(f=1));var D=c?c(f):f;e(D,v,g)!==!1&&1!==f||!g?g&&(h=v,core.effect.Animate.requestAnimationFrame(d,s)):(i[u]=null,r&&r(t-m/((v-p)/_),u,1===f||null==a))};return i[u]=!0,core.effect.Animate.requestAnimationFrame(d,s),u}}}(window);var ZyngaScroller;!function(){var e=function(){};ZyngaScroller=function(o,t){this.__callback=o,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:e,penetrationDeceleration:.03,penetrationAcceleration:.08};for(var _ in t)this.options[_]=t[_]};var o=function(e){return Math.pow(e-1,3)+1},t=function(e){return(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2)},_={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,o,t,_){var i=this;e===+e&&(i.__clientWidth=e),o===+o&&(i.__clientHeight=o),t===+t&&(i.__contentWidth=t),_===+_&&(i.__contentHeight=_),i.__computeScrollMax(),i.scrollTo(i.__scrollLeft,i.__scrollTop,!0)},setPosition:function(e,o){var t=this;t.__clientLeft=e||0,t.__clientTop=o||0},setSnapSize:function(e,o){var t=this;t.__snapWidth=e,t.__snapHeight=o},activatePullToRefresh:function(e,o,t,_){var i=this;i.__refreshHeight=e,i.__refreshActivate=o,i.__refreshDeactivate=t,i.__refreshStart=_},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var e=this;e.__refreshActive=!1,e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)},getValues:function(){var e=this;return{left:e.__scrollLeft,top:e.__scrollTop,zoom:e.__zoomLevel,isDragging:e.__isDragging}},getScrollMax:function(){var e=this;return{left:e.__maxScrollLeft,top:e.__maxScrollTop}},zoomTo:function(e,o,t,_,i){var l=this;if(!l.options.zooming)throw new Error(\"Zooming is not enabled!\");i&&(l.__zoomComplete=i),l.__isDecelerating&&(core.effect.Animate.stop(l.__isDecelerating),l.__isDecelerating=!1);var n=l.__zoomLevel;null==t&&(t=l.__clientWidth/2),null==_&&(_=l.__clientHeight/2),e=Math.max(Math.min(e,l.options.maxZoom),l.options.minZoom),l.__computeScrollMax(e);var r=(t+l.__scrollLeft)*e/n-t,a=(_+l.__scrollTop)*e/n-_;r>l.__maxScrollLeft?r=l.__maxScrollLeft:0>r&&(r=0),a>l.__maxScrollTop?a=l.__maxScrollTop:0>a&&(a=0),l.__publish(r,a,e,o)},zoomBy:function(e,o,t,_,i){var l=this;l.zoomTo(l.__zoomLevel*e,o,t,_,i)},scrollTo:function(e,o,t,_){var i=this;if(i.__isDecelerating&&(core.effect.Animate.stop(i.__isDecelerating),i.__isDecelerating=!1),null!=_&&_!==i.__zoomLevel){if(!i.options.zooming)throw new Error(\"Zooming is not enabled!\");e*=_,o*=_,i.__computeScrollMax(_)}else _=i.__zoomLevel;i.options.scrollingX?i.options.paging?e=Math.round(e/i.__clientWidth)*i.__clientWidth:i.options.snapping&&(e=Math.round(e/i.__snapWidth)*i.__snapWidth):e=i.__scrollLeft,i.options.scrollingY?i.options.paging?o=Math.round(o/i.__clientHeight)*i.__clientHeight:i.options.snapping&&(o=Math.round(o/i.__snapHeight)*i.__snapHeight):o=i.__scrollTop,e=Math.max(Math.min(i.__maxScrollLeft,e),0),o=Math.max(Math.min(i.__maxScrollTop,o),0),e===i.__scrollLeft&&o===i.__scrollTop&&(t=!1),i.__publish(e,o,_,t)},scrollBy:function(e,o,t){var _=this,i=_.__isAnimating?_.__scheduledLeft:_.__scrollLeft,l=_.__isAnimating?_.__scheduledTop:_.__scrollTop;_.scrollTo(i+(e||0),l+(o||0),t)},doMouseZoom:function(e,o,t,_){var i=this,l=e>0?.97:1.03;return i.zoomTo(i.__zoomLevel*l,!1,t-i.__clientLeft,_-i.__clientTop)},doTouchStart:function(e,o){if(null==e.length)throw new Error(\"Invalid touch list: \"+e);if(o instanceof Date&&(o=o.valueOf()),\"number\"!=typeof o)throw new Error(\"Invalid timestamp value: \"+o);var t=this;t.__interruptedAnimation=!0,t.__isDecelerating&&(core.effect.Animate.stop(t.__isDecelerating),t.__isDecelerating=!1,t.__interruptedAnimation=!0),t.__isAnimating&&(core.effect.Animate.stop(t.__isAnimating),t.__isAnimating=!1,t.__interruptedAnimation=!0);var _,i,l=1===e.length;l?(_=e[0].pageX,i=e[0].pageY):(_=Math.abs(e[0].pageX+e[1].pageX)/2,i=Math.abs(e[0].pageY+e[1].pageY)/2),t.__initialTouchLeft=_,t.__initialTouchTop=i,t.__zoomLevelStart=t.__zoomLevel,t.__lastTouchLeft=_,t.__lastTouchTop=i,t.__lastTouchMove=o,t.__lastScale=1,t.__enableScrollX=!l&&t.options.scrollingX,t.__enableScrollY=!l&&t.options.scrollingY,t.__isTracking=!0,t.__didDecelerationComplete=!1,t.__isDragging=!l,t.__isSingleTouch=l,t.__positions=[]},doTouchMove:function(e,o,t){if(null==e.length)throw new Error(\"Invalid touch list: \"+e);if(o instanceof Date&&(o=o.valueOf()),\"number\"!=typeof o)throw new Error(\"Invalid timestamp value: \"+o);var _=this;if(_.__isTracking){var i,l;2===e.length?(i=Math.abs(e[0].pageX+e[1].pageX)/2,l=Math.abs(e[0].pageY+e[1].pageY)/2):(i=e[0].pageX,l=e[0].pageY);var n=_.__positions;if(_.__isDragging){var r=i-_.__lastTouchLeft,a=l-_.__lastTouchTop,c=_.__scrollLeft,s=_.__scrollTop,p=_.__zoomLevel;if(null!=t&&_.options.zooming){var h=p;if(p=p/_.__lastScale*t,p=Math.max(Math.min(p,_.options.maxZoom),_.options.minZoom),h!==p){var f=i-_.__clientLeft,m=l-_.__clientTop;c=(f+c)*p/h-f,s=(m+s)*p/h-m,_.__computeScrollMax(p)}}if(_.__enableScrollX){c-=r*this.options.speedMultiplier;var u=_.__maxScrollLeft;(c>u||0>c)&&(_.options.bouncing?c+=r/2*this.options.speedMultiplier:c=c>u?u:0)}if(_.__enableScrollY){s-=a*this.options.speedMultiplier;var g=_.__maxScrollTop;(s>g||0>s)&&(_.options.bouncing?(s+=a/2*this.options.speedMultiplier,_.__enableScrollX||null==_.__refreshHeight||(!_.__refreshActive&&s<=-_.__refreshHeight?(_.__refreshActive=!0,_.__refreshActivate&&_.__refreshActivate()):_.__refreshActive&&s>-_.__refreshHeight&&(_.__refreshActive=!1,_.__refreshDeactivate&&_.__refreshDeactivate()))):s=s>g?g:0)}n.length>60&&n.splice(0,30),n.push(c,s,o),_.__publish(c,s,p)}else{var v=_.options.locking?3:0,d=5,T=Math.abs(i-_.__initialTouchLeft),S=Math.abs(l-_.__initialTouchTop);_.__enableScrollX=_.options.scrollingX&&T>=v,_.__enableScrollY=_.options.scrollingY&&S>=v,n.push(_.__scrollLeft,_.__scrollTop,o),_.__isDragging=(_.__enableScrollX||_.__enableScrollY)&&(T>=d||S>=d),_.__isDragging&&(_.__interruptedAnimation=!1)}_.__lastTouchLeft=i,_.__lastTouchTop=l,_.__lastTouchMove=o,_.__lastScale=t}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),\"number\"!=typeof e)throw new Error(\"Invalid timestamp value: \"+e);var o=this;if(o.__isTracking){if(o.__isTracking=!1,o.__isDragging)if(o.__isDragging=!1,o.__isSingleTouch&&o.options.animating&&e-o.__lastTouchMove<=100){for(var t=o.__positions,_=t.length-1,i=_,l=_;l>0&&t[l]>o.__lastTouchMove-100;l-=3)i=l;if(i!==_){var n=t[_]-t[i],r=o.__scrollLeft-t[i-2],a=o.__scrollTop-t[i-1];o.__decelerationVelocityX=r/n*(1e3/60),o.__decelerationVelocityY=a/n*(1e3/60);var c=o.options.paging||o.options.snapping?4:1;(Math.abs(o.__decelerationVelocityX)>c||Math.abs(o.__decelerationVelocityY)>c)&&(o.__refreshActive||o.__startDeceleration(e))}else o.options.scrollingComplete()}else e-o.__lastTouchMove>100&&o.options.scrollingComplete();o.__isDecelerating||(o.__refreshActive&&o.__refreshStart?(o.__publish(o.__scrollLeft,-o.__refreshHeight,o.__zoomLevel,!0),o.__refreshStart&&o.__refreshStart()):((o.__interruptedAnimation||o.__isDragging)&&o.options.scrollingComplete(),o.scrollTo(o.__scrollLeft,o.__scrollTop,!0,o.__zoomLevel),o.__refreshActive&&(o.__refreshActive=!1,o.__refreshDeactivate&&o.__refreshDeactivate()))),o.__positions.length=0}},__publish:function(e,_,i,l){var n=this,r=n.__isAnimating;if(r&&(core.effect.Animate.stop(r),n.__isAnimating=!1),l&&n.options.animating){n.__scheduledLeft=e,n.__scheduledTop=_,n.__scheduledZoom=i;var a=n.__scrollLeft,c=n.__scrollTop,s=n.__zoomLevel,p=e-a,h=_-c,f=i-s,m=function(e,o,t){t&&(n.__scrollLeft=a+p*e,n.__scrollTop=c+h*e,n.__zoomLevel=s+f*e,n.__callback&&n.__callback(n.__scrollLeft,n.__scrollTop,n.__zoomLevel))},u=function(e){return n.__isAnimating===e},g=function(e,o,t){o===n.__isAnimating&&(n.__isAnimating=!1),(n.__didDecelerationComplete||t)&&n.options.scrollingComplete(),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))};n.__isAnimating=core.effect.Animate.start(m,u,g,n.options.animationDuration,r?o:t)}else n.__scheduledLeft=n.__scrollLeft=e,n.__scheduledTop=n.__scrollTop=_,n.__scheduledZoom=n.__zoomLevel=i,n.__callback&&n.__callback(e,_,i),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))},__computeScrollMax:function(e){var o=this;null==e&&(e=o.__zoomLevel),o.__maxScrollLeft=Math.max(o.__contentWidth*e-o.__clientWidth,0),o.__maxScrollTop=Math.max(o.__contentHeight*e-o.__clientHeight,0)},__startDeceleration:function(){var e=this;if(e.options.paging){var o=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),t=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),_=e.__clientWidth,i=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(o/_)*_,e.__minDecelerationScrollTop=Math.floor(t/i)*i,e.__maxDecelerationScrollLeft=Math.ceil(o/_)*_,e.__maxDecelerationScrollTop=Math.ceil(t/i)*i}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=function(o,t,_){e.__stepThroughDeceleration(_)},n=e.options.snapping?4:.1,r=function(){var o=Math.abs(e.__decelerationVelocityX)>=n||Math.abs(e.__decelerationVelocityY)>=n;return o||(e.__didDecelerationComplete=!0),o},a=function(){e.__isDecelerating=!1,e.__didDecelerationComplete&&e.options.scrollingComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping)};e.__isDecelerating=core.effect.Animate.start(l,r,a)},__stepThroughDeceleration:function(e){var o=this,t=o.__scrollLeft+o.__decelerationVelocityX,_=o.__scrollTop+o.__decelerationVelocityY;if(!o.options.bouncing){var i=Math.max(Math.min(o.__maxDecelerationScrollLeft,t),o.__minDecelerationScrollLeft);i!==t&&(t=i,o.__decelerationVelocityX=0);var l=Math.max(Math.min(o.__maxDecelerationScrollTop,_),o.__minDecelerationScrollTop);l!==_&&(_=l,o.__decelerationVelocityY=0)}if(e?o.__publish(t,_,o.__zoomLevel):(o.__scrollLeft=t,o.__scrollTop=_),!o.options.paging){var n=.95;o.__decelerationVelocityX*=n,o.__decelerationVelocityY*=n}if(o.options.bouncing){var r=0,a=0,c=o.options.penetrationDeceleration,s=o.options.penetrationAcceleration;to.__maxDecelerationScrollLeft&&(r=o.__maxDecelerationScrollLeft-t),_o.__maxDecelerationScrollTop&&(a=o.__maxDecelerationScrollTop-_),0!==r&&(r*o.__decelerationVelocityX<=0?o.__decelerationVelocityX+=r*c:o.__decelerationVelocityX=r*s),0!==a&&(a*o.__decelerationVelocityY<=0?o.__decelerationVelocityY+=a*c:o.__decelerationVelocityY=a*s)}}};for(var i in _)ZyngaScroller.prototype[i]=_[i]}();;\nfunction Scroller(t,i,o){this.container=t,this.list=i,this.options=o||{},this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handleScroll=this._handleScroll.bind(this),this.silentScrolling=!1,this.zyngaScroller=new ZyngaScroller(this._handleScroll,{scrollingX:\"vertical\"===this.options.direction?!1:!0,scrollingY:\"horizontal\"===this.options.direction?!1:!0,bouncing:!!this.options.bouncing,animating:!!this.options.animating,locking:!!this.options.locking,snapping:!!this.options.snapping,animationDuration:\"undefined\"!=typeof this.options.animationDuration?this.options.animationDuration:250,scrollingComplete:deferred(this.emits(\"scrollingEnd\"))}),this.setEasing(\"undefined\"==typeof this.options.easing?!0:this.options.easing),this.redraw()}extend(Scroller.prototype,EventEmitter),Object.defineProperty(Scroller.prototype,\"isDragging\",{get:function(){return this.zyngaScroller.getValues().isDragging}}),Scroller._owner=\"celtra\",Scroller.prototype._handleScroll=function(t,i){t=isNaN(t)?0:t,i=isNaN(i)?0:i;var o=this.getMaxScroll();this.currentPosition={left:t,top:i,leftPercent:o.left?t/o.left:0,topPercent:o.top?i/o.top:0},celtra.styler.css(this.list,\"transform\",ScreenObject.supports3d?\"translate3d(\"+-t+\"px, \"+-i+\"px, 0)\":\"translate(\"+-t+\"px, \"+-i+\"px)\"),this.scrollbars&&(this.currentPosition.sbTop=this.currentPosition.top/(this.list.size.height-this.container.size.height)*(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10)),this.currentPosition.sbLeft=this.currentPosition.left/(this.list.size.width-this.container.size.width)*(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10)),this.currentPosition.sbTopPercent=this.currentPosition.sbTop/(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10)),this.currentPosition.sbLeftPercent=this.currentPosition.sbLeft/(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10)),this._renderScrollbars(this.currentPosition.sbLeft,this.currentPosition.sbTop)),this.silentScrolling||this.emit(\"scrolling\",this.currentPosition)},Scroller.prototype._handleTouchStart=function(t){this.zyngaScroller.doTouchStart(t.touches,t.timeStamp),this.emit(\"scrollingStart\")},Scroller.prototype._handleTouchMove=function(t){this.zyngaScroller.doTouchMove(t.touches,t.timeStamp)},Scroller.prototype._handleTouchEnd=function(t){this.zyngaScroller.doTouchEnd(t.timeStamp)},Scroller.prototype._createScrollbars=function(){var t=document.createElement(\"div\");addClass(t,\"celtra-vertical-scrollbar \"+this.options.scrollbarPosition||\"none\"),this.container.appendChild(t);var i=document.createElement(\"div\");t.appendChild(i),t.style.height=Math.round(this.container.size.height/this.list.size.height*this.container.size.height)+\"px\",t.style.backgroundColor=this.options.scrollbarColor,t.style.display=this.list.size.height<=this.container.size.height?\"none\":\"block\";var o=document.createElement(\"div\");addClass(o,\"celtra-horizontal-scrollbar \"+this.options.scrollbarPosition||\"none\"),this.container.appendChild(o);var e=document.createElement(\"div\");o.appendChild(e),o.style.width=Math.round(this.container.size.width/this.list.size.width*this.container.size.width)+\"px\",o.style.backgroundColor=this.options.scrollbarColor,o.style.display=this.list.size.width<=this.container.size.width?\"none\":\"block\",this.scrollbars={vertical:t,horizontal:o,verticalStyle:t.style,horizontalStyle:o.style}},Scroller.prototype.scrollTo=function(t,i,o,e,s,n){this._scroll(\"scrollTo\",{left:t,top:i,animate:o,duration:e,easing:s,callback:n})},Scroller.prototype.scrollBy=function(t,i,o,e,s,n){this._scroll(\"scrollBy\",{left:t,top:i,animate:o,duration:e,easing:s,callback:n})},Scroller.prototype._scroll=function(t,i){i.animate&&(\"number\"==typeof i.duration?this._setAnimationDuration(i.duration):\"boolean\"==typeof i.duration&&(i.easing=i.duration),\"boolean\"==typeof i.easing&&this.setEasing(i.easing)),this.once(\"scrollingEnd\",function(){\"function\"==typeof i.callback&&i.callback()}),this.zyngaScroller[t](i.left,i.top,i.animate),this.emit(\"scrollingStart\")},Scroller.prototype.getMaxScroll=function(){return{left:this.zyngaScroller.__maxScrollLeft,top:this.zyngaScroller.__maxScrollTop}},Scroller.prototype.getCurrentScroll=function(){return this.currentPosition},Scroller.prototype._setAnimationDuration=function(t){this.zyngaScroller.options.animationDuration=t},Scroller.prototype.setEasing=function(t){this.options.easing=t,this.zyngaScroller.__publish=function(i,o,e,s){var n=this,r=function(t){return Math.pow(t-1,3)+1},l=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},a=n.__isAnimating;if(a&&(core.effect.Animate.stop(a),n.__isAnimating=!1),s&&n.options.animating){n.__scheduledLeft=i,n.__scheduledTop=o,n.__scheduledZoom=e;var c=n.__scrollLeft,h=n.__scrollTop,p=n.__zoomLevel,d=i-c,u=o-h,_=e-p,g=function(t,i,o){o&&(n.__scrollLeft=c+d*t,n.__scrollTop=h+u*t,n.__zoomLevel=p+_*t,n.__callback&&n.__callback(n.__scrollLeft,n.__scrollTop,n.__zoomLevel))},S=function(t){return n.__isAnimating===t},z=function(t,i,o){i===n.__isAnimating&&(n.__isAnimating=!1),(n.__didDecelerationComplete||o)&&n.options.scrollingComplete(),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))};n.__isAnimating=t?core.effect.Animate.start(g,S,z,n.options.animationDuration,a?r:l):core.effect.Animate.start(g,S,z,n.options.animationDuration)}else n.__scheduledLeft=n.__scrollLeft=i,n.__scheduledTop=n.__scrollTop=o,n.__scheduledZoom=n.__zoomLevel=e,n.__callback&&n.__callback(i,o,e),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))}},Scroller.prototype.redraw=function(){this.container.size={width:this.container.offsetWidth,height:this.container.offsetHeight},this.list.size={width:this.list.offsetWidth,height:this.list.offsetHeight},this.zyngaScroller.setDimensions(this.container.size.width,this.container.size.height,this.list.size.width,this.list.size.height),this.options.snapping&&this._setSnapSize(this.container.size.width,this.container.size.height);var t=this.getMaxScroll();this.zyngaScroller.scrollTo(t.left*this.currentPosition.leftPercent,t.top*this.currentPosition.topPercent,!1),this.scrollbars?(this.scrollbars.verticalStyle.height=Math.round(this.container.size.height/this.list.size.height*this.container.size.height)+\"px\",this.scrollbars.horizontalStyle.width=Math.round(this.container.size.width/this.list.size.width*this.container.size.width)+\"px\",this.currentPosition.sbTop=(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10))*this.currentPosition.sbTopPercent,this.currentPosition.sbLeft=(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10))*this.currentPosition.sbLeftPercent,this._renderScrollbars(this.currentPosition.sbLeft,this.currentPosition.sbTop)):(\"outer\"===this.options.scrollbarPosition||\"inner\"===this.options.scrollbarPosition)&&this._createScrollbars()},Scroller.prototype._renderScrollbars=function(t,i){ScreenObject.allowPositioningAndSizingUsingTransforms?(celtra.styler.css(this.scrollbars.vertical,\"transform\",ScreenObject.supports3d?\"translate3d(0, \"+i+\"px, 0)\":\"translate(0, \"+i+\"px)\"),celtra.styler.css(this.scrollbars.horizontal,\"transform\",ScreenObject.supports3d?\"translate3d(\"+t+\"px, 0, 0)\":\"translate(\"+t+\"px, 0)\")):(this.scrollbars.verticalStyle.top=i+\"px\",this.scrollbars.horizontalStyle.left=t+\"px\"),this.container.size.height>=this.list.size.height?(this.scrollbars.verticalStyle.display=\"none\",removeClass(this.container,\"vertical-scrollbar\")):(this.scrollbars.verticalStyle.display=\"block\",addClass(this.container,\"vertical-scrollbar\")),this.container.size.width>=this.list.size.width?(this.scrollbars.horizontalStyle.display=\"none\",removeClass(this.container,\"horizontal-scrollbar\")):(this.scrollbars.horizontalStyle.display=\"block\",addClass(this.container,\"horizontal-scrollbar\"))},Scroller.prototype._setSnapSize=function(t,i){this.zyngaScroller.setSnapSize(t,i)};;\nfunction Creative(e,t,r,n,i,a,o,s,u,c,d,m,l){if(e instanceof Creative)throw\"This JSON has already been unfreezed. We do it inline, to improve performance. Duplicate it yourself before unfreezing, if you need to use it again.\";var p=l.start(\"Creative.new\"),v=extend({adapter:a,runtimeParams:t||{},urlOpenedOverrideUrls:s,urlOpenedUrlAppendage:d,clickThroughDestinationUrl:m,storeOpenedOverrideUrls:u,macros:c},o);if(\"InstaAdHtml\"!==e.clazz){var f=l.start(\"Creative.unfreeze\");e=Freezer.unfreeze(e,window,v),f.end()}return e.instantiation=randInt(),e.batcher=new Batcher,e.trackingCenter=r,e.universalInteractionId=\"\",e.aggregatorTracking=n,e.experiments=i,e.perf=l,e.platformAdvId=t.platformAdvId,e.platformAdvIdTrackingLimited=t.platformAdvIdTrackingLimited,\"InstaAdHtml\"===e.clazz&&(e.adapter=a,e.runtimeParams=t||{},e.urlOpenedOverrideUrls=s,e.urlOpenedUrlAppendage=d,e.clickThroughDestinationUrl=m,e.storeOpenedOverrideUrls=u,e.macros=c,extend(this,e),e=this),\"undefined\"!=typeof a&&null!==a&&(a.openBrowserSameWindowInHostileIFrame=function(e){window.top.location.href=e}),p.end(),e}Creative.toString=function(){return\"[Clazz Creative]\"},Creative.prototype.toString=function(){return\"[Creative \"+this.name+\"]\"},window.creative=null,extend(Creative.prototype,EventEmitter),Creative.init=function(e,t,r,n,i,a,o,s,u,c,d,m,l){if(window.creative)throw\"creative is a singleton and was already initialized.\";Logger.initFromRuntimeParams(t),window.creative=new Creative(e,t,r,n,i,a,o,s,u,c,d,m,l)},Creative.prototype.userInteracted=function(e){this.emit(\"interaction\",e)},Creative.prototype.clickedThrough=function(e){this.emit(\"clickThrough\",e)},Creative.prototype._getRuntimeParamsWithPrefix=function(e){var t={};for(var r in this.runtimeParams)0===r.indexOf(e)&&(t[r.slice(e.length)]=this.runtimeParams[r]);return t},Object.defineProperties(Creative.prototype,{sessionId:{enumerable:!0,get:function(){return this.runtimeParams.sessionId}},placementId:{enumerable:!0,get:function(){return this.runtimeParams.placementId||null}},folderId:{enumerable:!0,get:function(){return this.runtimeParams.folderId}},supplierId:{enumerable:!0,get:function(){return this.runtimeParams.supplierId||null}},dataURIsEnabled:{enumerable:!1,get:function(){return 1==this.runtimeParams.dataURIsEnabled||\"treatment\"===(this.experiments.get(\"UseDataURIsGlobally\")||{}).chosenVariant}},secure:{enumerable:!0,get:function(){return 1==this.runtimeParams.secure}},userParams:{enumerable:!0,get:function(){return this._getRuntimeParamsWithPrefix(\"user.\")}},userIdentifiers:{enumerable:!0,get:function(){return this.runtimeParams.userIdentifiers}},authTokenUrlParam:{enumerable:!1,get:function(){return\"authBasis=\"+creative.runtimeParams.authBasis+\"&authToken=\"+creative.runtimeParams.authToken}},customAudiences:{enumerable:!0,get:function(){return function(e){if(!creative.runtimeParams.customAudiences[e])throw new Error('Custom audience \"'+e+'\" is not used by the creative.');return{userExists:creative.runtimeParams.customAudiences[e].userExists,userData:creative.runtimeParams.customAudiences[e].userData,addUser:function(t){return CustomAudiences.addUser(e,t)},removeUser:function(){return CustomAudiences.removeUser(e)}}}}},acceptLanguage:{enumerable:!0,get:function(){return this.runtimeParams.acceptLanguage}}}),Creative.prototype.awake=function(){function e(r,n,i,a){r.forEach(function(r){r.parentUnit=a,r.parentScreen=i,r.parentContainer=n;var o=r.getNestedContainers();o.forEach(function(n){n.parentUnit=a,n.parentScreen=i,n.parentObject=r,e(n.objects,n,i,a),n.scenes&&t(n.scenes,n,i,a)})})}function t(e,t,r,n){e.forEach(function(e){e.parentUnit=n,e.parentScreen=r,e.parentContainer=t})}var r=this;for(var n in r.units){var i=r.units[n];i.name=n;var a=[];i.variants?i.variants.forEach(function(e){a=a.concat(e.master,e.screens)}):(a=[i.master].concat(i.screens),i.loadingScreen&&(a=[i.loadingScreen].concat(a))),a.forEach(function(r){r.parentUnit=i,e(r.objects,r,r,i),r.scenes&&t(r.scenes,r,r,i)})}},Creative.prototype.track=function(e,t){[\"firstInteraction\",\"interaction\",\"endCardInteraction\",\"unitCollapsed\",\"creativeDismissed\",\"clickThroughDestinationOpened\",\"firstClickThrough\",\"itemSwiped\"].indexOf(e.name)>=0&&(e=extend(e,{universalInteractionId:this.universalInteractionId})),this.trackingCenter.track(e,t)},Creative.prototype.setUniversalInteractionId=function(e){this.universalInteractionId=e},Creative.prototype.wrapRedirectPageUrl=function(e,t){return this.trackingCenter.wrapRedirectPageUrl(e,t)},Object.defineProperty(Creative.prototype,\"sdk\",{get:function(){return this.adapter},enumerable:!0}),Creative._throw=function(e){throw e},Creative.prototype.getUserInteracted=function(){return 1==this.runtimeParams.userInteracted},Creative.prototype.trackCreativeRendered=function(){creative.adapter.notifycreativeRendered(),this._getCreativeRendered()||(this.track({name:\"creativeRendered\"}),this.runtimeParams.creativeRendered=1,defer(this.trackingCenter.batchFlush))},Creative.prototype._getCreativeRendered=function(){return 1===this.runtimeParams.creativeRendered},Creative.prototype.trackCreativeRenderedOnScreenShow=Creative.prototype.trackCreativeRendered,Creative.prototype.trackCreativeRenderedOnVideoStart=noop,Creative.trackCustomEventAction=function(e,t,r){var n=\"custom\";e.track({name:n,label:t.name}),creative.adapter.sendToEventMonitor(n,t.triggerId,e.screen.name,null,t.name),r&&r()},Creative.prototype.trackCreativeLoaded=function(e){this.track({name:\"creativeLoaded\",viewability00Measurable:e.observingViewability(\"00\"),viewability501Measurable:e.observingViewability(\"501\"),viewableTimeMeasurable:e.observingViewableTime(),cdnVariant:this.runtimeParams.variantChoices.CdnTiming||\"none\"}),defer(this.trackingCenter.batchFlush),this.perf._stopTrackingDefers=!0,this.perf.mark(\"creativeLoaded\")},Creative.prototype.createUserLocation=function(e){return\"undefined\"!=typeof UserLocation?new UserLocation({lat:this.runtimeParams.gpsLat,lng:this.runtimeParams.gpsLng},e):void 0},Creative.prototype.getPageUrl=function(e){return(this.secure?this.creativeUrl:this.insecureCreativeUrl)+e+\"?base64json=\"+encodeURIComponent(btoa(to_utf8(JSON.stringify(this.runtimeParams))))},Creative.prototype.shouldClickThroughToNewWindow=function(e){var t;t=[\"same\",\"new\"].indexOf(this.runtimeParams.preferredClickThroughWindow)>=0?this.runtimeParams.preferredClickThroughWindow:\"new\";var r=e&&e.inUserInitiatedIteration;return\"new\"==t&&r},Creative.prototype.getFeedFields=function(){return FeedData.getCustomFields()},Creative.prototype.getFeedFieldByName=function(e){return FeedData.getCustomFieldByName(e)},Creative.prototype.getAllFeedFieldsByName=function(e){return FeedData.getCustomFields().filter(function(t){return t.name===e})};;\nfunction ExpandableBanner(){}inherit(ExpandableBanner,Creative),ExpandableBanner.toString=function(){return\"[Clazz ExpandableBanner]\"},ExpandableBanner.prototype.toString=function(){return\"[ExpandableBanner \"+this.name+\"]\"},ExpandableBanner.prototype.awake=function(){ExpandableBanner.uber.awake.call(this),this.adapter.wrapRedirectPageUrl=this.wrapRedirectPageUrl.bind(this),this.adapter.getModalUrl=function(e){return creative.getPageUrl(e?e:\"modal.html\")}.bind(this),this.units.banner.expandAction=function(e,a,n){this._assertAppearBeforeExpand(),\"undefined\"!=typeof a.destinationPage&&null!==a.destinationPage&&(creative.runtimeParams.goToPageAfterExpand=a.destinationPage),e.track({name:\"expandRequested\"}),e.trackClickThrough(),creative.adapter.expand(n,a)},this.units.banner.dismissAction=function(e,a,n){e.track({name:\"creativeDismissed\"}),creative.adapter.dismiss(n,a)},this.units.modal.collapseAction=function(e,a,n){e.track({name:\"unitCollapsed\"}),creative.adapter.collapse(n,a)},this.units.modal.dismissAction=function(e,a,n){e.track({name:\"creativeDismissed\"}),creative.adapter.dismiss(n,a)},this.units.banner.trackCreativeDismissed=function(){new ActionContext(this.visibleScreen).track({name:\"creativeDismissed\"})},this.units.banner.userLocation=this.createUserLocation(!1),this.units.modal.userLocation=this.createUserLocation(!0)};;\nvar Kernel={};Kernel.toString=function(){return\"[Clazz Kernel]\"},Kernel.runInParallelAction=function(e,n,t){n.actions.waitForEach(function(n,t){n(e,t)},t)},Kernel.runInParallelActionDryRun=Kernel.runInParallelAction,Kernel.runInBackgroundAction=function(e,n,t){n.action&&n.action(e,noop),t()},Kernel.runInSequenceAction=function(e,n,t){for(var r=t,i=n.actions.length-1;i>=0;i--)r=function(n,t){return function(){t(e,n)}}(r,n.actions[i]);r()},Kernel.runInSequenceActionDryRun=Kernel.runInSequenceAction,Kernel.runNTimesAction=function(e,n){n.caller.hasOwnProperty(\"executionsLeft\")||(n.caller.executionsLeft=n.repeat),n.caller.executionsLeft>0&&(n.caller.executionsLeft--,(n.action||nullai)(e))},Kernel.runNTimesActionDryRun=function(e,n,t){(n.action||nullai)(e,t)},Kernel.loopAction=function(e,n,t){function r(){return 0==i?t():(-1!=i&&i--,void(n.action||nullai)(e,\"thumb\"===creative.runtimeParams.purpose?t:r))}var i=n.repeat;r()},Kernel.loopActionDryRun=function(e,n,t){(n.action||nullai)(e,t)},Kernel.sleepAction=function(e,n,t){setTimeout(t,n.duration)},Kernel.executeJavascriptAction=function(e,n,t){try{var r=e.initiator,i=e.screen.parentUnit,c=e.screen,a=new Function(\"ctx\",\"c\",\"unit\",\"screen\",\"variant\",n.script.code),o=!1,u=i.getVariantForScreen?i.getVariantForScreen(c):void 0;null!==n.script.code.match(/http:/)&&this._track(\"executeJavascriptAction.code\");var l=function(){o?console.warn('Multiple calls made to \"c()\" from \"'+e.initiator.fieldName+'\" Execute JS Action'):(t(),o=!0)}.bind(this);a.call(r,e,l,i,c,u)}catch(s){console.error(s.message+\"\\n\"+s.stack)}},Kernel.randomAction=function(e,n,t){var r=0;if(n.outcomes.forEach(function(e){r+=e.weight}),!r)return t();for(var i=Math.random()*r,c=0;ci)return(a.action||nullai)(e,t)}},Kernel.randomActionDryRun=function(e,n,t){n.outcomes.forEach(function(n){(n.action||nullai)(e)}),t()},Kernel.bestAction=function(e,n,t){var r=creative.experiments.get(\"Best\",[creative.id,n.experimentName]);r.trackExposure();var i=n.outcomes.filter(function(e){return e.experimentVariant==r.chosenVariant})[0],c=i?i:n.outcomes[0];(c.action||nullai)(e,t)},Kernel.bestActionDryRun=function(e,n,t){var r=creative.experiments.get(\"Best\",[creative.id,n.experimentName]),i=n.outcomes.filter(function(e){return e.experimentVariant==r.chosenVariant})[0],c=i?i:n.outcomes[0];(c.action||nullai)(e,t)},Kernel.trackBestVariantSuccessAction=function(e,n,t){var r=creative.experiments.get(\"Best\",[creative.id,n.experimentName]);r.trackSuccess(),creative.adapter.sendToEventMonitor(\"trackBestVariantSuccess\",n.triggerId,e.screen.name,r.chosenVariant,\"\"),t()},Kernel._track=function(e){this._privateApiTracked=this._privateApiTracked||{},this._privateApiTracked[e]||(this._privateApiTracked[e]=!0,creative.track({name:\"retiredFeatureUsed\",featureType:\"loadingInsecureContent\",featureName:e}))};;\n;\nfunction View(){}extend(View.prototype,EventEmitter),View.prototype.awake=function(){this.node=null,this._loadingCount=null,this._waitingForLoadCallbacks=[],this._isAppearing=!1,this._hasAppearedAtLeastOnce=!1,this._shouldAppear=!1,this.incrementLoadingCount=this.incrementLoadingCount.bind(this),this.decrementLoadingCount=this.decrementLoadingCount.bind(this),this._preloadImage=this._preloadImage.bind(this),this._loadImage=this._loadImage.bind(this),this._trackViewShown=this._trackViewShown.bind(this),this.isTrackable&&this.once(\"appeared\",this._trackViewShown),this.hacks={}},View.prototype.incrementLoadingCount=function(){if(this.loaded)throw\"Starting loads after the view has already finished loading?\";this._loadingCount++},View.prototype.decrementLoadingCount=function(){if(!this.loading)throw\"decrementLoadingCount called while not loading!\";if(!--this._loadingCount){this.finishedLoading();for(var e=this._waitingForLoadCallbacks,t=0;t0}}),View.prototype.createNode=function(){this.on(\"loaded\",creative.perf.start(\"View.load\",{clazz:this.constructor.name,name:this.name}).end);var e=document.createElement(\"div\");\"undefined\"!=typeof creative&&creative.adapter&&creative.adapter.useNativeClickForTapDetection&&(e.style.touchAction=\"manipulation\"),this.localId&&(e.id=\"celtra-object-\"+this.localId);for(var t=this.constructor;t;t=t.uber?t.uber.constructor:void 0)e.className+=\" celtra\"+t.name.replace(/[A-Z]/g,function(e){return\"-\"+e.toLowerCase()});return e},View.prototype.getNode=function(e){return this.loaded?e&&defer(e,0,\"View.getNode defer finishedLoadingCallback\",useAsap()):(e&&this._waitingForLoadCallbacks.push(e),this.node||(this.incrementLoadingCount(),this.node=this.createNode(),defer(this.decrementLoadingCount,0,\"View.getNode defer decrementLoadingCount\",useAsap()))),this.node},Object.defineProperty(View.prototype,\"isAppearing\",{get:function(){return this._isAppearing}}),Object.defineProperty(View.prototype,\"hasAppearedAtLeastOnce\",{get:function(){return this._hasAppearedAtLeastOnce}}),View.prototype.appear=function(){var e=\"View APPEAR called on \"+this.constructor.name+\" \"+this.localId+\" (name=\"+this.name+\")\";this.parentContainer&&(e+=\" from \"+this.parentContainer.constructor.name+\" \"+this.parentContainer.localId+\" (name=\"+this.parentContainer.name+\")\"),Logger(\"events.appear\").log(e),this.hidden?this._shouldAppear=!0:this.isAppearing||(this._appear(),this._isAppearing=!0,this._hasAppearedAtLeastOnce=!0,this.emit(\"appeared\"))},View.prototype.disappear=function(){var e=\"View DISAPPEAR called on \"+this.constructor.name+\" \"+this.localId+\" (name=\"+this.name+\")\";this.parentContainer&&(e+=\" from \"+this.parentContainer.constructor.name+\" \"+this.parentContainer.localId+\" (name=\"+this.parentContainer.name+\")\"),Logger(\"events.appear\").log(e),this.isAppearing&&(this._disappear(),this._isAppearing=!1,this._shouldAppear=!1,this.emit(\"disappeared\"))},View.prototype.reset=function(){this.isAppearing&&(this._shouldAppear=this.hidden,this._isAppearing=!this.hidden)},View.prototype._appear=function(){},View.prototype._disappear=function(){},View.prototype.appearNestedObjects=function(){this.objects.forEach(function(e){e.appear()},this)},View.prototype.disappearNestedObjects=function(){this.objects.forEach(function(e){e.disappear()},this)},View.prototype._trackViewShown=function(e){var t={name:\"viewShown\",viewName:this.name,clazz:this.constructor.name};new ActionContext(this,!1).track(extend(t,e))};;\nBaseCreativeUnit.prototype.alert=function(e,t){var a=this.size.width,r=this.size.height,l=e.boxWidth||320,n=e.boxHeight||160;e.message=removeHtmlTags(e.message),a>=l&&r>=n?this.showModalDialogInPlacement(\"alert\",e,t):(alert(e.message),t())},BaseCreativeUnit.prototype.prompt=function(e,t){var a=this.size.width,r=this.size.height,l=e.boxWidth||320,n=e.boxHeight||190;if(a>=l&&r>=n)this.showModalDialogInPlacement(\"prompt\",e,t);else{var i=prompt(removeHtmlTags(e.message));t(i)}},BaseCreativeUnit.prototype._getUniqueId=function(){var e=new Date,t=e.getTime()+Math.random();return t},BaseCreativeUnit.prototype.showModalDialogInPlacement=function(e,t,a){var r=this._getUniqueId(),l={};l[r]={attachment:\"body\",positioning:\"screen\",type:\"layer\"},creative.adapter.createPlacements(l,function(){function l(e){13==e.keyCode&&(creative.adapter.destroyPlacement(r),o=null,a(C.value))}function n(e){e.preventDefault(),e.stopPropagation()}function i(t){t.preventDefault(),t.stopPropagation(),creative.adapter.destroyPlacement(r),o=null,\"prompt\"==e?a(C.value):a()}function s(e){e.preventDefault(),e.stopPropagation(),creative.adapter.destroyPlacement(r),o=null,a(null)}if(window){var o=creative.adapter.placements[r];o.setZIndex(\"max\"),o.setSize(\"100%\",\"100%\"),o.setPosition(0,0);var d=o.createElement(\"link\");d.rel=\"stylesheet\",d.type=\"text/css\",d.href=creative.resourceUrl+\"runner-min/clazzes/ModalDialogs-Overlay.css\",o.getContainer().appendChild(d);var c=o.createElement(\"div\");addClass(c,\"celtra-alert\"),c.style.display=\"none\";var p=o.createElement(\"div\");addClass(p,\"celtra-alert-dark-overlay\"),c.appendChild(p),this.preventScroll(c);var h=o.createElement(\"div\");if(addClass(h,\"celtra-alert-box\"),t.title&&\"\"!=t.title){var m=o.createElement(\"h1\");addClass(m,\"celtra-alert-title\"),m.innerHTML=t.title,h.appendChild(m)}if(t.title&&\"\"!=t.title&&t.message&&\"\"!=t.message){var v=o.createElement(\"hr\");addClass(v,\"celtra-alert-dark-line\"),h.appendChild(v);var u=o.createElement(\"hr\");addClass(u,\"celtra-alert-light-line\"),h.appendChild(u)}if(t.message&&\"\"!=t.message){var g=o.createElement(\"div\");addClass(g,\"celtra-alert-message\"),g.innerHTML=t.message,h.appendChild(g)}if(\"prompt\"==e){var C=o.createElement(\"input\");addClass(C,\"celtra-alert-input\"),C.value=t.defaultValue||\"\",h.appendChild(C),attach(C,\"keypress\",l)}var f=o.createElement(\"div\");if(addClass(f,\"celtra-alert-ok\"),f.innerHTML=\"OK\",h.appendChild(f),this.preventScroll(h),once(f,\"touchend\",i,!1),\"prompt\"==e&&t.showCancel){addClass(f,\"with-cancel\");var y=o.createElement(\"div\");addClass(y,\"celtra-alert-cancel\"),y.innerHTML=\"CANCEL\",h.appendChild(y),attach(f,\"touchstart\",n,!1),once(y,\"touchend\",s,!1)}c.appendChild(h),o.populate(c,function(){o.show();var e=setInterval(function(){\"absolute\"===celtra.styler.computedCSS(h,\"position\")&&(computedBoxHeight=parseInt(celtra.styler.computedCSS(h,\"height\"),10)+parseInt(celtra.styler.computedCSS(h,\"paddingTop\"),10)+parseInt(celtra.styler.computedCSS(h,\"paddingBottom\"),10),h.style.marginTop=-computedBoxHeight/2+\"px\",h.style.opacity=1,clearInterval(e),e=null)},100)})}}.bind(this))},BaseCreativeUnit.prototype.preventScroll=function(e){var t=[\"mousewheel\",\"touchmove\"];t.forEach(function(t){attach(e,t,function(e){e.preventDefault()},!1)})};;\nfunction CreativeUnit(){}inherit(CreativeUnit,BaseCreativeUnit),CreativeUnit.IGNORABLES=BaseCreativeUnit.IGNORABLES,CreativeUnit.DEBUG_EXTRA_PHASE_DELAY=0,CreativeUnit.toString=function(){return\"[Clazz CreativeUnit]\"},CreativeUnit.prototype.toString=function(){return\"[CreativeUnit \"+this.name+\" (\"+this.localId+\")]\"},Object.defineProperty(CreativeUnit.prototype,\"size\",{get:function(){var t=this.getAvailableSize();return this.layoutCurrent||this._updateActiveLayout(this._getOrientation(),t.width,t.height),\"responsive\"===this.sizing?{width:t.width,height:t.height}:{width:this.layoutCurrent.unitSize.width,height:this.layoutCurrent.unitSize.height}},set:function(){}}),Object.defineProperty(CreativeUnit.prototype,\"unitAlignment\",{get:function(){return\"undefined\"==typeof this.layoutCurrent.unitAlignment?{}:this.layoutCurrent.unitAlignment}}),Object.defineProperty(CreativeUnit.prototype,\"layoutCurrent\",{get:function(){return this.layouts[this.layoutCurrentIndex]}}),Object.defineProperty(CreativeUnit.prototype,\"hasOverflow\",{get:function(){return this.screens.concat([this.master]).filter(function(t){return t.showOverflow}).length>0}}),Object.defineProperty(CreativeUnit.prototype,\"hasScreens\",{get:function(){return this.screens.length>0}}),CreativeUnit.prototype._getDestinationScreen=function(){var t=this.hasScreens?this.screens[0]:this.master;if(\"modal\"==this.name&&\"undefined\"!=typeof creative.runtimeParams.goToPageAfterExpand){var e=creative.runtimeParams.goToPageAfterExpand;if(\"string\"!=typeof e)throw new TypeError(\"Only string type is allowed to reference destination screen!\");var i=this.screens.filter(function(t){return t.title===e});i.length>0&&(t=i[0])}return t},CreativeUnit.prototype.awake=function(){var t=this;CreativeUnit.uber.awake.call(this),this.currentScreen=null,this.visibleScreen=null,this._masterShown=!1,this.overflowsY=!1,this.layoutCurrentIndex=null,this.screens.forEach(function(t){t.objects.forEach(function(t){t.zIndex+=ScreenObject._zIndexOffset})}),\"undefined\"==typeof this.backgroundColor&&(this.backgroundColor=\"#000000\"),\"undefined\"==typeof this.usePlaceboBar&&(this.usePlaceboBar=!1),\"undefined\"==typeof this.showCloseButton&&(this.showCloseButton=!1),\"undefined\"==typeof this.alignBackButtonHorizontal&&(this.alignBackButtonHorizontal=\"left\"),this.on(\"_firstScreenLoaded\",function(){t.placeboBar&&(t.placeboBar.parentNode.removeChild(t.placeboBar),t.placeboBar=null),this._setVisibleScreen(this._getDestinationScreen())}.bind(this)),this.onAll(\"_firstScreenLoaded _unitFirstShown\",function(){this.goToScreen(this._getDestinationScreen())}.bind(this)),this.triggerOrientationChange=this.triggerOrientationChange.bind(this),this.updateWindowMetrics=this.updateWindowMetrics.bind(this),this.hacks.triggerBlurWhenTappingOutsideOfInputs=ios()},CreativeUnit.prototype.setAvailableSize=function(t,e){var i=CreativeUnit.uber.setAvailableSize.apply(this,arguments),n=this._getOrientation(),o=this.layouts[this.layoutCurrentIndex];this._updateActiveLayout(n,t,e),this.updateWindowMetrics(n,t,e);var r=this._previousOrientation&&n!=this._previousOrientation,s=o&&o.orientation!=this.layoutCurrent.orientation;(r||s)&&this.triggerOrientationChange(),this._previousOrientation=n,(i||s)&&this.emit(\"resize\")},CreativeUnit.prototype._getOrientation=function(){return creative.adapter.orientation%180===0?\"portrait\":\"landscape\"},CreativeUnit.prototype._updateActiveLayout=function(t,e,i){{var n=this.layouts.slice(),o=this.layoutCurrentIndex;this.layouts[o]||null}n.forEach(function(n){n.sortIndex=0,\"independent\"==n.orientation?n.sortIndex+=1:n.orientation!=t&&(n.sortIndex+=4e3),n.minSize.width>e&&(n.sortIndex+=2e3),n.minSize.height>i&&(n.sortIndex+=2e3),n.sortIndex+=Math.abs(n.minSize.width-e)+Math.abs(n.minSize.height-i)}),n.sort(function(t,e){return t.sortIndex-e.sortIndex}),this.layoutCurrentIndex=this.layouts.indexOf(n[0]),o!=this.layoutCurrentIndex&&this.emit(\"layoutChanged\")},CreativeUnit.prototype.enterRenderTree=function(){if(!this._isRendering){this._isRendering=!0;var t=this.getAvailableSize();this.updateWindowMetrics(this._getOrientation(),t.width,t.height),this.master&&(this.master.loaded?defer(this.master.enterRenderTree.bind(this.master),void 0,void 0,useAsap()):this.once(\"_firstScreenLoaded\",this.master.enterRenderTree.bind(this.master))),this.visibleScreen&&defer(this.visibleScreen.enterRenderTree.bind(this.visibleScreen),void 0,void 0,useAsap()),this.hacks.triggerBlurWhenTappingOutsideOfInputs&&(attach(this.node,\"touchstart\",function(t){-1==[\"INPUT\",\"TEXTAREA\",\"SELECT\"].indexOf(t.target.nodeName)&&null!=this.lastInputElementFocused&&this.lastInputElementFocused.blur()}.bind(this),!0),attach(this.node,\"focus\",function(t){[\"INPUT\",\"TEXTAREA\",\"SELECT\"].indexOf(t.target.nodeName)>-1&&(this.lastInputElementFocused=t.target)}.bind(this),!0),attach(this.node,\"blur\",function(t){[\"INPUT\",\"TEXTAREA\",\"SELECT\"].indexOf(t.target.nodeName)>-1&&(this.lastInputElementFocused=null)}.bind(this),!0))}},CreativeUnit.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.master&&this.master.exitRenderTree(),this.visibleScreen&&this.visibleScreen.exitRenderTree())},CreativeUnit.prototype._appear=function(){this.loaded||Creative._throw(\"Cannot show the unit before it has finished loading.\"),this.isAppearing&&Creative._throw(\"The unit is already appearing.\"),this.node.parentNode||Creative._throw(\"Creative unit must be added to DOM before show() is called. Animations will start on show().\"),Logger(\"unit\").log(\"Showing \"+this),this.inView&&(this.inView.start(),this.currentScreen&&this.currentScreen.inView&&this.currentScreen.inView.start()),this.hasAppearedAtLeastOnce||(this.placeboBar&&this.placeboBar.start(),this._orientationLockIsOn?this._emitUnitFirstShownAfterOrientationPrompt=!0:this.emit(\"_unitFirstShown\"))},CreativeUnit.prototype._disappear=function(){this.isAppearing||Creative._throw(\"The unit is not appearing, can not disappear.\"),Logger(\"unit\").log(\"Hiding \"+this),this.inView&&this.inView.stop()},CreativeUnit.prototype.createNode=function(){var t=this.unitDiv=CreativeUnit.uber.createNode.call(this);if(t.id=\"celtra-\"+this.name.replace(/[A-Z]/g,function(t){return\"-\"+t.toLowerCase()}),Color.isGradient(this.backgroundColor)?addCssRule(\"#\"+t.id,Color.createGradientStyle(this.backgroundColor)):t.style.backgroundColor=this.backgroundColor,t.style.overflow=this.master.showOverflow?\"visible\":\"hidden\",this.screenContainer=document.createElement(\"div\"),this.screenContainer.className=\"celtra-screen-container\",this.screenContainer.style.position=\"absolute\",t.appendChild(this.screenContainer),this.screenHolder=document.createElement(\"div\"),this.screenHolder.className=\"celtra-screen-holder\",this.screenHolder.style.width=\"100%\",this.screenHolder.style.height=\"100%\",this.screenContainer.appendChild(this.screenHolder),t.style.position=\"absolute\",this.usePlaceboBar){var e=this.loadingScreen&&this.loadingScreen.loaderColor||\"white\";this.placeboBar=new PlaceboBar(5e3,.9,200,e),this.screenContainer.appendChild(this.placeboBar)}if(this.showCloseButton){if(this.closeAction||Creative._throw(\"Close button requested, but no close action defined?\"),this.closeButtonType&&\"text\"===this.closeButtonType){var i=document.createElement(\"div\");i.className=\"celtra-close-button touchable celtra-close-button-text\",i.textContent=this.closeButtonText,i.style.color=this.closeButtonTextColor,this.unitDiv.appendChild(i)}else{var i=document.createElement(\"img\"),n=document.createElement(\"img\");this.closeButtonUp?(this.closeButtonDown||(this.closeButtonDown=this.closeButtonUp),this.closeButtonWidth&&this.closeButtonHeight&&(i.style.width=n.style.width=this.closeButtonWidth+\"px\",i.style.height=n.style.height=this.closeButtonHeight+\"px\")):(this.closeButtonUp=new File(\"runner/clazzes/CreativeUnit/close-up.svg\"),this.closeButtonDown=new File(\"runner/clazzes/CreativeUnit/close-down.svg\")),i.className=\"celtra-close-button touchable celtra-close-button-up\",this._preloadImage(this.closeButtonUp,{force:!1},function(t,e){i.src=e}),n.className=\"celtra-close-button celtra-close-button-down\",this._preloadImage(this.closeButtonDown,{force:!1},function(t,e){n.src=e}),this.closeButtonImage=i,this.closeButtonImagePressed=n,this.unitDiv.appendChild(this.closeButtonImage),this.unitDiv.appendChild(this.closeButtonImagePressed)}attach(i,\"tap\",function(){var t=this.currentScreen||this.visibleScreen;this.closeAction(t?new ActionContext(t,!0):null,{},noop)}.bind(this),!1)}var o=[];o.push({name:\"loading\",fun:function(t){if(this.loadingScreen){var e=creative.perf.start(\"CreativeUnit.loadingScreen\");this.loadingScreen.getNode(function(){defer(function(){e.end(),this._setVisibleScreen(this.loadingScreen),t(!0)}.bind(this),CreativeUnit.DEBUG_EXTRA_PHASE_DELAY,\"CreativeUnit.createNode defer loading phase completion\",useAsap())}.bind(this))}else t(!1)}.bind(this)}),o.push({name:\"interactive\",fun:function(t){var e=creative.perf.start(\"CreativeUnit.firstScreenLoaded\"),i=this.hasScreens?2:1,n=function(){--i||defer(function(){e.end(),defer(this.emits(\"_firstScreenLoaded\"),0,\"CreativeUnit.createNode emit _firstScreenLoaded\",useAsap()),t(!0)}.bind(this),CreativeUnit.DEBUG_EXTRA_PHASE_DELAY,\"CreativeUnit.createNode defer onScreenLoaded\",useAsap())}.bind(this);this.hasScreens&&this._getDestinationScreen().getNode(n),this.master.getNode(n)}.bind(this)}),this.incrementLoadingCount();var r=!1,s=function(){r||Creative._throw(\"Unit still not ready to show after last phase?!\")};return o.reverse().forEach(function(t){var e=s;s=function(){Logger(\"unit\").log(\"Phase '\"+t.name+\"' started.\"),t.fun(function(i){Logger(\"unit\").log(\"Phase '\"+t.name+\"' finished, \"+(i?\"DID\":\"DID NOT\")+\" draw something.\"),i&&(r||(r=!0,this.decrementLoadingCount())),e()}.bind(this))}.bind(this)}.bind(this)),s(),t},CreativeUnit.prototype._repositionCloseButton=function(t){function e(t,e,i){function n(t){return{left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}var o=n(i),r=n(e),s=n(t);s.left=r.left+r.width-s.width,s.top=r.top;var a=o.left<=s.left&&s.left+s.width-1-1,r=!1,a=!1,s=500;return n?(clearTimeout(i.shakeTimeout),i.shakeStartTime||(i.shakeStartTime=new Date),r=t.duration&&(new Date).getTime()-i.shakeStartTime.getTime()>=t.duration,i.shakeTimeout=setTimeout(function(){delete i.shakeStartTime,i.triggered=!1},s),r&&!i.triggered&&(a=!0,i.triggered=!0),a):!1},null,t)}},Screen.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit(\"enteredRenderTree\"))},Screen.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.emit(\"exitedRenderTree\"))},Screen.prototype._updateSize=function(){this.emit(\"resize\")},Screen.prototype.finishedLoading=function(){Screen.uber.finishedLoading.call(this),Logger(\"unit\").log(\"Finished loading \"+this)},Screen.prototype.triggerBeforeAppear=function(e){var t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&!this.appearedAtLeastOnce&&(this.isFirstScreen()||this.isMasterScreen())});this.fireTriggers(\"beforeAppear\",null,e,t)},Screen.prototype.triggerOrientationChange=function(e){this.fireTriggers(\"orientationChange\",null,e)},Screen.prototype.getMaxZIndex=function(){var e=0;return this.objects.forEach(function(t){t.zIndex>e&&(e=t.zIndex)}),e},Screen.prototype.inViewTriggerSetup=function(){var e=!1;this.triggers.forEach(function(t){(\"enterView\"===t.type||\"leaveView\"===t.type)&&(e=!0,this.inViewAreaRatio=0)},this),e&&this.inView.on(\"areaInViewRatioChanged\",this.triggerInView.bind(this))},Screen.prototype.triggerInView=function(e){var t=new ActionContext(this),i=\"enterView\",n=this.inViewAreaRatio,r=e,a=function(e,t){return e.parameters.area-t.parameters.area};e=n&&r>=t},null,t,a),this._getTriggers(i,function(e){var t=e.area/100;return t>=n&&r>=t}),this.inViewAreaRatio=e},Screen.prototype.getActionsExecutedOnAppear=function(){var e=!this.appearedAtLeastOnce,t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&e&&(this.isFirstScreen()||this.isMasterScreen())}),i=this.fireTriggersDryRun(\"beforeAppear\",null,noop,t);return e&&(i=i.concat(this.fireTriggersDryRun(\"firstAppear\",null,noop,t))),i.concat(this.fireTriggersDryRun(\"appear\",null,noop,t))},Screen.prototype.resetAction=function(e,t,i){var n=this.findAll(),r=n.length;r?n.forEach(function(n){n.resetAction(e,t,function(){--r||i()})}):i()},Screen.prototype.shuffleAction=function(e,t,i){function n(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return e}var r=n(t.objects.map(function(e){return JSON.parse(JSON.stringify(e.layoutSpecificValues))}));t.objects.forEach(function(e,t){e.layoutSpecificValues.forEach(function(e,i){e.position=r[t][i].position}),e._refreshDisplayState()}),i&&i()},Screen.prototype._trackViewShown=function(){Screen.uber._trackViewShown.call(this,{isMasterScreen:this.isMasterScreen(),isLoadingScreen:this.isLoadingScreen()})};;\nfunction NestedContainer(){}inherit(NestedContainer,ScreenObjectContainer),extend(NestedContainer.prototype,TriggerHost),NestedContainer.toString=function(){return\"[Clazz NestedContainer]\"},NestedContainer.prototype.toString=function(){return\"[NestedContainer \"+this.localId+\"]\"},NestedContainer.prototype.createNode=function(){var e=NestedContainer.uber.createNode.call(this);return this.node=e,this._updateSize=this._updateSize.bind(this),this.enterRenderTree=this.enterRenderTree.bind(this),this.exitRenderTree=this.exitRenderTree.bind(this),this.parentObject.on(\"enteredRenderTree\",this.enterRenderTree),this.parentObject.on(\"exitedRenderTree\",this.exitRenderTree),this.objects.forEach(function(t){this.incrementLoadingCount(),e.appendChild(t.getNode(this.decrementLoadingCount))}.bind(this)),0===this.objects.length&&(e.className+=\" empty\"),this.parentObject.parentContainer.on(\"resize\",this._updateSize),e},NestedContainer.prototype.redrawLayout=function(){this.node.style.width=this.layoutCurrent.size.width,this.node.style.height=this.layoutCurrent.size.height,this.node.style.position=\"relative\",this.node.style.overflow=\"hidden\"},NestedContainer.prototype._updateSize=function(){this.redrawLayout(),this.emit(\"resize\")},NestedContainer.prototype.enterRenderTree=function(){this.emit(\"enteredRenderTree\"),this._updateSize()},NestedContainer.prototype.exitRenderTree=function(){this.emit(\"exitedRenderTree\")},NestedContainer.prototype.onFocus=function(e){this.hasTriggers(\"itemFocus\")&&this.fireTriggers(\"itemFocus\",null,e,new ActionContext(this.parentObject))},NestedContainer.prototype.onBlur=function(e){this.hasTriggers(\"itemBlur\")&&this.fireTriggers(\"itemBlur\",null,e,new ActionContext(this.parentObject))},Object.defineProperty(NestedContainer.prototype,\"layoutCurrent\",{get:function(){return this.layoutSpecificValues[this.parentUnit.layoutCurrentIndex]}}),Object.defineProperties(NestedContainer.prototype,{size:{get:function(){var e,t=this.layoutCurrent.size,i=parseFloat(t.width),n=parseFloat(t.height);return t.width.toString().indexOf(\"%\")>-1&&(e=this.parentObject.getNaturalSize(),i=e.width*i/100),t.height.toString().indexOf(\"%\")>-1&&(e||(e=this.parentObject.getNaturalSize()),n=e.height*n/100),{width:Math.round(i),height:Math.round(n)}}}});;\nfunction ScreenObject(){}inherit(ScreenObject,View),extend(ScreenObject.prototype,TriggerHost),extend(ScreenObject.prototype,DiscoverableTrait),extend(ScreenObject.prototype,ClickPreventer),ScreenObject.requiresRedrawToTriggerAnimationEvents=android(\"4.0\"),ScreenObject.redrawTriggerInterval=60,ScreenObject.toString=function(){return\"[Clazz ScreenObject]\"},ScreenObject.prototype.toString=function(){return\"[ScreenObject \"+this.localId+\" (name=\"+this.name+\")]\"},ScreenObject.allowPositioningAndSizingUsingTransforms=!android(\"2.2\",\"2.3\")||celtra.iframe(),ScreenObject._zIndexOffset=1e4,ScreenObject._resettableProperties=[\"position\",\"size\",\"rotation\",\"zIndex\",\"opacity\",\"hidden\"],ScreenObject._3dTransformBlacklisted=function(t){return/Silk\\/\\d|Kindle Fire| KFTT | KFOT | KFJWI | KFJWA |\\bGT-P3100\\b| HTC[ _]One[ _]S /.test(t)||/\\bGT-I9300\\b/.test(t)&&android(\"4.0\")}(navigator.userAgent),ScreenObject.supports3d=function(){var t=\"WebKitCSSMatrix\"in window&&\"m11\"in new WebKitCSSMatrix||\"MSCSSMatrix\"in window||/Gecko\\//.test(navigator.userAgent);return t&&!this._3dTransformBlacklisted}(),ScreenObject.requires3dTranslateForPositioning=/GT-I9500|GT-I9505|SM-N900|GT-P5210|SM-T520/.test(navigator.userAgent),ScreenObject.dummyImageSpacer=windows(\"10\"),ScreenObject._toPositionPx=function(t,e,i){var n,r,o,s,a=i.width,c=i.height,h=e.width,u=e.height;return[\"left\",\"right\",\"hcenter\"].forEach(function(e){e in t&&(n=e)}),[\"bottom\",\"top\",\"vcenter\"].forEach(function(e){e in t&&(r=e)}),o=t[n],s=t[r],o=o.indexOf(\"%\")>-1?a*parseFloat(o)/100:parseFloat(o),\"hcenter\"===n?o=(a-h)/2+o:\"right\"===n&&(o=a-(o+h)),s=s.indexOf(\"%\")>-1?c*parseFloat(s)/100:parseFloat(s),\"vcenter\"===r?s=(c-u)/2+s:\"bottom\"===r&&(s=c-(s+u)),{x:ScreenObject._roundIfNeeded(o),y:ScreenObject._roundIfNeeded(s)}},ScreenObject._toSizePx=function(t,e){var i=parseFloat(t.width),n=parseFloat(t.height),r=e.width,o=e.height;return t.width.toString().indexOf(\"%\")>-1&&(i=r*i/100),t.height.toString().indexOf(\"%\")>-1&&(n=o*n/100),{width:ScreenObject._roundIfNeeded(i),height:ScreenObject._roundIfNeeded(n)}},ScreenObject._roundIfNeeded=function(t){return Math.round(t)},Object.defineProperty(ScreenObject.prototype,\"layoutCurrent\",{get:function(){return null==this.layoutCurrentIndex?this.layoutSpecificValues[0]:this.layoutSpecificValues[this.layoutCurrentIndex]},enumerable:!0,configurable:!1}),Object.defineProperty(ScreenObject.prototype,\"layoutCurrentIndex\",{get:function(){return this.parentUnit.layoutCurrentIndex},enumerable:!0,configurable:!1}),ScreenObject._Position=function(t,e){this._instance=t,this._position=e},Object.defineProperties(ScreenObject._Position.prototype,{x:{get:function(){return this._position.x},set:function(t){delete this._instance.layoutCurrent.right,delete this._instance.layoutCurrent.hcenter,this._instance.layoutCurrent.position.left=t+(\"number\"==typeof t?\"px\":\"\")}},y:{get:function(){return this._position.y},set:function(t){delete this._instance.layoutCurrent.bottom,delete this._instance.layoutCurrent.vcenter,this._instance.layoutCurrent.position.top=t+(\"number\"==typeof t?\"px\":\"\")}}}),ScreenObject._Size=function(t,e){this._instance=t,this._size=e},Object.defineProperties(ScreenObject._Size.prototype,{width:{get:function(){return this._size.width},set:function(t){this._instance.layoutCurrent.size.width=t+(\"number\"==typeof t?\"px\":\"\")}},height:{get:function(){return this._size.height},set:function(t){this._instance.layoutCurrent.size.height=t+(\"number\"==typeof t?\"px\":\"\")}}}),Object.defineProperties(ScreenObject.prototype,{position:{get:function(){var t=ScreenObject._toPositionPx(this.layoutCurrent.position,this.size,this.parentContainer.size);return new ScreenObject._Position(this,t)},set:function(t){delete this.layoutCurrent.position.right,delete this.layoutCurrent.position.hcenter,delete this.layoutCurrent.position.bottom,delete this.layoutCurrent.position.vcenter,this.layoutCurrent.position.left=t.left,this.layoutCurrent.position.top=t.top}},originalSize:{get:function(){var t=this.layoutCurrentIndex||0;return ScreenObject._toSizePx(JSON.parse(this.originalLayoutSpecificValues)[t].size,this.parentContainer.size)},set:function(){throw new Error(\"originalSize is not settable!\")}},size:{get:function(){var t=ScreenObject._toSizePx(this.layoutCurrent.size,this.parentContainer.size);return new ScreenObject._Size(this,t)},set:function(t){this.layoutCurrent.size.width=t.width,this.layoutCurrent.size.height=t.height}},opacity:{get:function(){return this.layoutCurrent.opacity},set:function(t){this.layoutCurrent.opacity=t}},rotation:{get:function(){return this.layoutCurrent.rotation},set:function(t){this.layoutCurrent.rotation=t}},hidden:{get:function(){return this.layoutCurrent.hidden},set:function(t){this.layoutSpecificValues.forEach(function(e){e.hidden=t})}}}),ScreenObject.getCSSTranslate=function(t,e){return ScreenObject.requires3dTranslateForPositioning?\"translate3d(\"+t+\"px,\"+e+\"px, 0)\":\"translate(\"+t+\"px,\"+e+\"px)\"},ScreenObject.prototype.awake=function(){ScreenObject.uber.awake.call(this),this.originalLayoutSpecificValues=JSON.stringify(this.layoutSpecificValues),this.originalZIndex=this.zIndex,this.finishAnimation=this.finishAnimation.bind(this),this._refreshDisplayState=this._refreshDisplayState.bind(this)},ScreenObject.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit(\"enteredRenderTree\"))},ScreenObject.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this._isInMouseOver&&trigger(this.node,\"mouseout\",!1),this.emit(\"exitedRenderTree\"))},ScreenObject.prototype.react=function(t){var e=this.parentUnit.getRxStateObject(),i=function(){this._isRendering&&t.call(this,e)}.bind(this);null!==e&&(this._rxListeners.push(i),Ticker.frame(i,\"render\"))},ScreenObject.prototype.appearNestedObjects=function(){this.getNestedContainers().forEach(function(t){t.appear(),t.appearNestedObjects(t.objects)},this)},ScreenObject.prototype.disappearNestedObjects=function(){this.getNestedContainers().forEach(function(t){t.disappearNestedObjects(t.objects),t.disappear()},this)},ScreenObject.prototype.initTemplates=function(){var t=this.templates={},e=this.constructor.templates;if(e){for(var i in e)\"string\"==typeof e[i]&&(e[i]=tmpl(e[i]));extend(t,e)}},ScreenObject.prototype.tmpl=function(t,e,i){this.templates||this.initTemplates();var n=this.templates[t];return n?n.call(i||this,e):\"Missing template: \"+t},ScreenObject.prototype.template=function(t,e,i){var n,r=document.createElement(\"div\");r.innerHTML=this.tmpl(t,e);var o=r.firstChild;if(i)for(;n=r.firstChild;)i.appendChild(n);return o},ScreenObject.prototype.ifNotClosing=function(t,e,i){var n=this.fireTriggersDryRun(t,null,noop,e)._actions,r=[\"dismiss\",\"collapse\"],o=!n.some(function(t){return r.indexOf(t.method)>-1});o&&i()},ScreenObject.prototype.createNode=function(){this._isInMouseOver=!1;var t=this,e=ScreenObject.uber.createNode.call(t);e.style.position=\"absolute\",this.hasTriggers(\"tap\")&&(addClass(e,\"touchable\"),attach(e,\"tap\",function(){var e=new ActionContext(t,!0);t.ifNotClosing(\"tap\",e,e.trackUserInteraction),t.fireTriggers(\"tap\",null,null,e)},!1));var i=\"mouseOver\",n=[];if(this.hasTriggers(i)){var r=this._getTriggers(i,null),o=[],s=noop;r.forEach(function(t){t.parameters&&t.parameters.delay&&o.indexOf(t.parameters.delay)<0&&o.push(t.parameters.delay)}),attach(e,\"mouseover\",function(){var e=new ActionContext(t,!0),r=function(n){return function(){t.fireTriggers(i,function(t){return t.delay==n},null,e)}};t._isInMouseOver=!0,o.forEach(function(t,e){s=r(t),n[e]=setTimeout(s,t)})},!1)}return attach(e,\"mouseout\",function(){var e=new ActionContext(t,!0);t._isInMouseOver=!1,n.forEach(clearTimeout),n=[],t.hasTriggers(\"mouseOut\")&&t.fireTriggers(\"mouseOut\",null,null,e)},!1),attach(e,\"touchstart\",function(){if(t.hasTriggers(\"touchstart\")){var e=new ActionContext(t,!0);t.ifNotClosing(\"touchstart\",e,e.trackUserInteraction),t.fireTriggers(\"touchstart\",null,null,e)}},!1),attach(e,\"touchend\",function(){if(t.hasTriggers(\"touchend\")){var e=new ActionContext(t,!0);t.ifNotClosing(\"touchend\",e,e.trackUserInteraction),t.fireTriggers(\"touchend\",null,null,e)}},!1),this.hasTriggers(\"swipe\")&&(attach(e,\"touchstart\",function(t){t.stopPropagation()}),new SwipeListener({target:e,swipeNodeGetter:function(){return this.parentUnit.node}.bind(this),swipe:function(e,i){var n=new ActionContext(t,!0);t.fireTriggers(\"swipe\",function(r){var o=e==r.direction&&i>=r.length;return o&&t.ifNotClosing(\"swipe\",n,n.trackUserInteraction),o},null,n)}})),attach(e,\"transitionend\",function(t){t.stopPropagation()},!1),this.parentContainer.on(\"resize\",this._refreshDisplayState),this.parentContainer.on(\"enteredRenderTree\",function(){this.hidden||this.enterRenderTree()}.bind(this)),this.parentContainer.on(\"exitedRenderTree\",function(){this.hidden||this.exitRenderTree()}.bind(this)),this.layoutPrevious=this.layoutCurrent,this.parentUnit.on(\"layoutChanged\",this.handleLayoutChanged.bind(this)),this.initClickPrevention(function(){return this.node}.bind(this)),this._applyStyles(e,this._calculateNewStyleAttributes()),this.positionUsingTransforms()||deviceInfo.browser.safari(\"9.0.0\",null)||(e.style.outline=\"1px solid transparent\"),this._rxListeners=[],e},ScreenObject.prototype.positionUsingTransforms=retFalse,ScreenObject.prototype.sizeUsingTransforms=retFalse,ScreenObject.prototype.isValid=retTrue,ScreenObject.prototype.getNaturalSize=function(){return this.originalSize},ScreenObject.prototype._calculateNewStyleAttributes=function(){var t={transform:\"\",transformOrigin:\"50% 50%\"},e=this.getNaturalSize(),i=this.position.x,n=this.position.y;if(this.sizeUsingTransforms()&&(i+=ScreenObject._roundIfNeeded((this.size.width-e.width)/2),n+=ScreenObject._roundIfNeeded((this.size.height-e.height)/2)),this.positionUsingTransforms()?(t.left=\"0\",t.top=\"0\",(i||n)&&(t.transform+=ScreenObject.getCSSTranslate(i,n))):(t.left=i+\"px\",t.top=n+\"px\"),(this.isAnimated||0!=this.rotation)&&(t.transform+=\" rotate(\"+this.rotation+\"deg) \"),this.sizeUsingTransforms()){t.width=e.width+\"px\",t.height=e.height+\"px\";var r=this.size.width/e.width,o=this.size.height/e.height;t.transform+=\" scale(\"+r+\", \"+o+\")\"}else t.width=this.size.width+\"px\",t.height=this.size.height+\"px\";return t.zIndex=this.zIndex,t.opacity=this.opacity,t.display=this.hidden?\"none\":\"block\",t},ScreenObject.prototype._applyStyles=function(t,e){e&&Object.keys(e).forEach(function(i){celtra.styler.css(t,i,e[i])})},ScreenObject.prototype._refreshDisplayState=function(){if(this.node){var t=this._calculateNewStyleAttributes(),e=!1;for(var i in t){var n=String(t[i]).replace(/^\\s*|\\s*$/g,\"\"),r=celtra.styler.css(this.node,i),o=null;celtra.styler.css(this.node,i)!==n&&(o=n,r!=o&&\"zIndex\"!=i&&\"display\"!=i&&(e=!0))}return this._applyStyles(this.node,t),this.redrawLayout(),e}},ScreenObject.prototype.finishAnimation=function(){this.node&&void 0!==celtra.styler.css(this.node,\"transitionDuration\")&&(celtra.styler.css(this.node,\"transitionDuration\",\"1ms\"),this.node.offsetWidth,celtra.styler.css(this.node,\"transitionDuration\",\"\"))},ScreenObject.prototype.handleLayoutChanged=function(){var t=function(){this.layoutPrevious.hidden&&!this.layoutCurrent.hidden?this.enterRenderTreeAndAppear(!0):!this.layoutPrevious.hidden&&this.layoutCurrent.hidden&&this.parentContainer._isRendering&&this.exitRenderTree(),this.layoutPrevious=this.layoutCurrent}.bind(this);ios()?defer(t):t(),this.finishAnimation(),this._refreshDisplayState()},ScreenObject.prototype.redrawLayout=function(){},ScreenObject.prototype._preloadImage=function(t,e,i){if(!(t instanceof File))throw\"file is not a File\";\"function\"==typeof e?(i=e,e={}):\"undefined\"==typeof e&&(e={}),e.creativeUnitVariantId=this.parentScreen.parentContainer.localId,ScreenObject.uber._preloadImage.call(this,t,e,i)},ScreenObject.prototype.setPosition=function(t,e){this.position={left:t+\"px\",top:e+\"px\"},this._refreshDisplayState()},ScreenObject.prototype.getPosition=function(){return{x:this.position.x,y:this.position.y}},ScreenObject.prototype.setSize=function(t,e){this.size.width=t,this.size.height=e,this._refreshDisplayState()},ScreenObject.prototype.getSize=function(){return{width:this.size.width,height:this.size.height}},ScreenObject.prototype.setOpacity=function(t){this.opacity=t,this._refreshDisplayState()},ScreenObject.prototype.getOpacity=function(){return this.opacity},ScreenObject.prototype.animateAction=function(t,e,i){function n(t){return!isNaN(parseFloat(t))&&isFinite(t)}function r(t){var e={position:{},size:{width:null,height:null},zIndex:null,opacity:null,rotation:null};return deep(e,t),e}function o(t,e){var i=e.size,n=t.size;null==i.width&&(i.width=n.width),null==i.height&&(i.height=n.height),t.size=i;var r=t.position,o=e.position,s=null,a=null,c=null,h=null;[\"left\",\"right\",\"hcenter\"].forEach(function(t){t in r&&(s=t),t in o&&(c=t)}),[\"bottom\",\"top\",\"vcenter\"].forEach(function(t){t in r&&(a=t),t in o&&(h=t)}),c&&null!==o[c]&&(delete r[s],r[c]=o[c]),h&&null!==o[h]&&(delete r[a],r[h]=o[h]),null!=e.rotation&&(t.rotation=e.rotation),null!=e.opacity&&(t.opacity=e.opacity),null!=e.zIndex&&(t.zIndex=e.zIndex)}i=i||noop,this.isAnimated=!0;var s=\"undefined\"!=typeof e.duration?e.duration:1e3,a=e.timingFunction||\"linear\";if(e.layoutSpecificValues)e.layoutSpecificValues.forEach(function(t,e){this.layoutSpecificValues[e]&&o(this.layoutSpecificValues[e],r(t))}.bind(this));else{var c=r(e.properties);null!=c.position.x&&(c.position.left=c.position.x+\"px\"),null!=c.position.y&&(c.position.top=c.position.y+\"px\"),null!=c.zIndex&&(c.zIndex=c.zIndex+ScreenObject._zIndexOffset,this.zIndex=c.zIndex),null!=c.size.width&&n(c.size.width)&&(c.size.width+=\"px\"),null!=c.size.height&&n(c.size.height)&&(c.size.height+=\"px\"),o(this.layoutCurrent,c)}var h=this.node;celtra.styler.css(h,\"transition\",\"\"),celtra.styler.css(h,\"transitionProperty\",\"all\"),celtra.styler.css(h,\"transitionDuration\",s+\"ms\"),celtra.styler.css(h,\"transitionTimingFunction\",a);var u=this._refreshDisplayState();if(s>0&&u){var l=!1,p=function(){l||(l=!0,i())};ScreenObject.requiresRedrawToTriggerAnimationEvents&&!function(){var t=Date.now(),e=t+(Number(s)||0),i=function(){flash(),Date.now()0?s:0;setTimeout(i,d)}},ScreenObject.prototype.enterRenderTreeAndAppear=function(t){t&&this.parentScreen._isRendering&&this.enterRenderTree(),t&&!this.isAppearing&&this._shouldAppear&&this.appear()},ScreenObject.prototype.scaleAction=function(t,e,i){var n=e.useOriginalSize?this.originalSize:this.size,r=e.scale/100,o={width:n.width*r,height:n.height*r},s={x:this.position.x+this.size.width/2-o.width/2,y:this.position.y+this.size.height/2-o.height/2};this.animateAction(t,{properties:{position:s,size:o},duration:e.duration,timingFunction:e.timingFunction},i)},ScreenObject.prototype.showAction=function(t,e,i){var n=this.hidden;this.hidden=!1,this.node.style.display=\"block\",this.enterRenderTreeAndAppear(n),this.node.offsetWidth,nextFrame(i)},ScreenObject.prototype.hideAction=function(t,e,i){var n=this.hidden;this.hidden=!0,this.node.style.display=\"none\",!n&&this.parentScreen._isRendering&&(this.isAppearing&&(this.disappear(),this._shouldAppear=!0),this.exitRenderTree()),setTimeout(i,0)},ScreenObject.prototype.isHidden=function(){return this.hidden},ScreenObject.prototype.resetAction=function(t,e,i){this.layoutSpecificValues=JSON.parse(this.originalLayoutSpecificValues),this.reset(),this.zIndex=this.originalZIndex,this.finishAnimation(),this._refreshDisplayState(),defer(i)},ScreenObject.prototype.addStyle=function(t){var e=\"#celtra-object-\"+this.localId,i=this.node,n=/^:(link|visited|active|hover|focus|first-child|nth-child|nth-last-child|nth-of-type|first-of-type|last-of-type|empty|target|checked|enabled|disabled)/,r=/,\\s*/g;this.styleNode||(this.styleNode=document.createElement(\"style\"),i||(i=document.getElementsByTagName(\"head\")[0]),i.appendChild(this.styleNode));var o=[];for(var s in t)o.push({selector:s.split(r).map(function(t){return e+(n.test(t)?\"\":\" \")+t}).join(\",\"),attributes:t[s]});var a=this._styleSheetTemplate({rules:o});this.styleNode.textContent+=a},ScreenObject.prototype._styleSheetTemplate=tmpl(\"<% for (var i = 0; i < rules.length; i++) { %><%= rules[i].selector %> { <%= rules[i].attributes %> }\\n<% } %>\"),ScreenObject.prototype.css=function(t,e){\"undefined\"==typeof e&&(e=t,t=this.getNode()),Object.keys(e).forEach(function(i){celtra.styler.css(t,i,e[i])})},ScreenObject.prototype.getNestedContainers=function(){return[]},ScreenObject.prototype.getActiveContainers=function(){return this.getNestedContainers()};;\nfunction Group(){}inherit(Group,ScreenObject),Group.toString=function(){return\"[Clazz Group]\"},Group.prototype.toString=function(){return\"[Group \"+this.localId+\"]\"},Group.prototype.createNode=function(){var t=Group.uber.createNode.call(this);return this.incrementLoadingCount(),t.appendChild(this.content.getNode(this.decrementLoadingCount)),t},Group.prototype.getNestedContainers=function(){return[this.content]},Group.prototype.positionUsingTransforms=ios(\"8\")?retFalse:retTrue,Group.prototype.sizeUsingTransforms=retTrue,Group.prototype.getNaturalSize=function(){return this.originalSize},Group.prototype._appear=function(){this.appearNestedObjects()},Group.prototype._disappear=function(){this.disappearNestedObjects()};var ObjectGroup=Group;;\nfunction Picture(){}inherit(Picture,ScreenObject),Picture.toString=function(){return\"[Clazz Picture]\"},Picture.prototype.toString=function(){return\"[Picture \"+this.localId+\"]\"},Picture.prototype.createNode=function(){var e=new File(\"runner/image-placeholder.png\");e.meta={height:28,width:28},this.file||(this.file=e);var i={};this._useDynamicImage=\"feed\"===this.assetSource&&null!=this.feedFieldKey&&\"string\"==typeof creative.runtimeParams.dynamicContent[this.feedFieldKey],\"feed\"===this.assetSource&&FeedData.checkAndTrackValue(this.feedFieldKey,this.constructor.name),this._useDynamicImage&&(this.file=null,FeedData.isCorrectFieldType(this.feedFieldKey,this.constructor.name)&&(this.file=new File,this.file.url=creative.runtimeParams.dynamicContent[this.feedFieldKey],this.file.meta=ScreenObject._toSizePx(this.layoutCurrent.size,this.parentContainer.size),i.force=!1));var t=Picture.uber.createNode.call(this);return this.file===e?((\"feed\"!=this.assetSource||\"feed\"===this.assetSource&&null===this.feedFieldKey)&&(addClass(t,\"empty\"),this._preloadImage(new File(\"runner/image-placeholder.png\"),{force:!1},function(e,i){t.style.backgroundImage=\"url(\"+i+\")\"})),t):(this.file&&this._preloadImage(this.file,i,this._handlePreloadedImage.bind(this,t)),t)},Picture.prototype._handlePreloadedImage=function(e,i){this._useDynamicImage&&(this.file.meta={height:i.naturalHeight,width:i.naturalWidth});var t=\"\",r=\"\",s=\"no-repeat\";this.imagePosition&&(t=this.imagePosition.replace(\"-\",\" \"));var a=this.sizeUsingTransforms()?this.getNaturalSize():this.size,n=this.fittingSize;switch(\"fitUpToOriginal\"===this.fittingSize&&(n=a.widtho&&\"fit\"==this.fittingSize||o>n&&\"fill\"==this.fittingSize,i=o>n&&\"fit\"==this.fittingSize||n>o&&\"fill\"==this.fittingSize,t=s,r=a,e?r=s/h*l:i&&(t=a/l*h),t>c&&(r*=c/t,t=c),r>c&&(t*=c/r,r=c),{width:t,height:r})},Picture.prototype.getImageUrl=function(){return this.file?this.file.getUrl():void 0};;\nfunction Button(){}inherit(Button,ScreenObject),extend(Button.prototype,TextStyleIntegrator),Button.toString=function(){return\"[Clazz Button]\"},Button.prototype.toString=function(){return\"[Button \"+this.localId+\"]\"},Object.defineProperties(Button.prototype,{_borderRoundness:{get:function(){var e=0,t=0,o=0,r=0;if(this.border&&\"number\"==typeof this.borderRadius)e=this.borderRadius;else if(this.border!==!1||this.roundness){if(\"number\"==typeof this.roundness&&(r=this.roundness),r>0){var n=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),s=n/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),a=i/2;if(50>r){var d=r/50;e=s*d}else{var h=(r-50)/50,u=(a-s)*h,l=s+u;t=this.getNaturalSize().width==n?s:l,o=this.getNaturalSize().height==n?s:l}}}else r=0;return this.shadow&&ios(\"8\")&&window.devicePixelRatio>=3&&(1>e&&(e=1),1>t&&(t=1),1>o&&(o=1)),50>r?e+\"px\":t+\"px \"+o+\"px\"}}}),Button.prototype.getBorderWidth=function(){return this.borderWidth},Button.prototype.getShadowDistance=function(){return this.shadowDistance},Button.prototype.getShadowBlur=function(){return this.shadowBlur},Button.prototype.awake=function(){Button.uber.awake.call(this),this._defaultValues={backgroundUpImage:\"runner/clazzes/Button/button.png\",backgroundDownImage:\"runner/clazzes/Button/button-down.png\"},this._handleTap=this._handleTap.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this)},Button.prototype.createNode=function(){var e=Button.uber.createNode.call(this),t=creative.runtimeParams.overrides||creative.runtimeParams,o=t.deviceInfo&&t.deviceInfo.deviceType.toLowerCase();return this._hoverEnabled=(\"Desktop\"===creative.intendedDeviceType||\"Any\"===creative.intendedDeviceType)&&\"desktop\"===o,this._privateApiTracked={},this._backgroundElement=null,this._foregroundElement=null,this._textBorder=0,this._cssRules={},this._useBackgroundImage=\"image\"===this.background,this._useForegroundImage=\"image\"===(this._useBackgroundImage?this.foregroundForImage:this.foregroundForCss),addClass(e,\"touchable\"),this._createBackground(e),this._createForeground(e),this.addStyle(this._cssRules),attach(e,\"tap\",this._handleTap),attach(e,\"touchstart\",this._handleTouchStart),e},Button.prototype._createBackground=function(e){if(this._backgroundElement=document.createElement(\"div\"),addClass(this._backgroundElement,\"background\"),this._useBackgroundImage){var t=!1,o=\"normal\",r=\"focus\",n=\"pressed\",s=function(e,t){addClass(t,e),this._backgroundElement.appendChild(t)}.bind(this);this.backgroundUpImage?this._preloadImage(this.backgroundUpImage,function(e){s(o,e)}):(t=!0,this._preloadImage(new File(this._defaultValues.backgroundUpImage),{force:!1},function(e){s(o,e)})),this._hoverEnabled&&this.backgroundHoverImage&&this._preloadImage(this.backgroundHoverImage,function(e){s(r,e)}),this.backgroundDownImage?this._preloadImage(this.backgroundDownImage,function(e){s(n,e)}):t&&this._preloadImage(new File(this._defaultValues.backgroundDownImage),{force:!1},function(e){s(n,e)}),this._cssRules[\".background .\"+o]=\"display: block;\",this._cssRules[\".background .\"+r]=\"display: none;\",this._cssRules[\".background .\"+n]=\"display: none;\",this._hoverEnabled&&this.backgroundHoverImage&&(this._cssRules[\":hover .background .\"+o]=\"display: none;\",this._cssRules[\":hover .background .\"+r]=\"display: block;\",this._cssRules[\":hover .background .\"+n]=\"display: none;\"),(this.backgroundDownImage||t)&&(this._cssRules[\".background.down .\"+o]=\"display: none;\",this._cssRules[\".background.down .\"+r]=\"display: none;\",this._cssRules[\".background.down .\"+n]=\"display: block;\")}else{if(this.backgroundColor){var i=\"\";if(Color.isGradient(this.backgroundColorUp)?(i+=Color.createGradientStyle(this.backgroundColorUp),i+=\"background-color: transparent;\"):(i+=\"background-image: none; \",i+=\"background-color: \"+this.backgroundColorUp+\";\"),this._cssRules[\".background\"]=i,this._hoverEnabled&&this.backgroundColorHover){var a=\"\";Color.isGradient(this.backgroundColorHover)?(a+=Color.createGradientStyle(this.backgroundColorHover),a+=\"background-color: transparent;\"):(a+=\"background-image: none; \",a+=\"background-color: \"+this.backgroundColorHover+\";\"),this._cssRules[\":hover .background\"]=a}var d=\"\";Color.isGradient(this.backgroundColorDown)?(d+=Color.createGradientStyle(this.backgroundColorDown),d+=\"background-color: transparent;\"):(d+=\"background-image: none; \",d+=\"background-color: \"+this.backgroundColorDown+\";\"),this._cssRules[\".background.down\"]=d}if(this.border&&(this._backgroundElement.style.borderColor=this.borderColor,this._backgroundElement.style.borderWidth=this.getBorderWidth()+\"px\"),this.shadow){var h=this.shadowAngle%90===0?-.3:0,u=this.shadowAngle*(Math.PI/180),l=Math.round(this.getShadowDistance()*Math.cos(u)),c=Math.round(this.getShadowDistance()*Math.sin(u));celtra.styler.css(this._backgroundElement,\"boxShadow\",l+\"px \"+c+\"px \"+this.getShadowBlur()+\"px \"+h+\"px \"+this.shadowColor)}}e.appendChild(this._backgroundElement)},Button.prototype._createForeground=function(e){var t=this.callToActionText.trim().length>0;if(this._foregroundElement=document.createElement(\"div\"),addClass(this._foregroundElement,\"foreground\"),!this._useBackgroundImage&&this.border?(this._foregroundElement.style.borderWidth=this.getBorderWidth()+\"px\",this._textBorder=this.getBorderWidth()):this._textBorder=0,this._useForegroundImage){this._foregroundElement.className+=this.foregroundStretchImage?\" image-stretch\":\" image-fit\";var o=\"normal\",r=\"focus\",n=\"pressed\",s=function(e,t){var o=document.createElement(\"div\");addClass(o,e),o.style.backgroundImage=\"url(\"+t.src+\")\",this._foregroundElement.appendChild(o)}.bind(this);this.foregroundUpImage&&this._preloadImage(this.foregroundUpImage,function(e){s(o,e)}),this._hoverEnabled&&this.foregroundHoverImage&&this._preloadImage(this.foregroundHoverImage,function(e){s(r,e)}),this.foregroundDownImage&&this._preloadImage(this.foregroundDownImage,function(e){s(n,e)}),this._cssRules[\".foreground .\"+o]=\"display: block;\",this._cssRules[\".foreground .\"+r]=\"display: none;\",this._cssRules[\".foreground .\"+n]=\"display: none;\",this._hoverEnabled&&this.foregroundHoverImage&&(this._cssRules[\":hover .foreground .\"+o]=\"display: none;\",this._cssRules[\":hover .foreground .\"+r]=\"display: block;\",this._cssRules[\":hover .foreground .\"+n]=\"display: none;\"),this.foregroundDownImage&&(this._cssRules[\".foreground.down .\"+o]=\"display: none;\",this._cssRules[\".foreground.down .\"+r]=\"display: none;\",this._cssRules[\".foreground.down .\"+n]=\"display: block;\")}else t&&(this._foregroundElement.className+=\" call-to-action\",this._foregroundElement.textContent=this.callToActionText,this.initializeFont(),this._cssRules[\".foreground\"]=\"color: \"+this.textColor+\";\",this._hoverEnabled&&this.textColorHover&&(this._cssRules[\":hover .foreground\"]=\"color: \"+this.textColorHover+\";\"),this._cssRules[\".foreground.down\"]=\"color: \"+this.textColorDown+\";\");e.appendChild(this._foregroundElement)},Button.prototype.redrawLayout=function(){if(!this._useBackgroundImage){var e=this._borderRoundness;parseInt(e,10)>0&&(this._backgroundElement&&(this._backgroundElement.style.borderTopLeftRadius=e,this._backgroundElement.style.borderTopRightRadius=e,this._backgroundElement.style.borderBottomLeftRadius=e,this._backgroundElement.style.borderBottomRightRadius=e),this._foregroundElement&&(this._foregroundElement.style.borderTopLeftRadius=e,this._foregroundElement.style.borderTopRightRadius=e,this._foregroundElement.style.borderBottomLeftRadius=e,this._foregroundElement.style.borderBottomRightRadius=e))}var t=this.callToActionText.trim().length>0;if(!this._useForegroundImage&&t){this.applyTextSize(this._foregroundElement.style);var o;if(\"undefined\"!=typeof this.lineSpacing){o=parseInt(this._foregroundElement.style.lineHeight,10);var r=this.callToActionText.split(/\\n/).length,n=o*r,s=this.sizeUsingTransforms()?this.getNaturalSize():this.size,i=(s.height-n)/2,a=i-this._textBorder;this._foregroundElement.style.paddingTop=a+\"px\"}else o=this.size.height-2*this._textBorder,this._foregroundElement.style.lineHeight=o+\"px\"}},Button.prototype.updateTextStyle=function(){var e=this.callToActionText.trim().length>0;!this._useForegroundImage&&e&&(this.applyTextStyle(this._foregroundElement.style),this._foregroundElement.style.color=\"\")},Button.prototype._handleTap=function(e){e.stopPropagation()},Button.prototype._handleTouchStart=function(){addClass(this._backgroundElement,\"down\"),addClass(this._foregroundElement,\"down\"),attach(this.parentUnit.node,\"touchend\",this._handleTouchEnd)},Button.prototype._handleTouchEnd=function(){removeClass(this._backgroundElement,\"down\"),removeClass(this._foregroundElement,\"down\"),detach(this.parentUnit.node,\"touchend\",this._handleTouchEnd)};;\nfunction Texty(){}inherit(Texty,ScreenObject),extend(Texty.prototype,TextStyleIntegrator),Texty.toString=function(){return\"[Clazz Texty]\"},Texty.prototype.toString=function(){return\"[Texty \"+this.localId+\"]\"},Texty.prototype.awake=function(){Texty.uber.awake.call(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handleTouchCancel=this._handleTouchCancel.bind(this)},Texty.prototype.createNode=function(){var t=Texty.uber.createNode.call(this);if(this.scroller=null,this._autoscrolling=!1,this._listeningForTouches=!1,this._sanitizeText=!0,this._fontScaleFactor=1,this._lineHeightRatio=1,this._letterSpacingRatio=1,this._responsiveFontSize=this._getNaturalFontSize(),this.dynamicContentEnabled){FeedData.checkAndTrackValue(this.feedFieldKey,this.constructor.name);var e=\"\";null!=this.feedFieldKey&&\"string\"==typeof creative.runtimeParams.dynamicContent[this.feedFieldKey]&&FeedData.isCorrectFieldType(this.feedFieldKey,this.constructor.name)&&(e=creative.runtimeParams.dynamicContent[this.feedFieldKey]),this.text=e}return this._initialText=this.text,this._initialScaleFont=this.scaleFont,this._scrollContainer=document.createElement(\"div\"),this._scrollContainer.className=\"scroll-container\",this._textContainer=document.createElement(\"div\"),this._textContainerClone=document.createElement(\"div\"),this._textContainerClone.style.display=\"none\",this._textContainerResponsive=document.createElement(\"div\"),this._textContainerResponsive.style.visibility=\"hidden\",this._setTextContainerStyle(\"paddingBottom\",this._getDefaultPadding()+\"px\"),(deviceInfo.browser.chrome(null,\"48\")||\"Samsung Browser\"===deviceInfo.browser.name)&&this._setTextContainerStyle(\"textRendering\",\"geometricPrecision\"),this.scrollable&&(this.scroller=new Scroller(t,this._textContainer,{direction:\"vertical\",animating:!0,easing:!0,locking:!1,scrollbarPosition:this.scrollbarPosition,scrollbarColor:this.scrollbarColor})),this.initializeFont(),this._updateTextContent(),this._scrollContainer.appendChild(this._textContainer),this._scrollContainer.appendChild(this._textContainerClone),this._scrollContainer.appendChild(this._textContainerResponsive),t.appendChild(this._scrollContainer),this._startListeningForTouches(),t},Texty.prototype._appear=function(){this._handleSizeUpdate()},Texty.prototype.redrawLayout=function(){this._handleSizeUpdate()},Texty.prototype._handleSizeUpdate=function(){this._updateTextSizeAndAlignment(),this._updateScrollbar()},Texty.prototype._updateTextSizeAndAlignment=function(){var t=this._getDefaultPadding();this._setTextContainerStyle(\"paddingLeft\",t+\"px\"),this._setTextContainerStyle(\"paddingRight\",t+\"px\"),this._setTextContainerStyle(\"paddingTop\",t+\"px\"),this._setTextContainerStyle(\"marginTop\",\"\"),this.responsiveFont||(this.applyTextSize(this._textContainer.style),this.applyTextSize(this._textContainerClone.style)),this._horizontallyRealignTextWithPadding(),this._adjustFontSizeToFitContainer(),this._verticallyAlignText()},Texty.prototype._getContentSizeOfResponsiveContainer=function(){var t=this._textContainerResponsive.getBoundingClientRect(),e=this._textContainerResponsive.scrollHeight+(parseInt(t.height)-t.height),i=this._textContainerResponsive.scrollWidth+(parseInt(t.width)-t.width);return{width:i,height:e}},Texty.prototype._setTextContainerStyle=function(t,e){this._textContainer.style[t]=e,this._textContainerClone.style[t]=e,this._textContainerResponsive.style[t]=e},Texty.prototype._applyAdjustedFontSizeStyle=function(t){var e=this._responsiveFontSize*this._fontScaleFactor;t.style.fontSize=e+\"px\",t.style.lineHeight=Math.max(1,e*this._lineHeightRatio)+\"px\",t.style.letterSpacing=e*this._letterSpacingRatio+\"px\"},Texty.prototype._adjustFontSizeToFitContainer=function(){if(this.responsiveFont&&!hasClass(this.node,\"animated\")){var t=.5,e=this.getFontSize(),i=this._getNaturalFontSize(),n=Math.max(Math.round(i*t),1);this._fontScaleFactor=e/i;var o=1/this._fontScaleFactor;this._responsiveFontSize=i;var s=Math.max(1,this.getLineSpacing()+e);this._lineHeightRatio=s/e,this._letterSpacingRatio=this.getLetterSpacing()/e;var a=this.getNaturalSize();this._applyAdjustedFontSizeStyle(this._textContainerResponsive);for(var h=this._getContentSizeOfResponsiveContainer();this._responsiveFontSize>n&&(h.height>a.height||h.width>a.width);)this._responsiveFontSize-=o,this._applyAdjustedFontSizeStyle(this._textContainerResponsive),h=this._getContentSizeOfResponsiveContainer();this._applyAdjustedFontSizeStyle(this._textContainer),this._applyAdjustedFontSizeStyle(this._textContainerClone)}},Texty.prototype.updateTextStyle=function(){this.applyTextStyle(this._textContainer.style),this.applyTextStyle(this._textContainerClone.style),this.applyTextStyle(this._textContainerResponsive.style),this._setTextContainerStyle(\"whiteSpace\",\"pre-wrap\")},Texty.prototype._horizontallyRealignTextWithPadding=function(){var t=this._getDefaultPadding(),e=t,i=t,n=parseInt(this._textContainer.style.paddingLeft,10),o=parseInt(this._textContainer.style.paddingRight,10);this.scaleFont&&\"right\"==this.textAlign&&!isNaN(n)?e=n-t:this.scaleFont&&\"left\"==this.textAlign&&!isNaN(o)&&(i=o-t);var s=Math.max(e,t),a=Math.max(i,t);s!==n&&this._setTextContainerStyle(\"paddingLeft\",s+\"px\"),a!==o&&this._setTextContainerStyle(\"paddingRight\",a+\"px\")},Texty.prototype._verticallyAlignText=function(){if(!(this.scrollable||this._scrollContainer.offsetHeight<=this._textContainer.offsetHeight||\"undefined\"==typeof this.textAlignVertical)){this._setTextContainerStyle(\"paddingTop\",\"\");var t=this._getDefaultPadding(),e=0,i=this.scrollable?0:Number(this.textAlignVertical),n=this.getNaturalSize().height;this._textContainerClone.style.height=0,this._textContainerClone.style.display=\"inline\";var o=0===i?0:this._textContainerClone.scrollHeight;this._textContainerClone.style.display=\"none\";var s=Math.max(0,(n-o)*i/100);s=isNaN(s)?0:s,e=i>50&&n>o?-t:50==i&&n>o?t/2:t,this._setTextContainerStyle(\"marginTop\",s+e+\"px\")}},Texty.prototype._updateTextContent=function(){var t=this._sanitizeText?htmlentitize(this.text.toString()):this.text;this._textContainer.innerHTML=t,this._textContainerClone.innerHTML=t,this._textContainerResponsive.innerHTML=t},Texty.prototype._updateScrollbar=function(){this.scrollable&&(this.scroller.redraw(),this.scroller.scrollTo(0,0,!1),this.autoscrollEnabled&&(this._resetAutoScroll(),this._createAutoScroll()))},Texty.prototype._createAutoScroll=function(){var t=this.scroller.getMaxScroll();defer(function(){this.scroller.scrollTo(t.left,t.top,!0,this.autoscrollDuration,!0,function(){\"return\"===this.autoscrollConclusion?this.scroller.scrollTo(0,0,!0,this.autoscrollDuration,!0):\"loop\"===this.autoscrollConclusion&&(this._autoscrolling=!0,e())}.bind(this))}.bind(this),this.autoscrollDelay);var e=function(){this._autoscrolling&&this.scroller.scrollTo(0,0,!0,this.autoscrollDuration,!0,function(){this.scroller.scrollTo(t.left,t.top,!0,this.autoscrollDuration,!0,e)}.bind(this))}.bind(this)},Texty.prototype._resetAutoScroll=function(){this._autoscrolling=!1},Texty.prototype._handleTouchStart=function(t){t.preventDefault(),new ActionContext(this,!0).trackUserInteraction(),this.scrollable&&(this._resetAutoScroll(),t.stopPropagation(),this.scroller._handleTouchStart(t),attach(this.parentUnit.node,\"touchmove\",this._handleTouchMove),attach(this.parentUnit.node,\"touchend\",this._handleTouchEnd),attach(this.parentUnit.node,\"touchcancel\",this._handleTouchCancel))},Texty.prototype._handleTouchMove=function(t){t.preventDefault(),this.scroller._handleTouchMove(t)},Texty.prototype._handleTouchEnd=function(t){t.preventDefault(),this.scroller._handleTouchEnd(t),detach(this.parentUnit.node,\"touchmove\",this._handleTouchMove),detach(this.parentUnit.node,\"touchend\",this._handleTouchEnd),detach(this.parentUnit.node,\"touchcancel\",this._handleTouchCancel)},Texty.prototype._handleTouchCancel=function(t){this._handleTouchEnd(t)},Texty.prototype.positionUsingTransforms=retTrue,Texty.prototype.sizeUsingTransforms=retTrue,Texty.prototype.getNaturalSize=function(){return this.originalSize},Texty.prototype._getNaturalFontSize=function(){return this.fontSize},Texty.prototype._getDefaultPadding=function(){return this.usePadding?2:0},Texty.prototype._startListeningForTouches=function(){this.scrollable&&!this._listeningForTouches&&(attach(this._textContainer,\"touchstart\",this._handleTouchStart),this._listeningForTouches=!0)},Texty.prototype._stopListeningForTouches=function(){this._listeningForTouches&&(detach(this._textContainer,\"touchstart\",this._handleTouchStart),this._listeningForTouches=!1)},Texty.prototype._setText=function(t){this._sanitizeText=!1,this.text=t,this._updateTextContent(),this.scaleFont&&(this.scaleFont=!1),this.hidden||this._handleSizeUpdate()},Texty.prototype.showAction=function(t,e,i){Texty.uber.showAction.call(this,t,e,function(){this._startListeningForTouches(),i()}.bind(this))},Texty.prototype.hideAction=function(t,e,i){Texty.uber.hideAction.call(this,t,e,function(){this._stopListeningForTouches(),i()}.bind(this))},Texty.prototype.resetAction=function(t,e,i){this._sanitizeText=!0,Texty.uber.resetAction.call(this,t,e,function(){this.hidden||this._startListeningForTouches(),this.text=this._initialText,this._updateTextContent(),this.scaleFont=this._initialScaleFont,this._handleSizeUpdate(),i()}.bind(this))},Texty.prototype.setTextAction=function(t,e,i){this._setText(e.text),i()};;\nfunction Shapey(){}inherit(Shapey,ScreenObject),Shapey.toString=function(){return\"[Clazz Shapey]\"},Shapey.prototype.toString=function(){return\"[Shapey \"+this.localId+\"]\"},Object.defineProperties(Shapey.prototype,{_borderRoundness:{get:function(){var e=0,t=0,a=0,r=this._defaultValues.roundness;if(\"number\"==typeof this.roundness&&(r=this.roundness),r>0){var s=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),o=s/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),h=i/2;if(50>r){var d=r/50;e=o*d}else{var p=(r-50)/50,n=(h-o)*p,u=o+n;t=this.getNaturalSize().width==s?o:u,a=this.getNaturalSize().height==s?o:u}}return this.shadow&&ios(\"8\")&&window.devicePixelRatio>=3&&(1>e&&(e=1),1>t&&(t=1),1>a&&(a=1)),50>r?e+\"px\":t+\"px \"+a+\"px\"}}}),Shapey.prototype.awake=function(){Shapey.uber.awake.call(this),this._defaultValues={backgroundColor:\"#365c99\",borderColor:\"#000000\",borderWidth:5,roundness:0,shadowAngle:0,shadowBlur:10,shadowColor:\"rgba(0,0,0,0.5)\",shadowDistance:0}},Shapey.prototype.createNode=function(){var e=Shapey.uber.createNode.call(this);if(this._privateApiTracked={},e.className+=\" touchable\",this._shapey=document.createElement(\"div\"),this.backgroundColor)if(Color.isGradient(this.backgroundColor)){var t=Color.createGradientStyle(this.backgroundColor);this.addStyle({\".gradient-shapey\":t}),addClass(this._shapey,\"gradient-shapey\")}else this._shapey.style.backgroundColor=this.backgroundColor;if(this.border){var a=\"undefined\"!=typeof this.borderColor?this.borderColor:this._defaultValues.borderColor,r=\"number\"==typeof this.borderWidth?this.borderWidth:this._defaultValues.borderWidth;this._shapey.style.borderColor=a,this._shapey.style.borderStyle=\"solid\",this._shapey.style.borderWidth=r+\"px\"}if(this.shadow){var s=(\"number\"==typeof this.shadowAngle?this.shadowAngle:this._defaultValues.shadowAngle)*(Math.PI/180),o=\"number\"==typeof this.shadowBlur?this.shadowBlur:this._defaultValues.shadowBlur,i=\"undefined\"!=typeof this.shadowColor?this.shadowColor:this._defaultValues.shadowColor,h=\"number\"==typeof this.shadowDistance?this.shadowDistance:this._defaultValues.shadowDistance,d=Math.round(h*Math.cos(s)),p=Math.round(h*Math.sin(s));celtra.styler.css(this._shapey,\"boxShadow\",d+\"px \"+p+\"px \"+o+\"px \"+i)}return e.appendChild(this._shapey),e},Shapey.prototype.redrawLayout=function(){if(this._shapey){var e=this._borderRoundness;parseInt(e,10)>0&&(this._shapey.style.borderTopLeftRadius=e,this._shapey.style.borderTopRightRadius=e,this._shapey.style.borderBottomLeftRadius=e,this._shapey.style.borderBottomRightRadius=e)}},Shapey.prototype._track=function(e){this._privateApiTracked[e]||(this._privateApiTracked[e]=!0,creative.track({name:\"retiredFeatureUsed\",featureType:\"apifunction\",featureName:e}))},Shapey.deprecatedPropertiesArray=[\"borderRoundness\",\"shapey\",\"defaultValues\"],Shapey.deprecatedPropertiesObject={},Shapey.deprecatedPropertiesArray.forEach(function(e){Shapey.deprecatedPropertiesObject[e]={get:function(){return this._track(\"Shapey.\"+e+\".getter\"),this[\"_\"+e]},set:function(t){this._track(\"Shapey.\"+e+\".setter\"),this[\"_\"+e]=t}}}),Object.defineProperties(Shapey.prototype,Shapey.deprecatedPropertiesObject);;\nfunction File(t){this.url=t}File.toString=function(){return\"[Clazz File]\"},File.prototype.toString=function(){return\"[File \"+this.localId+\"(\"+this.name+\"/\"+this.url+\")]\"},File.prototype.getOriginalUrl=function(){if(this.url){if(-1!==this.url.indexOf(\"://\"))return this.url;if(\"/\"===this.url[0])throw\"An absolute path as URL?\";return creative.resourceUrl+this.url}if(this.blobHash)return(creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"blobs/\"+this.blobHash+\"/\"+encodeURIComponent(this.name);throw\"Neither url nor blobHash set?\"},File.prototype.getUrl=function(t){var i=this.getOriginalUrl(),e=String(this.name).match(/\\.(gif|png|jpe?g)$/i);return this.blobHash&&e&&(i+=\"?transform=crush\",this.quality>-1&&(i+=\"&quality=\"+this.quality),t&&this.optimizedWidth(t)>0&&this.optimizedHeight(t)>0&&(i+=\"&resize=\"+this.optimizedWidth(t)+\"x\"+this.optimizedHeight(t))),i},File.prototype.getDataUri=function(t,i){t instanceof Function&&(i=t,t={});var e=this,r=this.getUrl(t.creativeUnitVariantId);\"undefined\"!=typeof this.dataUri?defer(function(){i(e.dataUri)},0,\"File.getDataUri defer callback, has dataUri\"):creative.dataURIsEnabled||t.force?creative.batcher.getDataUri(r,i):defer(function(){i(r)},0,\"File.getDataUri defer callback, url\")},Object.defineProperty(File.prototype,\"retina\",{get:function(){return this.retinaScaleFactor>1}}),Object.defineProperty(File.prototype,\"width\",{get:function(){return this.retina?Math.round(this.meta.width/this.retinaScaleFactor):this.meta.width}}),Object.defineProperty(File.prototype,\"height\",{get:function(){return this.retina?Math.round(this.meta.height/this.retinaScaleFactor):this.meta.height}}),Object.defineProperty(File.prototype,\"optimizedWidth\",{enumerable:!1,configurable:!1,get:function(){return function(t){if(\"number\"!=typeof t||!this.optimizationSettings)return null;for(var i=null,e=0;e