\n \n \n '+t+"\n "}function u(e){return e.replace("/&/g","&").replace("//g",">").replace('/"/g',""").replace("/'/g","'")}var l=n(4),c=t,g=n(3),f=l.UT_RESPONSE_PROP.BANNER,p=l.UT_RESPONSE_PROP.CONTENT,m="https:"===g.getWindow().document.location.protocol?"https:":"http:";c.getIframe=function(e){var t,n=h(e),r=g.getWindow();if(t=null!==r.document.getElementById(n)?r.document.getElementById(n):r.document.createElement("iframe"),t.id=n,e.alwaysUseXDomainIframe||e.enableSafeFrame){g.logMessage("targetId: "+e.targetId+" is using safeFrame. Loading this ad into sandboxed iframe");var a;e.isMediated?a=apntag.getAdMarkup(e.targetId,e.uuid):(a=o(e),a=u(a),a=""+a);var i={targetId:e.targetId,ad:a,host:r.location.protocol+"//"+r.location.host,geom:e.geom,debug:g.debugTurnedOn(),hasFocus:document.hasFocus(),hostSfSupport:e.safeframe,isMediated:e.isMediated};e.safeframe.meta&&(i.meta=e.safeframe.meta),t.name=JSON.stringify(i),e.safeframe.sandbox&&(t.sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts")}else t.name=n;return t.setAttribute("height",e.initialHeight),t.setAttribute("width",e.initialWidth),t.tabIndex="-1",t.width=e.initialWidth+"px",t.height=e.initialHeight+"px",t.border="0",t.hspace="0",t.vspace="0",t.marginWidth="0",t.marginHeight="0",t.style.border="0",t.scrolling="no",t.frameBorder="0",t},c.loadIeIframe=function(e,t){if(t.alwaysUseXDomainIframe||t.enableSafeFrame)e.src=m+l.EXTERNAL_LIB.SAFE_FRAME_URL;else{var n="";n=o(t);try{e.contentWindow.contents=n}catch(r){e.src="javascript:document.write('')",e.contentWindow.contents=n}var a,i=document.getElementsByTagName("base");i.length&&(a=i.target,i[0].target="_self"),e.src='javascript:window["contents"];',i.length&&(i[0].target=a)}},c.loadIframe=function(e,t){if(t.alwaysUseXDomainIframe||t.enableSafeFrame)e.src=m+l.EXTERNAL_LIB.SAFE_FRAME_URL;else{var n="",r=v(e);n=o(t),r.open("text/html","replace"),r.write(n),r.close()}},c.createIframe=function(e){var t=e.strategy,n=e.data,i=g.getWindow(),o=i.document.createElement("iframe");o.width=0,o.height=0,o.border="0",o.hspace="0",o.vspace="0",o.tabIndex="-1",o.marginWidth="0",o.marginHeight="0",o.style.border="0",o.style.display="none",o.scrolling="no",o.frameBorder="0","WithContent"===t&&r(o,n),"WithAttributes"===t&&a(o,n)};var h=function(e){return l.PREFIX.UT_IFRAME+e.targetId+"_"+g.getUUID()},v=function(e){var t;try{t=e.contentWindow?e.contentWindow.document:e.contentDocument.document?e.contentDocument.document:e.contentDocument}catch(n){g.logError("Error getting iframe document: "+n)}return t}},function(e,t,n){function r(e){e?(I=T.stringContains(e,"http")?e:("https:"===pe.document.location.protocol?"https:":"http:")+"//"+e,T.logMessage("Setting endpoint to: "+I)):T.logError("Cannot set an empty endpoint")}function a(e){return T.logMessage("getTag called for tag "+e),Ue(e)?e&&X[e]?X[e]:void 0:void T.logError("the "+e+" tag is not defined.",A.LOG.WARN)}function i(e){var t="defaultKey";return e.targetId&&(t=e.targetId),t}function o(e,t){T.logMessage("showTag called for "+e),Y[e]=!0;var n=Ue(e);if(n){var r=ve.requests.tags[e];if(r.showTagCalled=!0,r.curWindow=t,r.displayed)return void T.logWarn("Attempting to display ad that is already displayed, will not render this ad again: "+e);ve.requests.utCalled?r.adResponse?(p(r),ve.requests.hasLeft&&Fe()):ve.requests.checkDisplay=!0:T.logWarn(e+" : showTag() called before ad request was made. This placement might not display if a subsequent loadTags() call is not made")}else T.logMessage("the "+e+" tag was loaded before the ad placement was available.",A.LOG.WARN)}function s(e,t,n,r,a){T._each(V[t],function(t){d(e,t,n,r,a)})}function d(e,t,n,r,a){0===n&&(e="Failure to contact endpoint. This can be caused by invalid CORS headers or failure of server to respond.");var i,o=ve.requests.tags[t];o&&(i=k.getAdObj(o.adResponse));var s=k.getAdErrorObj(e,t,a,n);_.emit(r,t,s,i)}function u(e,t,n){T.logMessage("renderAd is called"),T._each(ve.requests.tags,function(e){e.uuid===t&&(e.adResponse=n,n.ad&&n.ad.ad_type===ee&&(e.ad={mediatedContent:n.ad.rtb.banner.content},e.initialHeight=n.ad.rtb.banner.height,e.initialWidth=n.ad.rtb.banner.width),p(e))})}function l(){}function c(e,t){var n=null;if(ve.requests.cbCalled=!0,typeof e===ue||null===e||e.error){var r="malformed response from ad server";e&&e.error&&(r=e.error),T.logError("Error response from impbus: "+r);var a={};try{a=JSON.parse(t)}catch(i){}return void T._each(ve.requests.tags,function(e,t){var n=k.getAdErrorObj(r,t,void 0,200);if(e)var i=k.getAdObj(e.adResponse);T._each(a.tags,function(r){r.uuid===e.uuid&&_.emit(A.EVENTS.BAD_REQUEST,t,n,i)})})}e.debug&&e.debug.debug_info&&S.load(e.debug.debug_info),e.toolkit&&e.toolkit.enabled&&S.loadToolkit(e.tags),T._each(e.tags,function(e){if(e.error)return void T._each(ve.requests.tags,function(t){if(t.uuid===e.uuid){var n="There was an exception from targetId:"+t.targetId+" this usually means there is a setup error on the tag (invalid ID etc)";T.logError(n,e.error);var r=k.getAdErrorObj(n,t.targetId,void 0,200);_.emit(A.EVENTS.BAD_REQUEST,t.targetId,r)}});if(e.ads&&e.ads.length&&e.ads[0].ad_type===Z){var t=g(e);if(!t)return void T.logError("required native assets missing from response")}var r=e.ads,a=O.checkIfMediatedResponse(r);a?T._each(ve.requests.tags,function(t,a){if(t.uuid===e.uuid){t.utCalled=!0,t.isMediated=!0;var i=O.getMediationType(r),o=O.getMediationOptions(ve.requests.tags,e);if(i===te)n=k.getAdObj(e),_.emit(A.EVENTS.AVAILABLE,a,n),O.callMediationFramework(i,e,o,u);else{var s=O.getContentForBannerMediation(t.targetId,e);e.ad={ad_type:ee},t.ad={mediatedContent:s},f(t,e,a)}}}):T._each(ve.requests.tags,function(t,n){f(t,e,n)})}),ve.requests.checkDisplay&&Fe()}function g(e){var t,n={};T._each(Q,function(n){n.uuid===e.uuid&&(t=n)}),t&&(n=t["native"]);var r=[];T._each(n,function(e,t){e.required===!0&&r.push(t)});var a=k.getAdObj(e),i=[];T._each(a["native"],function(e,t){T.isEmpty(e)||i.push(t)});var o=i.length>0;return T._each(r,function(e){o=o&&i.indexOf(e)>-1}),o}function f(e,t,n){var r;e.uuid===t.uuid&&(t.nobid===!0?(T.logMessage("No bid for targetId:"+e.targetId),r=k.getAdObj(t),_.emit(A.EVENTS.NO_BID,n,r)):(e.adResponse=t,e.utCalled=!0,r=k.getAdObj(t),_.emit(A.EVENTS.AVAILABLE,n,r),e.prebid||e.displayed||p(e)))}function p(e){var t,n,r,a,i=pe,o=e.adResponse;if(e.adResponse&&e.adResponse.ads){var s=T.getAdObjFromAdsArray(e.adResponse.ads);if(s.banner){var d=e.initCollapsed,u=d&&d.expandBy&&T.values(fe).indexOf(d.expandBy)>=0;d&&!u&&T.logWarn("TagID "+e.tagId+" initCollapsed is set but expandBy is not recognized, initial size will not be collapsed"),e.initialHeight=u?0:s.banner.height,e.initialWidth=u?0:s.banner.width}}if(r=O.getAdObjByMediation(e),null===r||typeof r.error!==ue)return void y(o);if(typeof o!==ue&&e.showTagCalled){if(o&&r.renderer_url&&r.renderer_id){var l=r.renderer_id,c=O.getContentSourceForMediation(r);if(typeof c===ue)return void T.logError("No Content Source Found");if(r[r.ad_type]=c,L[l]){var g=L[l];T.isFn(g)||T.isObj(g)?(v(e),O.copyAdObjforMediation(e),N.invokeRendererRenderAd(g,e,m),e.displayed=!0,a=k.getAdObj(e.adResponse),_.emit(A.EVENTS.LOADED,e.targetId,a),T.logTimestamp("The "+e.targetId+" ad is loaded.")):(W[l]=typeof W[l]===ue?[]:W[l],W[l].push(e))}else T.loadScript(pe,r.renderer_url),W[l]=typeof W[l]===ue?[]:W[l],W[l].push(e),L[l]=!0}else if(r[$]===Z)T.logMessage("Render for the following ad should be handled outside of ast.js :"+e.tagId),e.displayed=!0,a=k.getAdObj(e.adResponse),_.emit(A.EVENTS.LOADED,e.targetId,a),T.logTimestamp("The "+e.targetId+" ad is loaded.");else{if(r[$]===te)return void T.logWarn("Response has no renderer for video");if(r[$]===ee){if(!e.isMediated){var f=r[ie][ne];if(T.isEmpty(f)||typeof f!==le)return void T.logError("Response has no banner object");if(!T.hasOwn(f,re))return void T.logError("Response has no banner content");if(!T.hasOwn(f,"width"))return void T.logError("Response has no banner width");if(!T.hasOwn(f,"height"))return void T.logError("Response has no banner height")}var p;T.hasOwn(J,e.targetId)&&(p=J[e.targetId]);var h;if(e.alwaysUseXDomainIframe||e.enableSafeFrame){me(),h=i.document.getElementById(e.targetId);var b=h.style.height,E=h.style.width;h.style.height=e.initialHeight,h.style.width=e.initialWidth,h.style.height=b,h.style.width=E}var w=T.cloneAsObject(K);T.hasOwn(e.safeframe,"expansionByPush")&&(w.expansionByPush=e.safeframe.expansionByPush),T.hasOwn(e.safeframe,"expansionByOverlay")&&(w.expansionByOverlay=e.safeframe.expansionByOverlay),T.hasOwn(e.safeframe,"sandbox")&&(w.sandbox=e.safeframe.sandbox),T.hasOwn(e.safeframe,"meta")&&(w.meta=e.safeframe.meta),e.safeframe=w,n=Oe(e),(e.alwaysUseXDomainIframe||e.enableSafeFrame)&&(n.style.height=e.initialHeight+"px",n.style.width=e.initialWidth+"px",n.style.display="block",h.appendChild(n),e.geom=M.geomInit(e.targetId,n)),t=R.getIframe(e);var I=P.getInstance(),S={};if(S.iframe=t,S.originalWidth=e.initialWidth,S.originalHeight=e.initialHeight,I.add(e.targetId,S),J[e.targetId]=t,typeof p!==ue&&i.document.getElementById(p.id)?n.replaceChild(t,p):n.appendChild(t),e.displayed=!0,i.document.body)try{Se(e,n,t)}catch(x){T.logError("Error rendering ad: "+x.message)}else T.logError("Error rendering ad: window.document.body is undefined")}else T.logError("Error rendering ad: unknown type")}j.push(e.targetId)}}function m(e,t){var n=h(e),r=k.getAdObj(n.adResponse);T.logMessage("handling event for DOM ID: "+r.targetId+" eventType : "+t),t=t===A.RENDERER_EVENTS.LOADED?"adLoaded":t,t===A.EVENTS.LOADED?_.emit(A.EVENTS.LOADED,r.targetId,r):_.emit(t,r.targetId)}function h(e){var t={};return T._each(ve.requests.tags,function(n){e!==n.uuid&&e!==n.targetId||(t=n)}),t}function v(e){if(!e||!e.isMediated){var t=O.getAdObjByMediation(e);T.loadPixelUrl(pe.document.body,t[ae],t[ce])}}function y(e){T.loadPixelUrl(pe.document.body,e[oe],e.uuid)}function b(e,t){for(var n=e[ie][de][0][se],r=0;rs.width&&("center"===e.promoAlignment?i.setAttribute("align","center"):i.setAttribute("align","left")),T.logMessage("The "+e.targetId+" ad is loaded."),T.logTimestamp("The "+e.targetId+" ad is loaded.");var u=k.getAdObj(e.adResponse);_.emit(A.EVENTS.LOADED,e.targetId,u)}else T.logWarn("No div element found for display ad. This ad will not show. Div id: "+e.targetId)},xe=function(e){if(e.rid&&(ve.requests.keywords.rid=e.rid),e.provider_id&&(ve.requests.keywords.provider_id=e.provider_id),e.debug&&(ve.debug=e.debug),e.astToolkit&&e.astDongle&&(ve.requests.toolkit={enabled:!0,dongle:e.astDongle}),e.size)return void T.logError("Size is deprecated, please use sizes instead.");if(e.member||(e.member=ve.requests.member),e.member||(e.member="none"),!(e.tagId||e.invCode&&e.member))return void T.logError("tagId or (invCode & memberId) should be defined for targetId: "+e.targetId);if(!e.sizeMapping||w(e))try{var t=e.targetId,n=Pe(e,t);return T.logMessage("defineTag called for: "+t),ve.requests&&ve.requests.utCalled===!0&&!ve.requests.tags[t].utCalled&&T.logMessage("A placement was loaded after ut call was started. These ad calls will not be coordinated"),n}catch(r){T.logError("buildAdTagContainer: "+r.message)}},ke=function(e){ve.requests.utCalled=!1,ve.requests.hasLeft=!1,ve.requests.cbCalled=!1,ve.requests.errorReported=!1;var t=T.getTargetArrayforRefresh(e),n=Re(t);T._each(n,function(e,t){T._each(j,function(e){if(t===e){var n=pe.document,r=n.getElementById(e);if(!r)return;for(;r.hasChildNodes();)r.removeChild(r.firstChild)}})}),T._each(n,function(e){e.utCalled=!1,e.displayed=!1});try{Ce()}catch(r){T.logError("refreshTags "+r.message)}},Ne=function(){ke(this.targetId)},Re=function(e){var t={};return 0===e.length?ve.requests.tags:(T._each(ve.requests.tags,function(n,r){for(var a=0;a>>0;if(0===a)return-1;var i=+t||0;if(Math.abs(i)===1/0&&(i=0),i>=a)return-1;for(n=Math.max(i>=0?i:a-Math.abs(i),0);n');",n+=""}},function(e,t,n){function r(){var e=document.createElement("iframe");return e.id="appnexus-debug-console-loader",e.height="100%",e.width="100%",e.border="0px",e.hspace="0",e.vspace="0",e.marginWidth="0",e.marginHeight="0",e.style.border="0",e.frameBorder="0",e}function a(){var e;return p.ls&&(e=p.ls.getItem("ast_dongle")),'
AST Dongle Value:
"}function i(e){var t=e.map(function(e){return'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Target ID'+o(e)+"
Creative ID"+s(e,"creative_id")+"
Buyer Member ID"+s(e,"buyer_member_id")+"
Creative Size"+d(e)+"
Available Sizes"+u(e)+"
Winning Bid"+s(e,"cpm")+"
Demand Source"+l(e)+"
Ad Type"+s(e,"ad_type")+"
Media Type"+s(e,"media_type_id")+'
\n Console Ad Profile:\n '+e.ad_profile_id+"\n "+f(e)+"\n
\n "}).join(" ");return t}function o(e){try{return Object.keys(apntag.requests.tags).filter(function(t){return apntag.requests.tags[t].uuid===e.uuid})[0]}catch(t){return""}}function s(e,t){if(e.nobid)return h;var n=e.ads&&e.ads[0][t];return n||0===n?n:""}function d(e){if(e.nobid)return h;var t=null,n=null,r=e.ads&&e.ads.length?e.ads[0]:{};return r.rtb&&r.rtb.banner&&(t=r.rtb.banner.height,n=r.rtb.banner.width),t&&n?n+" x "+t:""}function u(e){try{var t=o(e),n=apntag.requests.tags[t].sizes;return JSON.stringify(n)}catch(r){return""}}function l(e){if(e.nobid)return h;var t="",n=c(e);return t=e.ads[0].csm?"CSM":e.ads[0].buyer_member_id===n||e.ads[0].deal_id?e.ads[0].buyer_member_id!==n&&e.ads[0].deal_id?"Deal":e.ads[0].buyer_member_id===n?"Direct":"":"RTB"}function c(e){var t=apntag.requests.tags;if(e.ads.length&&e.ads[0].seller_member_id)return e.ads[0].seller_member_id;for(var n in t)if(t.hasOwnProperty(n)&&t[n].uuid===e.uuid)return t[n].member;return null}function g(e){return"//console.appnexus.com/ad-quality?id="+e.placement.publisher.id}function f(e){if(!e.ads)return"";var t="//ib.adnxs.com/cr?id="+e.ads[0].creative_id;return'| Creative Preview'}var p=n(6),m=t;m.load=function(e){e=e.replace(/(\n)/g,"
"),e=a()+e;var t=document.body,n=document.createElement("div");n.id="appnexus_debug_window";var i=document.createElement("div");i.style.width="100%",i.style.height="400px",i.style.clear="both",t.insertBefore(i,null);var o=n.style;o.position="fixed",o.bottom="0px",o.left="0px",o.width="100%",o.height="450px",o.overflow="hidden",o["border-top"]="1px solid",o["z-index"]=999999,o.background="white",t.insertBefore(n,null);var s=document.createElement("div");s.style.width="100%",s.style.height="30px";var d=r();n.appendChild(d);var u=d.contentWindow.document;d.onload=function(){var e,t,n=u.getElementsByTagName("br"),r=n.length,a=0;for(a;a519,c=e===t,!c&&m&&e[m])be&&(!A||A>0&&A<8||"BackCompat"===_)&&(d=t.clientLeft,u=t.clientTop),l=e[m](),g.t=l.top,g.l=l.left,(d||u)&&(g.l-=d,g.t-=u),(n.y||n.x)&&(!Te.ios||Te.ios>=4.2)&&(g.l+=n.x,g.t+=n.y);else{for(;(r=r[Pe])&&a(r)&&i!==r;)d=r[Be],u=r[qe],g.t+=u,g.l+=d,I&&(g=p(r,g)),i=r;if("fixed"!=o.position){for(r=e,i=Ee;(r=r[Ve])&&a(r)&&i!==r&&r!=t;)y=r[Ce],b=r[De],Oe&&(s=f(r),"visible"!=s[se]&&(g=p(r,g,s))),(y||b)&&(g.l-=b,g.t-=y),i=r;g.l+=n.x,g.t+=n.y}else g.l+=n.x,g.t+=n.y}e==t?(w=e[We],E=e[Le]):(w=e[Fe],E=e[Ue]),g.b=g.t+w,g.r=g.l+E,g.w=ge(E,0),g.h=ge(w,0), g.z=o.zIndex}catch(O){g={t:0,l:0,r:0,b:0,w:0,h:0,z:0}}return g}function a(e){return 1===i(e)}function i(e){var t=b(e&&e.nodeType,-1);return t}function o(e){return e=s(e),e&&e.search(/\D+/g)==-1?we:e&&e.search(/px/gi)!=-1?we:void 0}function s(e){var t=typeof e;return t==te?e:t!=ne||e?t==ee&&e&&e.join?e.join(""):e===!1?"false":e===!0?"true":e?le(e):"":"0"}function d(e){var t=0;return parseFloat(e.replace(/\./g,function(){return 1==t++?"":"."}))}function u(e,t,n){var r=e&&e.match(t);return n==Ee?r:r&&r[n]||Ee}function l(e,t){return e.test(t)}function c(){var e,t={};t.ie=t.opera=t.gecko=t.webkit=t.safari=t.chrome=t.air=t.ipod=t.ipad=t.iphone=t.android=t.webos=t.silk=t.nodejs=t.phantomjs=0,t.mobile=t.ios=t.caja=he&&he.cajaVersion;var n=ve;return n&&(l(/KHTML/,n)&&(t.webkit=1),l(/IEMobile|XBLWP7/,n)&&(t.mobile="windows"),l(/Fennec/,n)&&(t.mobile="gecko"),e=u(n,/AppleWebKit\/([^\s]*)/,1),e&&(t.webkit=d(e),t.safari=t.webkit,l(/PhantomJS/,n)&&(e=u(n,/PhantomJS\/([^\s]*)/,1),e&&(t.phantomjs=d(e))),l(/ Mobile\//,n)||l(/iPad|iPod|iPhone/,n)?(t.mobile="Apple",e=u(n,/OS ([^\s]*)/,1),e=e&&d(e.replace("_",".")),t.ios=e,t.ipad=t.ipod=t.iphone=0,e=u(n,/iPad|iPod|iPhone/,0),e&&(t[e[re]()]=t.ios)):(e=u(n,/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/,0),e&&(t.mobile=e),l(/webOS/,n)&&(t.mobile="WebOS",e=u(n,/webOS\/([^\s]*);/,1),e&&(t.webos=d(e))),l(/ Android/,n)&&(t.mobile="Android",e=u(n,/Android ([^\s]*);/,1),e&&(t.android=d(e))),l(/Silk/,n)&&(e=u(n,/Silk\/([^\s]*)\)/,1),e&&(t.silk=d(e)))),e=n.match(/(Chrome|CrMo)\/([^\s]*)/),e&&e[1]&&e[2]?(t.chrome=d(e[2]),t.safari=0,"CrMo"===e[1]&&(t.mobile="chrome")):(e=u(n,/AdobeAIR\/([^\s]*)/),e&&(t.air=e[0]))),t.webkit||(e=u(n,/Opera[\s\/]([^\s]*)/,1),e?(t.opera=d(e),e=u(n,/Opera Mini[^;]*/,0),e&&(t.mobile=e)):(e=u(n,/MSIE\s([^;]*)/,1),e?t.ie=d(e):(e=u(n,/Gecko\/([^\s]*)/),e&&(t.gecko=1,e=u(n,/rv:([^\s\)]*)/,1),e&&(t.gecko=d(e))))))),t}function g(e){var t,n=Ee,r="parentWindow",a="defaultView";try{e&&(n=e[r]||e[a]||Ee,n||(t=h(e),n=t&&(t[r]||t[a])||Ee))}catch(i){n=Ee}return n}function f(e){var t;if(g(e).getComputedStyle)try{t=g(e).getComputedStyle(e,Ee)}catch(n){t=Ee}else try{t=e.currentStyle}catch(n){t=Ee}return t}function p(e,t,n){var r=0,a=0,i=/^t(?:able|d|h|r|head|foot)$/i;return n=n||f(e),n&&(r=n.borderTopWidth,a=n.borderLeftWidth,r=o(r)?b(r,0):0,a=o(a)?b(a,0):0,Oe&&i.test(w(e))&&(r=a=0)),t=t||{t:0,l:0},t.t+=r,t.l+=a,t}function m(e){return e&&(e.parentNode||e.parentElement)}function h(e){var t,n=Ee;try{e&&(t=i(e),n=9==t?e:e[de]||e.ownerDocument||Ee)}catch(r){n=Ee}return n}function v(e){var t=e&&h(e)||B,n=t[U],r=t[F];return n&&!Se&&"CSS1Compat"!=n&&(r=t.body),r}function y(e){var t,n,r,a,i=[-1,-1,-1,-1],s=[X+"Top",X+"Right",X+"Bottom",X+"Left"],d=0;if(!e)return i;if(_e)for(;n=s[d];)t=e[n],o(t)&&(t=b(t,-1),t>=0&&(i[d]=t)),d++;else if(t=e[X],t&&t.search(/\d+/g)!=-1)for(t=t.replace(/\w+\(([^\)]*?)\)/g,"$1"),i=t.split(" "),i=i[oe]<=1?i.split(","):i,a=i[oe],d=0;a--;)r=i[d],o(r)?i[d]=b(r,-1):i[d]=-1,d++;return i}function b(e,t,n,r){if(typeof e!=ne)try{e=e?parseFloat(e):Q.NaN}catch(a){e=Q.NaN}return r==Ee&&(r=K),n==Ee&&(n=$),(isNaN(e)||er)&&t!=Ee?t:e}function E(e,t){var n=Ie,r=e&&e[L]||-1,a=t&&t[L]||-1;if(1==r&&a!=-1)if(e[z])if(Se||1==a)n=e[z](t);else for(;t;){if(e===t){n=we;break}t=t.parentNode}else e[Z]&&(n=e===t||!!(16&e[Z](t)));return n}function w(e){return e&&1==e[L]&&e.tagName[re]()||""}function I(e,t,n){try{arguments[oe]>2?n===Ee?e[J](t):(n=s(n),"class"==t[re]()?e.className=n:e[Y](t,n)):n=s(e[G](t))}catch(r){n=""}return n}function T(){return(new Date).getTime()}function _(){return ce.round(100*ce.random())}function A(e){return s([e||"","_",T(),"_",_(),"_",xe++])}function O(e){var t,n,a,i,o,s,d,u,l,c,g,f,p,m,y,b,w=r(e),T=h(e),_=v(T),O=w.t,S=w.l,k=V,N=[],R=0;if(N.on=0,t=w.w,n=w.h,a=pe(t/k),i=pe(n/k),o=a,s=i,t<=1||n<=1||a<1||i<1)return N;if(b=x(),y=b.y,m=b.x,f=S+t,p=O+n,T&&_&&T[ie]){for(;oA&&(u=_-A),!d&&N>R&&(d=N-R),pe?(T>A&&(h=0,E=(me[je]||0||_)+ie.x,h>i&&(i=h),ER&&(p=0,I=(me[ze]||0||N)+ie.y,p>a&&(a=p),Ii&&(i=h,he.left=ee),EA&&(ce.push(ee),Z=we)),P[3]>0&&(z=h+P[3],z>i&&(i=z,he.left=ee)),P[1]>0&&(V=E+P[1],Va&&(a=p,he.top=ee),IR&&(ce.push(ee),Z=we))),P[0]>0&&(U=p+P[0],U>a&&(a=U,he.top=ee)),P[2]>0&&(F=$.t+P[2],Fg?g:B,q=fe(E,V)-ge(h,z),q=q<0?0:q,q=q>c?c:q,UI?I<=U?le.b=0:le.b=ge(F-I,0):le.b=0,zE?E<=z?le.r=0:F<=p?le.r=0:le.r=ge(V-E,0):le.r=0,le.w=ge(le.r-le.l,0),le.h=ge(le.b-le.t,0),le.xiv=c>0?b((q/c)[ae](2)):0,le.yiv=g>0?b((B/g)[ae](2)):0,le.iv=c>0||g>0?b((q*B/(c*g))[ae](2)):0,le.civ=0,n&&(Q=le.iv,Q>.49&&(K=O(e),Y=K[oe],J=b(K.on,0),J&&(X=1-b((J/Y)[ae](2),0),le.civ=le.iv=X))),t.rect=ne,t.clipRect=ue,t.docRect=de,ce[oe]?(t.isRoot=Ie,t.canScroll=we,le.xs=!!d,le.ys=!!u):re.b>=ue.b||re.r>=ue.r?(t.isRoot=we,le.xs=!!(de.w>re.w&&d),le.ys=!!(de.h>re.h&&u),t.canScroll=de.w>re.w||de.h>re.h):le.ys=le.xs=t.isRoot=t.canScroll=Ie,t.scrollNodes=ce,t.clipNodes=he,t.expRect=le,le}function N(e){var t=e&&g(e)||me,n=t.innerHeight||0,r=t.innerWidth||0,a=t.screenY||t.screenTop||0,i=n+a,o=t.screenX||t.screenLeft||0,s=r+o,d=v(e);return n||r||!d||(n=d.clientHeight||0,r=d.clientWidth||0,s=o+r,i=a+n),{t:a,l:o,b:i,r:s,w:r,h:n}}function R(e,t,n){var r,a,i,o={},s={};if(k(t,s,we),!n&&!s.isRoot&&s.canScroll&&(a=s.expRect,a.xs||a.ys)){D(e),r=[],ke[e]=r;for(var d=0;d0)||(i.logInfo("No size mapping defined"),!1)}var a,i=n(3),o=t;o.mapSizes=function(e){if(!r(e.sizeMapping))return e.sizes;var t,n=o.getScreenWidth();if(!n){t=e.sizeMapping[0];for(var a=0;aparseInt(t.minWidth,10)&&(t=e.sizeMapping[a]);return t.sizes?t.sizes:e.sizes}for(var s="",d=e.sizeMapping.slice().sort(function(e,t){return e.minWidth-t.minWidth}),u=0;u=d[u].minWidth&&(t=d[u]);return t&&t.sizes?(s=t.sizes,i.logMessage("tag : "+e.targetId+" resized based on device width to : "+s)):i.logMessage("tag : "+e.targetId+" not mapped to any sizes for device width. This request will be suppressed."),s},o.getScreenWidth=function(e){var t=e||a||i.getWindow(),n=t.document;return t.innerWidth?t.innerWidth:n.body.clientWidth?n.body.clientWidth:n.documentElement.clientWidth?n.documentElement.clientWidth:0},o.setWindow=function(e){a=e}},function(e,t){"use strict";function n(){var e=document.createElement("div");e.id="cookiemsg-slider";var t='";return e.innerHTML=t+h,e}function r(e){y.setParentNode(e);var t=y.getContainer().querySelector("#ancookie-close");t.addEventListener("click",function(){e.remove()});var n=a();n(),window.addEventListener("resize",n)}function a(){var e;return function(){var t=y.getSliderElement(),n=d(t),r=y.getMessageElement();r.setAttribute("style","-webkit-transition: none; -webkit-transform: translateX(0); -webkit-column-width: "+n+"px;");var a=y.getNav();a.innerHTML="",clearTimeout(e),e=setTimeout(function(){clearInterval(m),r.style.webkitTransition="opacity 0.3s ease-out",r.style.opacity=1;var e=t.scrollWidth+10,o=Math.round(e/n);1";e.innerHTML=t}function d(e){return e.offsetWidth}function u(e){e&&e.override&&(b=e.override),e&&e.cookieUrl&&(E=e.cookieUrl);var t=window.addEventListener?"addEventListener":"attachEvent",n=window[t],r="attachEvent"==t?"onload":"load";"complete"===document.readyState||"interactive"===document.readyState?l():n(r,function(e){l()},!1)}function l(){if(!w){w=!0;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);if(!e)return void console.log("Not safari, skipping link override");p(),c(E,g)}}function c(e,t){var n;try{n=new XMLHttpRequest}catch(r){return}n.open("GET",e),n.withCredentials=!0,n.onreadystatechange=function(){if(4===n.readyState&&200===n.status)try{var e=JSON.parse(n.responseText);t(e)}catch(r){console.error(r)}},n.send()}function g(e){console.log(e.uid);var t=parseInt(e.uid,10)||0;0===t&&f()}function f(){console.log("Perfoming link override.");for(var e=0;e

Leeds boxer Nicola Adams meets the Queen

Queen Elizabeth II meets Nicola Adams at Buckingham Palace.  Photo credit: John Stillwell/PA Wire
Queen Elizabeth II meets Nicola Adams at Buckingham Palace. Photo credit: John Stillwell/PA Wire

BOXER Nicola Adams and former England football captain David Beckham joined the Queen at Buckingham Palace to celebrate the achievements of young people from across the Commonwealth.

Leeds-born Adams was also joined by former Prime Minister Sir John Major and comedian and actor Sir Lenny Henry for the Queen’s Young Leaders awards ceremony.

The Queen’s Young Leaders Programme, now in its fourth and final year, celebrates the achievements of young people from across the Commonwealth working to improve the lives of people.

The Duke and Duchess of Sussex, who also attended the event, met youngsters who have helped make changes in their communities, including mental health advocates and those tackling domestic violence.

The finalists also got to meet the host of celebrities, including television presenter Ore Oduba, journalist Tina Daheley and model Neelam Gill.

Trade-in for the Win
Trade-in for the Win
Claim up to £200 when you order a Lenovo ThinkPad T, X ,E or L series with Windows 10 Pro.
Promoted by Lenovo

This year’s finalists, from across 38 countries, are working on issues including supporting people living with mental health problems, access to education, promoting gender equality and climate change.