“Ahhh, I need to take up space. I need to take up space. I am here,” says Alexandria Ocasio-Cortez, waving her arms and talking to herself in her New York City apartment.
A huge cardboard box she hasn’t yet recycled is wedged behind her couch. Multiple coffee mugs litter her table, as does a clipboard of talking points she’s highlighting for a debate that night on NY1’s Inside City Hall, against Joseph Crowley, the fourth most powerful Democrat in Congress. She’s challenging him in a primary in New York’s 14th Congressional District, despite having negligible campaign funds and zero name recognition. She’s just a bartender at a Union Square taqueria.
It’s June 2018, and even the future youngest congresswoman in history needs some ritual confidence building. At that point, no one, not even AOC — who was 35 points down two weeks before the election, according to the only poll her campaign could afford to conduct — could have known she’d actually win. And yet there was a camera in her apartment, documenting every intimate moment of an effort seemingly destined to fail.
Two years before Ocasio-Cortez became the main target of GOP wrath, documentary filmmaker Rachel Lears had decided to follow her as one of four everyday, progressive women running for Congress in the wake of the Trump presidency. Lears, too, was operating on hope and paltry funding, until later that June, when Ocasio-Cortez’s race turned out the way no one could have expected. Suddenly, Lears found herself sitting on some of the most serendipitously important footage of our political age — of a newly minted superstar in the process of becoming a superstar. Lears rushed the film to completion, eager to capitalize on AOC’s momentum and meet the autumn submission deadline for Park City’s prestigious Sundance Film Festival. Lears’s film, Knock Down the House, sold to Netflix for $10 million this January, in the largest documentary sale the festival’s ever seen.
Back to that room: AOC flops around and makes big circles with her hands. “What’s that?” laughs an offscreen voice. It belongs to Ocasio-Cortez’s partner, tech designer Riley Roberts, who’s tall, red of beard, and sitting at the only desk it seems their apartment can fit. “I don’t know,” says Ocasio-Cortez. “That’s me taking up space.” She waves her highlighter around like a gavel and predicts just how condescending Crowley will be, now that he’s finally started showing up to their debates. (Earlier in the race, he’d sent a Latina woman from his team to debate for him by proxy.)
“He’s going to tell me I can’t do this. He’s going to tell me that I’m small, that I’m little, that I’m young, that I’m inexperienced,” she tells Roberts, who’s surely heard this before. Then she throws her arms out in front of her, shooting out imaginary laser beams. Her words from the very beginning of the scene linger: “I am debating on behalf of the movement tonight. This is not about electing me to Congress. This is about electing us to Congress.”
AOC isn’t the only candidate featured in Lears’s film, but she gets the majority of the screen time. Knock Down the House is an intimate, myth-busting look at the woman behind the viral Twitter feed. To watch itis to marvel at the luck and instinct that brought Lears’s cameras — formerly positioned on two young Uruguayan songwriters for 2009’s Birds of Passage and undocumented restaurant workers fighting for better conditions for 2014’s The Hand That Feeds — inside Ocasio-Cortez’s home and workplace before any other media outlet was paying attention.
“I certainly didn’t have a crystal ball,” Lears told Vulture in the weeks before her film debuted on Netflix. “I didn’t have this premonition that, you know, this person is the one that wins and becomes a superstar a year and a half from now.”
Lears’s husband and the film’s editor, Robin Blotnick, says he was skeptical at the onset. “I would say it was definitely clear that she was going to be a star,” says Blotnick of Ocasio-Cortez, “but I really thought she was the kind of candidate who was going to lose her first race and then go on to great things down the road. When she won, it surprised me, just like it did the whole nation.”
That serendipity is what makes Knock Down the House so compelling, even if we know the outcome. After Ocasio-Cortez’s victory, Lears and Blotnick still had to wait until the very last primary they were covering came to a close in August 2018 before a complete vision for their documentary came into focus, with its climactic finale of Ocasio-Cortez in tears in front of the U.S. Capitol in Washington, D.C.It’s the rare political documentary where viewers get to watch someone step into her persona, as opposed to more recent, hagiographical entries on Ruth Bader Ginsburg and Beto O’Rourke that reinforce what we already understand. This is a film about becoming, centered on a woman whose every move — even now, as the film is coming out — is a certain headline.
The film’s emotional impact wasn’t just a matter of luck, though. Lears was seeking a particular kind of candidate for her documentary from the start: women with deeply personal reasons for running for office, who were clearly hell-bent on challenging the status quo. She had just given birth to her son Max when she first heard of Brand New Congress and Justice Democrats, grassroots organizations that were recruiting outsider candidates for Congress to challenge established politicians and refuse to take corporate funds. Both groups had put out a call and got some 10,000 submissions; Ocasio-Cortez’s brother nominated her. As the organizations vetted candidates, they agreed to send compelling stories to Lears, who had dozens of video calls with potential characters before settling on the four she profiled in Knock Down the House. “We were looking for people who would be the most interesting to watch no matter what happened with the outcome of the election,” says Lears, “because all of these races were considered long shots.”
Lears met Ocasio-Cortez in the spring of 2017, not long after AOC attended the December protest at Standing Rock that famously radicalized her into action. Soon after emerged Cori Bush, a registered nurse and ordained pastor running in the same St. Louis, Missouri, district where a white cop had killed Michael Brown. Later, Lears found her way to Paula Jean Swearingen, a coal miner’s daughter in West Virginia who had seen firsthand how pollutants had given her friends and family black lung disease and cancer; and to Amy Vilela in Las Vegas, Nevada, who was advocating for universal health care after her 22-year-old daughter, Shalynne, died after she was forced to leave an emergency room when she couldn’t produce proof of insurance.
“All four of these women had really personal experiences of loss and hardship and injustice that motivated them to take this step of running an insurgent congressional campaign, which is really not an easy thing to do,” says Lears. All agreed to be filmed; it was another act of service, to demystify the political process. “I think they saw the value of sharing the story of what it looks like for ordinary people to run for Congress,” Lears adds. “And also the very things that motivated them to run were things that they wanted to share as widely as possible.”
Alexandria Ocasio-Cortez in Knock Down the House.
Photo: Photo: Netflix
While Bush, Swearingen, and Vilela were running in districts spread out across the country, Ocasio-Cortez just happened to be campaigning in New York City, where Lears and Blotnick live. Because of that physical proximity, they could easily shoot the early stages of AOC’s journey, in between their own freelance jobs and caring for their baby — well before they’d gotten external funding from grants and a Kickstarter campaign, let alone millions of distribution dollars. As a result, Ocasio-Cortez became the film’s de facto star.
Throughout the footage the couple accrued thereafter, we don’t just hear Ocasio-Cortez talk about the 18-hour shifts she worked to help her family avoid foreclosure on their home after her father died during the financial crisis; we see video evidence of her doing just that. We see her at the very meeting where she decides to run for office. At an early campaign event in Queens, a man asks her whether it’s worth it for the community to lose a powerful representative who’s vying for Speaker of the House in order to vote for an upstart who’s more in their corner. Ocasio-Cortez responds quickly and forcefully: “I think we have to look at what that power does now. When it matters, he doesn’t stand up for us. When it matters, he doesn’t advocate for our interests. We have to have the courage to say we can do better. We can do better. It’s not going to be a loss.”
We see her knocking on doors, and getting shut down knocking on doors. We see her collect 10,000 signatures to get on the ballot, when she only needs 1,500, because she’s worried that the board of elections, appointed by her powerful opponent, will find excuses to reject most of them. We see home videos, provided by her mom and brother, showing her childhood in the Bronx and then in Yorktown, 30 minutes north, where she says her family moved with the help of donations from her entire extended Puerto Rican family, because the dropout rate at public schools where she lived was astronomically high. Her mom, she says, cleaned houses in exchange for SAT lessons for her kids.
We even get a rare glimpse of her home life with Roberts, whom she met when they were both at Boston University. (They’re notoriously private.) The tall redhead is a tech professional who helped with the campaign’s social media strategy, and is a constant presence throughout the film. He’s there, proudly filming her as she submits her ballot petition; and there, confessing that he ate the entire pint of Ben & Jerry’s AmeriCone Dream they just bought (“You’re so unrepentant,” Ocasio-Cortez gripes, laughing); and there for a long hug as they both weep after casting their ballots in the primary.
Crowley didn’t respond to Lears’s many interview requests, but he does appear in her documentary by way of public events and TV appearances. We learn that he hadn’t had a primary challenger in 14 years, but that he took in $3 million per cycle “from Wall Street, real estate, and pharmaceutical corporations,” Ocasio-Cortez says. We see him valiantly correcting a constituent he runs into at a Pride parade who calls AOC “that stupid woman.” (“She’s not stupid, but thank you,” says Crowley.) We see the debate in the Bronx that he doesn’t bother to attend, and we see his tactic of politely belittling his opponent in the debates that he does. (“Miss Ocasio-Cortez, I think you’ve brought a lot of energy, and for someone who’s not as experienced in public life or public service, I think you’re doing a great job of that.”)
Once the grant money Lears had applied for started to come through, along with donations from a Kickstarter campaign that raised over $28,000, Lears and Blotnick were able to selectively shoot their other candidates, following Bush, Swearingen, and Vilela for two full weeks before their respective primaries — the last of which wrapped in August 2018. In the end, all three lost. “We would travel around the country with our little kid, who was 8 months old when the project started, and is 3 now,” says Lears.
“My main job,” says Blotnick, “was to travel with Rachel and our little son, Max, and watch him while she was shooting.” He’d edit in whatever little bursts of free time he could find. “A lot of the best scenes in the film,” he says, “were edited in a makeshift setup at an Airbnb during Max’s lengthy afternoon naps in places like Las Vegas and St. Louis.”
Even after Ocasio-Cortez won and the film’s appeal among distributors grew, Lears and Blotnick didn’t waiver. The logical move might have been to change the focus of the documentary entirely, but Lears says she “never considered just making a film about one person. It was the national scope of this movement that was my initial interest in it.” The filmmakers saw each candidate’s story of loss as crucial to highlighting AOC’s achievement. “We really needed the other three races to show just how broad this movement was,” says Blotnick, “how common the problems are across different kinds of communities, how similar the process of taking on the political machine or the political Establishment is no matter where you are in the country.”
“In the end, I think it’s very powerful to have one win and three losses to really underscore how difficult it is to run this type of campaign,” Lears says.
Today, Lears and her crew are the only people with footage of Ocasio-Cortez inside the car as she approaches her watch party on Election Night. Due to some strategic planning, they had two cameras at two different angles filming the iconic moment when AOC’s reaction to her surprise win made her an instant meme.
“The moment that she won the primary is a moment that I won’t ever forget,” says Blotnick. “I was not there, and that’s something I’ll always kind of be annoyed about. I was at home putting Max to bed, and I’m trying quickly to get him to go to sleep so I could check the internet.” Blotnick knew they’d struck gold when an NPR alert came onto his phone saying the fourth most powerful Democrat in Congress had been defeated by an insurgent outsider. The alert didn’t mention Ocasio-Cortez’s name. “I just remember the realization hitting me that we had documented history at a national and maybe international level of interest. And our whole life was about to change.”
Netflix is betting big on the movie, giving it a theatrical run for awards consideration. The couple is grateful that the film looks like it has a commercial future, but as Blotnick affirms over and over, they had zero expectation that anything would turn out this way. “We were totally ready to do the story if all four of them had lost,” he says. “We had a whole plan. It was going to be gritty and dark, and we were going to tell it like it is and show how powerful the political Establishment is.”Instead, the film ends on a high note: Lears followed Ocasio-Cortez to D.C. to speak on Meet the Press and orchestrated a moment for the not-yet-inaugurated representative and Roberts to visit the steps of the Capitol. Lears couldn’t have predicted how emotional Ocasio-Cortez would get. It’s an image that, after weeks of relentless editing, would become Knock Down the House’s final shot.
Still, the story they wanted to tell was never one of a single fairy-tale victory, but of four women representing a movement together. There’s a beautiful scene in the film, after Amy Vilela’s loss in Nevada, when AOC tells her as much on the phone. “It’s just the reality,” she says, “that in order for one of us to make it through, 100 of us have to try.”
By submitting your email, you agree to our
Terms and Privacy Notice
and to receive email correspondence from us. This site is protected by reCAPTCHA and the Google
Privacy Policy and
Terms of Service apply.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
Already a subscriber?
Already a subscriber?
`;
// integrate Sub(x) scripts and elements
if (hostname !== 'subs.nymag.com') { // do not integrate on this subdomain
document.head.appendChild(trackingScript);
document.body.insertAdjacentHTML('beforeend', subXAnimationElements);
}
There was an error processing the request. Please try again later."}).catch(e=>console.error("Error verifying email: ",e)))(r.querySelector(".content"),o.bannerCTAVerification)})):(l.remove(),s.remove()),o.dismissable||n.remove(),o.useAlertIcon||a.remove(),r.classList.add("show"),n.addEventListener("click",()=>{u(),r.classList.remove("show")})}else r.remove()}});
}, {"1":1,"6":6,"17":17,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(4),auth=require(17),signInButton=dom.find(".user-signin"),signOutButton=dom.find(".user-signout"),globalNav=dom.find('[class^="global-nav"]'),body=dom.find("body"),dropdownItems=dom.findAll(".dropdown-wrap"),gtm=require(1),appendLandingPageParams=require(135),pageUri=require(124).getPageUri(),subscriptionPromoLinks=dom.findAll(".persist-params"),searchString=window.location.search||"";function closeDropdowns(e){let n=globalNav.querySelectorAll(".dropdown.open");dropdownItems.forEach(function(t){let i=t.querySelector(".dropdown");!n||t.contains(e.target)&&27!==e.keyCode||i.classList.remove("open")})}function gtmSendReport(e,n,t){let i={eventCategory:"ecommerce",eventAction:"componentClick",brand:e,dimension23:"global-nav",list:pageUri,pageZone:"header",variant:"nav-link"};"global-nav-link"===t&&(i.eventLabel=n.href),gtm.reportNow(i)}function updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const i=t.split("?"),o=new URLSearchParams(i[1]);for(let e of n.entries())o.set(e[0],e[1]);t=`${i[0]}?${o.toString()}`,e.href=t}else e.href=`${t}?${n.toString()}`}}function init(e){const n=e.querySelectorAll(".to-landing-page");window.addEventListener("auth:init",()=>{signInButton.addEventListener("click",function(e){e.preventDefault(),auth.showEmbeddedLoginFlow("top navigation")}),signOutButton.addEventListener("click",function(e){e.preventDefault(),gtmSendReport("Sign Out",e.target,"user-info-link"),auth.logout()}),auth.isAuthenticated()&&e.classList.add("signed-in"),(auth.isSubscriber()||auth.isMobileAppRequest())&&e.classList.add("subscribed"),e.querySelectorAll(".user-link").forEach(e=>{e.classList.add("active")}),subscriptionPromoLinks.forEach(e=>{updateElementTargetUrlsIfQueryStrings(e)}),appendLandingPageParams(n)})}dropdownItems.forEach(function(e){e.addEventListener("click",function(){e.querySelector(".dropdown").classList.toggle("open")})}),body.addEventListener("click",closeDropdowns),document.addEventListener("keydown",closeDropdowns),globalNav.addEventListener("click",function(e){let n=e.target;n.classList.contains("global-nav-track")&>mSendReport(n.text,n,"global-nav-link")}),module.exports=init;
}, {"1":1,"4":4,"17":17,"124":124,"135":135}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(408),Fingerprint2=require(407),DS=require(406),Eventify=require(246);function registerGlobals(){window.DS=DS,window.Eventify=Eventify,window.Fingerprint2=Fingerprint2,DS.value("Eventify",Eventify),DS.value("Fingerprint2",Fingerprint2),DS.value("$document",window.document),DS.value("$window",window)}function mountDollarSliceComponents(){DS.service("components",["$document","$module",function(e,n){var o=_pickBy(n.definitions,e=>e.providerStrategy===n.providers.controller),r=Object.keys(o);function t(e){return o=>{try{n.get(e,o)}catch(e){logMountError(o,e)}}}_each(r,n=>{var o=e.querySelectorAll('[data-uri*="/_components/'+n+'/"]'),r=e.querySelectorAll('[data-uri$="/_components/'+n+'"]');_each(o,t(n)),_each(r,t(n))}),this.components=r}]),DS.get("components")}function logMountError(e,n){const o=e.outerHTML.slice(0,e.outerHTML.indexOf(e.innerHTML));console.error("Error attaching controller to "+o,n)}registerGlobals(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{mountDollarSliceComponents()}):mountDollarSliceComponents();
}, {"221":221,"246":246,"406":406,"407":407,"408":408}];
window.modules["ads.legacy"] = [function(require,module,exports){"use strict";const _map=require(118),_forEach=require(107),_isString=require(268),_intersectionWith=require(409),_isEqual=require(274),_each=require(408),_debounce=require(182),_sortBy=require(205),page=require(124),visit=require(114);DS.service("adService",["Eventify","$cid","$document","$window",function(e,t,a,i){var o,n,s,r,d,c,u,l,g={},p=this,h=[],f=visit.getQueryParamsObject(["utm_campaign"]),m=document.querySelector('script[data-type="ad-a9"]'),b=[],w=!1,v=[],y=document.querySelector('script[data-name="ad-doubleverify"]');document.querySelector('script[data-name="concert-ads"]')||(i.NYM={},i.NYM.analytics={},i.NYM.analytics.adStartTime=i.performance.now(),i.googletag=i.googletag||{},i.googletag.cmd=i.googletag.cmd||[],u=i.googletag,(m||y)&&(i.googletag.cmd=i.googletag.cmd||[],i.googletag.cmd.push(function(){i.googletag.pubads().disableInitialLoad()})),m&&(l=i.setInterval(function(){void 0!==window.apstag&&void 0!==window.apstag.timeout&&(i.clearInterval(l),window.apstag.cleared=!0,l=null)},10),setTimeout(function(){l&&(i.clearInterval(l),i.googletag.pubads().refresh(),window.apstag||console.log("MESSAGE: Timeout for A9 load exceeded, aborting"))},500)),y&&(b.push(new Promise(function(e){w?e():v.push(e)})),c=i.setTimeout(T,2500)),o=function(e){var t,a,o=e.data,n=[];return o.loaded?e:(o.loaded=!0,t=null,(t=o.sizes?u.defineSlot(o.name,o.sizes,o.id).addService(u.pubads()):u.defineOutOfPageSlot(o.name,o.id).addService(u.pubads())).setTargeting("adid",o.id),f.hasOwnProperty("utm_campaign")&&t.setTargeting("utmcamp",f.utm_campaign),a=p.getAdCount(o.label),t.setTargeting("label",o.label+"_"+o.site+"-"+a),u.display(o.id),u.pubads().addEventListener("slotOnload",function(){i.NYM.analytics.firstAdLoadTime||(i.NYM.analytics.firstAdLoadTime=i.performance.now(),i.NYM.analytics.firstAdLoadLabel=e.data.label)}),n=_(o),Promise.all(b).then(function(){n?window.apstag&&window.apstag.cleared?window.apstag.fetchBids({slots:[n],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([t],{changeCorrelator:!1})})}):y&&u.pubads().refresh([t],{changeCorrelator:!1}):u.pubads().refresh([t],{changeCorrelator:!1})}),e.slot=t,e)},n=function(e){var a,i,o,n=t(),s=e.getAttribute("data-name"),r=e.getAttribute("data-sizes"),d=e.getAttribute("data-label"),c=e.getAttribute("data-site");n=e.id,r&&r.length?(r=r.split(","),a=[],_map(r,function(e){e=e.split("x"),i=parseInt(e[0]),o=parseInt(e[1]),a.push([i,o])})):(e.classList.add("oop"),a=!1),this.data={id:n,name:s,sizes:a,loaded:!1,label:d,site:c},g[n]=this},r=function(e){u.cmd.push(function(){var t=o(e);g[e.data.id]=t})},s=function(e){var t=[];e.slot?(t=_(e))&&window.apstag&&window.apstag.cleared&&window.apstag.fetchBids({slots:[t],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([e.slot],{changeCorrelator:!1})})}):e&&r(e)},u.cmd.push(function(){var e,t,o,n=page.getMeta("article:tag"),s=page.getMeta("author"),r=i.location.href,d=(e=a.head.querySelector(".head-gtm"),t=a.body.querySelector(".gtm"),e&&"top"===e.getAttribute("data-gtm")?"gtmtop":t&&"bottom"===t.getAttribute("data-gtm")?"gtmbottom":"");o=[],_forEach([n,s,d],function(e){_forEach(e.split(","),function(e){(e=e.trim().toLowerCase().replace(/\s/g,"-").replace(/\'|\’/g,"")).length&&o.push(e)})}),u.pubads().setTargeting("kw",o),u.pubads().setTargeting("entry_group",o),r=r.slice(r.lastIndexOf("/")+1),u.pubads().setTargeting("pn",r),u.companionAds().setRefreshUnfilledSlots(!0),u.pubads().enableAsyncRendering(),u.enableServices()}),this.load=r,this.create=function(e){return new n(e)},this.refresh=function(e){var t;_isString(e)?(t=this.getById(e),s(t)):s(e)},this.remove=function(e){var t=e.data.id;a.getElementById(t).innerHTML=""},this.getAdCount=function(e){var t,a=0,i=Object.keys(g);return _each(i,function(i){(t=g[i]).data.loaded&&t.data.label===e&&a++}),a},this.getById=function(e){return g[e]},d=_debounce(function(){var e={TopLeaderboard:1,RightColTopMPU:2,outOfPage:99,"homepageTakeover/TopLeaderboard":1},t=_sortBy(h,function(t){return e[t.data.label]||10});_forEach(t,function(e){return e.data.sizes?r(e):i.setTimeout(function(){r(e)},2e3)}),y&&window.PQ.cmd.push(()=>{try{window.PQ.loadSignals(["ids","bsc","vlp"],T)}catch(e){T(),console.error(`There has been an error loading Double Verify signals: ${e}`)}}),h=[]},10),this.addToPageLoadQueue=function(e){h.push(e),d()});function _(e){var t,a=e.sizes;return a=_intersectionWith(a,[[970,250],[970,90],[728,90],[300,600],[300,250],[320,100],[320,50]],_isEqual),e.sizes&&e.sizes.length&&(t={slotID:e.id,sizes:a,slotName:e.label}),t}function T(){i.clearTimeout(c),w=!0,_forEach(v,function(e){e()})}}]);
}, {"107":107,"114":114,"118":118,"124":124,"182":182,"205":205,"268":268,"274":274,"408":408,"409":409}];
window.modules["cid.legacy"] = [function(require,module,exports){"use strict";DS.service("$cid",function(){var r=Math.floor(100*Math.random());return function(){return"cid-"+ ++r}});
}, {}];
window.modules["client.legacy"] = [function(require,module,exports){"use strict";require("cid.legacy"),require("ads.legacy"),require("facebook.legacy"),require("aaa-module-mounting.legacy");
}, {"cid.legacy":"cid.legacy","ads.legacy":"ads.legacy","facebook.legacy":"facebook.legacy","aaa-module-mounting.legacy":"aaa-module-mounting.legacy"}];
window.modules["facebook.legacy"] = [function(require,module,exports){"use strict";DS.service("facebook",[function(){this.fb=function(i){window.FB&&window.FB[i].apply(this,Array.prototype.slice.call(arguments,1))}}]);
}, {}];
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o typeof key === 'string' && key.match(/\.legacy$/)).forEach(key => window.require(key));
}
function tryToMount(fn, el, name) {
try {
fn(el); // init the controller
} catch (e) {
const elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML));
console.error(`Error initializing controller for "${name}" on "${elementTag}"`, e);
}
}
/**
* mount client.js component controllers
*/
function mountComponentModules() {
Object.keys(window.modules).filter(key => typeof key === 'string' && key.match(/\.client$/)).forEach(key => {
let controllerFn = window.require(key);
if (typeof controllerFn === 'function') {
const name = key.replace('.client', ''),
instancesSelector = `[data-uri*="_components/${name}/"]`,
defaultSelector = `[data-uri$="_components${name}"]`,
instances = document.querySelectorAll(instancesSelector),
defaults = document.querySelectorAll(defaultSelector);
for (let el of instances) {
tryToMount(controllerFn, el, name);
}
for (let el of defaults) {
tryToMount(controllerFn, el, name);
}
}
});
}
// Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies,
// services, or components that could require it
// note: the `` value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js
window.process = window.process || {};
window.process.env = window.process.env || {};
if (!window.process.env.NODE_ENV) {
window.process.env.NODE_ENV = '';
}
// note: legacy controllers that require legacy services (e.g. dollar-slice) must
// wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first
mountLegacyServices();
mountComponentModules();
// ]]