(function(){var g,k=this,aa=function(a){a=a.split(".");for(var b=k,c;c=a.shift();)if(null!=b[c])b=b[c];else return null;return b},l=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==
c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},m=function(a){return"array"==l(a)},ba=function(a){var b=l(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},ca=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},da="closure_uid_"+(1E9*Math.random()>>>0),ea=0,fa=function(a,
b,c){return a.call.apply(a.bind,arguments)},ga=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},q=function(a,b,c){q=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return q.apply(null,arguments)},r=Date.now||function(){return+new Date},
t=function(a,b){a=a.split(".");var c=k;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]?c[d]:c[d]={}:c[d]=b},u=function(a,b){function c(){}c.prototype=b.prototype;a.D=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Ub=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var ha={HEADER_CTA_CLICKED:"Header CTA clicked",IMAGE_GALLERY_CTA_CLICKED:"Image gallery CTA clicked",LOGO_CLICKED:"Logo clicked",PRODUCT_GALLERY_PRODUCT_CLICKED:"Product gallery product clicked",SOCIAL_LINK_CLICKED:"Social link clicked"},ja={VIDEO_THUMB_INITIALIZED:"video_thumb_initialized",VIDEO_THUMB_INITIALIZED_1S:"video_thumb_initialized_1s",VIDEO_THUMB_INITIALIZED_3S:"video_thumb_initialized_3s",VIDEO_THUMB_INITIALIZED_5S:"video_thumb_initialized_5s",VIDEO_THUMB_INITIALIZED_10S:"video_thumb_initialized_10s",
VIDEO_THUMB_INITIALIZED_20S:"video_thumb_initialized_20s",AUTO_PREVIEW_STARTED_PLAYING:"autopreview_started_playing",AUTO_PREVIEW_PLAYING_2S:"autopreview_playing_2s",TETRIS_BECAME_ACTIVE:"tetris_became_active",TETRIS_BECAME_IDLE:"tetris_became_idle"},ka={GOOGLE_MAPS_API_FAILURE:"google_maps_api_failure",ENGAGEMENT_STATE_FAILURE:"engagement_state_failure",WEB_FONT_API_FAILURE:"web_font_api_failure",YOUTUBE_IFRAME_API_FAILURE:"youtube_iframe_api_failure",OSD_TIMED_OUT:"osd_timed_out"};var v=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,v);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};u(v,Error);v.prototype.name="CustomError";var la;var ma=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},na=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},va=function(a){if(!oa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(pa,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(qa,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(ra,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(sa,"&quot;"));-1!=a.indexOf("'")&&
(a=a.replace(ta,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(ua,"&#0;"));return a},pa=/&/g,qa=/</g,ra=/>/g,sa=/"/g,ta=/'/g,ua=/\x00/g,oa=/[\x00&<>"']/,wa=function(a,b){return a<b?-1:a>b?1:0},xa=function(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})},ya=function(a){var b=p(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"):"\\s";return a.replace(new RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,e){return b+e.toUpperCase()})};var za=function(a,b){b.unshift(a);v.call(this,ma.apply(null,b));b.shift()};u(za,v);za.prototype.name="AssertionError";
var Aa=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new za(""+e,f||[]);},w=function(a,b,c){a||Aa("",null,b,Array.prototype.slice.call(arguments,2))},Ba=function(a,b){throw new za("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ca=function(a,b,c){p(a)||Aa("Expected string but got %s: %s.",[l(a),a],b,Array.prototype.slice.call(arguments,2));return a};var Da=Array.prototype.indexOf?function(a,b,c){w(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ea=Array.prototype.filter?function(a,b,c){w(null!=a.length);return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,h=p(a)?a.split(""):a,n=0;n<d;n++)if(n in h){var ia=h[n];b.call(c,ia,n,a)&&(e[f++]=
ia)}return e},Fa=Array.prototype.map?function(a,b,c){w(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=p(a)?a.split(""):a,h=0;h<d;h++)h in f&&(e[h]=b.call(c,f[h],h,a));return e},Ga=function(a,b){b=Da(a,b);var c;if(c=0<=b)w(null!=a.length),Array.prototype.splice.call(a,b,1);return c},Ha=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},Ia=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(ba(d)){var e=
a.length||0,f=d.length||0;a.length=e+f;for(var h=0;h<f;h++)a[e+h]=d[h]}else a.push(d)}};var Ja=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},Ka=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},x=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1},La="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Ma=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<La.length;f++)c=La[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var y;a:{var Na=k.navigator;if(Na){var Oa=Na.userAgent;if(Oa){y=Oa;break a}}y=""}var z=function(a){return-1!=y.indexOf(a)};var Qa=function(){this.fb="";this.ib=Pa;this.qb=null};Qa.prototype.toString=function(){return"SafeHtml{"+this.fb+"}"};var Pa={};var Ra=function(a,b){b&&(a=q(a,b));var c=null;return function(b){k.clearTimeout(c);var d=arguments;c=k.setTimeout(function(){a.apply(null,d)},500)}};var Sa="StopIteration"in k?k.StopIteration:{message:"StopIteration",stack:""},Ta=function(){};Ta.prototype.next=function(){throw Sa;};Ta.prototype.na=function(){return this};var A=function(a,b){this.s={};this.j=[];this.ma=this.G=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};A.prototype.H=function(){Ua(this);for(var a=[],b=0;b<this.j.length;b++)a.push(this.s[this.j[b]]);return a};A.prototype.ea=function(){return 0==this.G};
A.prototype.remove=function(a){return Object.prototype.hasOwnProperty.call(this.s,a)?(delete this.s[a],this.G--,this.ma++,this.j.length>2*this.G&&Ua(this),!0):!1};var Ua=function(a){if(a.G!=a.j.length){for(var b=0,c=0;b<a.j.length;){var d=a.j[b];Object.prototype.hasOwnProperty.call(a.s,d)&&(a.j[c++]=d);b++}a.j.length=c}if(a.G!=a.j.length){for(var e={},c=b=0;b<a.j.length;)d=a.j[b],Object.prototype.hasOwnProperty.call(e,d)||(a.j[c++]=d,e[d]=1),b++;a.j.length=c}};
A.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.s,a)||(this.G++,this.j.push(a),this.ma++);this.s[a]=b};A.prototype.addAll=function(a){var b;if(a instanceof A)Ua(a),b=a.j.concat(),a=a.H();else{b=[];var c=0,d;for(d in a)b[c++]=d;a=Ka(a)}for(c=0;c<b.length;c++)this.set(b[c],a[c])};
A.prototype.na=function(a){Ua(this);var b=0,c=this.ma,d=this,e=new Ta;e.next=function(){if(c!=d.ma)throw Error("The map has changed since the iterator was created");if(b>=d.j.length)throw Sa;var e=d.j[b++];return a?e:d.s[e]};return e};var Va=function(a){if(a.H&&"function"==typeof a.H)return a.H();if(p(a))return a.split("");if(ba(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Ka(a)};var Wa=function(a){this.s=new A;a&&this.addAll(a)},Xa=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[da]||(a[da]=++ea)):b.substr(0,1)+a};g=Wa.prototype;g.add=function(a){this.s.set(Xa(a),a)};g.addAll=function(a){a=Va(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};g.removeAll=function(a){a=Va(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};g.remove=function(a){return this.s.remove(Xa(a))};g.ea=function(){return this.s.ea()};g.H=function(){return this.s.H()};g.na=function(){return this.s.na(!1)};var Ya=function(){return z("iPhone")&&!z("iPod")&&!z("iPad")};var Za=function(a){Za[" "](a);return a};Za[" "]=function(){};var ab=function(a,b){var c=$a;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var bb=z("Opera"),B=z("Trident")||z("MSIE"),cb=z("Edge"),C=z("Gecko")&&!(-1!=y.toLowerCase().indexOf("webkit")&&!z("Edge"))&&!(z("Trident")||z("MSIE"))&&!z("Edge"),D=-1!=y.toLowerCase().indexOf("webkit")&&!z("Edge"),db=function(){var a=k.document;return a?a.documentMode:void 0},eb;
a:{var fb="",gb=function(){var a=y;if(C)return/rv\:([^\);]+)(\)|;)/.exec(a);if(cb)return/Edge\/([\d\.]+)/.exec(a);if(B)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(D)return/WebKit\/(\S+)/.exec(a);if(bb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();gb&&(fb=gb?gb[1]:"");if(B){var hb=db();if(null!=hb&&hb>parseFloat(fb)){eb=String(hb);break a}}eb=fb}
var ib=eb,$a={},E=function(a){return ab(a,function(){for(var b=0,c=na(String(ib)).split("."),d=na(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var h=c[f]||"",n=d[f]||"";do{h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];n=/(\d*)(\D*)(.*)/.exec(n)||["","","",""];if(0==h[0].length&&0==n[0].length)break;b=wa(0==h[1].length?0:parseInt(h[1],10),0==n[1].length?0:parseInt(n[1],10))||wa(0==h[2].length,0==n[2].length)||wa(h[2],n[2]);h=h[3];n=n[3]}while(0==b)}return 0<=b})},jb;var kb=k.document;
jb=kb&&B?db()||("CSS1Compat"==kb.compatMode?parseInt(ib,10):5):void 0;var F=function(a,b,c,d,e){this.reset(a,b,c,d,e)};F.prototype.Ma=null;var lb=0;F.prototype.reset=function(a,b,c,d,e){"number"==typeof e||lb++;d||r();this.V=a;this.Fb=b;delete this.Ma};F.prototype.setLevel=function(a){this.V=a};F.prototype.getMessage=function(){return this.Fb};var G=function(a){this.Gb=a;this.R=this.pa=this.V=this.ia=null},mb=function(a,b){this.name=a;this.value=b};mb.prototype.toString=function(){return this.name};var nb=new mb("SEVERE",1E3),ob=new mb("CONFIG",700);G.prototype.getParent=function(){return this.ia};G.prototype.getChildren=function(){this.pa||(this.pa={});return this.pa};G.prototype.setLevel=function(a){this.V=a};var pb=function(a){if(a.V)return a.V;if(a.ia)return pb(a.ia);Ba("Root logger has no level set.");return null};
G.prototype.log=function(a,b,c){if(a.value>=pb(this).value)for("function"==l(b)&&(b=b()),a=new F(a,String(b),this.Gb),c&&(a.Ma=c),c="log:"+a.getMessage(),k.console&&(k.console.timeStamp?k.console.timeStamp(c):k.console.markTimeline&&k.console.markTimeline(c)),k.msWriteProfilerMark&&k.msWriteProfilerMark(c),c=this;c;){var d=c,e=a;if(d.R)for(var f=0;b=d.R[f];f++)b(e);c=c.getParent()}};G.prototype.severe=function(a,b){this.log(nb,a,b)};G.prototype.config=function(a,b){this.log(ob,a,b)};
var qb={},rb=null,sb=function(a){rb||(rb=new G(""),qb[""]=rb,rb.setLevel(ob));var b;if(!(b=qb[a])){b=new G(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=sb(a.substr(0,c));c.getChildren()[d]=b;b.ia=c;qb[a]=b}return b};var tb=sb("studioinnovation.layouts.lightbox.tetris.utils"),ub=function(a,b){var c;if(x(ka,a))c="sampledError";else if(x(ja,a))c="sampledInfo";else{tb&&tb.severe('"'+a+'" must be in the Info or Error enum to be reported.',void 0);return}a="CreativeToolset.internals.gen204."+c+'("'+a+'", '+JSON.stringify(b)+", 1);";Enabler.invokeExternalJsFunction(a)};var H=function(a,b){this.width=a;this.height=b};H.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};H.prototype.ea=function(){return!(this.width*this.height)};var vb=!C&&!B||B&&9<=Number(jb)||C&&E("1.9.1");B&&E("9");var wb=function(){var a=window.document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new H(a.clientWidth,a.clientHeight)},I=function(a){this.O=a||k.document||document};I.prototype.getElement=function(a){return p(a)?this.O.getElementById(a):a};I.prototype.createElement=function(a){return this.O.createElement(String(a))};I.prototype.appendChild=function(a,b){a.appendChild(b)};
I.prototype.getChildren=function(a){return vb&&void 0!=a.children?a.children:Ea(a.childNodes,function(a){return 1==a.nodeType})};var J=function(){this.aa=this.aa;this.ha=this.ha};J.prototype.aa=!1;J.prototype.dispose=function(){this.aa||(this.aa=!0,this.w())};J.prototype.w=function(){if(this.ha)for(;this.ha.length;)this.ha.shift()()};var K=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.J=!1;this.gb=!0};K.prototype.preventDefault=function(){this.defaultPrevented=!0;this.gb=!1};var xb=!B||9<=Number(jb),yb=B&&!E("9");!D||E("528");C&&E("1.9b")||B&&E("8")||bb&&E("9.5")||D&&E("528");C&&!E("8")||B&&E("9");var L=function(a,b){K.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.ba=this.state=null;if(a){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(C){var e;a:{try{Za(b.nodeName);e=!0;break a}catch(f){}e=
!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;null===d?(this.offsetX=D||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=D||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,
this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.ba=a;a.defaultPrevented&&this.preventDefault()}};u(L,K);
L.prototype.preventDefault=function(){L.D.preventDefault.call(this);var a=this.ba;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,yb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var zb="closure_listenable_"+(1E6*Math.random()|0),M=function(a){return!(!a||!a[zb])},Ab=0;var Bb=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.ca=e;this.key=++Ab;this.removed=this.Z=!1},Cb=function(a){a.removed=!0;a.listener=null;a.proxy=null;a.src=null;a.ca=null};var N=function(a){this.src=a;this.o={};this.Y=0};N.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.o[f];a||(a=this.o[f]=[],this.Y++);var h=Db(a,b,d,e);-1<h?(b=a[h],c||(b.Z=!1)):(b=new Bb(b,this.src,f,!!d,e),b.Z=c,a.push(b));return b};N.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.o))return!1;var e=this.o[a];b=Db(e,b,c,d);return-1<b?(Cb(e[b]),w(null!=e.length),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.o[a],this.Y--),!0):!1};
var Eb=function(a,b){var c=b.type;c in a.o&&Ga(a.o[c],b)&&(Cb(b),0==a.o[c].length&&(delete a.o[c],a.Y--))};N.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.o)if(!a||c==a){for(var d=this.o[c],e=0;e<d.length;e++)++b,Cb(d[e]);delete this.o[c];this.Y--}return b};N.prototype.P=function(a,b,c,d){a=this.o[a.toString()];var e=-1;a&&(e=Db(a,b,c,d));return-1<e?a[e]:null};
var Db=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.removed&&f.listener==b&&f.capture==!!c&&f.ca==d)return e}return-1};var Fb="closure_lm_"+(1E6*Math.random()|0),Gb={},Hb=0,O=function(a,b,c,d,e){if(m(b)){for(var f=0;f<b.length;f++)O(a,b[f],c,d,e);return null}c=Ib(c);return M(a)?a.listen(b,c,d,e):Jb(a,b,c,!1,d,e)},Jb=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var h=!!e,n=Kb(a);n||(a[Fb]=n=new N(a));c=n.add(b,c,d,e,f);if(c.proxy)return c;d=Lb();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,h);else if(a.attachEvent)a.attachEvent(Mb(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
Hb++;return c},Lb=function(){var a=Nb,b=xb?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},Ob=function(a,b,c,d,e){if(m(b)){for(var f=0;f<b.length;f++)Ob(a,b[f],c,d,e);return null}c=Ib(c);return M(a)?a.$a(b,c,d,e):Jb(a,b,c,!0,d,e)},Pb=function(a,b,c,d,e){if(m(b))for(var f=0;f<b.length;f++)Pb(a,b[f],c,d,e);else c=Ib(c),M(a)?a.Ga(b,c,d,e):a&&(a=Kb(a))&&(b=a.P(b,c,!!d,e))&&Qb(b)},Qb=function(a){if("number"!=typeof a&&a&&!a.removed){var b=
a.src;if(M(b))Eb(b.u,a);else{var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(Mb(c),d);Hb--;(c=Kb(b))?(Eb(c,a),0==c.Y&&(c.src=null,b[Fb]=null)):Cb(a)}}},Mb=function(a){return a in Gb?Gb[a]:Gb[a]="on"+a},Sb=function(a,b,c,d){var e=!0;if(a=Kb(a))if(b=a.o[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.removed&&(f=Rb(f,d),e=e&&!1!==f)}return e},Rb=function(a,b){var c=a.listener,d=a.ca||a.src;a.Z&&Qb(a);return c.call(d,
b)},Nb=function(a,b){if(a.removed)return!0;if(!xb){var c=b||aa("window.event");b=new L(c,this);var d=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){a:{var e=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(h){e=!0}if(e||void 0==c.returnValue)c.returnValue=!0}c=[];for(e=b.currentTarget;e;e=e.parentNode)c.push(e);a=a.type;for(e=c.length-1;!b.J&&0<=e;e--){b.currentTarget=c[e];var f=Sb(c[e],a,!0,b),d=d&&f}for(e=0;!b.J&&e<c.length;e++)b.currentTarget=c[e],f=Sb(c[e],a,!1,b),d=d&&f}return d}return Rb(a,new L(b,
this))},Kb=function(a){a=a[Fb];return a instanceof N?a:null},Tb="__closure_events_fn_"+(1E9*Math.random()>>>0),Ib=function(a){w(a,"Listener can not be null.");if("function"==l(a))return a;w(a.handleEvent,"An object listener must have handleEvent method.");a[Tb]||(a[Tb]=function(b){return a.handleEvent(b)});return a[Tb]};var P=function(){J.call(this);this.u=new N(this);this.kb=this;this.Ca=null};u(P,J);P.prototype[zb]=!0;g=P.prototype;g.addEventListener=function(a,b,c,d){O(this,a,b,c,d)};g.removeEventListener=function(a,b,c,d){Pb(this,a,b,c,d)};
g.dispatchEvent=function(a){Ub(this);var b,c=this.Ca;if(c){b=[];for(var d=1;c;c=c.Ca)b.push(c),w(1E3>++d,"infinite loop")}c=this.kb;d=a.type||a;if(p(a))a=new K(a,c);else if(a instanceof K)a.target=a.target||c;else{var e=a;a=new K(d,c);Ma(a,e)}var e=!0,f;if(b)for(var h=b.length-1;!a.J&&0<=h;h--)f=a.currentTarget=b[h],e=Vb(f,d,!0,a)&&e;a.J||(f=a.currentTarget=c,e=Vb(f,d,!0,a)&&e,a.J||(e=Vb(f,d,!1,a)&&e));if(b)for(h=0;!a.J&&h<b.length;h++)f=a.currentTarget=b[h],e=Vb(f,d,!1,a)&&e;return e};
g.w=function(){P.D.w.call(this);this.u&&this.u.removeAll(void 0);this.Ca=null};g.listen=function(a,b,c,d){Ub(this);return this.u.add(String(a),b,!1,c,d)};g.$a=function(a,b,c,d){return this.u.add(String(a),b,!0,c,d)};g.Ga=function(a,b,c,d){return this.u.remove(String(a),b,c,d)};
var Vb=function(a,b,c,d){b=a.u.o[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var h=b[f];if(h&&!h.removed&&h.capture==c){var n=h.listener,ia=h.ca||h.src;h.Z&&Eb(a.u,h);e=!1!==n.call(ia,d)&&e}}return e&&0!=d.gb};P.prototype.P=function(a,b,c,d){return this.u.P(String(a),b,c,d)};var Ub=function(a){w(a.u,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var Wb=function(a,b,c){if("function"==l(a))c&&(a=q(a,c));else if(a&&"function"==typeof a.handleEvent)a=q(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:k.setTimeout(a,b||0)};var Xb=!1,Yb="[Innovation Logger]";t("common.utils.logger.setEnabled",function(a){Xb=a});t("common.utils.logger.setPrefix",function(a){Yb="["+a+"]"});t("common.utils.logger.error",function(a,b){Xb&&([].unshift.call(arguments,Yb),console.error.apply(console,arguments))});var Q=function(a,b){Xb&&([].unshift.call(arguments,Yb),console.log.apply(console,arguments))};t("common.utils.logger.log",Q);var Zb=function(a,b){Xb&&([].unshift.call(arguments,Yb),console.warn.apply(console,arguments))};
t("common.utils.logger.warn",Zb);var R=function(){P.call(this);this.Ja=studio.Enabler.getInstance();this.id="";this.l=this.type=this.path=null;this.R={}};u(R,P);g=R.prototype;g.addPropertyChangeListener=function(a,b){var c=function(a){Q("[propertyChangeHandler] "+this.path+" - "+b+": "+a)}.bind(this);studio.sdk.configurable.binding.addPropertyChangeListener(a,b,c);this.R[b]=c};g.counter=function(a){Q("["+this.getPath()+"] counter: "+a);studio.sdk.configurable.counter(this.l,a)};
g.exit=function(a,b){Q("["+this.getPath()+"] exit: "+a);/^[\s\xa0]*$/.test(null==b?"":String(b))?studio.sdk.configurable.exit(this.l,a):studio.sdk.configurable.exit(this.l,a,b)};g.getPath=function(){return this.path};g.getType=function(){return this.type};var $b=function(a,b){var c=typeof b;return"string"==c||"number"==c||"boolean"==c||void 0==b||void 0!==b["@type"]&&"color"==b["@type"].toLowerCase()||void 0!==b["@type"]&&"url"==b["@type"].toLowerCase()||void 0!==b["@value"]&&$b(a,b["@value"])};
g=R.prototype;g.register=function(a,b,c){if(ca(a)){this.l&&this.unregister();this.l=a[b];this.id=c||this.l["@id"];this.path=studio.sdk.configurable.config.getPath(this.l);this.type=studio.sdk.configurable.config.getType(this.l);for(var d in this.l)$b(this,this.l[d])&&"@id"!=d&&this.addPropertyChangeListener.call(this,a[b],d);Q("[register] id: "+this.path+" - type: "+this.type)}};g.removePropertyChangeListener=function(a,b){studio.sdk.configurable.binding.removePropertyChangeListener(a,b,this.R[b])};
g.startTimer=function(a){Q("["+this.getPath()+"] startTimer: "+a);studio.sdk.configurable.startTimer(this.l,a)};g.stopTimer=function(a){Q("["+this.getPath()+"] stopTimer: "+a);studio.sdk.configurable.stopTimer(this.l,a)};g.unregister=function(){if(this.l){Q("[unregister] id: "+this.path+" - type: "+this.type);var a=this.l,b;for(b in this.l)$b(this,this.l[b])&&"@id"!=b&&this.removePropertyChangeListener.call(this,a,b);this.id="";this.l=this.type=this.path=null}};var ac=function(a){R.call(this);this.ob=p(a)?document.getElementById(a):a};u(ac,R);var bc=function(a,b,c){ac.call(this,a);this.Da=[];this.m=null;this.X=b;this.Ha=this.la=-1;this.N=c};u(bc,ac);var cc={};g=bc.prototype;g.prepare=function(){this.m.prepare()};g.activate=function(){null==this.m||this.m.getIsActive()||(this.m.activate(),this.Ha=r(),0<this.N?(k.clearTimeout(this.la),this.la=Wb(q(this.hb,this,!1),this.N)):this.m.stopAnimation())};g.deactivate=function(){null!=this.m&&this.m.getIsActive()&&this.hb(!0)};g.invalidateSize=function(){this.m.invalidateSize()};
g.register=function(a,b,c){bc.D.register.call(this,a,b,c);this.update()};g.Ib=function(a,b){var c=a.type;"Element interacted"==c&&this.dispatchEvent("userinteracted");x(ka,c)||x(ja,c)?ub(c,a.gen204_params||{}):x(ha,a.type)||studio.sdk.configurable.counter(b,a.type,!a.deDupe)};g.mb=function(a,b){this.dispatchEvent("userinteracted");tetris.config.isEnabled(tetris.config.Experiment.USE_EXIT_OVERRIDE)?Enabler.exitOverride(a.type,a.href):studio.sdk.configurable.exit(b,a.type,a.href)};
g.Cb=function(a){Enabler.invokeExternalJsFunction("googlecreative.reporting.sharedReporter.reportEvents(["+JSON.stringify({unifiedReportingEvent:{type:"CUSTOM_EVENT",name:a.type},count:1})+"]);")};g.Rb=function(){for(;this.Da.length;){var a=this.Da.shift();studio.video.Reporter.attach(a.id,a.video,!0)}};
g.Qb=function(a){var b=a.id;a=a.video;studio.video&&studio.video.Reporter?studio.video.Reporter.attach(b,a,!0):(this.Da.push({id:b,video:a}),Enabler.loadModule(studio.module.ModuleId.VIDEO,q(this.Rb,this)))};
g.update=function(){if(null!=this.m){k.clearTimeout(this.la);this.deactivate();var a=this.m.getElement();a&&a.parentNode&&a.parentNode.removeChild(a);Ga(cc[this.X],this.m);this.m.dispose();this.m=null}a={};a[tetris.factory.RenderPresenterArg.DATA]=this.l;a[tetris.factory.RenderPresenterArg.PARENT_EL]=this.ob;a[tetris.factory.RenderPresenterArg.PRESENTER_TYPE]=this.X;a[tetris.factory.RenderPresenterArg.GET_TYPE_FN]=studio.sdk.configurable.config.getType;a[tetris.factory.RenderPresenterArg.HANDLE_PINGBACK_FN]=
q(this.Ib,this);a[tetris.factory.RenderPresenterArg.HANDLE_CLICK_THROUGH_FN]=q(this.mb,this);a[tetris.factory.RenderPresenterArg.HANDLE_LATENCY_FN]=q(this.Cb,this);a[tetris.factory.RenderPresenterArg.RESOLVE_URL_FN]=q(this.Ja.getUrl,this.Ja);a[tetris.factory.RenderPresenterArg.HANDLE_VIDEO_CREATED_FN]=q(this.Qb,this);this.m=tetris.factory.renderPresenter(a);null==cc[this.X]&&(cc[this.X]=[]);cc[this.X].push(this.m);this.dispatchEvent("updated")};
g.hb=function(a){this.m.getIsAnimating()&&(k.clearTimeout(this.la),a?this.m.deactivate():this.m.stopAnimation(),0<this.N&&(a=r()-this.Ha,this.N-=a))};t("presenters",cc);var dc=function(){R.call(this)};u(dc,R);dc.prototype.register=function(a,b,c){dc.D.register.call(this,a,b,c);tetris.themer.uninstall();a=this.l.common;tetris.themer.install(a.theme,a.fontFamily,a.fontStyle,a.fontWeight,a.fontLockerFontName)};var ec=function(){this.ja=void 0},fc=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(m(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],fc(a,a.ja?a.ja.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),gc(d,c),c.push(":"),fc(a,a.ja?a.ja.call(b,d,e):e,c),
f=","));c.push("}");return}}switch(typeof b){case "string":gc(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},hc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},ic=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,gc=function(a,b){b.push('"',a.replace(ic,
function(a){var b=hc[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),hc[a]=b);return b}),'"')};var S=function(){P.call(this)};u(S,P);S.getInstance=function(){return S.Ta?S.Ta:S.Ta=new S};
var jc=parseInt(1E4*Math.random(),10).toString(),kc=["touchstart","touchend","click","mousedown","mouseup"],mc=function(a){Enabler.invokeExternalJsFunction("CreativeToolset.internals.enableRemoteEvents(true);");O(document.body,kc,function(a){Enabler.invokeExternalJsFunction('(function(e) {var sink = CreativeToolset.internals.creativeBodyRemoteEventSink;if (typeof sink == "function") { sink(e); }})('+lc(a)+")")},!1,a)},lc=function(a){var b=a.ba,c={type:b.type,ctrlKey:b.ctrlKey,shiftKey:b.shiftKey,
altKey:b.altKey,metaKey:b.metaKey,timeStamp:b.timeStamp||r()};switch(a.type){case "touchstart":case "touchend":Ma(c,{touches:nc(b.touches),targetTouches:nc(b.targetTouches),changedTouches:nc(b.changedTouches)});break;case "click":case "mousedown":case "mouseup":Ma(c,{screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,button:b.button,buttons:b.buttons})}a=[];fc(new ec,c,a);return a.join("")},nc=function(a){return null!==a&&void 0!==a?Fa(a,function(a){return{identifier:a.identifier,
screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY,radiusX:a.radiusX,radiusY:a.radiusY,force:a.force}}):[]};S.prototype.va=function(){clearInterval(this.zb);Pb(window,"message",this.ab,!1,this);this.dispatchEvent("init")};S.prototype.ab=function(a){(a=a.ba)&&a.origin&&-1<a.origin.indexOf("adspreview.googleusercontent.com")?this.va():a&&a.data&&a.data.seed==jc&&null!=a.data.ctp&&this.va()};var pc=function(){return!oc()&&(z("iPod")||z("iPhone")||z("Android")||z("IEMobile"))},oc=function(){return z("iPad")||z("Android")&&!z("Mobile")||z("Silk")};var rc=function(a){var b={cursor:"pointer",position:"absolute",zIndex:1E3,top:0,right:0};if(p(b))(b=qc(a,b))&&(a.style[b]=void 0);else for(var c in b){var d=a,e=b[c],f=qc(d,c);f&&(d.style[f]=e)}},sc={},qc=function(a,b){var c=sc[b];if(!c){var d=xa(b),c=d;void 0===a.style[d]&&(d=(D?"Webkit":C?"Moz":B?"ms":bb?"O":null)+ya(d),void 0!==a.style[d]&&(c=d));sc[b]=c}return c};var T=function(a,b,c){P.call(this);this.F=document.getElementById(a);this.ya=document.getElementById(b);if(!this.F||!this.ya)throw"[FullExpansionController] Invalid collapsed/expanded element ID";this.Oa=c||"hover_or_click";this.Va=this.C=this.S=!1;this.K=new H(0,0);this.Pa=this.Qa=void 0;this.Ea=this.Fa=-1;this.fa=this.ga=this.T=!1;a=studio.common.Environment;this.Wa=a.hasType(a.Type.LOCAL);this.da=wb();this.Wa&&(a=document.createElement("IMG"),a.src="https://pagead2.googlesyndication.com/pagead/bf/images/close_circle.png",
rc(a),O(a,"click",function(){this.S=!0;window.setTimeout(q(function(){this.S=!1},this),2E3);this.Sa()},!1,this),this.ya.appendChild(a));tc(this,!1);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_SUPPORT,this.Mb,!1,this);Enabler.addEventListener(studio.events.StudioEvent.ABOUT_TO_EXPAND,this.jb,!1,this);O(Enabler,studio.events.StudioEvent.FULLSCREEN_EXPAND_START,this.Na,!1,this);O(Enabler,studio.events.StudioEvent.FULLSCREEN_COLLAPSE_START,this.ra,!1,this);O(Enabler,studio.events.StudioEvent.FULLSCREEN_COLLAPSE_FINISH,
this.qa,!1,this);(Ya()||z("iPad")||z("iPod"))&&studio.common.Environment.hasType(studio.common.Environment.Type.IN_APP)||O(Enabler,studio.events.StudioEvent.EXIT,this.Sa,!1,this);uc()};u(T,P);
var vc=14/9,wc=1/vc,xc=function(a){var b=-(a.da.width/2)+"px",c=-(a.da.height/2)+"px",d;d='studioV2.api.creatives[0].getAssets()[0].getContainerElement().style.position="absolute";studioV2.api.creatives[0].getAssets()[0].getContainerElement().style.left="50%";studioV2.api.creatives[0].getAssets()[0].getContainerElement().style.top="50%";'+('studioV2.api.creatives[0].getAssets()[0].getContainerElement().style.marginLeft="'+b+'";')+('studioV2.api.creatives[0].getAssets()[0].getContainerElement().style.marginTop="'+
c+'";')+'studioV2.api.creatives[0].getAssets()[0].getContainerElement().firstChild.style.position="absolute";';d+='studioV2.api.creatives[0].getAssets()[0].getContainerElement().firstChild.style.left="50%";';d+='studioV2.api.creatives[0].getAssets()[0].getContainerElement().firstChild.style.top="50%";';d=d+('studioV2.api.creatives[0].getAssets()[0].getContainerElement().firstChild.style.marginLeft="'+b+'";')+('studioV2.api.creatives[0].getAssets()[0].getContainerElement().firstChild.style.marginTop="'+
c+'";')+'studioV2.api.creatives[0].getAssets()[0].getContainerElement().parentNode.style.position="relative";';d+='studioV2.api.creatives[0].getAssets()[0].getContainerElement().parentNode.style.width="'+a.da.width+'px";';d+='studioV2.api.creatives[0].getAssets()[0].getContainerElement().parentNode.style.height="'+a.da.height+'px";';Enabler.invokeExternalJsFunction(d)};g=T.prototype;
g.enableExpansion=function(a,b){this.Qa=a;this.Pa=b;this.T=null!=a&&null!=b;Enabler.isInitialized()?(this.T||Enabler.setResponsiveExpanding(!0),Enabler.queryFullscreenSupport()):O(Enabler,studio.events.StudioEvent.INIT,function(){this.T||Enabler.setResponsiveExpanding(!0);Enabler.queryFullscreenSupport()},!1,this)};g.Na=function(){this.ga=!1;tc(this,!0);Enabler.counter("Lightbox Expand",!0);Enabler.startTimer("Lightbox Expansion Timer");Enabler.finishFullscreenExpand()};g.Sa=function(){Enabler.requestFullscreenCollapse()};
g.ra=function(){yc(this)};g.qa=function(){this.C&&yc(this);uc()};g.isExpanded=function(){return this.C};var yc=function(a){Enabler.counter("Lightbox Collapse",!0);Enabler.stopTimer("Lightbox Expansion Timer");tc(a,!1)},uc=function(){Enabler.invokeExternalJsFunction('studioV2.api.creatives[0].getAssets()[0].getContainerElement().firstChild.style.overflow="visible"')};
T.prototype.ka=function(){if(!this.C&&!this.S)if(this.T||this.fa){this.ga&&this.Ia();if(this.T)var a=this.Qa,b=this.Pa;else b=zc(this.K.width,this.K.height),a=b.width,b=b.height;a&&b&&(this.Fa=a,this.Ea=b);Enabler.requestFullscreenExpand(a,b);this.ga=!0;this.dispatchEvent("requestExpand")}else this.fa=!0,Enabler.queryFullscreenDimensions()};var zc=function(a,b){var c=a,d=b,e=a/b;e>vc?c=b*vc:e<wc&&(d=a/wc);return new H(c,d)};T.prototype.Ia=function(){this.ga=!1;this.dispatchEvent("cancelExpand")};
var tc=function(a,b){a.ya.style.left=b?"0":"-9999px";a.C=b;a.C?a.F.style.display="none":Wb(function(){this.F.style.display="";Enabler.finishFullscreenCollapse()},0,a)};T.prototype.jb=function(){this.ka()};T.prototype.Mb=function(a){if(this.Va=a.supported)Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_DIMENSIONS,this.Kb,!1,this),Enabler.queryFullscreenDimensions()};
T.prototype.Kb=function(a){this.K.width=a.width;this.K.height=a.height;if(this.C){Ob(window,"resize",q(function(){this.C&&this.Na()},this));var b=zc(this.K.width,this.K.height);a=b.width;b=b.height;if(a!=this.Fa||b!=this.Ea)Enabler.setResponsiveSize(a,b),this.Fa=a,this.Ea=b}else"hover"!=this.Oa&&O(this.F,"click",this.ka,!1,this),pc()||oc()||"click"==this.Oa||O(this.F,"mouseenter",this.ka,!1,this),this.Wa||O(this.F,"mouseleave",this.Ia,!1,this),xc(this),this.dispatchEvent("ready"),this.fa&&(this.ka(),
this.fa=!1)};var Ac=function(a,b,c){K.call(this,a);this.visibilityParams=b.visibilityParams;this.isFirstEvent=c};u(Ac,K);t("studioinnovation.visibility.VisibilityEvent",Ac);var U=function(a){P.call(this);this.Nb=a||1500;this.Db=r();this.Ua=this.za=!1;Enabler.addEventListener("visibilityChangeWithInfo",q(this.xb,this));Wb(q(this.Eb,this),this.Nb)};u(U,P);t("studioinnovation.visibility.OsdBroadcaster.IS_FIRST_EVENT_KEY","isFirstEvent");t("studioinnovation.visibility.OsdBroadcaster.VISIBILITY_PARAMS_KEY","visibilityParams");
t("studioinnovation.visibility.OsdBroadcaster.VISIBILITY_FRACTION_KEY","visibilityFraction");t("studioinnovation.visibility.OsdBroadcaster.VISIBLE_BOX_KEY","visibleBox");t("studioinnovation.visibility.OsdBroadcaster.VISIBLITY_CHANGE_WITH_INFO_STUDIO_EVENT_TYPE","visibilityChangeWithInfo");U.prototype.xb=function(a){this.Ua&&Zb("OsdBroadcaster received an osd message after declaringitself disconnected.");a=new Ac("innovationvisibilitychange",a,!this.za);this.za=!0;this.dispatchEvent(a)};
U.prototype.Eb=function(){this.za||(this.Ua=!0,this.dispatchEvent(new K("innovationvisibilitytimeout")))};U.prototype.tb=function(){return this.Db};U.prototype.getLoadTime=U.prototype.tb;var Bc={Wb:!0},Cc={Xb:!0},Dc=function(){throw Error("Do not instantiate directly");};Dc.prototype.sa=null;Dc.prototype.toString=function(){return this.content};var Fc=function(){var a=Ec({Ab:"invitation",pb:"cta",sb:"expanded"});if(!ca(a))return String(a);if(a instanceof Dc){if(a.ta===Bc)return Ca(a.content);if(a.ta===Cc)return va(a.content)}Ba("Soy template output is unsafe for use as HTML: "+a);return"zSoyz"};var V=function(a){J.call(this);this.Aa=a;this.j={}};u(V,J);var Gc=[];V.prototype.listen=function(a,b,c,d){m(b)||(b&&(Gc[0]=b.toString()),b=Gc);for(var e=0;e<b.length;e++){var f=O(a,b[e],c||this.handleEvent,d||!1,this.Aa||this);if(!f)break;this.j[f.key]=f}return this};V.prototype.$a=function(a,b,c,d){return Hc(this,a,b,c,d)};var Hc=function(a,b,c,d,e,f){if(m(c))for(var h=0;h<c.length;h++)Hc(a,b,c[h],d,e,f);else{b=Ob(b,c,d||a.handleEvent,e,f||a.Aa||a);if(!b)return a;a.j[b.key]=b}return a};
V.prototype.Ga=function(a,b,c,d,e){if(m(b))for(var f=0;f<b.length;f++)this.Ga(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.Aa||this,c=Ib(c),d=!!d,b=M(a)?a.P(b,c,d,e):a?(a=Kb(a))?a.P(b,c,d,e):null:null,b&&(Qb(b),delete this.j[b.key]);return this};V.prototype.removeAll=function(){Ja(this.j,function(a,b){this.j.hasOwnProperty(b)&&Qb(a)},this);this.j={}};V.prototype.w=function(){V.D.w.call(this);this.removeAll()};
V.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var W=function(a,b){P.call(this);this.wa=[];this.Ob=!!b;this.xa=new V(this);this.Bb=window.parent!=window;if(a)if(m(a))for(b=0;b<a.length;b++)Ic(this,a[b].O);else Ic(this,a.O);else a=la||(la=new I),Ic(this,a.O);this.Xa=r()};u(W,P);W.prototype.bb=0;var Jc=["click","dblclick","mousedown","mousemove","mouseup"],Kc=["touchend","touchmove","touchstart"],Lc=["keydown","keyup"];W.prototype.w=function(){W.D.w.call(this);this.xa.dispose();this.xa=null;delete this.wa};
var Ic=function(a,b){if(!(0<=Da(a.wa,b))){a.wa.push(b);var c=!a.Ob,d=Ha(Lc,Jc);a.Bb||Ia(d,Kc);a.xa.listen(b,d,a.wb,c)}};W.prototype.wb=function(a){var b=!1;switch(a.type){case "mousemove":if("number"==typeof this.Ya&&this.Ya!=a.clientX||"number"==typeof this.Za&&this.Za!=a.clientY)b=!0;this.Ya=a.clientX;this.Za=a.clientY;break;default:b=!0}b&&(Ca(a.type),Mc(this))};var Mc=function(a){var b=r();a.Xa=b;b>a.bb&&(a.dispatchEvent("activity"),a.bb=b+3E3)};var Y=function(a,b){P.call(this);b||(Nc.add(this),null==X&&(X=new W),b=X);this.yb=a;this.M=b;this.lb=q(this.Hb,this);Oc(this)};u(Y,P);Y.prototype.Ba=!1;var X=Y.prototype.W=null,Nc=new Wa,Oc=function(a){var b=a.yb+1-(r()-a.M.Xa);0<b?a.W=Wb(a.lb,b):(O(a.M,"activity",a.cb,!1,a),a.Ba=!0,a.dispatchEvent("idle"))};Y.prototype.Hb=function(){this.W=null;Oc(this)};Y.prototype.cb=function(){Pc(this);this.dispatchEvent("active");Oc(this)};var Pc=function(a){a.Ba&&(Pb(a.M,"activity",a.cb,!1,a),a.Ba=!1)};
Y.prototype.w=function(){Pc(this);null!=this.W&&(k.clearTimeout(this.W),this.W=null);Nc.remove(this);null!=X&&Nc.ea()&&(X.dispose(),X=null);Y.D.w.call(this)};B&&E(8);var Qc=function(a){if(null!=a)switch(a.sa){case 1:return 1;case -1:return-1;case 0:return 0}return null},Rc=function(){Dc.call(this)};u(Rc,Dc);Rc.prototype.ta=Bc;
var Tc=function(a){if(null!=a&&a.ta===Bc)return w(a.constructor===Rc),a;if(a instanceof Qa){var b=Sc,c;a instanceof Qa&&a.constructor===Qa&&a.ib===Pa?c=a.fb:(Ba("expected object of type SafeHtml, got '"+a+"' of type "+l(a)),c="type_error:SafeHtml");a=b(c,a.qb)}else a=Sc(va(String(String(a))),Qc(a));return a},Sc=function(a){function b(a){this.content=a}b.prototype=a.prototype;return function(a,d){a=new b(String(a));void 0!==d&&(a.sa=d);return a}}(Rc);
(function(a){function b(a){this.content=a}b.prototype=a.prototype;return function(a,d){a=String(a);if(!a)return"";a=new b(a);void 0!==d&&(a.sa=d);return a}})(Rc);var Ec=function(a){return'<div id="'+Tc(a.Ab)+'" class="view-container"><div id="'+Tc(a.pb)+'" class="view-container"></div><div id="'+Tc(a.Vb)+'" class="view-container"></div></div><div id="'+Tc(a.sb)+'" class="view-container" style="width:100%; height: 100%;"></div>'};Ec.Yb="studioinnovation.layouts.lightbox.tetris.templates.creative";var Z=function(){var a=document.body;w(Ec,"Soy template may not be null.");a.innerHTML=Fc();this.tetris=this.v=this.themer=null;this.U=!1;this.A=this.La=this.B=null;this.L=0;this.$=this.ua=this.oa=!1;this.eb=null;this.I=!1;aa("studio.sdk.gdn")?studio.sdk.gdn.getInitializedConfigByCallback(q(this.nb,this)):Uc(this)};t("studioinnovation.layouts.lightbox.tetris.Tetris",Z);
Z.prototype.nb=function(a){var b=a.getActiveExperimentLabels(),c=(a.getClientEnvironment()||{}).language,d=(a.getClientEnvironment()||{}).browserClass,e={};e[tetris.config.Field.ACTIVE_EXPERIMENTS]=b||[];e[tetris.config.Field.LOCALE]=c||"en-US";e[tetris.config.Field.BROWSER_CLASS]=d||(pc()||oc()?studio.common.Environment.hasType(studio.common.Environment.Type.IN_APP)?tetris.config.BrowserClass.IN_APP:tetris.config.BrowserClass.MOBILE_WEB:tetris.config.BrowserClass.DESKTOP);tetris.config.set(e);tetris.config.isEnabled(tetris.config.Experiment.VIEWABLE_THRESHOLD_1_PERCENT)?
this.L=.01:tetris.config.isEnabled(tetris.config.Experiment.VIEWABLE_THRESHOLD_25_PERCENT)?this.L=.25:tetris.config.isEnabled(tetris.config.Experiment.VIEWABLE_THRESHOLD_50_PERCENT)?this.L=.5:tetris.config.isEnabled(tetris.config.Experiment.VIEWABLE_THRESHOLD_75_PERCENT)&&(this.L=.75);this.oa=tetris.config.isEnabled(tetris.config.Experiment.ACTIVATE_WHEN_VIEWABLE);this.ua=tetris.config.isEnabled(tetris.config.Experiment.DEACTIVATE_WHEN_UNVIEWABLE);this.$=tetris.config.isEnabled(tetris.config.Experiment.DISABLE_EXPANSION_WHEN_UNVIEWABLE);
Vc(this)&&(this.eb=new U(3E4));this.La=Wb(q(this.Ka,this,null),2E3);a.retrieveCurrentEngagementState(q(this.Ka,this))};Z.prototype.Ka=function(a){k.clearTimeout(this.La);null!=a?this.U=a==studio.sdk.gdn.EngagementPhase.INVITATION_LARGE_CANVAS:ub("engagement_state_failure",{});Uc(this)};Z.prototype.Pb=function(){this.U&&Enabler.counter("GENERIC_ENGAGEMENT");null!=this.A&&null!=this.A.M&&Mc(this.A.M)};Z.prototype.Sb=function(){(this.U||this.B.isExpanded())&&this.tetris.activate()};
var Uc=function(a){a.themer=new dc;a.tetris=new bc("expanded",tetris.factory.PresenterType.EXPANDED,24E4);O(a.tetris,"updated",q(a.Sb,a));O(a.tetris,"userinteracted",q(a.Pb,a));a.U||(a.v=new bc("cta",tetris.factory.PresenterType.INVITATION,3E4),a.B=new T("invitation","expanded","hover_or_click"),Vc(a)&&O(a.eb,"innovationvisibilitychange",q(a.Tb,a)));if(studio.sdk.configurable.getRuntimeMode()==studio.sdk.configurable.RUNTIME_MODE.TRAFFICK){var b=S.getInstance();Ob(b,"init",a.Ra,!1,a);O(window,"message",
b.ab,!1,b);a=window.document.location.origin;a='(function(seed, origin){window.Creative = {};window.Creative.seed = seed;window.Creative.targetOrigin = origin;var s = document.createElement("script");s.src = "'+Enabler.getUrl("https://www.gstatic.com/doubleclick/studio/innovation/h5/layouts/creativeproxy/1/creativeproxy_min.js")+'";var t = document.getElementsByTagName("script")[0];t.parentNode.insertBefore(s, t);})("'+jc+'", "'+a+'")';b.zb=setInterval(b.va.bind(b),2500);Enabler.invokeExternalJsFunction(a);
window.disableEventBubbling||mc(b)}else a.Ra()};Z.prototype.Jb=function(){(Ya()||z("iPad")||z("iPod"))&&tetris.config.getNumber(tetris.config.Field.BROWSER_CLASS,tetris.config.BrowserClass.DESKTOP)==tetris.config.BrowserClass.IN_APP||this.tetris.prepare()};var Wc=function(a){null!==a.A&&(a.A.dispose(),a.A=null)};g=Z.prototype;
g.rb=function(){this.tetris.activate();Wc(this);tetris.config.isEnabled(tetris.config.Experiment.LOG_IDLE_IN_TETRIS)&&(this.A=new Y(5E3),this.A.listen("idle",this.vb,!1,this),this.A.listen("active",this.ub,!1,this))};g.vb=function(){ub("tetris_became_idle",{})};g.ub=function(){ub("tetris_became_active",{})};g.ra=function(){this.tetris.deactivate();Wc(this)};g.qa=function(){this.v.invalidateSize()};
g.Tb=function(a){a=a.visibilityParams.visibilityFraction;!this.I&&a>=this.L?(this.I=!0,Xc(this)):this.I&&a<this.L&&(this.I=!1,Yc(this))};var Xc=function(a){a.B&&a.$&&(a.B.S=!1);a.v&&a.v.activate()},Yc=function(a){a.B&&a.$&&(a.B.S=!0);a.v&&a.ua&&a.v.deactivate()};
Z.prototype.Ra=function(){this.U||(this.B.enableExpansion(),Enabler.addEventListener(studio.events.StudioEvent.ABOUT_TO_EXPAND,this.Jb,!1,this),Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_FINISH,this.rb,!1,this),Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_START,this.ra,!1,this),Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_FINISH,this.qa,!1,this));Vc(this)&&(this.I=!this.oa);studio.sdk.configurable.getConfiguration(q(this.Lb,
this))};Z.prototype.Lb=function(a){studio.sdk.configurable.setTranslationMethod(aa("GdnPreview.getConfig"));Zc(this,a);studio.sdk.configurable.binding.addValueChangeListener(a,q(Ra(function(){Zc(this,a)},this),this))};var Zc=function(a,b){a.themer.register(b,"tetris",1);a.tetris.register(b,"tetris",2);null!=a.v&&(a.v.register(b,"tetris",3),Vc(a)||a.v.activate());Vc(a)&&(a.I?Xc(a):Yc(a))},Vc=function(a){return a.oa||a.ua||a.$};}).call(this);
