(function() { function bxBootstrap() { var re = /bot|crawl|slurp|spider|mediapartners|headlesschrome|snap-prefetch|remotasks|woorank|uptime\.com|facebookexternalhit|facebookcatalog/i; if (re.test(navigator.userAgent) || navigator.userAgent == '') { return; } if (!(window.bouncex&&bouncex.website)) { var pushedData = []; if(window.bouncex && bouncex.push && bouncex.length){ pushedData = bouncex; } window.bouncex = {}; bouncex.pushedData = pushedData; bouncex.website = {"id":2823,"name":"Conde Nast - Vanity Fair","cookie_name":"bounceClientVisit2823","domain":"VanityFair.com","ct":"bind_to_domain","ally":1,"ei":0,"tcjs":"","cjs":"/* enable.feature.DISABLE_RELOAD_CAMPAIGNS_V2 */\n\n// PD: https://www.wrike.com/open.htm?id=322595888\nbouncex.report_ga = function(action, label, bypass) {\n var parsedAction = action.replace(/[a-z]/, function(letter) { return letter.toUpperCase(); });\n if (window.dataLayer) {\n window.dataLayer.push({'event': 'BounceX '+parsedAction, 'bouncex-action':label});\n }\n};\n\n(function () {\n\twindow.bouncex = window.bouncex || {};\n\n\twindow.bouncex.addAllyFeatures = function (params) {\n\t\tif (!params || !params.campaignId ) { return false; }\n\n\t\tvar $campaign = window.bouncex.campaigns[params.campaignId].obj1;\n\n /* focus on first actionable element*/\n if(!bouncex.browser.android && !bouncex.browser.iphone && !bouncex.browser.ipad) {\n $campaign.find('form').addClass('bx-ally-no-focus');\n }\n\n $campaign.find('.bx-close').attr('role','button');\n \n bouncex.on(bouncex.document, 'bxValidateFormComplete.bx-' + params.campaignId, function(e){\n var $nextStep = $campaign.find('.bx-step-'+(bouncex.campaigns[params.campaignId].current_step));\n if(!e.response || !e.response.errors || e.response.errors.length === 0 && (params.campaignId === e.campaign_id)){\n $campaign.removeAttr('role');\n var step2labelID = $nextStep.find('.bx-row-image-logo h2').attr('id'),\n step2descrID = $nextStep.find('.bx-group-primary').attr('id');\n $campaign.attr({'aria-labelledby' : step2labelID, 'aria-describedby': step2descrID});\n $campaign.attr('role', 'dialog');\n } \n });\n \n\t\tparams.steps.forEach(function (step, i) {\n var $step = $campaign.find('.bx-step-'+step.step_number);\n\n /* Associate microcopy with input */\n if(step.hasMicroCopy){\n var $inputRow = $step.find('.bx-row-input'),\n $emailInput = params.eCap ? $inputRow.find('input[type=\"email\"]') : $inputRow.find('input'),\n $micro = $step.find('.bx-group-micro'),\n privacyPolicyIds = '';\n \n if($emailInput.length > 0 && $micro.length > 0){\n $micro.find('.bx-row-text >*:first-child p').each(function(x,y){\n var privacyPolicyId = 'bx-micro-'+params.campaignId+'-'+(x+1)+'-step-' + (i+1);\n y.setAttribute('id', privacyPolicyId);\n y.setAttribute('tabindex', '-1');\n privacyPolicyIds += privacyPolicyId + ' ';\n });\n var validationID = $inputRow.find('.bx-vtext').attr('tabindex', '-1').text('').attr('id');\n $emailInput.attr('aria-describedby', privacyPolicyIds + validationID);\n }\n }\n\n\t\t});\n\n\t};\n\n})();\n\nbouncex.et.onVisible('#onetrust-accept-btn-handler', function(){\n bouncex.setVar('ccpa_cali', false);\n setBounceCookie();\n bouncex.reload_campaigns();\n});\n\njQuery('#onetrust-accept-btn-handler').on('click', function(){\n bouncex.setVar('ccpa_cali', true);\n setBounceCookie();\n bouncex.reload_campaigns();\n});\n\nbouncex.et.onVarChange('registration_wall', function(){\n if (bouncex.vars.registration_wall) {\n bouncex.setVar('reg_gate_url', window.location.pathname);\n }\n});\n\nif (bouncex.vars.reg_gate_url === window.location.pathname && !bouncex.vars.registration_wall) {\n bouncex.setVarAndReload('reg_gate_suppression', true);\n}","force_https":false,"waypoints":false,"content_width":900,"gai":"","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":1,"gmp":0,"whitelist_check":0},"burls":[{"prop":"contains","val":"video.vanityfair."},{"prop":"contains","val":"hollywood-portfolio"},{"prop":"contains","val":"/subscribe/vanityfair/149976"},{"prop":"contains","val":"paid-revops"}],"ple":false,"fbe":true,"mas":2,"map":1,"gar":true,"ete":1,"ettm":true,"etjs":"","dge":false,"bxidLoadFirst":false,"pie":false,"cme":false,"gbi_enabled":0,"bpush":false,"pt":null,"els":{"endcap":".content-footer__bottom .content-bottom-anchor","infeed":"article p:not(.byline):not(.has-dropcap):contains( )+p:not(.byline):not(.has-dropcap):contains( ), article p:not(.byline):not(.has-dropcap):contains( )+.bxc+p:not(.byline):not(.has-dropcap):contains( )","masthead":".ad__slot.ad__slot--hero, #cns-ads-slot-type-post-nav-0"},"vars":[{"name":"page_type","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var page_type;\n\n if (jQuery('.article.main-content').length > 0){\n page_type = 'article';\n } else if (jQuery('div.channel-subchannel').length > 0){\n page_type = 'category';\n } else if (jQuery('div[data-attribute-verso-pattern=\"gallery-body\"]').length > 0){\n page_type = 'gallery';\n } else if ( jQuery('form[name=\"account-sign-in\"]').length > 0){\n return 'login';\n } else if (window.location.origin.includes('subscribe.vanityfair')) {\n return 'subscription';\n }\n\n return page_type ? page_type : null;\n})();","trigger":""},{"name":"modal_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.account-modal.open').is(':visible') ? true : null;","trigger":""},{"name":"video_visible","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('iframe[title=\"Video Player\"]').length > 0;","trigger":""},{"name":"article_name","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.page_type === 'article' || bouncex.vars.page_type === 'gallery' ? jQuery('meta[property=\"og:title\"]').prop('content') : null;","trigger":""},{"name":"article_category","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (bouncex.vars.page_type === 'article' || bouncex.vars.page_type === 'gallery'){\n return bouncex.utils.getNestedProp('cns.pageContext.channel', false);\n }\n})();","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.newsletter-confirmation').is(':visible') || null;","trigger":""},{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.gtmLookup('user.account.loginStatus');","trigger":""},{"name":"ever_logged_in","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"subscription_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('div[id*=\"google_ads_iframe_3379/vanityfair.cm\"] iframe:visible').first().contents().find('span[class*=\"btn-close\"]').length === 1 || jQuery('div[id*=\"google_ads_iframe_3379/vanityfair.cm\"] iframe:visible').first().contents().find('.btn-close').length === 1 ","trigger":""},{"name":"dfp_rblock","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (!bouncex.dfpRan) {\n bouncex.dfpRan = true;\n return 'not_ready';\n }\n function check() {\n bouncex.dfp_loaded = false || bouncex.dfp_loaded;\n \n var event = bouncex.gbi2.getDfpEndPageViewEvent();\n \n if (event && event.dfp_status) {\n if (event.dfp_status == 'pending') {\n return 'not_ready';\n } \n \n bouncex.dfp_loaded = true;\n\n if (event.dfp_status == 'suppressed') {\n return 'sponsor';\n }\n\n return 'allow';\n }\n\n return 'not_ready';\n }\n\n if (bouncex.website.gbi.rblocks) {\n if (bouncex.dfp_loaded) {\n return null;\n } else if (window.googletag && googletag.apiReady && googletag.pubadsReady && bouncex.gbi2) {\n return check();\n } else if (typeof window.googletag === 'undefined') {\n return 'no_googletag';\n }\n return 'fallback';\n } else {\n return 'not_ready';\n }\n})()","trigger":""},{"name":"paywall","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"document.querySelectorAll('#cm_paywall_bar_call_to_action_0 iframe').length > 0;","trigger":"pageload"},{"name":"submitted_email_royalwatch","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_email_daily","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_email_hive","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_email_hwd","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_email_buyline","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_email_awards","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_jong_faster_politics","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_levin_report","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_vanities","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_email_gameofthrones","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"privacy_popup_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"document.querySelectorAll('iframe#privacy-policy-user-agreement-popup').length > 0;","trigger":"pageload"},{"name":"cn_email_subscriber","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.cookies.read('CN_segments') && bouncex.utils.cookies.read('CN_segments').indexOf('en.nl') > -1;","trigger":"pageload"},{"name":"cn_site_subscriber","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.cookies.read('CN_segments') && bouncex.utils.cookies.read('CN_segments').indexOf('en.vyf.a') > -1;","trigger":"pageload"},{"name":"ccpa_cali","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"true","code":"null;","trigger":"pageload"},{"name":"bottombar_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.bx-type-conversionbar.bx-impress').is(':visible');","trigger":"pageload"},{"name":"topbar_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.bx-type-nanobar.bx-impress').is(':visible');","trigger":"pageload"},{"name":"order_form","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n\tvar str = bouncex.utils.getNestedProp('circ.campaignName', '', HEARST).toLowerCase();\n\tvar badMatches = str.match(/remail|_dm/g);\n\t\n\tif (!!badMatches) return false;\n\n if (str.includes('_nat_')) {\n return '_nat_';\n } else if (str.includes('eml')) {\n return '_eml_';\n } else if (str.includes('email')) {\n return '_eml_';\n } else {\n return false;\n }\n})();","trigger":"pageload"},{"name":"registration_wall","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.registration-gate').length > 0 || jQuery('.paywall-modal__subscribe-container').length > 0;","trigger":"pageload"},{"name":"ecommerce_keyword","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('meta[name=keywords]').length > 0 && jQuery('meta[name=keywords]').attr('content').indexOf('ecommerce') > -1;","trigger":"pageload"},{"name":"reg_gate_submitted","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.paywall-bar__screen--sign-in:visible').length > 0 || null;","trigger":"pageload"},{"name":"half_paywall","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.paywall-bar__consumer-marketing-unit:visible').length > 0 && jQuery('.paywall-bar__consumer-marketing-unit:visible').css('height') === '300px';","trigger":"pageload"},{"name":"full_paywall","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.paywall-modal__subscribe-container').css('visibility') === 'visible';","trigger":"pageload"},{"name":"keyword_tag","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (jQuery('.article.main-content').length > 0){\n return (jQuery('meta[name=\"keywords\"]').attr('content') || \"\") || bouncex.utils.gtmLookup('content.tags','');\n }\n return \"\";\n}());","trigger":"pageload"},{"name":"reg_gate_url","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"reg_gate_suppression","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"hard_reg_wall_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.persistent-bottom:has(\".paywall-bar\") [class*=\"ExpandedCanvasContainer\"]').length > 0;","trigger":"pageload"},{"name":"user_bucket","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"localStorage.getItem('usr_bkt_eva') && Number(localStorage.getItem('usr_bkt_eva')) <= 50 ? 'User Bucket A' : 'User Bucket B';","trigger":"pageload"},{"name":"cm_sensitive","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.page_type === 'article' && !!bouncex.utils.getNestedProp('cns.pageContext.keywords.tags') && bouncex.utils.getNestedProp('cns.pageContext.keywords.tags').indexOf('_cm_sensitive') > -1;","trigger":"pageload"},{"name":"article_reporter","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('meta[property=\"article:author\"]').attr('content') || false;","trigger":"pageload"},{"name":"meter_bottom_bar_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.paywall-bar--expanded').length > 0;","trigger":"pageload"},{"name":"ecap_fired_pageview","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"journey_site_subscriber","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(() => {\n // Array/list of brand product names.\n // Manually update according to the brand.\n // If a brand has no product names, default to the brand name.\n const brandProductNames = [\"vanityfair\", \"vf\"];\n /**\n * Reads the CN Access token and checks if there is an active web product.\n * @param {string} cnAccessToken - CN Access Token.\n * @returns {boolean} - has the user an active web product for the brand.\n */\n function determineAccessEntitlement(cnAccessToken) {\n if (!cnAccessToken) return false;\n const decodedToken = JSON.parse(atob(cnAccessToken.split(\".\")[1]));\n const rgx = new RegExp(`(${brandProductNames.join(\"|\")})(:web|\\.com)`, \"i\");\n return Object.values(decodedToken.fct || {})\n .flat()\n .some((product) => product.match(rgx));\n }\n /**\n * Gets user entitlement and authentication status for a brand.\n * Wunderkind script to target user status in their campaigns.\n * @returns {object} - { isEntitled, isLoggedIn }\n */\n function getUserStatus() {\n let isEntitled = false;\n let isLoggedIn = false;\n try {\n const entitlementCookies = [\"pay_ent_sub\", \"pay_ent_pass\"];\n isLoggedIn = !!bouncex.utils.cookies.read(\"CN_token_id\");\n // legacy check\n isEntitled = entitlementCookies.some((cookie) =>\n bouncex.utils.cookies.read(cookie)\n );\n // access check\n if (!isEntitled) {\n const cnAccessToken = bouncex.utils.cookies.read(\"CN_access\");\n isEntitled = determineAccessEntitlement(cnAccessToken);\n }\n return {\n isEntitled,\n isLoggedIn,\n };\n } catch (error) {\n console.error(\"Wunderkind: failed getting user status.\", error);\n return { isEntitled, isLoggedIn };\n }\n }\n // read from these values\n const { isEntitled, isLoggedIn } = getUserStatus();\n\n return isLoggedIn && isEntitled;\n \n})();\n","trigger":"pageload"},{"name":"journey_logged_in_user","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(() => {\n // Array/list of brand product names.\n // Manually update according to the brand.\n // If a brand has no product names, default to the brand name.\n const brandProductNames = [\"vanityfair\", \"vf\"];\n /**\n * Reads the CN Access token and checks if there is an active web product.\n * @param {string} cnAccessToken - CN Access Token.\n * @returns {boolean} - has the user an active web product for the brand.\n */\n function determineAccessEntitlement(cnAccessToken) {\n if (!cnAccessToken) return false;\n const decodedToken = JSON.parse(atob(cnAccessToken.split(\".\")[1]));\n const rgx = new RegExp(`(${brandProductNames.join(\"|\")})(:web|\\.com)`, \"i\");\n return Object.values(decodedToken.fct || {})\n .flat()\n .some((product) => product.match(rgx));\n }\n /**\n * Gets user entitlement and authentication status for a brand.\n * Wunderkind script to target user status in their campaigns.\n * @returns {object} - { isEntitled, isLoggedIn }\n */\n function getUserStatus() {\n let isEntitled = false;\n let isLoggedIn = false;\n try {\n const entitlementCookies = [\"pay_ent_sub\", \"pay_ent_pass\"];\n isLoggedIn = !!bouncex.utils.cookies.read(\"CN_token_id\");\n // legacy check\n isEntitled = entitlementCookies.some((cookie) =>\n bouncex.utils.cookies.read(cookie)\n );\n // access check\n if (!isEntitled) {\n const cnAccessToken = bouncex.utils.cookies.read(\"CN_access\");\n isEntitled = determineAccessEntitlement(cnAccessToken);\n }\n return {\n isEntitled,\n isLoggedIn,\n };\n } catch (error) {\n console.error(\"Wunderkind: failed getting user status.\", error);\n return { isEntitled, isLoggedIn };\n }\n }\n // read from these values\n const { isEntitled, isLoggedIn } = getUserStatus();\n\n return isLoggedIn && !isEntitled;\n \n})();\n","trigger":"pageload"},{"name":"aiq_segment","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.cookies.read('CN_segments');","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":0,"mibcx":0,"te":0,"cart_rep":{"get":"","set":""},"ulpj":null,"cus":"","miw_exclude":"","enabled":0},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":true,"gamNetwork":"3379","spa":1,"spatm":0,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":false,"fme":false,"fmx":"","sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":1},"websdk":{"enabled":0},"ga4_property_id":"","ga4_measurement_id":""} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 0 }; bouncex.assets = {"ads":"0109586821763416266dd874f087ef69","creativesBaseStyles":"a53944a2","gam_3379":"//assets.bounceexchange.com/assets/gam/3379/3b369e45ae0017538cdc4d096dc92329.json","inbox":"749c9ccd613f1a40075d1e7b59caea42","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"0704dae1eb637cbeb4a847506058402d"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_6459738026535cda4232dc813c61447d.js'); runtime.setAttribute('async', 'async'); runtime.setAttribute('onload', 'bouncex.initializeTag()'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_f63930b37a25405c0fe14c50976210bb.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); bouncex.initializeTag = function() {}; }; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();