(function(){var e=this,h=function(a,b){var c=a.split("."),d=e;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var g;c.length&&(g=c.shift());)c.length||void 0===b?d=d[g]?d[g]:d[g]={}:d[g]=b};var k=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},n=function(a,b){return a<b?-1:a>b?1:0};var aa=Array.prototype.forEach?function(a,b,c){Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,g="string"==typeof a?a.split(""):a,f=0;f<d;f++)f in g&&b.call(c,g[f],f,a)};var p;a:{var q=e.navigator;if(q){var r=q.userAgent;if(r){p=r;break a}}p=""}var v=function(a){return-1!=p.indexOf(a)};var ba=v("Opera")||v("OPR"),x=v("Trident")||v("MSIE"),ca=v("Edge"),y=v("Gecko")&&!(-1!=p.toLowerCase().indexOf("webkit")&&!v("Edge"))&&!(v("Trident")||v("MSIE"))&&!v("Edge"),da=-1!=p.toLowerCase().indexOf("webkit")&&!v("Edge"),z=function(){var a=e.document;return a?a.documentMode:void 0},A;
a:{var B="",C=function(){var a=p;if(y)return/rv\:([^\);]+)(\)|;)/.exec(a);if(ca)return/Edge\/([\d\.]+)/.exec(a);if(x)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(da)return/WebKit\/(\S+)/.exec(a);if(ba)return/(?:Version)[ \/]?(\S+)/.exec(a)}();C&&(B=C?C[1]:"");if(x){var D=z();if(null!=D&&D>parseFloat(B)){A=String(D);break a}}A=B}
var E=A,F={},G=function(a){if(!F[a]){for(var b=0,c=k(String(E)).split("."),d=k(String(a)).split("."),g=Math.max(c.length,d.length),f=0;0==b&&f<g;f++){var l=c[f]||"",m=d[f]||"",w=RegExp("(\\d*)(\\D*)","g"),ia=RegExp("(\\d*)(\\D*)","g");do{var t=w.exec(l)||["","",""],u=ia.exec(m)||["","",""];if(0==t[0].length&&0==u[0].length)break;b=n(0==t[1].length?0:parseInt(t[1],10),0==u[1].length?0:parseInt(u[1],10))||n(0==t[2].length,0==u[2].length)||n(t[2],u[2])}while(0==b)}F[a]=0<=b}},H=e.document,ea=H&&x?z()||
("CSS1Compat"==H.compatMode?parseInt(E,10):5):void 0;var I;if(!(I=!y&&!x)){var J;if(J=x)J=9<=Number(ea);I=J}I||y&&G("1.9.1");x&&G("9");var K=function(a,b){this.h=a;this.c=b};var L=function(){return v("iPad")||v("Android")&&!v("Mobile")||v("Silk")};var fa=/#(.)(.)(.)/,M=function(a){if(!ga.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(fa,"#$1$1$2$2$3$3"));a=a.toLowerCase();return[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16)]},ha=function(a,b,c){a/=255;b/=255;c/=255;var d=Math.max(a,b,c),g=Math.min(a,b,c),f=0,l=0,m=.5*(d+g);d!=g&&(d==a?f=60*(b-c)/(d-g):d==b?f=60*(c-a)/(d-g)+120:d==c&&(f=60*(a-b)/(d-g)+240),l=0<m&&.5>=m?(d-g)/(2*m):(d-g)/(2-2*m));return[Math.round(f+360)%360,
l,m]},ga=/^#(?:[0-9a-f]{3}){1,2}$/i;var N=function(a,b,c,d){this.b=a;this.g=b;this.f=c;this.a=d},ja=[new N("#F44336",.515152,1,358.878),new N("#E91E63",.777778,.825581,337.444),new N("#9C27B0",.444444,.75,286.272),new N("#673AB7",.454545,.687861,259.503),new N("#3F51B5",.4375,.657895,231.706),new N("#2196F3",.787234,.899497,208.582),new N("#03A9F4",.913043,.987179,200.21),new N("#00BCD4",.708661,1,186.034),new N("#009688",.409091,1,173.816),new N("#4CAF50",.374046,.553719,122.977),new N("#8BC34A",.461224,.555556,90.6814),new N("#CDDC39",
.596838,.714286,63.3218),new N("#FFEB3B",.917355,1,48.1313),new N("#FFC107",1,1,41.1541),new N("#FF9800",1,1,32.7764),new N("#FF5722",.714286,1,13.4549),new N("#795548",.151899,.278351,14.7864)];var O=function(a){if(/^(?:|#|0x)(?:[a-fA-F\d]{3}){1,2}$/.test(a))return"#"+a.replace(/^#|0x/,"");throw Error("Invalid HEX color: "+a);},P=function(a,b){var c=M(O(a)),d=M(O(b));return Math.round(Math.abs(c[0]-d[0])+Math.abs(c[1]-d[1])+Math.abs(c[2]-d[2]))},ka=8/360,Q=function(a){switch(O(a)){case "#F44336":return"#B71C1C";case "#E91E63":return"#880E4F";case "#9C27B0":return"#4A148C";case "#673AB7":return"#311B92";case "#3F51B5":return"#1A237E";case "#2196F3":return"#0D47A1";case "#03A9F4":return"#01579B";
case "#00BCD4":return"#006064";case "#009688":return"#004D40";case "#4CAF50":return"#1B5E20";case "#8BC34A":return"#33691E";case "#CDDC39":return"#827717";case "#FFEB3B":return"#F57F17";case "#FFC107":return"#FF6F00";case "#FF9800":return"#E65100";case "#FF5722":return"#BF360C";case "#795548":return"#3E2723";case "#9E9E9E":return"#212121";case "#607D8B":return"#263238"}return""},R=function(a){a=M(a);var b=ha(a[0],a[1],a[2]),c="#9E9E9E";if(!la(b))return c;var d=Number.MAX_VALUE;aa(ja,function(a){var f;
f=Math.abs(b[0]-a.a);f=Math.min(f,360-f);f*=ka;var l;l=b[1];var m=a.g,w=a.f;l=l>=m&&l<=w?0:l<m?m-l:l-w;f=l*l+f*f;f<d&&(d=f,c=a.b)});switch(c){case "#FFEB3B":c="#FFC107";break;case "#CDDC39":c="#8BC34A"}return c},la=function(a){var b=a[1];a=a[2];return.3<=b&&.16<=a&&.9>=a&&.07<=b*a},S=["#FF5E3A","#FF2A68"],T=["#FF9500","#FF5E3A"],U=["#FFDB4C","#FFCD02"],V=["#52EDC7","#5AC8FB"],W=["#1AD6FD","#1D62F0"],X=["#C644FC","#5856D6"],ma={"#F44336":S,"#E91E63":S,"#9C27B0":X,"#673AB7":X,"#3F51B5":W,"#2196F3":W,
"#03A9F4":W,"#00BCD4":V,"#009688":V,"#4CAF50":V,"#8BC34A":V,"#CDDC39":U,"#FFEB3B":U,"#FFC107":U,"#FF9800":T,"#FF5722":T,"#795548":T,"#9E9E9E":["#4A4A4A","#2B2B2B"],"#607D8B":["#DBDDDE","#898C90"]},na=function(a){a=O(a);return ma[a]||[]};h("sirius.color.getRgbDifference",P);h("sirius.color.getMaterial900ColorFrom500",Q);h("sirius.color.selectBestMaterialColor",R);h("sirius.color.getIOSColorPaletteFromMaterialColor",na);h("sirius.color.getIOSColorPalette",function(a){a=R(a);return na(a)});var oa=function(a,b){var c=a.google_template_data.adData[0],d=a.force_google_width&&a.force_google_height?new K(a.force_google_width,a.force_google_height):new K(a.google_width,a.google_height);c.siriusFlagIntentfulClickDelay=1E3;!L()&&(v("iPod")||v("iPhone")||v("Android")||v("IEMobile"))||L()?c.siriusFlagUnclickableBorderSize=320==d.h&&50==d.c?[20,15,20,15]:10:b&&(c.siriusFlagClickAreaOption="button,headline,url")},pa=function(a){a=a.google_template_data.adData[0];a.accentColor&&(a.primaryColor=
a.accentColor);a.mainColor&&(a.secondaryColor=a.mainColor);a.primaryFontFamily&&(a.primaryFontName=a.primaryFontFamily);var b=a.primaryColor?O(a.primaryColor):null,c=a.secondaryColor?O(a.secondaryColor):null;if(b&&c)a.logoBackColor="#ffffff",a.textBackDarkColor=b,a.textBackLightColor=c;else if(b=b?b:"#ffffff",50>P(b,"#ffffff"))a.logoBackColor&&a.textBackDarkColor&&a.textBackLightColor||(a.logoBackColor=b,a.textBackDarkColor="#0D47A1",a.textBackLightColor="#2196F3"),a.secondaryColor&&(a.textBackLightColor=
c);else{var c=R(b),d=Q(c);a.logoBackColor="#ffffff";a.textBackDarkColor=50>P(b,d)?c:d;a.textBackLightColor=b}},qa=function(a){var b=Y;a=a.google_template_data.adData[0];"true"==a.siriusFlagUseWhiteBackground&&(a.logoBackColor="#ffffff",a.textBackLightColor="#ffffff");"false"==a.siriusFlagLogoColorAsButtonColorBannerScream&&delete b.variations.banner.styles.clickTFText.backgroundColor};h("sirius.adsettings.setupRicherTextAdsClick",oa);h("sirius.adsettings.setupScreamV3Colors",pa);var ra=["top","right","bottom","left"],Z=function(a,b,c,d){var g={};g.element=a;a={type:"element"};a.spec=g;if(4!=c.length)throw Error("The anchors should be an array of length 4.");b&&(a.alignments=b);for(b=0;b<ra.length;++b)c[b]&&(a[ra[b]]=c[b]);void 0!==d&&(a.z_index=d);return a};var Y={elements:{adContent:{type:"shape",node_id:"adContent",background_color_ids:"textBackLightColor"},colorSlot1:{type:"shape",node_id:"color-slot1",background_color_ids:"logoBackColor"},colorSlot2:{type:"shape",node_id:"color-slot2",background_color_ids:"textBackDarkColor"},product1MCImage:{type:"product",node_id:"product-image"},text1TFText:{type:"headline",node_id:"headline",background_color_ids:"textBackDarkColor"},text2TFText:{type:"description",node_id:"description",background_color_ids:"textBackLightColor"},
displayUrl:{type:"url",node_id:"display-url",background_color_ids:"textBackLightColor"},clickTFText:{field_name:"clickTFText",type:"button",node_id:"button1",background_color_ids:"textBackDarkColor",weight:1/28}},font_scale_strategy:"mega_title",variations:{square1:{calibrations:["AspectRatioGE 2 0","AspectRatioLE 0.5 0"],styles:{clickTFText:{displayType:"nessieButton"},text1TFText:{padding:"15px 0%"},text2TFText:{padding:"10% 0%"}},logo:Z("product1MCImage","top left",["","30%","65%",""]),colorSlot1:Z("colorSlot1",
"",["0","0","text1 0","0"]),text1:Z("text1TFText","left top",["logo","","text1 30%",""]),colorSlot2:Z("colorSlot2","",["text1 top 0","0","text1 bottom 0","0"]),text2:Z("text2TFText","left",["text1 5px","button","url 0",""]),url:Z("displayUrl","left bottom",["url 30px","button","5px",""]),button:Z("clickTFText","right",["text1 5px","","5px","50%"])},square2:{calibrations:["AspectRatioGE 2.5 0","AspectRatioLE 1.5 0"],styles:{clickTFText:{displayType:"nessieButton"},text1TFText:{padding:"0% 10px"},text2TFText:{padding:"10px 0 0 0"}},
logo:Z("product1MCImage","top left",["","50%","min(30%, 60px)",""]),colorSlot1:Z("colorSlot1","",["0","text1 0","text2 0","0"]),text1:Z("text1TFText","left right top bottom",["","","logo bottom 0px","logo"]),colorSlot2:Z("colorSlot2","",["0","0","text2 0","logo"]),text2:Z("text2TFText","left top bottom",["logo","button","url 5px",""]),url:Z("displayUrl","left bottom",["url 30px","button","5px",""]),button:Z("clickTFText","right",["logo","","0px","50%"])},banner:{calibrations:["AspectRatioLE 2 0"],
styles:{clickTFText:{backgroundColor:"logoBackColor",displayType:"nessieButton"},text1TFText:{padding:"10% 5%"},text2TFText:{padding:"0 15px 0 15px"}},logo:Z("product1MCImage","left",["","70%","","10px"]),colorSlot1:Z("colorSlot1","",["0","text1 10px","0","0"]),text1:Z("text1TFText","left top bottom",["","40%","","logo 20px"]),colorSlot2:Z("colorSlot2","",["0","text2 10px","0","logo 10px"]),text2:Z("text2TFText","top bottom left",["","70px","url 2%","text1 10px"]),button:Z("clickTFText","top bottom",
["5%","","5%","text2"]),url:Z("displayUrl","left bottom",["url 30px","70px","5px","text1 25px"])},tower:{calibrations:["AspectRatioGE 0.8 0"],styles:{clickTFText:{displayType:"nessieButton"},text1TFText:{padding:"20% 0%"}},logo:Z("product1MCImage","top",["","","70%",""]),colorSlot1:Z("colorSlot1","",["0","0","text1 0","0"]),text1:Z("text1TFText","left right top",["logo","10%","40%","10%"]),colorSlot2:Z("colorSlot2","",["text1 top 0","0","text1 bottom 0","0"]),text2:Z("text2TFText","left right top bottom",
["text1 2%","10%","button 2%","10%"]),button:Z("clickTFText","left right bottom",["70%","","url 5%",""]),url:Z("displayUrl","bottom",["url 30px","","5%",""])},smallTower:{calibrations:["AspectRatioGE 2 0"],styles:{adContent:{backgroundColor:"textBackDarkColor"},colorSlot1:{backgroundColor:"logoBackColor"},text2TFText:{backgroundColor:"textBackDarkColor"},clickTFText:{backgroundColor:"logoBackColor",displayType:"nessieButton"},displayUrl:{backgroundColor:"textBackDarkColor",font_level:0}},product1MCImage:Z("product1MCImage",
"top left right bottom",["3%","","63%",""]),textBox1:Z("text1TFText","",["43%","7%","button 3%","7%"]),textBox2:Z("text2TFText","",["43%","7%","button 3%","7%"],1),colorSlot1:Z("colorSlot1","",["0","0","60%","0"]),url:Z("displayUrl","",["43%","7%","button 3%","7%"],2),button:Z("clickTFText","bottom",["70%","","",""])},smallBanner:{calibrations:["AspectRatioLE 0.5 0"],styles:{adContent:{backgroundColor:"textBackDarkColor"},colorSlot1:{backgroundColor:"logoBackColor"},text2TFText:{backgroundColor:"textBackDarkColor"},
clickTFText:{backgroundColor:"logoBackColor",displayType:"nessieButton"},displayUrl:{backgroundColor:"textBackDarkColor",font_level:0}},product1MCImage:Z("product1MCImage","top left right bottom",["","75%","","0%"]),colorSlot1:Z("colorSlot1","",["0","75%","0","0"]),text1:Z("text1TFText","",["10px","button 2%","10px","27%"]),text2:Z("text2TFText","",["2%","button 2%","2%","27%"],1),url:Z("displayUrl","",["12px","button 5%","12px","30%"],2),button:Z("clickTFText","right",["","","","70%"])}}};h("onAdData",function(a){var b=a.google_template_data.adData[0];!b.product1MCImage&&b.logoMCImage&&(b.product1MCImage=b.logoMCImage);"false"==b.siriusFlagLogoColorAsButtonColorBannerScream&&delete Y.variations.banner.styles.clickTFText.backgroundColor;oa(a);pa(a);qa(a);window.renderAd(a,Y,function(){2==parseInt(a.google_template_data.adData[0].logoColorType,10)&&(document.getElementById("product-image").className+=" photo")})});})()
