Reviewing Fairview, a Play That Almost Demands That I Not Do So
BySara Holdren,
a theater director and a critic at New York magazine and Vulture.
From Fairview, at Soho Rep.
Photo: Julieta Cervantes
“I thought you said race is a construct,” says a mocking, identifiably white male voice coming from the sound system at Soho Rep halfway through Jackie Sibblies Drury’s vehement, searching, fourth-wall-demolishing new play Fairview. “It is,” answers another voice, also identifiably white, this one measured, anxious, female: “Just because it’s a construct doesn’t mean that it isn’t real.”
The same could be said about theater. It’s a construct and it’s real, at once make-believe and flesh-and-blood. Questions of spectatorship quickly meld with questions of privilege and power: Who’s working and who’s watching? And 24 hours after seeing Fairview — which, under a playful surface, is strenuous and scalpel-sharp and working its way through deep rage — I’m just starting to pick apart the many knotty questions it left me with. I’m contemplating metatheatrics and responsibility, spectatorship and representation (which takes on a double meaning when we start to think about whose stories we’re used to hearing, what kinds of faces and bodies tend to take up the most space on stages or in the seats). And, most of all, I’m grappling with the question this play inherently asks of whether I (straight, white, cis) should be writing about it at all.
There is, after all, an ongoing debate in the theater world about who should be reviewing what plays. It’s an insoluble conversation, and not a new one, bound up as it is with the related, eternally returning question of who has a right to tell which stories. I navigate through its forbidding maze nightly: The paths shift with each journey. One attempt doesn’t necessarily illuminate the next. And in the case of Fairview, the maze is thornier than ever. Here is a play by a black playwright who depicts a black family, the Frasiers, whose onstage story is gradually overshadowed — then, with increasing violence, full-on commandeered — by a foursome of white spectators. A play in which a young black woman (her name is Keisha, she’s played with utter assurance by Mayaa Boateng, and she’s the one who ultimately brings this sinister appropriation, and the play, grinding to a halt) turns to a 30-something white woman (the sensitive Hannah Cabell) and says this:
Please, stop. I know what you’re going to say because … Because you have told me every story I have ever heard. And I … I need you to listen … I can’t hear myself think. I can’t hear anything but you staring at me … I can’t think in the face of you telling me who you think I am, with your loud self and your loud eyes and your loud guilt — I can’t hear myself think.
After Drury’s plea — through Boateng, through Keisha — for silence, for space, is every word I write a violation? I move forward in uncertainty. But I believe that, for all her play’s incisiveness, so does Drury, and that’s no slight. Fairview travels towards the unresolvable, morphing from neatly structured, stereotypical familiarity into rampant chaos and then into fractured, inquisitive aftermath. It begins by giving us something we think we’ve seen before, then estranges us from it and from ourselves as viewers of it, then cracks the whole thing open entirely and forces everyone in the room, actors and audience, to reckon with the broken pieces.
Like Branden Jacobs-Jenkins, whose wily and brilliant An Octoroon also began its life under Sarah Benson’s unsparing direction at Soho Rep, Drury is interested in examining race by examining performance. Her play We Are Proud to Present…, another Soho Rep premiere, is a rehearsal-room drama, an unsettling fly-on-the-wall view of an earnest young theater company’s attempts to create a play around the Namibian genocide. Perhaps fittingly for 2018, Fairview is at least as interested in TV and movies as it is in theater, and inside the heavy black frame around Mimi Lien’s spick-and-span, creepily beige living-room set — with its driftwood accents and mass-produced hotel-room-style watercolors — the play’s first third unfolds as if it’s an episode of any of a dozen well-known sitcoms, from The Jeffersons to Family Matters.
“The Frasier family is gearing up for Grandma’s birthday, and Beverly needs this dinner to be perfect,” beams the theater’s cagily anodyne marketing blurb. If you wandered in with only that to go on, you might spend 45 minutes thinking that you’re watching, as one of Drury’s characters says, “a good old family drama. A slice of life … Nothing big and flashy, just [a] real story about real people.” But this is a playwright who once swore that “under no circumstances” would her next play be “a family drama around a kitchen table,” and there are fizzles of unease throughout Fairview’s opening that hint at the breaking point to come. The Frasiers’ radio crackles occasionally, interrupting the relaxed, purposefully on-the-nose strains of Sly and Family Stone’s “Family Affair” with strange static and what may be garbled voices. The adults of the Frasier family — the bustling, do-it-all Beverly; her side-eyeing sister, Jasmine; and her cheery, my-job-is-to-keep-my-wife-calm husband, Dayton — all have that amped-up, uncanny feeling of falseness that sitcom actors have. They’re playing for a laugh track. Only Beverly’s daughter, the teenage Keisha, senses that something is off, and Drury gives us a glimpse of the hand she’ll eventually play when Keisha, delivering a hopeful soliloquy out through the fourth wall, suddenly falters: “Something is keeping me from what I could be,” she muses, “And that something. It thinks it has made me who I am. It’s … it’s just so confusing.”
But Keisha’s hesitation is only a blip in the bustle — a glitch in the matrix — and it’s not until a kitchen disaster causes Beverly to faint (the stakes in Fairview’s first movement are all, as with comfortable TV shows, both completely mundane and met with exaggerated panic and hilarity), that Drury changes the game. In the wake of Beverly’s upset, the Frasiers disappear. Benson takes her time over resetting the stage, a transition that’s accomplished in half-light by a crew of stagehands that all look like they took the L in from Bushwick: They’re young, they’re hip, and they’re all white. And as they move props around, the Dave Matthews Band is playing. The message is clear: The white people are coming.
At first, they’re only voices. Fairview runs a little less than two hours without an intermission, and that time is broken up into three acts, the second of which is a sly conceptual sucker punch: We watch the Frasiers go through all of Act One again, gesture by gesture, their beige living room now dimly lit and a recorded soundtrack of their dialogue playing at a barely audible volume as they lip-sync along — while a whole new cast of characters chatters loudly over the sound system, providing the old onstage action with a new score. The chatterers’ voices are recognizably white, and in the course of their blasé, cringe-inducing conversation (“No, but like, like if you could choose to be any race you want, any race at all … what race would you be?”), we realize that they too are watching the Frasiers.
“Like, she’s just so sure of herself,” says a male voice, probably gay, as Jasmine sips rosé and trades barbs (now muted) with Beverly in the shadows. “Like, black women are … fierce. I think there could be something really … empowering in being a black woman. Like, look at the way they talk to each other. There’s just so much attitude … I just love that.”
Fairview’s second act is a dexterous evisceration of a host of white stereotypes, which are also, of course, white realities: the well-meaning white woman who’s terrified of putting a foot wrong, the European who believes her continental sophistication and understanding of “class” put her above this American obsession with “race, race, race”, the gay man who thinks his flippant fabulosity (and his pointed use of the term “Latinx,” even as he affects an Antonio Banderas accent) absolves him of insensitivity, the straight dude who talks over everyone, who treats casual conversation as a method of domination. That one’s called Jimbo, and he’s got a manic, increasingly horrifying speech in which he envisions himself as the villain in the movie of the world, but “that’s fine, because you’re in my fucking movie motherfucker.” It’s a epic takedown of white-male narcissism by Drury — all the more powerful because we can’t see this toxic clown as he fulminates — and it feels like the nasty antidote to a speech I discussed at length here.
Drury is underlining both the ease and the power of spectatorship, in contrast to the burden of performance. Fairview’s black cast members literally have to go through the motions all over again in the play’s second act, while the white actors presumably get to sit somewhere comfortable and talk into a microphone. When Dayton enters with a cake for the family’s party, the unseen onlookers make terrible cakewalk jokes, and Drury drives her point home: Her play’s whole first act has been a cakewalk, a disturbing dance performed by black actors in full awareness of the layers of stereotype at play. Eventually, the white actors join them in the flesh in the play’s third act, most of them tromping excitedly into the Frasiers’ space like a parade of appropriative, domineering elephants. I won’t spoil the specifics here, but let’s just say that for them, this whole experience is a dress-up game — a construct — while for the Frasiers, even refracted as they are by a white lens, it’s life. It’s real.
That lens helps to give meaning to Drury’s layered title, which takes on a different resonance with each act. In Act One, one might interpret “Fairview” as the mundane name for a suburb or a street, perhaps the neighborhood where the Frasiers live. Act Two shows us that it is where they live, but in a much more sinister sense: The “fair view” is the white gaze, and they’re trapped inside it. And in Act Three, after the play’s climax leaves Keisha stepping through the shattered remnants of the fourth wall, Boateng delivers a speech — a long, hard speech, powered more by hesitancy than hope — in which the title’s “fair” finally comes to mean “just.” With the world that we’ve built and the racism we’ve poured into its foundations, will any of us, Drury asks, ever be able to look around us at a view that is, in the truest sense, fair?
These days, the prospects feel bleak. But the night I saw Fairview, Drury’s line of questioning was met not simply with remorseful attention but by an ardent answer. “No!” shouted a young black woman in the audience, just as Boateng finished asking the question, “Will they make space for us if I ask them to?” The lights were on. We looked at each other, all of us. The young woman was passionate, angry. “This is all fake,” she fumed, “They’d never make space in real life — none of this is real.” Before Boateng could take back the reins, another audience member spoke up, another black woman, older than the first and clearly disturbed: “Is this part of it?!” she cried, and a scatter of nervous laughter filled the theater. “Is this part of the play? Because … I find this divisive! I don’t like this … I … I think it’s condescending — to white people and to black people!”
I honestly don’t know how Boateng regained the room. But somehow, eventually and with superlative grace, she did. She finished her speech. The show ended. We went home.
But for a moment, there was danger in that tiny theater. The bundled fuses of Drury’s play were set alight in ways no script or rehearsal process could ever fully predict. In a play that asks for its audience’s active involvement the way that Fairview does, no two performances will ever be the same, but what happened the night I saw it was remarkable — rare and intimidating, unresolved and raw. It left me with the blood pounding in my ears, feeling like a witness to something unwieldy, uncertain of how to proceed.
That’s why this review — if you can call it that — has taken an unconventional form. I could tell you more about the actors, who are uniformly excellent and in step with Drury and Benson’s heightened, demanding vision, but even as I write the word “excellent,” I think, Here it is. Your assessment. Your “fair view” of these performers. That view is my job, and it’s also on trial in Drury’s play. Thinking back now, I don’t see the energetic, fussy supermom, Beverly; instead I see Heather Alicia Simms’s face in the moments after the fourth wall comes down. Her mask is gone. Her shoulders slump a little as Boateng speaks to us, and her eyes look blank, drained. She’s exhausted. And she’s watching us now.
“You,” Boateng said, reaching out her hand to a person of color in the audience, a young man in the front row. “I’ve been trying to talk to You. This whole time. Have you heard me?” (My night, this chosen audience member nodded raptly, Yes.) “Do I have to keep talking to the white people?” Boateng asked, seriously and not unkindly, “Do I have to keep talking to them, and keep talking to them, and keep talking only to them, only to them, only to them, until I have used up every word? … Do I have to tell them that I want them to make space for us for them to make space for us? Do I really have to tell them that?”
One of Fairview’s rigorous twists is that Drury is also putting herself on trial: Do I have to keep talking to the white people? rings out as a question from the playwright to herself. It may well be the thought on the minds of myriad playwrights of color, writing as they are in a country where year after year, statistics about audience demographics skew overwhelmingly pale. The question — and the play it lives inside — hurts. Like Fairview as a whole, it’s a painful interrogation without an easy answer. But there is a difficult, gentle quiet in “I don’t know.”
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,"12":12,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(3),auth=require(12),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(136),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 o=t.querySelector(".dropdown");!n||t.contains(e.target)&&27!==e.keyCode||o.classList.remove("open")})}function gtmSendReport(e,n,t){let o={eventCategory:"ecommerce",eventAction:"componentClick",brand:e,dimension23:"global-nav",list:pageUri,pageZone:"header",variant:"nav-link"};"global-nav-link"===t&&(o.eventLabel=n.href),gtm.reportNow(o)}function updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const o=t.split("?"),i=new URLSearchParams(o[1]);for(let e of n.entries())i.set(e[0],e[1]);t=`${o[0]}?${i.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()&&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,"3":3,"12":12,"124":124,"136":136}];
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","aaa-module-mounting.legacy":"aaa-module-mounting.legacy","ads.legacy":"ads.legacy","facebook.legacy":"facebook.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();
// ]]